ARM: ARMv7 (with MMU) XIP without ARCH_MULTIPLATFORM
Subsystems (3)
cover ARM: ARMv7 (with MMU) XIP without ARCH_MULTIPLATFORM
The basic idea of this series is to introduce a top level ARM_SINGLE_ARMV7 that can be selected instead of ARCH_MULTIPLATFORM for the purpose of being able to select XIP_KERNEL.
ARM_SINGLE_ARMV7 is not selected directly, but rather by first selecting a specific SOC family (as opposed to the multiplatform option), then the SoC family will select ARM_SINGLE_ARMV7.
At that point, an individual SOC device can selected which then allows them to select XIP_KERNEL if they want to.
It is up to the SoC familiies to determine if XIP and/or ARM_SINGLE_ARMV7 makes sence.
For this series, the Renesas SoCs allow ARM_SINGLE_ARMV7.
Particulary, the Renesas RZ/A1 (ARCH_R7S72100) was tested with both XIP_KERNEL=y and XIP_KERNEL=n.
System Type --->
[*] MMU-based Paged Memory Management Support -*- ARMv7 based single platforms
ARM system type (Renesas ARM SoCs)
[*] Renesas ARM SoCs --->
[*] RZ/A1H (R7S72100)
For me, I was able to come up with a .config that would produce the same defconfig as it did before this patch series proving that ARCH_MULTIPLATFORM is just a method in grouping configs together that could normally be selected individually.
I would say maybe the only other thing we could add is a XIP_CAPABLE config that is set only by each individual SoC. Then users can only select XIP_KERNEL for SoCs that actually have a chance at working.
Something like:
[ arch/arm/mach-shmobile/Kconfig ]
config ARCH_R7S72100
bool "RZ/A1H (R7S72100)" select PM select PM_GENERIC_DOMAINS select SYS_SUPPORTS_SH_MTU2 select RENESAS_OSTM select XIP_CAPABLE
[ arch/arm/Kconifg ]
config XIP_KERNEL
bool "Kernel Execute-In-Place from ROM" depends on !ARM_LPAE && !ARCH_MULTIPLATFORM && XIP_CAPABLE
Chris Brandt (2):
ARM: add ARM_SINGLE_ARMV7 as config option
ARM: shmobile: add renesas soc as a top level selection
arch/arm/Kconfig | 22 ++++++++++++++++++++++ arch/arm/Kconfig.debug | 6 ++++-- arch/arm/Makefile | 5 +++++ arch/arm/kernel/devtree.c | 3 ++- arch/arm/mach-shmobile/Kconfig | 2 +- 5 files changed, 34 insertions(+), 4 deletions(-)
Signature · 1 line
2.10.1
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Creates a new ARM_SINGLE_ARMV7 option as an alternative ARCH_MULTIPLATFORM.
ARM_SINGLE_ARMV7 is very similar to ARCH_MULTIPLATFORM, except the options from ARCH_MULTI_V6_V7 were copied directly into the new ARM_SINGLE_ARMV7.
Additionally, everywhere ARCH_MULTIPLATFORM existed in build scripts, ARM_SINGLE_ARMV7 was added along side it in order to produce similar results.
--- arch/arm/Kconfig | 18 ++++++++++++++++++ arch/arm/Kconfig.debug | 6 ++++-- arch/arm/Makefile | 5 +++++ arch/arm/kernel/devtree.c | 3 ++- 4 files changed, 29 insertions(+), 3 deletions(-)
arch/arm/Kconfig +18 -0
@@ -317,6 +317,24 @@ config ARCH_MMAP_RND_BITS_MAX default 15 if PAGE_OFFSET=0x80000000 default 16 +config ARM_SINGLE_ARMV7 + bool "ARMv7 based single platforms" + depends on MMU + select ARM_HAS_SG_CHAIN + select ARM_PATCH_PHYS_VIRT if !XIP_KERNEL + select AUTO_ZRELADDR + select CLKSRC_OF + select COMMON_CLK + select CPU_V7 + select GENERIC_CLOCKEVENTS + select MIGHT_HAVE_PCI + select MULTI_IRQ_HANDLER + select PCI_DOMAINS if PCI + select SPARSE_IRQ + select USE_OF + select HAVE_SMP + select MIGHT_HAVE_CACHE_L2X0 + # # The "ARM system type" choice list is ordered alphabetically by option # text. Please add new entries in the option alphabetic order.
arch/arm/Kconfig.debug +4 -2
@@ -1694,7 +1694,8 @@ config DEBUG_UART_8250_FLOW_CONTROL config DEBUG_UNCOMPRESS bool - depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ !DEBUG_BRCMSTB_UART
@@ -1712,7 +1713,8 @@ config DEBUG_UNCOMPRESS config UNCOMPRESS_INCLUDE string default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ - PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7 default "mach/uncompress.h" config EARLY_PRINTK
arch/arm/Makefile +5 -0
@@ -255,12 +255,16 @@ endif ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) MACHINE := endif +ifeq ($(CONFIG_ARM_SINGLE_ARMV7),y) +MACHINE := +endif machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) +ifneq ($(CONFIG_ARM_SINGLE_ARMV7),y) ifeq ($(KBUILD_SRC),) KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) else
@@ -268,6 +272,7 @@ KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif endif endif +endif export TEXT_OFFSET GZFLAGS MMUEXT
arch/arm/kernel/devtree.c +2 -1
@@ -220,7 +220,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) {const struct machine_desc *mdesc, *mdesc_best =NULL ; -#if defined(CONFIG_ARCH_MULTIPLATFORM ) || defined(CONFIG_ARM_SINGLE_ARMV7M ) +#if defined(CONFIG_ARCH_MULTIPLATFORM ) || defined(CONFIG_ARM_SINGLE_ARMV7M ) || \ + defined(CONFIG_ARM_SINGLE_ARMV7 )DT_MACHINE_START (GENERIC_DT ,"Generic DT based system" ) .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0,
Signature · 1 line
2.10.1
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 8 lines · Chris Brandt
Creates a new
ARM_SINGLE_ARMV7option as an alternativeARCH_MULTIPLATFORM.
ARM_SINGLE_ARMV7is very similar toARCH_MULTIPLATFORM, except the options fromARCH_MULTI_V6_V7were copied directly into the newARM_SINGLE_ARMV7.Additionally, everywhere
ARCH_MULTIPLATFORMexisted in build scripts,ARM_SINGLE_ARMV7was added along side it in order to produce similar results.
Could we try to be a little smarter than this and if ARCH_MULTIPLATFORM is selected but only one platform beneath is we automatically select ARM_SINGLE_ARMV7 (this may require Kconfig hackery)?
I see value in what you are doing, but I don't think pulling the platforms out of the menu like what you do in the subsequent patch is looking nice as an user/configurator.
Quoted 106 lines
Signed-off-by Chris Brandt <[email protected]>--- arch/arm/Kconfig | 18 ++++++++++++++++++ arch/arm/Kconfig.debug | 6 ++++-- arch/arm/Makefile | 5 +++++ arch/arm/kernel/devtree.c | 3 ++- 4 files changed, 29 insertions(+), 3 deletions(-)arch/arm/Kconfig +18
-0@@ -317,6 +317,24 @@ config ARCH_MMAP_RND_BITS_MAX default 15 if PAGE_OFFSET=0x80000000 default 16 +config ARM_SINGLE_ARMV7 + bool "ARMv7 based single platforms" + depends on MMU + select ARM_HAS_SG_CHAIN + select ARM_PATCH_PHYS_VIRT if !XIP_KERNEL + select AUTO_ZRELADDR + select CLKSRC_OF + select COMMON_CLK + select CPU_V7 + select GENERIC_CLOCKEVENTS + select MIGHT_HAVE_PCI + select MULTI_IRQ_HANDLER + select PCI_DOMAINS if PCI + select SPARSE_IRQ + select USE_OF + select HAVE_SMP + select MIGHT_HAVE_CACHE_L2X0 + # # The "ARM system type" choice list is ordered alphabetically by option # text. Please add new entries in the option alphabetic order.arch/arm/Kconfig.debug +4
-2@@ -1694,7 +1694,8 @@ config DEBUG_UART_8250_FLOW_CONTROL config DEBUG_UNCOMPRESS bool - depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ !DEBUG_BRCMSTB_UART@@ -1712,7 +1713,8 @@ config DEBUG_UNCOMPRESS config UNCOMPRESS_INCLUDE string default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ - PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7 default "mach/uncompress.h" config EARLY_PRINTKarch/arm/Makefile +5
-0@@ -255,12 +255,16 @@ endif ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) MACHINE := endif +ifeq ($(CONFIG_ARM_SINGLE_ARMV7),y) +MACHINE := +endif machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) +ifneq ($(CONFIG_ARM_SINGLE_ARMV7),y) ifeq ($(KBUILD_SRC),) KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) else@@ -268,6 +272,7 @@ KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif endif endif +endif export TEXT_OFFSET GZFLAGS MMUEXTarch/arm/kernel/devtree.c +2
-1@@ -220,7 +220,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) {const struct machine_desc *mdesc, *mdesc_best =NULL ; -#if defined(CONFIG_ARCH_MULTIPLATFORM ) || defined(CONFIG_ARM_SINGLE_ARMV7M ) +#if defined(CONFIG_ARCH_MULTIPLATFORM ) || defined(CONFIG_ARM_SINGLE_ARMV7M ) || \ + defined(CONFIG_ARM_SINGLE_ARMV7 )DT_MACHINE_START (GENERIC_DT ,"Generic DT based system" ) .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0,
Signature · 1 line
Florian
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Hello Florian,
Quoted 8 lines · Florian Fainelli
Quoted 1 line · Chris Brandt
Creates a new
ARM_SINGLE_ARMV7option as an alternative
ARCH_MULTIPLATFORM.Quoted 3 lines
ARM_SINGLE_ARMV7is very similar toARCH_MULTIPLATFORM, except the options fromARCH_MULTI_V6_V7were copied directly into the new
ARM_SINGLE_ARMV7.Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Additionally, everywhere
ARCH_MULTIPLATFORMexisted in build scripts,ARM_SINGLE_ARMV7was added along side it in order to produce similar results.Could we try to be a little smarter than this and if
ARCH_MULTIPLATFORMis selected but only one platform beneath is we automatically selectARM_SINGLE_ARMV7(this may requireKconfighackery)?
Months ago I spent hours on trying to get the current kbuild system to do that and nothing I came up with would work. It's simply not designed that way.
I think the closest I might have come was to purposely break the build if more then 1 was select, but that still didn't stop you from making the selection.
If someone smarter than me has a way to do (not just an idea...I received lots of ideas but none of them worked), I'd be happy to hear it.
Quoted 3 lines
I see value in what you are doing, but I don't think pulling the platforms out of the menu like what you do in the subsequent patch is looking nice as an user/configurator.
What I was trying to do (and what was already removed from Kconfigs) was to avoid having a duplicate set of configs for each SOC: one for single and one for multi.
#I'm trying to get away from manually hacking these Kconfig files every time a new kernel is released.
Chris
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 23 lines · Chris Brandt
Hello Florian,
Quoted 8 lines · Florian Fainelli
Quoted 1 line · Chris Brandt
Creates a new
ARM_SINGLE_ARMV7option as an alternative
ARCH_MULTIPLATFORM.Quoted 3 lines
ARM_SINGLE_ARMV7is very similar toARCH_MULTIPLATFORM, except the options fromARCH_MULTI_V6_V7were copied directly into the new
ARM_SINGLE_ARMV7.Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Additionally, everywhere
ARCH_MULTIPLATFORMexisted in build scripts,ARM_SINGLE_ARMV7was added along side it in order to produce similar results.Could we try to be a little smarter than this and if
ARCH_MULTIPLATFORMis selected but only one platform beneath is we automatically selectARM_SINGLE_ARMV7(this may requireKconfighackery)?Months ago I spent hours on trying to get the current kbuild system to do that and nothing I came up with would work. It's simply not designed that way.
Quoted 6 lines
I think the closest I might have come was to purposely break the build if more then 1 was select, but that still didn't stop you from making the selection.
If someone smarter than me has a way to do (not just an idea...I received lots of ideas but none of them worked), I'd be happy to hear it.
I am definitively not a Kbuild expert, but it would almost necessarily require introduce some kind of new type in the Kconfig/Kbuild syntax that does something like that:
- have a way to count the number of symbols that are selected and do a "if ARCH_MULTI_V6_V7" (or an arbitrary expression) this most likely should exist internally within Kconfig
- introduce a new type of Kconfig type which is a "count", and gets assigned this value that we just counted, something that could look like this:
count ARCH_MULTI_V6_V7_COUNT
tracks ARCH_MULTI_V6_V7
All other typical Kconfig syntax thould then still apply and we could be doing something like:
depends on ARCH_MULTI_V6_V7_COUNT=1 etc..
So yeah, I am no better than whoever gave you indications better ;)
Quoted 7 lines
Quoted 6 lines
I see value in what you are doing, but I don't think pulling the platforms out of the menu like what you do in the subsequent patch is looking nice as an user/configurator.
Quoted 7 lines
What I was trying to do (and what was already removed from Kconfigs) was to avoid having a duplicate set of configs for each SOC: one for single and one for multi.
#I'm trying to get away from manually hacking these
Kconfigfiles every time a new kernel is released.
Sure, that makes complete sense to me. FWIW, there is one particular case that I am interested that you solved which is allowing DEBUG_UNCOMPRESS to be set in our downstream kernel because we typically only enable BRCMSTB and nothing else.
Signature · 1 line
Florian
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
On Thursday, February 09, 2017, Florian Fainelli worte:
Quoted 16 lines
Quoted 5 lines
I think the closest I might have come was to purposely break the build if more then 1 was select, but that still didn't stop you from making the selection.
If someone smarter than me has a way to do (not just an idea...I
received
Quoted 1 line
lots of ideas but none of them worked), I'd be happy to hear it.
I am definitively not a
Kbuildexpert, but it would almost necessarily require introduce some kind of new type in the Kconfig/Kbuild syntax that does something like that:- have a way to count the number of symbols that are selected and do a "if
ARCH_MULTI_V6_V7" (or an arbitrary expression) this most likely should exist internally withinKconfig
Quoted 6 lines
- introduce a new type of
Kconfigtype which is a "count", and gets assigned this value that we just counted, something that could look like this:count
ARCH_MULTI_V6_V7_COUNT
tracksARCH_MULTI_V6_V7
I did try the counting thing, but couldn't get it to work.
I admit though, I did stop when the next step was to create a new type kind of thing that I could use for counting. That seemed to start going down a deeper path than I was hoping for.
However,
I am hesitant to go and try anything else because everything I've submitted so far has been NACKed. The only thing Russell said he'd agree to is a top level single-platform option. But, since that all got taken out, I assume there's some resistance to putting it back in.
Chris
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 21 lines · CET Chris Brandt
On Thursday, February 09, 2017, Florian Fainelli worte:
Quoted 20 lines
Quoted 5 lines
I think the closest I might have come was to purposely break the build if more then 1 was select, but that still didn't stop you from making the selection.
If someone smarter than me has a way to do (not just an idea...I
received
Quoted 1 line
lots of ideas but none of them worked), I'd be happy to hear it.
I am definitively not a
Kbuildexpert, but it would almost necessarily require introduce some kind of new type in the Kconfig/Kbuild syntax that does something like that:- have a way to count the number of symbols that are selected and do a "if
ARCH_MULTI_V6_V7" (or an arbitrary expression) this most likely should exist internally withinKconfig- introduce a new type of
Kconfigtype which is a "count", and gets assigned this value that we just counted, something that could look like this:
Quoted 7 lines
Quoted 2 lines
count
ARCH_MULTI_V6_V7_COUNT
tracksARCH_MULTI_V6_V7I did try the counting thing, but couldn't get it to work.
I admit though, I did stop when the next step was to create a new type kind of thing that I could use for counting. That seemed to start going down a deeper path than I was hoping for.
I also couldn't come up with something working when I looked at this, and it wouldn't solve the related problem of platforms that we want to be able to use with or without MMU: You can't make the decision of whether allow an MMU based on the number of platforms since most platform options can only be offered depending on the setting of CONFIG_MMU.
Quoted 5 lines
However,
I am hesitant to go and try anything else because everything I've submitted so far has been NACKed. The only thing Russell said he'd agree to is a top level single-platform option. But, since that all got taken out, I assume there's some resistance to putting it back in.
And I really don't like adding new top-level for a platform here, it brings us back to the same problems we had before we moved most platforms to ARCH_MULTIPLATFORM, and it doesn't solve the remaining problems we still have:
- In some platforms, the decision would have to be done on a per-board level, as each board can have its memory at a different location base on which chipselect line got connected to the RAM and NOR flash respectively
- Some (few) platforms actually have separate top-level Kconfig options but are actually very closely related and you could have a kernel for all of them even with !MMU and XIP_KERNEL. The most important one here is ARM Versatile/Realview/Integrator/Vexpress that have more in common than things we put behind a common Kconfig option in other platforms.
- CONFIG_DEBUG_UNCOMPRESS has a very similar requirements to XIP_KERNEL and !MMU, and we currently allow it for any machine, with a lot of flexibility in configuring that always breaks running on any machine other than the one you are targetting.
Arnd
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 5 lines · Arnd Bergmann
I also couldn't come up with something working when I looked at this, and it wouldn't solve the related problem of platforms that we want to be able to use with or without MMU: You can't make the decision of whether allow an MMU based on the number of platforms since most platform options can only be offered depending on the setting of
CONFIG_MMU.
How about this idea (from a high level only):
1. At a top level, you would have 2 options:
* "Allow multiple platforms to be selected"
* "Single platform Only"
2. If SINGLE is selected, you still get all the choices that you get with MULTI, except as soon as you click a single ARCH_xx, all other ARCH_yy options are automatically 'unselected' and disappear from the menus. To change your mind, you simply uncheck that box and magically everything re-appears.
3. The current single platform ARCHs that are currently still sitting at the top level get moved to go sit with everyone else, except they will have "depends on SINGLE" so they will not show up when MULTI is selected.
4. XIP_KERNEL can only be selected if you have SINGLE selected.
The new restriction is that if you want XIP_KERNEL, you are only going to get 1 (and only 1) ARCH_xx.
Of course the only way this is going to happen is by modifying kbuild system to create a new 'mode' or something (but let's not get concerned with the details until a high level agreement can be made).
Quoted 4 lines
- In some platforms, the decision would have to be done on a per-board level, as each board can have its memory at a different location base on which chipselect line got connected to the RAM and NOR flash respectively
This idea only effects ARCH_xx. You can still select multiple MACH_xx if you want after you've selected your ARCH_xx.
Quoted 6 lines
- Some (few) platforms actually have separate top-level
Kconfigoptions but are actually very closely related and you could have a kernel for all of them even with !MMU andXIP_KERNEL. The most important one here is ARM Versatile/Realview/Integrator/Vexpress that have more in common than things we put behind a commonKconfigoption in other platforms.
So, this one gets squashed because for XIP_KERNEL, you have to pick just 1 ARCH_xx.
Quoted 4 lines
-
CONFIG_DEBUG_UNCOMPRESShas a very similar requirements toXIP_KERNELand !MMU, and we currently allow it for any machine, with a lot of flexibility in configuring that always breaks running on any machine other than the one you are targetting.
Since the purpose of this is "debugging" a single platform, could you put this under the "depends on SINGLE" category?
What I'm trying to understand is if:
A. There is something that can be agreed upon (whether it's technically
feasible still needs to be worked out)
B. It doesn't work today, and there's no way to make everyone happy,
so go hack your own Kconfig files and just live with it.
Chris
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 25 lines · Chris Brandt
Quoted 5 lines · Arnd Bergmann
I also couldn't come up with something working when I looked at this, and it wouldn't solve the related problem of platforms that we want to be able to use with or without MMU: You can't make the decision of whether allow an MMU based on the number of platforms since most platform options can only be offered depending on the setting of
CONFIG_MMU.How about this idea (from a high level only):
1. At a top level, you would have 2 options:
* "Allow multiple platforms to be selected"
* "Single platform Only"2. If SINGLE is selected, you still get all the choices that you get with MULTI, except as soon as you click a single
ARCH_xx, all otherARCH_yyoptions are automatically 'unselected' and disappear from the menus. To change your mind, you simply uncheck that box and magically everything re-appears.3. The current single platform ARCHs that are currently still sitting at the top level get moved to go sit with everyone else, except they will have "depends on SINGLE" so they will not show up when MULTI is selected.
Quoted 8 lines
4.
XIP_KERNELcan only be selected if you have SINGLE selected.The new restriction is that if you want
XIP_KERNEL, you are only going to get 1 (and only 1)ARCH_xx.Of course the only way this is going to happen is by modifying kbuild system to create a new 'mode' or something (but let's not get concerned with the details until a high level agreement can be made).
You can actually have a 'tristate' choice statement with semantics close to that, but actually using that here would get rather messy, as we'd have to move all the per-directory 'menuconfig' statements back into the top-level choice, and also add logic to detect whether we use =y or =m.
Quoted 7 lines
Quoted 4 lines
- In some platforms, the decision would have to be done on a per-board level, as each board can have its memory at a different location base on which chipselect line got connected to the RAM and NOR flash respectively
This idea only effects
ARCH_xx. You can still select multipleMACH_xxif you want after you've selected yourARCH_xx.
Yes, that's my point: we'd have to move some or all of the MACH_xx options into the top-level list as well, or repeat the same logic within each platform that may have incompatible boards.
Quoted 7 lines
Quoted 4 lines
-
CONFIG_DEBUG_UNCOMPRESShas a very similar requirements toXIP_KERNELand !MMU, and we currently allow it for any machine, with a lot of flexibility in configuring that always breaks running on any machine other than the one you are targetting.Since the purpose of this is "debugging" a single platform, could you put this under the "depends on SINGLE" category?
It would solve the problem of unusable configurations, but break one very important use case of DEBUG_LL: you have a problem with a running kernel and just want to turn on DEBUG_LL without changing anything else.
Arnd
Russell King - ARM Linux
maintainerPATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
In reply to Arnd BergmannQuoted 4 lines · Arnd Bergmann
And I really don't like adding new top-level for a platform here, it brings us back to the same problems we had before we moved most platforms to
ARCH_MULTIPLATFORM, and it doesn't solve the remaining problems we still have:
It's the least evil solution.
Quoted 4 lines
- In some platforms, the decision would have to be done on a per-board level, as each board can have its memory at a different location base on which chipselect line got connected to the RAM and NOR flash respectively
Right, but that's something we _had_ solved before multiplatform came along.
Quoted 6 lines
- Some (few) platforms actually have separate top-level
Kconfigoptions but are actually very closely related and you could have a kernel for all of them even with !MMU andXIP_KERNEL. The most important one here is ARM Versatile/Realview/Integrator/Vexpress that have more in common than things we put behind a commonKconfigoption in other platforms.
If you think that Versatile + Realview + Integrator + Vexpress should be lumped into one kernel image for !MMU and XIP_KERNEL then you're wrong - from what I remember, their RAM and flash locations are quite different which rules it out.
The biggest thing that matters for !MMU and XIP_KERNEL is the location of flash and RAM. If those are not compatible, !MMU and XIP_KERNEL has no chance of working.
Quoted 4 lines
-
CONFIG_DEBUG_UNCOMPRESShas a very similar requirements toXIP_KERNELand !MMU, and we currently allow it for any machine, with a lot of flexibility in configuring that always breaks running on any machine other than the one you are targetting.
Right, but that's debug, not core kernel configuration.
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
PATCH 1/2 ARM: add ARM_SINGLE_ARMV7 as config option
Quoted 8 lines · Russell King - ARM Linux
Quoted 7 lines
- Some (few) platforms actually have separate top-level
Kconfigoptions but are actually very closely related and you could have a kernel for all of them even with !MMU andXIP_KERNEL. The most important one here is ARM Versatile/Realview/Integrator/Vexpress that have more in common than things we put behind a commonKconfigoption in other platforms.
Quoted 4 lines
If you think that Versatile + Realview + Integrator + Vexpress should be lumped into one kernel image for !MMU and
XIP_KERNELthen you're wrong - from what I remember, their RAM and flash locations are quite different which rules it out.
They are not all the same, but the locations are not split according to the platform names either. The early realview platforms are like versatile here, while later realview platforms have the alias plus more, and vexpress has it in two other places depending on the generation.
I misremembered vexpress and thought that it was like the later realview, but at least versatile and realview are basically the same thing (the story with NOR flash is similar).
Quoted 6 lines
Quoted 4 lines
-
CONFIG_DEBUG_UNCOMPRESShas a very similar requirements toXIP_KERNELand !MMU, and we currently allow it for any machine, with a lot of flexibility in configuring that always breaks running on any machine other than the one you are targetting.Right, but that's debug, not core kernel configuration.
I have not yet seen any argument why that is an important distinction, i.e. what is the downside of letting users just turn the MMU and XIP options on and off without changing everything else, other than this having been the default in the past?
Obviously you won't be able to boot on machines when configured for a different physical address (for RAM, flash or uart), but even that is no change from what we have on the NOMMU platforms: on any of them you have to manually type the address when configuring your kernel for a given target and change it again when you want to run on another board that doesn't share the exact address.
Arnd
PATCH 2/2 ARM: shmobile: add renesas soc as a top level selection
In reply to Chris BrandtAllows users to select "Renesas ARM SoCs" as opposed to multiplatform. ARM_SINGLE_ARMV7 is then selected to help with the behind the scenes work in the build scripts.
--- arch/arm/Kconfig | 4 ++++ arch/arm/mach-shmobile/Kconfig | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm/Kconfig +4 -0
@@ -359,6 +359,10 @@ config ARCH_MULTIPLATFORM select SPARSE_IRQ select USE_OF +config ARM_SOC_RENESAS_V7 + bool "Renesas ARM SoCs" + select ARM_SINGLE_ARMV7 + config ARM_SINGLE_ARMV7M bool "ARMv7-M based platforms (Cortex-M0/M3/M4)" depends on !MMU
arch/arm/mach-shmobile/Kconfig +1 -1
@@ -31,7 +31,7 @@ config ARCH_RMOBILE menuconfig ARCH_RENESAS bool "Renesas ARM SoCs" - depends on ARCH_MULTI_V7 && MMU + depends on (ARCH_MULTI_V7 || ARM_SOC_RENESAS_V7) && MMU select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE select ARCH_SHMOBILE select ARCH_SHMOBILE_MULTI
Signature · 1 line
2.10.1