Re: [PATCH 08/10] iommu/omap: Use bus_set_iommu instead of register_iommu

From: Ohad Ben-Cohen
Date: Mon Sep 26 2011 - 03:10:24 EST


On Fri, Sep 23, 2011 at 6:45 PM, Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
> -       register_iommu(&omap_iommu_ops);
> +       bus_set_iommu(&platform_bus_type, &omap_iommu_ops);

I'm not sure it makes a lot of sense to bind the iommu ops to the platform bus.

Unlike the pci bus, the platform bus is not really a hardware bus:
it's some kind of a catch-all pseudo bus which is mostly used to to
describe a collection of autonomous peripherals on an SoC.

As a result, IOMMU users on an SoC might actually not belong to the
platform bus.

More specifically, I'm not sure how this would work out with the
upcoming generic IOMMU-based DMA API, which might be used by those
non-platform-bus users.

That said, the generic DMA API is not here yet, and nothing
immediately breaks for us by doing this change, so if this helps you
guys with the x86/pci iommu drivers than I'm ok with it: we can always
change/fix this later when real issues come up with this model.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/