Re: [RESEND][PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig
From: Russell King - ARM Linux
Date: Mon Mar 24 2014 - 06:46:03 EST
On Sat, Mar 22, 2014 at 03:59:11PM -0700, James Bottomley wrote:
> On Sat, 2014-03-22 at 22:52 +0000, Russell King - ARM Linux wrote:
> > And I'm disagreeing with that statement which implies that it's something
> > that is an architecture wide property for any particular architecture.
> >
> > Right now in mainline, if ARM has IOMMU support enabled, then SG_CHAIN
> > support will also be enabled. I've a patch out of tree which I've been
> > using for years which enables SG_CHAIN for a particular SoC (Dove).
> > Otherwise, it doesn't have support for SG_CHAIN.
> >
> > PARISC on the other hand (as you list) has no support to enable SG_CHAIN
> > under any circumstances.
> >
> > Where we're disagreeing is whether this is something that is always-on or
> > always-off for any particular architecture.
>
> Actually, I don't disagree with that. PA used to share sb_iommu with
> ia64 (it's the same chipset for the HP versions), but we can't now
> because ia64 is chained and we're not and there's no way to say chained
> for this platform but not for these other more legacy ones. If you have
> a proposal for this, I'd be interested, so I don't have to do an all or
> nothing conversion, but the config option isn't it because our platform
> configuration is runtime determined (we usually select every driver and
> let the actual one be chosen at runtime from the config table).
At runtime, it's obviously a lot harder to resolve. However, that's not
what we're trying to do with this patch.
The main issue is that Laura is trying to add SG chain support to ARM64.
At the moment, ARM64 uses the asm-generic version of scatterlist.h
directly.
Her first spin of the patch involved creating
arch/arm64/include/asm/scatterlist.h, which was nothing more than an
include of the asm-generic header file of the same name, and the
definition of ARCH_HAS_SG_CHAIN. That seemed to be extremely wasteful
and sub-optimal way to handle this.
Moving this symbol into the Kconfig means that ARM64 no longer has to
have this additional file (and probably a bunch of other architectures
fall into that same camp) and the ARM specific CONFIG_ARM_HAS_SG_CHAIN
can be eliminated in favour of the now generic cross-arch config symbol.
We have plenty of other Kconfig symbols which control similar features
throughout the kernel source, there is no reason that this one should
not be the same.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
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/