On Thu, 2016-01-09 at 12:56:42 UTC, Mauricio Faria de Oliveira wrote:
> This patch introduces the 'iommu_alloc_quiet=driver_name' parameter
> to suppress the 'iommu_alloc failures' messages for that one driver.
> This is an additional approach for this 'problem' of flooding logs,
> not as fine-grained and not enabled by default as DMA_ATTR_NO_WARN,
> but it has the advantage that it doesn't introduce any ABI changes.
> That is important/requirement for the distribution kernels - where
> the DMA_ATTR_NO_WARN changes to 'enum dma_attr' are not acceptable
> because it breaks the kernel ABI.

Adding an entry to an enum does not break the ABI.

In fact AFAIK the enum doesn't exist in the ABI, at the binary level an enum
just becomes an int (possibly excluding debug info).

Removing an entry from an enum would break the API (Note _P_). But I don't see
how adding one does.

Also kernel command line parameters are really poor in terms of usability. Folks
really don't want to have to change their kernel command line.

If we really need a hack for distros then I'd suggest we add a global struct
driver * in the powerpc iommu code, and then when nvme loads it sets that to
point at itself, and then the check becomes:

                if (dma_handle == DMA_ERROR_CODE) {
                        if (dev->driver == ppc_no_iommu_warn_driver && 
printk_ratelimit()) {
                                dev_info(dev, "iommu_alloc failed, tbl %p vaddr 
%p npages %d\n", tbl, vaddr, npages);


Reply via email to