diff mbox

[RFC,v2,23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU

Message ID 1480423205-48436-24-git-send-email-vladimir.murzin@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vladimir Murzin Nov. 29, 2016, 12:40 p.m. UTC
With this patch applied potentially any platform can be built in NOMMU
configurations if CONFIG_EXPERT is selected. However, there is no
guaranty that platform can successfully run such Image. So the main
motivation behind of this patch:
- bring build coverage for NOMMU configurations
- allow known working NOMMU platforms (like R-class) to be used
- pave a way to add support for single address space (aka 1:1 mapping)
  for MMU platforms, so they can be usable in NOMMU configurations

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm/Kconfig |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

Comments

Russell King (Oracle) Nov. 29, 2016, 5:22 p.m. UTC | #1
On Tue, Nov 29, 2016 at 12:40:05PM +0000, Vladimir Murzin wrote:
> With this patch applied potentially any platform can be built in NOMMU
> configurations if CONFIG_EXPERT is selected. However, there is no
> guaranty that platform can successfully run such Image. So the main

guarantee

> motivation behind of this patch:
> - bring build coverage for NOMMU configurations
> - allow known working NOMMU platforms (like R-class) to be used
> - pave a way to add support for single address space (aka 1:1 mapping)
>   for MMU platforms, so they can be usable in NOMMU configurations
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
>  arch/arm/Kconfig |   21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index e78c822..bc6f406 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -327,9 +327,9 @@ choice
>  
>  config ARCH_MULTIPLATFORM
>  	bool "Allow multiple platforms to be selected"
> -	depends on MMU
> +	depends on MMU || EXPERT
>  	select ARM_HAS_SG_CHAIN
> -	select ARM_PATCH_PHYS_VIRT
> +	select ARM_PATCH_PHYS_VIRT if MMU
>  	select AUTO_ZRELADDR
>  	select CLKSRC_OF
>  	select COMMON_CLK
> @@ -339,6 +339,23 @@ config ARCH_MULTIPLATFORM
>  	select PCI_DOMAINS if PCI
>  	select SPARSE_IRQ
>  	select USE_OF
> +	help
> +	  Please, read carefully if you've selected CONFIG_MMU=n!
> +
> +	  Multiplatform with !MMU configuration *is not* meant that
> +	  kernel built to support every platform will boot on them. It
> +	  is because physical address space layouts (particularly where
> +	  RAM is located) are different between platforms and there is
> +	  no MMU to work that around.
> +
> +	  You must specify where RAM start (via DRAM_BASE config
> +	  option) and appropriate size of RAM (via DRAM_SIZE config
> +	  option) which are valid for the platform you are building
> +	  for.
> +
> +	  This feature is *EXPERIMENTAL*, please, consider building
> +	  with CONFIG_MMU=y unless you know what you do or want to
> +	  help with testing.

Do you actually see this help text anywhere?  I don't think multiple-choice
options show help for individual choices.
Vladimir Murzin Nov. 30, 2016, 10:01 a.m. UTC | #2
On 29/11/16 17:22, Russell King - ARM Linux wrote:
> On Tue, Nov 29, 2016 at 12:40:05PM +0000, Vladimir Murzin wrote:
>> With this patch applied potentially any platform can be built in NOMMU
>> configurations if CONFIG_EXPERT is selected. However, there is no
>> guaranty that platform can successfully run such Image. So the main
> 
> guarantee
> 
>> motivation behind of this patch:
>> - bring build coverage for NOMMU configurations
>> - allow known working NOMMU platforms (like R-class) to be used
>> - pave a way to add support for single address space (aka 1:1 mapping)
>>   for MMU platforms, so they can be usable in NOMMU configurations
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Alexander Shiyan <shc_work@mail.ru>
>> Cc: Shawn Guo <shawnguo@kernel.org>
>> Cc: Sascha Hauer <kernel@pengutronix.de>
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: Russell King <linux@armlinux.org.uk>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>>  arch/arm/Kconfig |   21 +++++++++++++++++++--
>>  1 file changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index e78c822..bc6f406 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -327,9 +327,9 @@ choice
>>  
>>  config ARCH_MULTIPLATFORM
>>  	bool "Allow multiple platforms to be selected"
>> -	depends on MMU
>> +	depends on MMU || EXPERT
>>  	select ARM_HAS_SG_CHAIN
>> -	select ARM_PATCH_PHYS_VIRT
>> +	select ARM_PATCH_PHYS_VIRT if MMU
>>  	select AUTO_ZRELADDR
>>  	select CLKSRC_OF
>>  	select COMMON_CLK
>> @@ -339,6 +339,23 @@ config ARCH_MULTIPLATFORM
>>  	select PCI_DOMAINS if PCI
>>  	select SPARSE_IRQ
>>  	select USE_OF
>> +	help
>> +	  Please, read carefully if you've selected CONFIG_MMU=n!
>> +
>> +	  Multiplatform with !MMU configuration *is not* meant that
>> +	  kernel built to support every platform will boot on them. It
>> +	  is because physical address space layouts (particularly where
>> +	  RAM is located) are different between platforms and there is
>> +	  no MMU to work that around.
>> +
>> +	  You must specify where RAM start (via DRAM_BASE config
>> +	  option) and appropriate size of RAM (via DRAM_SIZE config
>> +	  option) which are valid for the platform you are building
>> +	  for.
>> +
>> +	  This feature is *EXPERIMENTAL*, please, consider building
>> +	  with CONFIG_MMU=y unless you know what you do or want to
>> +	  help with testing.
> 
> Do you actually see this help text anywhere?  I don't think multiple-choice
> options show help for individual choices.
> 

Yes I can: "System Type" -> "ARM system type" -> "Allow multiple platforms to
be selected" -> "?". Probably not the best place, but I failed to find
anything better :(

Cheers
Vladimir
Chris Brandt Dec. 1, 2016, 8:11 p.m. UTC | #3
On 11/29/2016, Vladimir Murzin wrote:
> >> motivation behind of this patch:
> >> - bring build coverage for NOMMU configurations
> >> - allow known working NOMMU platforms (like R-class) to be used
> >> - pave a way to add support for single address space (aka 1:1 mapping)
> >>   for MMU platforms, so they can be usable in NOMMU configurations


I use XIP_KERNEL with a MMU platform (Renesas RZ/A1, Cortex A9) which is
also ARCH_MULTIPLATFORM.

So I also have to hack the Kconfig to get it to build.

I had proposed this patch to allow you to select which multiplatform
devices are XIP capable, but it never made it in.

https://patchwork.kernel.org/patch/8395661/


Maybe you can do the same idea for !MMU platforms as well (just
say whether the device can do XIP regardless of MMU or !MMU)


Chris
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e78c822..bc6f406 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -327,9 +327,9 @@  choice
 
 config ARCH_MULTIPLATFORM
 	bool "Allow multiple platforms to be selected"
-	depends on MMU
+	depends on MMU || EXPERT
 	select ARM_HAS_SG_CHAIN
-	select ARM_PATCH_PHYS_VIRT
+	select ARM_PATCH_PHYS_VIRT if MMU
 	select AUTO_ZRELADDR
 	select CLKSRC_OF
 	select COMMON_CLK
@@ -339,6 +339,23 @@  config ARCH_MULTIPLATFORM
 	select PCI_DOMAINS if PCI
 	select SPARSE_IRQ
 	select USE_OF
+	help
+	  Please, read carefully if you've selected CONFIG_MMU=n!
+
+	  Multiplatform with !MMU configuration *is not* meant that
+	  kernel built to support every platform will boot on them. It
+	  is because physical address space layouts (particularly where
+	  RAM is located) are different between platforms and there is
+	  no MMU to work that around.
+
+	  You must specify where RAM start (via DRAM_BASE config
+	  option) and appropriate size of RAM (via DRAM_SIZE config
+	  option) which are valid for the platform you are building
+	  for.
+
+	  This feature is *EXPERIMENTAL*, please, consider building
+	  with CONFIG_MMU=y unless you know what you do or want to
+	  help with testing.
 
 config ARM_SINGLE_ARMV7M
 	bool "ARMv7-M based platforms (Cortex-M0/M3/M4)"