Re: Modularizing IOMMUs (devel/iommu-0.4)
From: Konrad Rzeszutek Wilk
Date: Fri Oct 22 2010 - 09:55:51 EST
On Fri, Oct 22, 2010 at 08:52:41AM +0100, Jan Beulich wrote:
> >>> On 20.10.10 at 22:20, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> > Another way, less elegant was to manually enforce each function to be stuck
> > in the .iommu_text section. For that I made a macro: __iommu that would
> > force the function to be stuck in section specific for the IOMMU. So all
> > functions in pci-gart_64.c would be funneled in .iommu.gart.text. For
> > calgary:
> > .iommu.calgary.text., and so on. This is accomplished by having at the
> > beginning
> > of the the file the name of the IOMMU section, as so:
> >
> > #define IOMMU_MODULE "gart"
> >
> > And all of the functions would get stuck in .iommu.gart.text.
>
> For this particular approach - did you consider using objcopy's
> --rename-section option?
<goes off to look at that>
>
> > And then Question #3): Is there a better way?
>
> Generally I like hpa's suggestion of using pre-loaded but unloadable
> modules much better, not the least because in the past I had seen
> potential uses for such a mechanism in other places of the kernel.
<nods> It does sound like the right option. 12 years ago it was suggested,
so.. how come nobody worked on it in the past? Were there some epic battles?
--
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/