Building for MMU-less vexpress targets
Hi guys,
I was playing around with !CONFIG_MMU today and to my dismay noticed that you can't select ARCH_VEXPRESS without CONFIG_MMU=y! This is because ARCH_VEXPRESS is only selectable via ARCH_MULTI_V7, which depends on ARCH_MULTIPLATFORM which in turn depends on MMU.
I'm inclined to add a dummy VEXPRESS entry to arm/Kconfig which depends on !ARCH_MULTIPLATFORM and just selects ARCH_VEXPRESS (with the if ARCH_MULTI_V7 dependency dropped) but I wondered if you'd got any better ideas?
Cheers,
Will
Quoted 3 lines · Will Deacon
I'm inclined to add a dummy VEXPRESS entry to arm/Kconfig which depends on !ARCH_MULTIPLATFORM and just selects
ARCH_VEXPRESS(with the ifARCH_MULTI_V7dependency dropped)
... depends on !ARCH_MULTIPLATFORM or maybe rather !MMU? (I assume you want to add an extra dummy position in the choice section, where options are mutually exclusive anyway?)
Pawe?
Quoted 8 lines · Pawel Moll
Quoted 3 lines · Will Deacon
I'm inclined to add a dummy VEXPRESS entry to arm/Kconfig which depends on !ARCH_MULTIPLATFORM and just selects
ARCH_VEXPRESS(with the ifARCH_MULTI_V7dependency dropped)... depends on !ARCH_MULTIPLATFORM or maybe rather !MMU? (I assume you want to add an extra dummy position in the choice section, where options are mutually exclusive anyway?)
Yeah, you could do something like the following but it just feels a bit nasty:
Will
--->8
arch/arm/Kconfig +5 -0
@@ -305,6 +305,11 @@ config ARCH_REALVIEW help This enables support for ARM Ltd RealView boards. +config ARCH_VEXPRESS_NOMMU + bool "ARM Ltd. Versatile Express family (nommu)" + depends on !MMU + select ARCH_VEXPRESS + config ARCH_VERSATILE bool "ARM Ltd. Versatile family" select ARCH_WANT_OPTIONAL_GPIOLIB
Quoted 9 lines · Will Deacon
I was playing around with !CONFIG_MMU today and to my dismay noticed that you can't select
ARCH_VEXPRESSwithoutCONFIG_MMU=y! This is becauseARCH_VEXPRESSis only selectable viaARCH_MULTI_V7, which depends onARCH_MULTIPLATFORMwhich in turn depends on MMU.I'm inclined to add a dummy VEXPRESS entry to arm/Kconfig which depends on !ARCH_MULTIPLATFORM and just selects
ARCH_VEXPRESS(with the ifARCH_MULTI_V7dependency dropped) but I wondered if you'd got any better ideas?
I don't actually remember what the reason for making ARCH_MULTIPLATFORM depend on MMU was. Maybe it just works if you drop the dependency.
Presumably it's related to ARM_PATCH_PHYS_VIRT and AUTO_ZRELADDR not working on NOMMU, but if that's the case, we could make it
ARCH_MULTIPLATFORM
bool "Allow multiple platforms to be selected" select ARM_PATCH_PHYS_VIRT if !MMU select AUTO_ZRELADDR if !MMU
but maybe those actually work without MMU as well. I have never looked too closely at NOMMU configurations, every time I tried, they were broken in combination with something else I wanted to enable.
Arnd
Quoted 14 lines · Arnd Bergmann
Quoted 9 lines · Will Deacon
I was playing around with !CONFIG_MMU today and to my dismay noticed that you can't select
ARCH_VEXPRESSwithoutCONFIG_MMU=y! This is becauseARCH_VEXPRESSis only selectable viaARCH_MULTI_V7, which depends onARCH_MULTIPLATFORMwhich in turn depends on MMU.I'm inclined to add a dummy VEXPRESS entry to arm/Kconfig which depends on !ARCH_MULTIPLATFORM and just selects
ARCH_VEXPRESS(with the ifARCH_MULTI_V7dependency dropped) but I wondered if you'd got any better ideas?I don't actually remember what the reason for making
ARCH_MULTIPLATFORMdepend on MMU was. Maybe it just works if you drop the dependency.
Quoted 8 lines
Presumably it's related to
ARM_PATCH_PHYS_VIRTandAUTO_ZRELADDRnot working on NOMMU, but if that's the case, we could make it
ARCH_MULTIPLATFORM
bool "Allow multiple platforms to be selected" selectARM_PATCH_PHYS_VIRTif !MMU selectAUTO_ZRELADDRif !MMU
you mean if MMU, right?
Quoted 3 lines
but maybe those actually work without MMU as well. I have never looked too closely at NOMMU configurations, every time I tried, they were broken in combination with something else I wanted to enable.
ARM_PATCH_PHYS_VIRT wouldn't make any sense, but I can't see why AUTO_ZRELADDR wouldn't be ok. nommu-XIP kernels are a different kettle of fish, but we don't care about a decompressor there.
The real problem will hit with things like CONFIG_DRAM_BASE, where !MMU can't realistically support multiple platforms, so allowing ARCH_MULTIPLATFORM doesn't feel quite right either...
Will
Quoted 6 lines · Will Deacon
Quoted 4 lines
ARCH_MULTIPLATFORM
bool "Allow multiple platforms to be selected" selectARM_PATCH_PHYS_VIRTif !MMU selectAUTO_ZRELADDRif !MMUyou mean if MMU, right?
Yes.
Quoted 6 lines
Quoted 3 lines
but maybe those actually work without MMU as well. I have never looked too closely at NOMMU configurations, every time I tried, they were broken in combination with something else I wanted to enable.
ARM_PATCH_PHYS_VIRTwouldn't make any sense, but I can't see whyAUTO_ZRELADDRwouldn't be ok.
Ok.
Quoted 2 lines
nommu-XIP kernels are a different kettle
of fish, but we don't care about a decompressor there.
XIP is only supported on ARCH_PXA and ARCH_SA1100. I don't see either of them moving to CONFIG_MULTIPLATFORM any time soon, given how much work that would be. ARCH_MMP should be possible in the future, but has never supported XIP so far.
Quoted 3 lines
The real problem will hit with things like
CONFIG_DRAM_BASE, where !MMU can't realistically support multiple platforms, so allowingARCH_MULTIPLATFORMdoesn't feel quite right either...
Anybody who wants to build a !MMU kernel already needs to tweak the configuration quite a lot and usually knows more about the system than a typical end user. Having to pick the correct DRAM_BASE probably isn't too bad in that case, as long as the kernels actually build.
Arnd
Quoted 8 lines · Arnd Bergmann
Quoted 2 lines · Will Deacon
nommu-XIP kernels are a different kettle
of fish, but we don't care about a decompressor there.XIP is only supported on
ARCH_PXAandARCH_SA1100. I don't see either of them moving toCONFIG_MULTIPLATFORMany time soon, given how much work that would be.ARCH_MMPshould be possible in the future, but has never supported XIP so far.
Indeed, although I expect systems with M-class CPUs to make more use of XIP (I believe Uwe's board does this and uses the framebuffer for main memory).
Quoted 8 lines
Quoted 3 lines
The real problem will hit with things like
CONFIG_DRAM_BASE, where !MMU can't realistically support multiple platforms, so allowingARCH_MULTIPLATFORMdoesn't feel quite right either...Anybody who wants to build a !MMU kernel already needs to tweak the configuration quite a lot and usually knows more about the system than a typical end user. Having to pick the correct
DRAM_BASEprobably isn't too bad in that case, as long as the kernels actually build.
Ok, that's fair enough. Patch below.
Cheers,
Will
--->8
ARM: nommu: remove MMU dependency from ARCH_MULTIPLATFORM
ARCH_MULTIPLATFORM is the only way to select ARCH_VEXPRESS, so remove the dependency on MMU and instead use it to predicate the selection of ARM_PATCH_PHYS_VIRT.
Although running a multi-platform kernel on a selection of MMU-less targets might not yet be possible, the thing should build and targetting a nommu platform is already a fairly involved exercise.
arch/arm/Kconfig +1 -2
@@ -264,8 +264,7 @@ choice config ARCH_MULTIPLATFORM bool "Allow multiple platforms to be selected" - depends on MMU - select ARM_PATCH_PHYS_VIRT + select ARM_PATCH_PHYS_VIRT if MMU select AUTO_ZRELADDR select COMMON_CLK select MULTI_IRQ_HANDLER
Arnd Bergmann
Acked-byQuoted 6 lines · Will Deacon
ARM: nommu: remove MMU dependency from
ARCH_MULTIPLATFORM
ARCH_MULTIPLATFORMis the only way to selectARCH_VEXPRESS, so remove the dependency on MMU and instead use it to predicate the selection ofARM_PATCH_PHYS_VIRT.
Quoted 8 lines
Although running a multi-platform kernel on a selection of MMU-less targets might not yet be possible, the thing should build and targetting a nommu platform is already a fairly involved exercise.
Cc Arnd Bergmann <[email protected]>Cc Pawel Moll <[email protected]>Signed-off-by Will Deacon <[email protected]>
Before we apply this, I should probably do a round of randconfig tests. Right now, I have a series that fixes all build errors we currently get from randconfig (which always selects MULTIPLATFORM since it doesn't randomize choice statements), but I am pretty sure that adding NOMMU into the mix gives us a lot of new errors.
Arnd
Quoted 8 lines · Arnd Bergmann
Quoted 2 lines · Will Deacon
nommu-XIP kernels are a different kettle
of fish, but we don't care about a decompressor there.XIP is only supported on
ARCH_PXAandARCH_SA1100. I don't see either of them moving toCONFIG_MULTIPLATFORMany time soon, given how much work that would be.ARCH_MMPshould be possible in the future, but has never supported XIP so far.
XIP kernels (CONFIG_XIP_KERNEL) are supported on any architecture. This doesn't require any platform specific support. You just need a range of physical memory addresses where to get the kernel text from (that could even be unmapped RAM if you wanted to play with it on a platform with no NOR flash). The prospect of PRAM usage might renew interest in a XIP kernel.
Maybe you are confused by CONFIG_ARCH_MTD_XIP where special support is needed in order to make writable MTD devices compatible with a XIP kernel located on them. That is indeed only available for ARCH_PXA and ARCH_SA1100.
Quoted 8 lines
Quoted 3 lines
The real problem will hit with things like
CONFIG_DRAM_BASE, where !MMU can't realistically support multiple platforms, so allowingARCH_MULTIPLATFORMdoesn't feel quite right either...Anybody who wants to build a !MMU kernel already needs to tweak the configuration quite a lot and usually knows more about the system than a typical end user. Having to pick the correct
DRAM_BASEprobably isn't too bad in that case, as long as the kernels actually build.
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Nicolas
Quoted 4 lines · Nicolas Pitre
Maybe you are confused by
CONFIG_ARCH_MTD_XIPwhere special support is needed in order to make writable MTD devices compatible with a XIP kernel located on them. That is indeed only available forARCH_PXAandARCH_SA1100.
Ok, I see.
Quoted 4 lines
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
There are two separate aspects here: One is to run a kernel on !MMU that is built to support multiple platforms. I agree that this is rather pointless and not interesting.
The other point is being able to build such a kernel, and this is what Will seems to be interested in more. We have made VEXPRESS depend on MULTIPLATFORM, which broke support for building a non-MMU vexpress kernel, and I think we should fix that. The two options are either to make vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complex Kconfig constructs.
Arnd
Quoted 7 lines · Arnd Bergmann
The other point is being able to build such a kernel, and this is what Will seems to be interested in more. We have made VEXPRESS depend on MULTIPLATFORM, which broke support for building a non-MMU vexpress kernel, and I think we should fix that. The two options are either to make vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complex
Kconfigconstructs.
The other thing here is... why does a platform which _was_ able to be built in isolation from every other platform suddenly become incapable of being so when they join the multiplatform conglomerate? This just sounds totally perverse and wrong.
Surely it should be: platforms _not_ yet converted to multiplatform can't be selected with multi-platform support enabled?
So, maybe the _proper_ solution here is:
- change the big choice to be: config SINGLE_xxx
- these select config MACH_FOO / PLAT_FOO / ARCH_FOO eg,
config SINGLE_FOO
bool "Support for foo platforms in single kernel" select MACH_FOO
- add a final option: config MULTIPLATFORM
- then add:
config MULTI_FOO
bool "Include support for foo platforms" select MACH_FOO depends on MULTIPLATFORM || !MMU
...
config MACH_FOO
bool
Now, we don't _have_ to have the single and multi variants if they aren't appropriate for the platform, but we can cover all the cases: a platform where it's part of the multi-platform kernel when built for MMU, but is incapable of being a multi-platform kernel when built without MMU.
And we can do it without _too_ much Kconfig pain, and certainly without having to delve into anything beyond arch/arm/Kconfig.
I'd suggest at that point we separate out this stuff into a separate file - arch/arm/Kconfig.mach, which contains all the platform selection stuff.
Quoted 9 lines · Russell King - ARM Linux
Quoted 7 lines · Arnd Bergmann
The other point is being able to build such a kernel, and this is what Will seems to be interested in more. We have made VEXPRESS depend on MULTIPLATFORM, which broke support for building a non-MMU vexpress kernel, and I think we should fix that. The two options are either to make vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complex
Kconfigconstructs.
Quoted 4 lines
The other thing here is... why does a platform which _was_ able to be built in isolation from every other platform suddenly become incapable of being so when they join the multiplatform conglomerate? This just sounds totally perverse and wrong.
Arnd and I discussed this some at Connect regarding VExpress being selected. This is only to prevent the warning that no machine is enabled in a randconfig or user error case. We could simply remove this error or make it a warning instead. Then selecting a single platform is a matter of only selecting 1 platform.
Quoted 14 lines
Surely it should be: platforms _not_ yet converted to multiplatform can't be selected with multi-platform support enabled?
So, maybe the _proper_ solution here is:
- change the big choice to be: config
SINGLE_xxx
- these select configMACH_FOO/PLAT_FOO/ARCH_FOOeg,
configSINGLE_FOO
bool "Support for foo platforms in single kernel" selectMACH_FOO
- add a final option: config MULTIPLATFORM
- then add:
Quoted 9 lines
config
MULTI_FOObool "Include support for foo platforms" select MACH_FOO depends on MULTIPLATFORM || !MMU...
config
MACH_FOO
bool
I'd rather see less xxx_FOO config symbols rather than more.
Wouldn't this break defconfigs?
Rob
Quoted 17 lines
Now, we don't _have_ to have the single and multi variants if they aren't appropriate for the platform, but we can cover all the cases: a platform where it's part of the multi-platform kernel when built for MMU, but is incapable of being a multi-platform kernel when built without MMU.
And we can do it without _too_ much
Kconfigpain, and certainly without having to delve into anything beyondarch/arm/Kconfig.I'd suggest at that point we separate out this stuff into a separate file -
arch/arm/Kconfig.mach, which contains all the platform selection stuff._______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 28 lines · Russell King - ARM Linux
Quoted 7 lines · Arnd Bergmann
The other point is being able to build such a kernel, and this is what Will seems to be interested in more. We have made VEXPRESS depend on MULTIPLATFORM, which broke support for building a non-MMU vexpress kernel, and I think we should fix that. The two options are either to make vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complex
Kconfigconstructs.The other thing here is... why does a platform which _was_ able to be built in isolation from every other platform suddenly become incapable of being so when they join the multiplatform conglomerate? This just sounds totally perverse and wrong.
Surely it should be: platforms _not_ yet converted to multiplatform can't be selected with multi-platform support enabled?
So, maybe the _proper_ solution here is:
- change the big choice to be: config
SINGLE_xxx
- these select configMACH_FOO/PLAT_FOO/ARCH_FOOeg,
configSINGLE_FOO
bool "Support for foo platforms in single kernel" selectMACH_FOO
- add a final option: config MULTIPLATFORM
- then add:
Quoted 8 lines
config
MULTI_FOObool "Include support for foo platforms" select MACH_FOO depends on MULTIPLATFORM || !MMU...
config
MACH_FOO
bool
A few platforms are doing this. E.g. the vt8500 platform currently allows both, and the at91 will only allow multiplatform to be selected for the DT-aware systems, while the single-platform still allows both DT and non-DT. In general, I'm fine with either approach (multiplatform only or mixed) and I'd like to leave that choice to the platform maintainers.
Quoted 7 lines
Now, we don't _have_ to have the single and multi variants if they aren't appropriate for the platform, but we can cover all the cases: a platform where it's part of the multi-platform kernel when built for MMU, but is incapable of being a multi-platform kernel when built without MMU.
And we can do it without _too_ much
Kconfigpain, and certainly without having to delve into anything beyondarch/arm/Kconfig.
Sure, that works. My point was just that I think it would be simpler to keep vexpress multiplatform-only if there are no reasons that prevent us from doing that.
I also hope that we can at some point in the future get all ARMv6 and ARMv7 platforms to be multiplatform-only, while leaving each ARMv4/ARMv5 to be any of single, multi, or mixed.
Quoted 3 lines
I'd suggest at that point we separate out this stuff into a separate file -
arch/arm/Kconfig.mach, which contains all the platform selection stuff.
Good idea, I like that.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 7 lines · Russell King - ARM Linux
Now, we don't _have_ to have the single and multi variants if they aren't appropriate for the platform, but we can cover all the cases: a platform where it's part of the multi-platform kernel when built for MMU, but is incapable of being a multi-platform kernel when built without MMU.
And we can do it without _too_ much
Kconfigpain, and certainly without having to delve into anything beyondarch/arm/Kconfig.
Quoted 7 lines
Sure, that works. My point was just that I think it would be simpler to keep vexpress multiplatform-only if there are no reasons that prevent us from doing that.
I also hope that we can at some point in the future get all ARMv6 and ARMv7 platforms to be multiplatform-only, while leaving each ARMv4/ARMv5 to be any of single, multi, or mixed.
Except... we have one report where this approach already doesn't work, where we have what is essentially an ARMv7 platform needing to be built outside the multiplatform stuff...
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Quoted 6 lines
There are two separate aspects here: One is to run a kernel on !MMU that is built to support multiple platforms. I agree that this is rather pointless and not interesting.
The other point is being able to build such a kernel, and this is what Will seems to be interested in more.
What's the point of building a pointless and uninteresting kernel?
Sure, wide build coverage is good. But pointless builds are not. Comes a point where Kconfig should serve its purpose i.e. help the user make a valid kernel configuration for himself. And I really think that multi-platform and !MMU together don't make for a valid configuration anymore.
Quoted 2 lines
We have made VEXPRESS depend on MULTIPLATFORM, which broke support for building a non-MMU vexpress kernel, and I think we should fix that.
No argument there.
Quoted 4 lines
The two options are either to make
vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complexKconfigconstructs.
Well, I'd rather prefer to think that the first option is the most logical between those 2 options, regardless of Kconfig complexity issues.
I didn't look, but just making MULTIPLATFORM depend on !MMU, and VEXPRESS depend on MULTIPLATFORM || MMU should be close to what is needed, no?
Nicolas
Quoted 15 lines · Nicolas Pitre
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Quoted 6 lines
There are two separate aspects here: One is to run a kernel on !MMU that is built to support multiple platforms. I agree that this is rather pointless and not interesting.
The other point is being able to build such a kernel, and this is what Will seems to be interested in more.
Quoted 7 lines
What's the point of building a pointless and uninteresting kernel?
Sure, wide build coverage is good. But pointless builds are not. Comes a point where
Kconfigshould serve its purpose i.e. help the user make a valid kernel configuration for himself. And I really think that multi-platform and !MMU together don't make for a valid configuration anymore.
If it's just the physical memory map that gets in the way for multiplatform !MMU, it's probably worth me pointing out that for PMSAv7 (i.e. R-class cores) there is a mandated default memory map, which does make this problem largely disappear.
All said and done, I don't see anybody ever using the option though -- distributions will likely never ship nommu kernels and they typically get deployed in one place only with an emphasis on keeping the thing small.
Will
Quoted 8 lines · Nicolas Pitre
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Quoted 8 lines
Quoted 6 lines
There are two separate aspects here: One is to run a kernel on !MMU that is built to support multiple platforms. I agree that this is rather pointless and not interesting.
The other point is being able to build such a kernel, and this is what Will seems to be interested in more.
What's the point of building a pointless and uninteresting kernel?
Built-time coverage is the only one I can think of, but I think it's a good reason. Being able to build an "allyesconfig" with MMU disabled sounds like a good sniff test to see if something broke and is much faster than building all the defconfigs.
Quoted 5 lines
Quoted 4 lines
The two options are either to make
vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complexKconfigconstructs.
Quoted 7 lines
Well, I'd rather prefer to think that the first option is the most logical between those 2 options, regardless of
Kconfigcomplexity issues.I didn't look, but just making MULTIPLATFORM depend on !MMU, and VEXPRESS depend on MULTIPLATFORM || MMU should be close to what is needed, no?
Fine with me too. I suppose you just made the same logic error that I had earlier in this thread and meant !MMU where you wrote MMU.
Arnd
Nicolas,
Quoted 9 lines · Nicolas Pitre
Quoted 6 lines · Arnd Bergmann
On Tuesday 06 November 2012, Nicolas Pitre wrote:
The two options are either to make
vexpress be single-platform when building for !MMU, or to allow multiplatform kernels to be built without MMU support in principle. I think the second option is more logical and avoids complexKconfigconstructs.
Quoted 8 lines
Well, I'd rather prefer to think that the first option is the most logical between those 2 options, regardless of
Kconfigcomplexity issues.I didn't look, but just making MULTIPLATFORM depend on !MMU, and VEXPRESS depend on MULTIPLATFORM || MMU should be close to what is needed, no?
I've spent a little bit of time trying this, as both Arnd and you seemed to be happy with a solution along these lines.
However, I can't seem to make it fall out quite so trivially so I wonder if you'd mind clarifying what you were expecting:
The problem that I see when I try to do this is that ARCH_VEXPRESS no longer exists in the 'choice' for "ARM system type" in arch/arm/Kconfig. A solution that allows selection of VEXPRESS as a single platform (!MMU) and multi-platform (MMU) appears to need an entry in that 'choice' for the single platform case, and a config option in arch/arm/mach-vexpress/Kconfig for the multiplatform one.
So it seems to me we need a shim in one of those two locations...
As Will suggested a while back, the shim in arch/arm/Kconfig could look like:
---8<---
arch/arm/Kconfig +5 -0
@@ -305,6 +305,11 @@ config ARCH_REALVIEW help This enables support for ARM Ltd RealView boards. +config ARCH_VEXPRESS_NOMMU + bool "ARM Ltd. Versatile Express family (nommu)" + depends on !MMU + select ARCH_VEXPRESS + config ARCH_VERSATILE bool "ARM Ltd. Versatile family" select ARCH_WANT_OPTIONAL_GPIOLIB
---->8----
With the other perhaps being to merge the ARCH_VEXPRESS option back in to the 'choice' and create a ARCH_VEXPRESS_MULTI elsewhere...
Is that the sort of thing you had in mind, or is there another way around that I'm missing?
Thanks,
Jonny
Arnd Bergmann
Acked-byQuoted 7 lines · Jonathan Austin
arch/arm/Kconfig +0
-0@@ -305,6 +305,11 @@ config ARCH_REALVIEW help This enables support for ARM Ltd RealView boards.
arch/arm/Kconfig config ARCH_REALVIEW
Quoted 10 lines
arch/arm/Kconfig +5
-1+config ARCH_VEXPRESS_NOMMU + bool "ARM Ltd. Versatile Express family (nommu)" + depends on !MMU + select ARCH_VEXPRESS + config ARCH_VERSATILE bool "ARM Ltd. Versatile family" select ARCH_WANT_OPTIONAL_GPIOLIB ---->8----
Yes, I think this is the right approach.
Quoted 2 lines
With the other perhaps being to merge the
ARCH_VEXPRESSoption back in to the 'choice' and create aARCH_VEXPRESS_MULTIelsewhere...
That would needlessly break 'make oldconfig' for people that have CONFIG_ARCH_VEXPRESS in their .config files or other scripts.
Quoted 2 lines
Is that the sort of thing you had in mind, or is there another way around that I'm missing?
I think it's good.
Nicolas Pitre
Acked-byQuoted 27 lines · Arnd Bergmann
Quoted 7 lines · Jonathan Austin
arch/arm/Kconfig +0
-0@@ -305,6 +305,11 @@ config ARCH_REALVIEW help This enables support for ARM Ltd RealView boards.arch/arm/Kconfig config ARCH_REALVIEW
Quoted 10 lines
arch/arm/Kconfig +5
-1+config ARCH_VEXPRESS_NOMMU + bool "ARM Ltd. Versatile Express family (nommu)" + depends on !MMU + select ARCH_VEXPRESS + config ARCH_VERSATILE bool "ARM Ltd. Versatile family" select ARCH_WANT_OPTIONAL_GPIOLIB ---->8----Yes, I think this is the right approach.
Quoted 2 lines
With the other perhaps being to merge the
ARCH_VEXPRESSoption back in to the 'choice' and create aARCH_VEXPRESS_MULTIelsewhere...That would needlessly break 'make oldconfig' for people that have
CONFIG_ARCH_VEXPRESSin their .config files or other scripts.
Quoted 6 lines
Quoted 2 lines
Is that the sort of thing you had in mind, or is there another way around that I'm missing?
I think it's good.
Acked-by Arnd Bergmann <[email protected]>
Looks fine to me too. Perhaps the vexpress option would logically fit better if located after versatile instead of being in the middle of realview and versatile.
Other than that:
Nicolas
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Although there's likely to be approximately zero interest in multi-platform !MMU, relocating at boot time doesn't sound onerous, should it be needed. x86 kernels already do that. Maybe ARM kernels will eventually do that anyway for the same reason as x86.
-- Jamie
Quoted 10 lines · Jamie Lokier
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Although there's likely to be approximately zero interest in multi-platform !MMU, relocating at boot time doesn't sound onerous, should it be needed. x86 kernels already do that. Maybe ARM kernels will eventually do that anyway for the same reason as x86.
We already have something similar but simpler: CONFIG_ARM_PATCH_PHYS_VIRT. Except that the virtual address the kernel is using always remains the same, even if the physical address can move. Although this is not the case at the moment, the ARM kdump implementation could take advantage of this ability and avoid the copying of memory around.
Nicolas
Quoted 13 lines · Nicolas Pitre
Quoted 10 lines · Jamie Lokier
Quoted 4 lines · Nicolas Pitre
I really think that it makes no sense at all to support !MMU kernels in a multi-platform kernel build, even if the set of included platforms were all !MMU. The kernel has to be linked for the physical address of the target and not a common invariant virtual address.
Although there's likely to be approximately zero interest in multi-platform !MMU, relocating at boot time doesn't sound onerous, should it be needed. x86 kernels already do that. Maybe ARM kernels will eventually do that anyway for the same reason as x86.
Quoted 5 lines
We already have something similar but simpler:
CONFIG_ARM_PATCH_PHYS_VIRT. Except that the virtual address the kernel is using always remains the same, even if the physical address can move. Although this is not the case at the moment, the ARM kdump implementation could take advantage of this ability and avoid the copying of memory around.
I wonder why x86 didn't go that route. Not that it matters.
-- Jamie