Re: [PATCH] use select for GART_IOMMU to enable AGP

From: Roman Zippel
Date: Fri Mar 24 2006 - 08:47:06 EST


Hi,

On Fri, 24 Mar 2006, Andi Kleen wrote:

> > I don't see how this is/was possible, if GART_IOMMU was enabled so was AGP
> > (and AGP_AMD64). That hasn't changed with the patch.
>
> That was/is a bug that was originally introduced in the 2.4->2.6 Kconfig conversion.
> The code was designed to handle it and did in 2.4.

It's debatable whether it's really a bug in the conversion.

2.4 does this:

if [ "$CONFIG_GART_IOMMU" = "y" ]; then
bool '/dev/agpgart (AGP Support)' CONFIG_AGP
else
tristate '/dev/agpgart (AGP Support)' CONFIG_AGP
fi

Dynamically changing the symbol type isn't supported anymore and it works
in 2.4 only by accident (e.g. it breaks the old xconfig).

If we really want to do something like this we had to introduce two
different symbols. Something like:

config GART_IOMMU
....

config AGP_BOOL
bool "builtin AGP support"
depends on GART_IOMMU
select AGP
select AGP_AMD64
help
Our IOMMU code sucks. :-)

We could also just remove the select/default and add a comment after
AGP_AMD64 depending on "AGP && GART_IOMMU && AGP_AMD64=m" saying that this
configuration disables IOMMU support for it and be done with it.
Another alternative is to fix the code to reinitialize the iommu stuff
when agp module is loaded.

bye, Roman
-
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/