Allow NOMMU for MULTIPLATFORM
Subsystems (4)
cover Allow NOMMU for MULTIPLATFORM
Hi,
With transition to MULTIPLATFORM we lost capability to build NOMMU configurations. Maybe not a big deal, but there is still interest in building NOMMU configuration apart from M-class cores. Basically, I'm talking about R-class cores which shares a lot with A-class except MMU; there was little interest to run A-class with MMU disabled (or 1:1 MMU mapping) as well. By now it is not even possible to build such configurations without extra patches on top. Another aspect is that some portion of NOMMU code have been (build) untested for a while. All these makes it even harder to involve more people in using NOMMU and build community around that.
This series is trying to make it possible to build NOMMU configurations. It is done in PATCH 11/11 which allows to select ARCH_MULTIPLATFORM even for NOMMU. This is controlled with EXPERT config option. All patches prior 11/11 is an attempt to fix build failures for NOMMU case. I don't claim they are 100% correct, so I'm open to suggestion how they can be done in a better way.
Vladimir Murzin (11):
ARM: NOMMU: define stubs for fixup
ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only
ARM: omap: do not select HIGHMEM explicitly
PCI: tegra: limit to MMU build only
ARM: move arm_heavy_mb to MMU/noMMU neutral place
ARM: tlbflush: drop dependency on CONFIG_SMP
ARM: sleep: allow it to be build for R-class
ARM: NOMMU: define debug_ll_io_ini
ARM: NOMMU: define SECTION_xxx macros
ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions
ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
arch/arm/Kconfig | 8 ++++---- arch/arm/include/asm/fixmap.h | 6 ++++++ arch/arm/include/asm/mach/map.h | 2 ++ arch/arm/include/asm/pgtable-nommu.h | 5 +++++ arch/arm/include/asm/tlbflush.h | 2 +- arch/arm/kernel/sleep.S | 4 ---- arch/arm/mach-omap2/Kconfig | 1 - arch/arm/mm/flush.c | 15 --------------- arch/arm/mm/iomap.c | 17 +++++++++++++++++ arch/arm/mm/nommu.c | 35 ++++++++++++++++++++++++++++++++++ drivers/pci/host/Kconfig | 2 +- 11 files changed, 71 insertions(+), 26 deletions(-)
Signature · 1 line
1.7.9.5
RFC PATCH 1/11 ARM: NOMMU: define stubs for fixup
When build for NOMMU following errors show ups:
arch/arm/kernel/patch.c: In function 'patch_map':arch/arm/kernel/patch.c:39:2: error: implicit declaration of function 'set_fixmap' [-Werror=implicit-function-declaration]
set_fixmap(fixmap, page_to_phys(page));
^arch/arm/kernel/patch.c:41:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK));
^arch/arm/kernel/patch.c: In function 'patch_unmap':arch/arm/kernel/patch.c:47:2: error: implicit declaration of function 'clear_fixmap' [-Werror=implicit-function-declaration]
clear_fixmap(fixmap);
^
cc1: some warnings being treated as errors
Fixup does not make much sense in NOMMU configurations, so provide stub definitions.
--- arch/arm/include/asm/fixmap.h | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/include/asm/fixmap.h +6 -0
@@ -59,6 +59,12 @@ enum fixed_addresses {#else +#define set_fixmap (idx, phys) +#define clear_fixmap (idx) + +#define __fix_to_virt (x) (x) +#define __virt_to_fix (x) (x) +static inline void early_fixmap_init (void ) { }#endif
Signature · 1 line
1.7.9.5
Russell King - ARM Linux
maintainerRFC PATCH 1/11 ARM: NOMMU: define stubs for fixup
Quoted 15 lines · Vladimir Murzin
When build for NOMMU following errors show ups:
arch/arm/kernel/patch.c: In function 'patch_map':arch/arm/kernel/patch.c:39:2: error: implicit declaration of function 'set_fixmap' [-Werror=implicit-function-declaration]
set_fixmap(fixmap, page_to_phys(page));
^arch/arm/kernel/patch.c:41:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
return (void *) (__fix_to_virt(fixmap)+ (uintaddr & ~PAGE_MASK));
^arch/arm/kernel/patch.c: In function 'patch_unmap':arch/arm/kernel/patch.c:47:2: error: implicit declaration of function 'clear_fixmap' [-Werror=implicit-function-declaration]
clear_fixmap(fixmap);
^
cc1: some warnings being treated as errors
Quoted 4 lines
Fixup does not make much sense in NOMMU configurations, so provide stub definitions.
Cc Russell King <[email protected]>
I think there should be a Fixes: line for the commit which introduced this?
Quoted 25 lines
Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/fixmap.h | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/include/asm/fixmap.h +6
-0@@ -59,6 +59,12 @@ enum fixed_addresses {#else +#define set_fixmap (idx, phys) +#define clear_fixmap (idx) + +#define __fix_to_virt (x) (x) +#define __virt_to_fix (x) (x) +static inline void early_fixmap_init (void ) { }#endif Signature · 1 line
1.7.9.5
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.
RFC PATCH 1/11 ARM: NOMMU: define stubs for fixup
Quoted 16 lines · Russell King - ARM Linux
Quoted 15 lines · Vladimir Murzin
When build for NOMMU following errors show ups:
arch/arm/kernel/patch.c: In function 'patch_map':arch/arm/kernel/patch.c:39:2: error: implicit declaration of function 'set_fixmap' [-Werror=implicit-function-declaration]
set_fixmap(fixmap, page_to_phys(page));
^arch/arm/kernel/patch.c:41:2: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
return (void *) (__fix_to_virt(fixmap)+ (uintaddr & ~PAGE_MASK));
^arch/arm/kernel/patch.c: In function 'patch_unmap':arch/arm/kernel/patch.c:47:2: error: implicit declaration of function 'clear_fixmap' [-Werror=implicit-function-declaration]
clear_fixmap(fixmap);
^
cc1: some warnings being treated as errors
Quoted 7 lines
Quoted 4 lines
Fixup does not make much sense in NOMMU configurations, so provide stub definitions.
Cc Russell King <[email protected]>I think there should be a Fixes: line for the commit which introduced this?
It was discovered only after PATCH 11/11 was applied. Without that patch this error is unreachable, so no regression.
If you do think it is a good to have Fixes: I can add
Cheers
Vladimir
Quoted 27 lines
Quoted 26 lines
Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/fixmap.h | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/include/asm/fixmap.h +6
-0@@ -59,6 +59,12 @@ enum fixed_addresses {#else +#define set_fixmap (idx, phys) +#define clear_fixmap (idx) + +#define __fix_to_virt (x) (x) +#define __virt_to_fix (x) (x) +static inline void early_fixmap_init (void ) { }#endif Signature · 1 line
1.7.9.5
RFC PATCH 2/11 ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only
In reply to Vladimir MurzinBuilding in NOMMU configurations lead to the following splat:
warning: (ARCH_INTEGRATOR && ARCH_MULTIPLATFORM && ARCH_EP93XX) selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU)
Make sure ARM_PATCH_PHYS_VIRT is selected for MMU builds only.
--- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
@@ -380,7 +380,7 @@ config ARCH_EP93XX bool "EP93xx-based" select ARCH_HAS_HOLES_MEMORYMODEL select ARM_AMBA - select ARM_PATCH_PHYS_VIRT + select ARM_PATCH_PHYS_VIRT if MMU select ARM_VIC select AUTO_ZRELADDR select CLKDEV_LOOKUP
Signature · 1 line
1.7.9.5
RFC PATCH 3/11 ARM: omap: do not select HIGHMEM explicitly
In reply to Vladimir MurzinExplicit selection of HIGHMEM breaks NOMMU builds. It seems that HIGHMEM is user selectable option, so probably it would be better to let user to make a decision on this options or, at least, move it to defconfig.
--- arch/arm/mach-omap2/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/Kconfig +0 -1
@@ -120,7 +120,6 @@ config ARCH_OMAP2PLUS_TYPICAL bool "Typical OMAP configuration" default y select AEABI - select HIGHMEM select I2C select I2C_OMAP select MENELAUS if ARCH_OMAP2
Signature · 1 line
1.7.9.5
Russell King - ARM Linux
maintainerRFC PATCH 3/11 ARM: omap: do not select HIGHMEM explicitly
Quoted 4 lines · Vladimir Murzin
Explicit selection of HIGHMEM breaks NOMMU builds. It seems that HIGHMEM is user selectable option, so probably it would be better to let user to make a decision on this options or, at least, move it to defconfig.
That's kind of the point of ARCH_OMAP2PLUS_TYPICAL - it's a user option to let the user select a range of options for typical OMAP2+ configurations, so that the user doesn't have to dig around looking for multiple options, some of which are hard requirements for OMAP to be functional. OMAP is a particularly difficult case because the hardware tends to be very complex.
However, HIGHMEM should never be a requirement to boot, so this looks sane.
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.
Tony Lindgren
maintainerRFC PATCH 3/11 ARM: omap: do not select HIGHMEM explicitly
Quoted 13 lines · Russell King - ARM Linux
Quoted 4 lines · Vladimir Murzin
Explicit selection of HIGHMEM breaks NOMMU builds. It seems that HIGHMEM is user selectable option, so probably it would be better to let user to make a decision on this options or, at least, move it to defconfig.
That's kind of the point of
ARCH_OMAP2PLUS_TYPICAL- it's a user option to let the user select a range of options for typical OMAP2+ configurations, so that the user doesn't have to dig around looking for multiple options, some of which are hard requirements for OMAP to be functional. OMAP is a particularly difficult case because the hardware tends to be very complex.
Quoted 2 lines
However, HIGHMEM should never be a requirement to boot, so this looks sane.
Yeah we can add that to the defconfig:
RFC PATCH 3/11 ARM: omap: do not select HIGHMEM explicitly
Quoted 14 lines · Tony Lindgren
Quoted 13 lines · Russell King - ARM Linux
Quoted 4 lines · Vladimir Murzin
Explicit selection of HIGHMEM breaks NOMMU builds. It seems that HIGHMEM is user selectable option, so probably it would be better to let user to make a decision on this options or, at least, move it to defconfig.
That's kind of the point of
ARCH_OMAP2PLUS_TYPICAL- it's a user option to let the user select a range of options for typical OMAP2+ configurations, so that the user doesn't have to dig around looking for multiple options, some of which are hard requirements for OMAP to be functional. OMAP is a particularly difficult case because the hardware tends to be very complex.
Quoted 7 lines
Quoted 2 lines
However, HIGHMEM should never be a requirement to boot, so this looks sane.
Yeah we can add that to the defconfig:
Acked-by Tony Lindgren <[email protected]>
Thanks!
Vladimir
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
In reply to Vladimir MurzinThis driver uses functionality which available for MMU build only, thus add dependency on MMU.
--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/Kconfig +1 -1
@@ -69,7 +69,7 @@ config PCI_IMX6 config PCI_TEGRA bool "NVIDIA Tegra PCIe controller" - depends on ARCH_TEGRA && !ARM64 + depends on ARCH_TEGRA && !ARM64 && MMU help Say Y here if you want support for the PCIe host controller found on NVIDIA Tegra SoCs.
Signature · 1 line
1.7.9.5
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>
Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Arnd
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Yes it comes from I/O space remapping.
The fill error log:
CC drivers/pci/host/pci-tegra.o
In file included from ./arch/arm/include/asm/page.h:22:0,
from ./arch/arm/include/asm/thread_info.h:17,
from ./include/linux/thread_info.h:58,
from ./include/asm-generic/current.h:4,
from ./arch/arm/include/generated/asm/current.h:1,
from ./include/linux/mutex.h:13,
from ./include/linux/notifier.h:13,
from ./include/linux/clk.h:17,
from drivers/pci/host/pci-tegra.c:29:
drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_bus_alloc':
drivers/pci/host/pci-tegra.c:388:27: error: 'L_PTE_PRESENT' undeclared (first use in this function)
pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:388:27: note: each undeclared identifier is reported only once for each function it appears in
pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:388:43: error: 'L_PTE_YOUNG' undeclared (first use in this function)
pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:388:57: error: 'L_PTE_DIRTY' undeclared (first use in this function)
pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:389:6: error: 'L_PTE_XN' undeclared (first use in this function)
L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:389:17: error: 'L_PTE_MT_DEV_SHARED' undeclared (first use in this function)
L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c:389:39: error: 'L_PTE_SHARED' undeclared (first use in this function)
L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
drivers/pci/host/pci-tegra.c: At top level:
drivers/pci/host/pci-tegra.c:501:10: error: 'pci_generic_config_read32' undeclared here (not in a function)
.read = pci_generic_config_read32,
^
drivers/pci/host/pci-tegra.c:502:11: error: 'pci_generic_config_write32' undeclared here (not in a function)
.write = pci_generic_config_write32,
^drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_relax_enable':drivers/pci/host/pci-tegra.c:609:2: error: implicit declaration of function 'pcie_capability_set_word' [-Werror=implicit-function-declaration]
pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN);
^drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_setup':drivers/pci/host/pci-tegra.c:626:8: error: implicit declaration of function 'pci_remap_iospace' [-Werror=implicit-function-declaration]
err = pci_remap_iospace(&pcie->pio, pcie->io.start);
^drivers/pci/host/pci-tegra.c:628:3: error: implicit declaration of function 'pci_add_resource_offset' [-Werror=implicit-function-declaration]
pci_add_resource_offset(&sys->resources, &pcie->pio,
^drivers/pci/host/pci-tegra.c:634:2: error: implicit declaration of function 'pci_add_resource' [-Werror=implicit-function-declaration]
pci_add_resource(&sys->resources, &pcie->busn);
^drivers/pci/host/pci-tegra.c:636:8: error: implicit declaration of function 'devm_request_pci_bus_resources' [-Werror=implicit-function-declaration]
err = devm_request_pci_bus_resources(dev, &sys->resources);
^cc1: some warnings being treated as errors make[1]: *** [drivers/pci/host/pci-tegra.o] Error 1
make: *** [drivers/pci/host/pci-tegra.o] Error 2
Cheers
Vladimir
Quoted 4 lines
Arnd
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 27 lines · CET Vladimir Murzin
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Yes it comes from I/O space remapping.
The fill error log:
CC
drivers/pci/host/pci-tegra.o
In file included from./arch/arm/include/asm/page.h:22:0,from ./arch/arm/include/asm/thread_info.h:17, from ./include/linux/thread_info.h:58, from ./include/asm-generic/current.h:4, from ./arch/arm/include/generated/asm/current.h:1, from ./include/linux/mutex.h:13, from ./include/linux/notifier.h:13, from ./include/linux/clk.h:17, from drivers/pci/host/pci-tegra.c:29:
Quoted 3 lines
drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_bus_alloc':drivers/pci/host/pci-tegra.c:388:27: error: 'L_PTE_PRESENT' undeclared (first use in this function)
pgprot_tprot = __pgprot(L_PTE_PRESENT |L_PTE_YOUNG|L_PTE_DIRTY|
That is not the I/O space, that is the config space.
Not sure what a better alternative would be, but the manual selection of page flags makes the driver non-portable and dependent on architecture specifics that it really shouldn't have to worry about.
In common PCI code, we use pgprot_device(PAGE_KERNEL)) at some point, and that sounds like the right thing to do, but ARM doesn't provide an override for it and the fallback is pgprot_noncached(), which is probably wrong here.
Unless someone has a good idea for how to change the driver, just mention this in the changelog.
Arnd
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 33 lines · Arnd Bergmann
Quoted 27 lines · CET Vladimir Murzin
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Yes it comes from I/O space remapping.
The fill error log:
CC
drivers/pci/host/pci-tegra.o
In file included from./arch/arm/include/asm/page.h:22:0,from ./arch/arm/include/asm/thread_info.h:17, from ./include/linux/thread_info.h:58, from ./include/asm-generic/current.h:4, from ./arch/arm/include/generated/asm/current.h:1, from ./include/linux/mutex.h:13, from ./include/linux/notifier.h:13, from ./include/linux/clk.h:17, from drivers/pci/host/pci-tegra.c:29:Quoted 3 lines
drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_bus_alloc':drivers/pci/host/pci-tegra.c:388:27: error: 'L_PTE_PRESENT' undeclared (first use in this function)
pgprot_tprot = __pgprot(L_PTE_PRESENT |L_PTE_YOUNG|L_PTE_DIRTY|
Quoted 1 line
That is not the I/O space, that is the config space.
Sorry for that, I'm not in PCI :(
Quoted 5 lines
Not sure what a better alternative would be, but the manual selection of page flags makes the driver non-portable and dependent on architecture specifics that it really shouldn't have to worry about.
Quoted 7 lines
In common PCI code, we use
pgprot_device(PAGE_KERNEL)) at some point, and that sounds like the right thing to do, but ARM doesn't provide an override for it and the fallback ispgprot_noncached(), which is probably wrong here.Unless someone has a good idea for how to change the driver, just mention this in the changelog.
Thanks for explanation! I'll wait for Thierry's thoughts on this.
Cheers
Vladimir
Quoted 3 lines
Arnd
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
In reply to Arnd BergmannQuoted 35 lines · Arnd Bergmann
Quoted 27 lines · CET Vladimir Murzin
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Yes it comes from I/O space remapping.
The fill error log:
CC
drivers/pci/host/pci-tegra.o
In file included from./arch/arm/include/asm/page.h:22:0,from ./arch/arm/include/asm/thread_info.h:17, from ./include/linux/thread_info.h:58, from ./include/asm-generic/current.h:4, from ./arch/arm/include/generated/asm/current.h:1, from ./include/linux/mutex.h:13, from ./include/linux/notifier.h:13, from ./include/linux/clk.h:17, from drivers/pci/host/pci-tegra.c:29:Quoted 3 lines
drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_bus_alloc':drivers/pci/host/pci-tegra.c:388:27: error: 'L_PTE_PRESENT' undeclared (first use in this function)
pgprot_tprot = __pgprot(L_PTE_PRESENT |L_PTE_YOUNG|L_PTE_DIRTY|That is not the I/O space, that is the config space.
Quoted 8 lines
Not sure what a better alternative would be, but the manual selection of page flags makes the driver non-portable and dependent on architecture specifics that it really shouldn't have to worry about.
In common PCI code, we use
pgprot_device(PAGE_KERNEL)) at some point, and that sounds like the right thing to do, but ARM doesn't provide an override for it and the fallback ispgprot_noncached(), which is probably wrong here.
Actually I think pgprot_noncached() is correct. Very early on we used to map this using ioremap() and I remember that working. I also just tested the pci-tegra driver with pgprot_device(PAGE_KERNEL) instead of the ARM- specific flags and it seems to work well.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161122/220bb54b/attachment-0001.sig>
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 45 lines · Thierry Reding
Quoted 35 lines · Arnd Bergmann
Quoted 27 lines · CET Vladimir Murzin
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · CET Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
Cc Thierry Reding <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>Can you be more specific about what requires the MMU here?
Is it the I/O space remapping or something else?
Yes it comes from I/O space remapping.
The fill error log:
CC
drivers/pci/host/pci-tegra.o
In file included from./arch/arm/include/asm/page.h:22:0,from ./arch/arm/include/asm/thread_info.h:17, from ./include/linux/thread_info.h:58, from ./include/asm-generic/current.h:4, from ./arch/arm/include/generated/asm/current.h:1, from ./include/linux/mutex.h:13, from ./include/linux/notifier.h:13, from ./include/linux/clk.h:17, from drivers/pci/host/pci-tegra.c:29:Quoted 3 lines
drivers/pci/host/pci-tegra.c: In function 'tegra_pcie_bus_alloc':drivers/pci/host/pci-tegra.c:388:27: error: 'L_PTE_PRESENT' undeclared (first use in this function)
pgprot_tprot = __pgprot(L_PTE_PRESENT |L_PTE_YOUNG|L_PTE_DIRTY|That is not the I/O space, that is the config space.
Quoted 8 lines
Not sure what a better alternative would be, but the manual selection of page flags makes the driver non-portable and dependent on architecture specifics that it really shouldn't have to worry about.
In common PCI code, we use
pgprot_device(PAGE_KERNEL)) at some point, and that sounds like the right thing to do, but ARM doesn't provide an override for it and the fallback ispgprot_noncached(), which is probably wrong here.
Quoted 5 lines
Actually I think
pgprot_noncached()is correct. Very early on we used to map this usingioremap()and I remember that working. I also just tested the pci-tegra driver withpgprot_device(PAGE_KERNEL)instead of the ARM- specific flags and it seems to work well.
I did try that, but tegra_pcie_bus_alloc() calls get_vm_area() so
drivers/built-in.o: In function `tegra_pcie_add_bus':
:(.text+0x7763c): undefined reference to `get_vm_area'
make: *** [vmlinux] Error 1
Cheers
Vladimir
Quoted 2 lines
Thierry
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
In reply to Vladimir MurzinQuoted 2 lines · Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
I'd expect ARCH_TEGRA to depend on MMU instead.
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 6 lines · CET Stephen Warren
Quoted 2 lines · Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
I'd expect
ARCH_TEGRAto depend on MMU instead.
Any particular reason for why we'd single out Tegra?
Arnd
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 9 lines · Arnd Bergmann
Quoted 6 lines · CET Stephen Warren
Quoted 2 lines · Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
I'd expect
ARCH_TEGRAto depend on MMU instead.Any particular reason for why we'd single out Tegra?
From the cover letter, it sounded like the point of the series was to
all !MMU builds for a bunch of SoCs with M-class cores. Tegra doesn't have an M-class core so I wouldn't expect it to be included in such a build. I'd expect the same fix that I suggested to apply to all non-M-class SoCs, rather than fixing up individual drivers to depend on !MMU.
RFC PATCH 4/11 PCI: tegra: limit to MMU build only
Quoted 9 lines · CET Stephen Warren
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines · CET Stephen Warren
Quoted 2 lines · Vladimir Murzin
This driver uses functionality which available for MMU build only, thus add dependency on MMU.
I'd expect
ARCH_TEGRAto depend on MMU instead.
Quoted 8 lines
Quoted 1 line
Any particular reason for why we'd single out Tegra?
From the cover letter, it sounded like the point of the series was to
all !MMU builds for a bunch of SoCs with M-class cores. Tegra doesn't have an M-class core so I wouldn't expect it to be included in such a build. I'd expect the same fix that I suggested to apply to all non-M-class SoCs, rather than fixing up individual drivers to depend on !MMU.
I think you misread that, the point is to get NOMMU support back for machines other than ARMv7-M, the Cortex-M based machines already work without this.
Arnd
RFC PATCH 5/11 ARM: move arm_heavy_mb to MMU/noMMU neutral place
In reply to Vladimir MurzinSo it can be referenced from both camps.
--- arch/arm/mm/flush.c | 15 --------------- arch/arm/mm/iomap.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-)
arch/arm/mm/flush.c +0 -15
@@ -21,21 +21,6 @@#include "mm.h" -#ifdef CONFIG_ARM_HEAVY_MB -void (*soc_mb)(void ); - -void arm_heavy_mb (void ) -{ -#ifdef CONFIG_OUTER_CACHE_SYNC -if (outer_cache.sync) - outer_cache.sync (); -#endif -if (soc_mb) -soc_mb (); -} -EXPORT_SYMBOL (arm_heavy_mb); -#endif -#ifdef CONFIG_CPU_CACHE_VIPT static void flush_pfn_alias (unsigned long pfn,unsigned long vaddr)
arch/arm/mm/iomap.c +17 -0
@@ -9,6 +9,8 @@#include <linux/ioport.h> #include <linux/io.h> +#include <asm/outercache.h> +unsigned long vga_base;EXPORT_SYMBOL (vga_base);
@@ -40,3 +42,18 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr) }EXPORT_SYMBOL (pci_iounmap);#endif + +#ifdef CONFIG_ARM_HEAVY_MB +void (*soc_mb)(void ); + +void arm_heavy_mb (void ) +{ +#ifdef CONFIG_OUTER_CACHE_SYNC +if (outer_cache.sync) + outer_cache.sync (); +#endif +if (soc_mb) +soc_mb (); +} +EXPORT_SYMBOL (arm_heavy_mb); +#endif
Signature · 1 line
1.7.9.5
RFC PATCH 6/11 ARM: tlbflush: drop dependency on CONFIG_SMP
In reply to Vladimir MurzinIt can be referenced in UP case as well.
--- arch/arm/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/tlbflush.h +1 -1
@@ -641,7 +641,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,#endif -#elif defined(CONFIG_SMP)/* !CONFIG_MMU */ +#else /* !CONFIG_MMU */ #ifndef __ASSEMBLY__
Signature · 1 line
1.7.9.5
Russell King - ARM Linux
maintainerRFC PATCH 6/11 ARM: tlbflush: drop dependency on CONFIG_SMP
Quoted 1 line · Vladimir Murzin
It can be referenced in UP case as well.
What's missing is an explanation of why you want this change. Exposing the local_* stuff doesn't make sense for UP.
Quoted 22 lines
Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/include/asm/tlbflush.h +1
-1@@ -641,7 +641,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,#endif -#elif defined(CONFIG_SMP)/* !CONFIG_MMU */ +#else /* !CONFIG_MMU */ #ifndef __ASSEMBLY__Signature · 1 line
1.7.9.5
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.
RFC PATCH 6/11 ARM: tlbflush: drop dependency on CONFIG_SMP
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
It can be referenced in UP case as well.
What's missing is an explanation of why you want this change. Exposing the local_* stuff doesn't make sense for UP.
It comes from:
arch/arm/mach-mvebu/pmsu.c: In function 'armada_370_xp_pmsu_idle_enter':arch/arm/mach-mvebu/pmsu.c:291:2: error: implicit declaration of function 'local_flush_tlb_all' [-Werror=implicit-function-declaration]
local_flush_tlb_all();
^
make[1]: *** [arch/arm/mach-mvebu/pmsu.o] Error 1
and
arch/arm/mach-imx/pm-imx5.c: In function 'mx5_suspend_enter':arch/arm/mach-imx/pm-imx5.c:227:3: error: implicit declaration of function 'local_flush_tlb_all' [-Werror=implicit-function-declaration]
local_flush_tlb_all();
^
cc1: some warnings being treated as errors make[1]: *** [arch/arm/mach-imx/pm-imx5.o] Error 1
Maybe there are other users, please, let me know if you want me to count them all.
Cheers
Vladimir
Quoted 24 lines
Quoted 23 lines
Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/include/asm/tlbflush.h +1
-1@@ -641,7 +641,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,#endif -#elif defined(CONFIG_SMP)/* !CONFIG_MMU */ +#else /* !CONFIG_MMU */ #ifndef __ASSEMBLY__Signature · 1 line
1.7.9.5
RFC PATCH 6/11 ARM: tlbflush: drop dependency on CONFIG_SMP
Quoted 21 lines · Vladimir Murzin
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
It can be referenced in UP case as well.
What's missing is an explanation of why you want this change. Exposing the local_* stuff doesn't make sense for UP.
It comes from:
arch/arm/mach-mvebu/pmsu.c: In function 'armada_370_xp_pmsu_idle_enter':arch/arm/mach-mvebu/pmsu.c:291:2: error: implicit declaration of function 'local_flush_tlb_all' [-Werror=implicit-function-declaration]
local_flush_tlb_all();
^make[1]: *** [
arch/arm/mach-mvebu/pmsu.o] Error 1and
arch/arm/mach-imx/pm-imx5.c: In function 'mx5_suspend_enter':arch/arm/mach-imx/pm-imx5.c:227:3: error: implicit declaration of function 'local_flush_tlb_all' [-Werror=implicit-function-declaration]
Quoted 7 lines
local_flush_tlb_all(); ^cc1: some warnings being treated as errors make[1]: *** [
arch/arm/mach-imx/pm-imx5.o] Error 1Maybe there are other users, please, let me know if you want me to count them all.
Russell, is it a good argument to expose the local_* stuff or it should be addressed differently?
Thanks
Vladimir
Quoted 35 lines
Cheers
VladimirQuoted 15 lines
Quoted 15 lines
Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/include/asm/tlbflush.h +0
-0@@ -641,7 +641,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,#endif Quoted 9 lines
Quoted 8 lines
arch/arm/include/asm/tlbflush.h +1
-1-#elif defined(CONFIG_SMP )/* !CONFIG_MMU */ +#else /* !CONFIG_MMU */ #ifndef __ASSEMBLY__Signature · 1 line
1.7.9.5_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
RFC PATCH 7/11 ARM: sleep: allow it to be build for R-class
In reply to Vladimir MurzinDependency on MMU is quite strict and prevent R-class from being built - relax this condition and guard against M-class only
--- arch/arm/Kconfig | 2 +- arch/arm/kernel/sleep.S | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-)
arch/arm/Kconfig +1 -1
@@ -2179,7 +2179,7 @@ config ARCH_SUSPEND_POSSIBLE def_bool y config ARM_CPU_SUSPEND - def_bool PM_SLEEP || BL_SWITCHER || ARM_PSCI_FW + def_bool (PM_SLEEP || BL_SWITCHER || ARM_PSCI_FW) && !CPU_V7M depends on ARCH_SUSPEND_POSSIBLE config ARCH_HIBERNATION_POSSIBLE
arch/arm/kernel/sleep.S +0 -4
@@ -119,14 +119,12 @@ ENDPROC(cpu_resume_after_mmu) .text .align -#ifdef CONFIG_MMU .arm ENTRY(cpu_resume_arm) THUMB( badr r9, 1f ) @ Kernel is entered in ARM. THUMB( bx r9 ) @ If this is a Thumb-2 kernel, THUMB( .thumb ) @ switch to Thumb now. THUMB(1: ) -#endif ENTRY(cpu_resume) ARM_BE8(setend be) @ ensure we are in BE mode
@@ -160,9 +158,7 @@ THUMB( mov sp, r2 ) THUMB( bx r3 ) ENDPROC(cpu_resume) -#ifdef CONFIG_MMU ENDPROC(cpu_resume_arm) -#endif .align 2 _sleep_save_sp:
Signature · 1 line
1.7.9.5
RFC PATCH 8/11 ARM: NOMMU: define debug_ll_io_ini
In reply to Vladimir MurzinWe do not need to do anything in debug_ll_io_init in case of NOMMU.
--- arch/arm/include/asm/mach/map.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/mach/map.h +2 -0
@@ -62,6 +62,8 @@ extern int ioremap_page(unsigned long virt, unsigned long phys,#else #define iotable_init (map,num) do { } while (0)#define vm_reserve_area_early (a,s,c) do { } while (0) +#define debug_ll_io_init () do { } while (0) +#endif #endif
Signature · 1 line
1.7.9.5
RFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
In reply to Vladimir MurzinPickup defines from pgtable-2level.h to make NOMMU build happy.
--- arch/arm/include/asm/pgtable-nommu.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/include/asm/pgtable-nommu.h +5 -0
@@ -35,6 +35,11 @@#define PGDIR_SIZE (1UL << PGDIR_SHIFT)#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +#define SECTION_SHIFT 20 +#define SECTION_SIZE (1UL << SECTION_SHIFT) +#define SECTION_MASK (~(SECTION_SIZE-1)) +/* FIXME */ #define PAGE_NONE __pgprot(0)
Signature · 1 line
1.7.9.5
Russell King - ARM Linux
maintainerRFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
Quoted 1 line · Vladimir Murzin
Pickup defines from
pgtable-2level.hto make NOMMU build happy.
This needs more detail.
Quoted 26 lines
Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/pgtable-nommu.h | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/include/asm/pgtable-nommu.h +5
-0@@ -35,6 +35,11 @@#define PGDIR_SIZE (1UL << PGDIR_SHIFT)#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +#define SECTION_SHIFT 20 +#define SECTION_SIZE (1UL << SECTION_SHIFT) +#define SECTION_MASK (~(SECTION_SIZE-1)) +/* FIXME */ #define PAGE_NONE __pgprot(0)Signature · 1 line
1.7.9.5
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.
RFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
Pickup defines from
pgtable-2level.hto make NOMMU build happy.This needs more detail.
It comes from
CC arch/arm/kernel/setup.oarch/arm/kernel/setup.c: In function 'reserve_crashkernel':arch/arm/kernel/setup.c:1001:25: error: 'SECTION_SIZE' undeclared (first use in this function)
crash_size, SECTION_SIZE);
^arch/arm/kernel/setup.c:1001:25: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/kernel/setup.o] Error 1
make: *** [arch/arm/kernel] Error 2
Cheers
Vladimir
Quoted 27 lines
Quoted 26 lines
Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>--- arch/arm/include/asm/pgtable-nommu.h | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/include/asm/pgtable-nommu.h +5
-0@@ -35,6 +35,11 @@#define PGDIR_SIZE (1UL << PGDIR_SHIFT)#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +#define SECTION_SHIFT 20 +#define SECTION_SIZE (1UL << SECTION_SHIFT) +#define SECTION_MASK (~(SECTION_SIZE-1)) +/* FIXME */ #define PAGE_NONE __pgprot(0)Signature · 1 line
1.7.9.5
Russell King - ARM Linux
maintainerRFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
Quoted 9 lines · Vladimir Murzin
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
Pickup defines from
pgtable-2level.hto make NOMMU build happy.This needs more detail.
It comes from
Quoted 8 lines
CC
arch/arm/kernel/setup.oarch/arm/kernel/setup.c: In function 'reserve_crashkernel':arch/arm/kernel/setup.c:1001:25: error: 'SECTION_SIZE' undeclared (first use in this function)crash_size, SECTION_SIZE); ^
arch/arm/kernel/setup.c:1001:25: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/kernel/setup.o] Error 1
make: *** [arch/arm/kernel] Error 2
Hmm, I decided not to use CRASH_ALIGN there because I didn't want to break anyone's existing setup unnecessarily, however arguably it should be CRASH_ALIGN to ensure that the new kernel is properly positioned.
I wonder if we can get away with changing that, rather than unnecessarily introducing these otherwise meaningless definitions for R-class.
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.
RFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
Quoted 19 lines · Russell King - ARM Linux
Quoted 9 lines · Vladimir Murzin
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
Pickup defines from
pgtable-2level.hto make NOMMU build happy.This needs more detail.
It comes from
Quoted 8 lines
CC
arch/arm/kernel/setup.oarch/arm/kernel/setup.c: In function 'reserve_crashkernel':arch/arm/kernel/setup.c:1001:25: error: 'SECTION_SIZE' undeclared (first use in this function)crash_size, SECTION_SIZE); ^
arch/arm/kernel/setup.c:1001:25: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/kernel/setup.o] Error 1
make: *** [arch/arm/kernel] Error 2
Quoted 9 lines
Hmm, I decided not to use
CRASH_ALIGNthere because I didn't want to break anyone's existing setup unnecessarily, however arguably it should beCRASH_ALIGNto ensure that the new kernel is properly positioned.I wonder if we can get away with changing that, rather than unnecessarily introducing these otherwise meaningless definitions for R-class.
CRASH_ALIGN works fine but it seems not only user of SECTION_SIZE
In file included from ./include/linux/cache.h:4:0,
from ./include/linux/printk.h:8,
from ./include/linux/kernel.h:13,
from arch/arm/mach-omap2/omap-secure.c:15:
arch/arm/mach-omap2/omap-secure.c: In function 'omap_secure_ram_reserve_memblock':
arch/arm/mach-omap2/omap-secure.c:65:21: error: 'SECTION_SIZE' undeclared (first use in this function)
size = ALIGN(size, SECTION_SIZE);
^
./include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
./include/linux/kernel.h:48:22: note: in expansion of macro '__ALIGN_KERNEL'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
arch/arm/mach-omap2/omap-secure.c:65:9: note: in expansion of macro 'ALIGN'
size = ALIGN(size, SECTION_SIZE);
^
arch/arm/mach-omap2/omap-secure.c:65:21: note: each undeclared identifier is reported only once for each function it appears in
size = ALIGN(size, SECTION_SIZE);
^
./include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
./include/linux/kernel.h:48:22: note: in expansion of macro '__ALIGN_KERNEL'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
arch/arm/mach-omap2/omap-secure.c:65:9: note: in expansion of macro 'ALIGN'
size = ALIGN(size, SECTION_SIZE);
^make[1]: *** [arch/arm/mach-omap2/omap-secure.o] Error 1
Cheers
Vladimir
RFC PATCH 9/11 ARM: NOMMU: define SECTION_xxx macros
Quoted 61 lines · Vladimir Murzin
Quoted 19 lines · Russell King - ARM Linux
Quoted 9 lines · Vladimir Murzin
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Vladimir Murzin
Pickup defines from
pgtable-2level.hto make NOMMU build happy.This needs more detail.
It comes from
Quoted 8 lines
CC
arch/arm/kernel/setup.oarch/arm/kernel/setup.c: In function 'reserve_crashkernel':arch/arm/kernel/setup.c:1001:25: error: 'SECTION_SIZE' undeclared (first use in this function)crash_size, SECTION_SIZE); ^
arch/arm/kernel/setup.c:1001:25: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/kernel/setup.o] Error 1
make: *** [arch/arm/kernel] Error 2Quoted 9 lines
Hmm, I decided not to use
CRASH_ALIGNthere because I didn't want to break anyone's existing setup unnecessarily, however arguably it should beCRASH_ALIGNto ensure that the new kernel is properly positioned.I wonder if we can get away with changing that, rather than unnecessarily introducing these otherwise meaningless definitions for R-class.
CRASH_ALIGNworks fine but it seems not only user ofSECTION_SIZEIn file included from
./include/linux/cache.h:4:0,from ./include/linux/printk.h:8, from ./include/linux/kernel.h:13, from arch/arm/mach-omap2/omap-secure.c:15: arch/arm/mach-omap2/omap-secure.c: In function 'omap_secure_ram_reserve_memblock': arch/arm/mach-omap2/omap-secure.c:65:21: error: 'SECTION_SIZE' undeclared (first use in this function) size = ALIGN(size, SECTION_SIZE); ^ ./include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ ./include/linux/kernel.h:48:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ arch/arm/mach-omap2/omap-secure.c:65:9: note: in expansion of macro 'ALIGN' size = ALIGN(size, SECTION_SIZE); ^ arch/arm/mach-omap2/omap-secure.c:65:21: note: each undeclared identifier is reported only once for each function it appears in size = ALIGN(size, SECTION_SIZE); ^ ./include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ ./include/linux/kernel.h:48:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ arch/arm/mach-omap2/omap-secure.c:65:9: note: in expansion of macro 'ALIGN' size = ALIGN(size, SECTION_SIZE); ^
Quoted 1 line
make[1]: *** [
arch/arm/mach-omap2/omap-secure.o] Error 1
Russell, do you have further comment on this? I would try to address them in the next version.
Thanks!
Vladimir
Quoted 9 lines
Cheers
Vladimir_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
RFC PATCH 10/11 ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions
In reply to Vladimir MurzinDefine __arm_ioremap_exec and pci_ioremap* functions fallowing pattern for other ioremap functions.
--- arch/arm/mm/nommu.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/mm/nommu.c +35 -0
@@ -19,6 +19,7 @@#include <asm/cputype.h> #include <asm/mpu.h> #include <asm/procinfo.h> +#include <asm/mach/map.h> #include "mm.h"
@@ -401,3 +402,37 @@ void iounmap(volatile void __iomem *addr) { }EXPORT_SYMBOL (iounmap); + +void __iomem * +__arm_ioremap_exec (phys_addr_t phys_addr,size_t size,bool cached) +{ +unsigned int mtype; + +if (cached) + mtype =MT_MEMORY_RWX ; +else + mtype =MT_MEMORY_RWX_NONCACHED ; + +return __arm_ioremap_caller (phys_addr, size, mtype, +__builtin_return_address (0 )); +} + +#ifdef CONFIG_PCI +static int pci_ioremap_mem_type =MT_DEVICE ; + +void pci_ioremap_set_mem_type (int mem_type) +{ + pci_ioremap_mem_type = mem_type; +} + +int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr) +{ +BUG_ON (offset +SZ_64K >IO_SPACE_LIMIT ); + +return ioremap_page_range (PCI_IO_VIRT_BASE + offset, +PCI_IO_VIRT_BASE + offset +SZ_64K , + phys_addr, +MT_DEVICE ); +} +EXPORT_SYMBOL_GPL (pci_ioremap_io); +#endif
Signature · 1 line
1.7.9.5
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
In reply to Vladimir MurzinWith 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
--- arch/arm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/Kconfig +2 -2
@@ -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
Signature · 1 line
1.7.9.5
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 9 lines · CET Vladimir Murzin
With this patch applied potentially any platform can be built in NOMMU configurations if
CONFIG_EXPERTis 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
Quoted 6 lines
Cc Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>Cc Tony Lindgren <[email protected]>Cc Thierry Reding <[email protected]>Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>
I'd have to give this a spin with my randconfig build setup, I'd rather not introduce build regressions. Have you tried an allmodconfig build with CONFIG_MMU disabled?
Can you provide a git tree that I can try pulling in?
Another question is what architecture levels and what platforms we want to support without MMU. The only ARMv4/v5 platform we still have that can actually use NOMMU cores is Integrator with its ARM7TDMI, ARM920T and ARM966E core tiles (and possibly others I couldn't immediately find). Do we actually care about them any more now that all the NOMMU world is ARMv7-M? Are there any benefits in running an ARM920T or ARM926E core with MMU disabled, and does this work with your patches?
If not, we could limit it to ARMv7-A/R and possibly ARMv6. Depending on how the build tests go, a per-platform opt-in might be easier than having an opt-out for things that don't work.
Arnd
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 17 lines · Arnd Bergmann
Quoted 9 lines · CET Vladimir Murzin
With this patch applied potentially any platform can be built in NOMMU configurations if
CONFIG_EXPERTis 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 configurationsQuoted 6 lines
Cc Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>Cc Tony Lindgren <[email protected]>Cc Thierry Reding <[email protected]>Cc Russell King <[email protected]>Signed-off-by Vladimir Murzin <[email protected]>
Quoted 3 lines
I'd have to give this a spin with my randconfig build setup, I'd rather not introduce build regressions. Have you tried an allmodconfig build with
CONFIG_MMUdisabled?
I used defconfigs and just got results for allmodconfig apart of complain on isb instruction in arch/arm/kernel/head-nommu.S [1] there are several link time errors [2].
Quoted 3 lines
Can you provide a git tree that I can try pulling in?
Unfortunately, I can't provide you with git tree at the moment I'll try to do something around this before proposing the next version.
Quoted 9 lines
Another question is what architecture levels and what platforms we want to support without MMU. The only ARMv4/v5 platform we still have that can actually use NOMMU cores is Integrator with its ARM7TDMI, ARM920T and ARM966E core tiles (and possibly others I couldn't immediately find). Do we actually care about them any more now that all the NOMMU world is ARMv7-M? Are there any benefits in running an ARM920T or ARM926E core with MMU disabled, and does this work with your patches?
I don't have such hardware, so I can't acctually test it - it is why "there is no guaranty" :( OTOH, if sombody has these platforms these pathces is a good start to try NOMMU.
Quoted 7 lines
If not, we could limit it to ARMv7-A/R and possibly ARMv6. Depending on how the build tests go, a per-platform opt-in might be easier than having an opt-out for things that don't work.
Arnd
[1]
AS arch/arm/kernel/head-nommu.oarch/arm/kernel/head-nommu.S: Assembler messages:arch/arm/kernel/head-nommu.S:223: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:231: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:235: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:244: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:248: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:258: Error: selected processor does not support ARM mode isb' arch/arm/kernel/head-nommu.S:265: Error: selected processor does not support ARM mode `isb' make[1]: *** [arch/arm/kernel/head-nommu.o] Error 1
[2]arch/arm/kernel/head-nommu.o: In function `secondary_startup':
(.text+0x1c): undefined reference to `__setup_mpu'arch/arm/kernel/head-nommu.o: In function `stext':
(.head.text+0x30): undefined reference to __setup_mpu' arch/arm/kernel/built-in.o: In function setup_arch':
arch/arm/kernel/smccc-call.o:(.init.text+0xa50): undefined reference to erratum_a15_798181_init' kernel/built-in.o: In function kimage_free_entry':
memremap.c:(.text+0xd3d9c): undefined reference to arch_phys_to_idmap_offset' kernel/built-in.o: In function kimage_alloc_page':
memremap.c:(.text+0xd4338): undefined reference to arch_phys_to_idmap_offset' kernel/built-in.o: In function kimage_alloc_control_pages':
memremap.c:(.text+0xd4ac8): undefined reference to arch_phys_to_idmap_offset' kernel/built-in.o: In function kimage_load_segment':
memremap.c:(.text+0xd4f40): undefined reference to arch_phys_to_idmap_offset' kernel/built-in.o: In function crash_free_reserved_phys_range':
memremap.c:(.text+0xd50bc): undefined reference to arch_phys_to_idmap_offset' arch/arm/mach-mediatek/built-in.o: In function __mtk_smp_prepare_cpus':
mediatek.c:(.init.text+0xe8): undefined reference to secondary_startup_arm' arch/arm/mach-qcom/built-in.o: In function qcom_smp_prepare_cpus':
platsmp.c:(.init.text+0xe8): undefined reference to secondary_startup_arm' mm/built-in.o: In function do_mmu_notifier_register':
usercopy.c:(.text+0x34d10): undefined reference to mm_take_all_locks' usercopy.c:(.text+0x34d9c): undefined reference to mm_drop_all_locks' usercopy.c:(.text+0x34de4): undefined reference to `mm_take_all_locks'
make: *** [vmlinux] Error 1
Cheers
Vladimir
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Hi,
Quoted 1 line · Vladimir Murzin
I used defconfigs
Which defconfig was used ?
multi_v7_defconfig, MMU & SMP disabled - thus spake the compiler,
kernel/built-in.o: In function `kimage_free_entry':
memremap.c:(.text+0x4dafc): undefined reference to arch_phys_to_idmap_offset' memremap.c:(.text+0x4db04): undefined reference to arch_phys_to_idmap_offset'kernel/built-in.o: In function `kimage_alloc_page':
memremap.c:(.text+0x4dbc0): undefined reference to arch_phys_to_idmap_offset' memremap.c:(.text+0x4dbc8): undefined reference to arch_phys_to_idmap_offset' memremap.c:(.text+0x4dc1c): undefined reference to arch_phys_to_idmap_offset' kernel/built-in.o:memremap.c:(.text+0x4dc30): more undefined references to arch_phys_to_idmap_offset' follow
multi_v7_defconfig & MMU disabled, stderr was more verbose and was unhappy with Kconfig dependencies,
warning: (SOC_IMX31 && SOC_IMX35 && SOC_VF610 && REALVIEW_DT) selects SMP_ON_UP which has unmet direct dependencies (SMP && !XIP_KERNEL && MMU)
warning: (SOC_IMX31 && SOC_IMX35 && SOC_VF610 && REALVIEW_DT) selects SMP_ON_UP which has unmet direct dependencies (SMP && !XIP_KERNEL && MMU)
Ulterior motive here is to try !MMU on Cortex A
Regards
afzal
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 8 lines · Afzal Mohammed
Hi,
Quoted 1 line · Vladimir Murzin
I used defconfigs
Which defconfig was used ?
I had a script to traverse config directory, but seems that I messed things up.
Now I'm running allmodconfig per Arnd suggestion.
Quoted 16 lines
multi_v7_defconfig, MMU & SMP disabled - thus spake the compiler,
kernel/built-in.o: In function `kimage_free_entry':
memremap.c:(.text+0x4dafc): undefined reference toarch_phys_to_idmap_offset' memremap.c:(.text+0x4db04): undefined reference toarch_phys_to_idmap_offset'kernel/built-in.o: In function `kimage_alloc_page':
memremap.c:(.text+0x4dbc0): undefined reference toarch_phys_to_idmap_offset' memremap.c:(.text+0x4dbc8): undefined reference toarch_phys_to_idmap_offset' memremap.c:(.text+0x4dc1c): undefined reference toarch_phys_to_idmap_offset' kernel/built-in.o:memremap.c:(.text+0x4dc30): more undefined references toarch_phys_to_idmap_offset' follow
I think this one is fixed by
arch/arm/Kconfig +1 -1
@@ -2019,7 +2019,7 @@ config XIP_PHYS_ADDR config KEXEC bool "Kexec system call (EXPERIMENTAL)" depends on (!SMP || PM_SLEEP_SMP) - depends on !CPU_V7M + depends on MMU select KEXEC_CORE help kexec is a system call that implements the ability to shutdown your
but there are others I'm working on.
Quoted 10 lines
multi_v7_defconfig& MMU disabled, stderr was more verbose and was unhappy withKconfigdependencies,warning: (
SOC_IMX31&&SOC_IMX35&&SOC_VF610&&REALVIEW_DT) selectsSMP_ON_UPwhich has unmet direct dependencies (SMP && !XIP_KERNEL && MMU)
warning: (SOC_IMX31&&SOC_IMX35&&SOC_VF610&&REALVIEW_DT) selectsSMP_ON_UPwhich has unmet direct dependencies (SMP && !XIP_KERNEL && MMU)
These we fixed in 9001214 ("ARM: imx: no need to select SMP_ON_UP explicitly")
Quoted 3 lines
Ulterior motive here is to try !MMU on Cortex A
Thanks for trying it. Just a gentle remainder not to forget to set DRAM_BASE and DRAM_SIZE ;)
Quoted 3 lines
Regards
afzal
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Hi,
Quoted 15 lines · Vladimir Murzin
I think this one is fixed by
arch/arm/Kconfig +1
-1@@ -2019,7 +2019,7 @@ config XIP_PHYS_ADDR config KEXEC bool "Kexec system call (EXPERIMENTAL)" depends on (!SMP || PM_SLEEP_SMP) - depends on !CPU_V7M + depends on MMU These we fixed in 9001214 ("ARM: imx: no need to select SMP_ON_UP explicitly")
Quoted 2 lines
Thanks for trying it. Just a gentle remainder not to forget to set
DRAM_BASEandDRAM_SIZE;)
Thanks for the info.
Based on your feedback, have been able to build multi_v7 w/ MMU & SMP disabled.
Trying to get something in the console on Cortex A platform.
Regards
afzal
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 22 lines · Afzal Mohammed
Hi,
Quoted 15 lines · Vladimir Murzin
I think this one is fixed by
arch/arm/Kconfig +1
-1@@ -2019,7 +2019,7 @@ config XIP_PHYS_ADDR config KEXEC bool "Kexec system call (EXPERIMENTAL)" depends on (!SMP || PM_SLEEP_SMP) - depends on !CPU_V7M + depends on MMU These we fixed in 9001214 ("ARM: imx: no need to select SMP_ON_UP explicitly")Quoted 2 lines
Thanks for trying it. Just a gentle remainder not to forget to set
DRAM_BASEandDRAM_SIZE;)
Quoted 6 lines
Thanks for the info.
Based on your feedback, have been able to build
multi_v7w/ MMU & SMP disabled.Trying to get something in the console on Cortex A platform.
Make sure you have ARM_MPU disabled, otherwise it will die early (I keep proper patch for that here).
Cheers
Vladimir
Quoted 4 lines
Regards
afzal
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Hi,
Quoted 2 lines · Vladimir Murzin
Make sure you have
ARM_MPUdisabled, otherwise it will die early (I keep proper patch for that here).
Hmm.., thanks, that is enabled here, will disable it & proceed.
Regards
afzal
Russell King - ARM Linux
maintainerRFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
In reply to Afzal MohammedQuoted 2 lines · Afzal Mohammed
multi_v7_defconfig& MMU disabled, stderr was more verbose and was unhappy withKconfigdependencies,
Well, !MMU and multiplatform _are_ exclusive in reality. One of the things we work around in multiplatform is the different physical address space layouts of the platforms, particularly with where RAM is located. That's not possible in !MMU configurations. A kernel built to support every platform in multiplatform will not boot on most of them.
So efforts to make !MMU work with multiplatform are IMHO rather misguided.
!MMU makes sense with classifications of systems (like the Cortex-M* based systems) but not everything.
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.
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Hi,
Quoted 7 lines · Russell King - ARM Linux
Well, !MMU and multiplatform _are_ exclusive in reality. One of the things we work around in multiplatform is the different physical address space layouts of the platforms, particularly with where RAM is located. That's not possible in !MMU configurations. A kernel built to support every platform in multiplatform will not boot on most of them.
Quoted 5 lines
So efforts to make !MMU work with multiplatform are IMHO rather misguided.
!MMU makes sense with classifications of systems (like the Cortex-M* based systems) but not everything.
Okay, seems you were referring to AUTO_ZRELADDR or if you had something else in mind, please let me know.
The plan was to use Image instead of zImage. Here there are 2 platforms, Freescale's, oh no, NXP's, oh no no, Qualcomm's Vybrid (vf610) and TI's Sitara siblings (am335x beagle & am437x). It was thought that though changes might have to be made b/n them, at least it might be easier using same defconfig, thus went by multi_v7.
Though have been able to build for !MMU, have not yet been successful in seeing any activity on the console, probably will have to put printascii() into service.
Regards
afzal
Russell King - ARM Linux
maintainerRFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 11 lines · Afzal Mohammed
Hi,
Quoted 7 lines · Russell King - ARM Linux
Well, !MMU and multiplatform _are_ exclusive in reality. One of the things we work around in multiplatform is the different physical address space layouts of the platforms, particularly with where RAM is located. That's not possible in !MMU configurations. A kernel built to support every platform in multiplatform will not boot on most of them.
Quoted 8 lines
Quoted 5 lines
So efforts to make !MMU work with multiplatform are IMHO rather misguided.
!MMU makes sense with classifications of systems (like the Cortex-M* based systems) but not everything.
Okay, seems you were referring to
AUTO_ZRELADDRor if you had something else in mind, please let me know.
No, I'm talking about the kernel proper itself.
Quoted 3 lines
The plan was to use Image instead of zImage. Here there are 2 platforms, Freescale's, oh no, NXP's, oh no no, Qualcomm's Vybrid (vf610) and TI's Sitara siblings (am335x beagle & am437x).
Right, so Freescale's iMX6, RAM starts at 0x10000000, so when building for noMMU, you need to specify DRAM_START as 0x10000000 and DRAM_SIZE to be the appropriate size of RAM.
You'll be able to run the same "Image" kernel on the other platforms _if_ and _only_ _if_ they have RAM covering the same region.
That's my point - the kernel image will be linked to place its read-write data at a certain location in the address space, and if you have the MMU disabled (or in 1:1 translation mode) you _must_ have RAM at that location.
The reason multiplatform works is because we use the MMU to abstract away the differences in the location of RAM on the platform (amongst other things.)
Also note that Cortex-A class CPUs don't perform well with the MMU off, because you can't enable the data cache - and you must have the data cache enabled for SMP to be functional, and it's also required for exclusives to work.
There's also some cases where "Device, non-shared" must be used to access some devices, which can only be done with the MMU enabled.
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.
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Hi,
Quoted 3 lines · Russell King - ARM Linux
Right, so Freescale's iMX6, RAM starts at
0x10000000, so when building for noMMU, you need to specifyDRAM_STARTas0x10000000andDRAM_SIZEto be the appropriate size of RAM.
Hmm.., i had thought that Vybrid's memory mappings starts from 0x80000000 (same TI Sitara's), just rechecked the older boot logs of Vybrid & Data manual, it seems it is @0x80000000, probably iMX6 has a different map.
Quoted 4 lines
Also note that Cortex-A class CPUs don't perform well with the MMU off, because you can't enable the data cache - and you must have the data cache enabled for SMP to be functional, and it's also required for exclusives to work.
Yes, was aware of the performance degradation due to disabled dcache.
Here the platforms at my disposal are all single core - vf610, am335x & am437x (though strictly speaking 2 of them are ARM SMP configurations, but with number of cores as 1). Seems at least from SMP pov, not expecting issues as they are single core (SMP disabled kernel with MMU enabled works on those)
Quoted 2 lines
There's also some cases where "Device, non-shared" must be used to access some devices, which can only be done with the MMU enabled.
Thanks for your valuable feedbacks.
Regards
afzal
Russell King - ARM Linux
maintainerRFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 4 lines · Afzal Mohammed
Hi,
On Thu, Nov 24, 2016 at 05:35:32PM +0000, Russell King - ARM Linux wrote:
Quoted 8 lines
Quoted 3 lines
Right, so Freescale's iMX6, RAM starts at
0x10000000, so when building for noMMU, you need to specifyDRAM_STARTas0x10000000andDRAM_SIZEto be the appropriate size of RAM.Hmm.., i had thought that Vybrid's memory mappings starts from
0x80000000(same TI Sitara's), just rechecked the older boot logs of Vybrid & Data manual, it seems it is @0x80000000, probably iMX6 has a different map.
Right, so if you build a multiplatform kernel which covers TI Sitara and iMX6, then you have a choice:
- Set DRAM_START to 0x10000000, and have a kernel which will boot on iMX6 but fail on TI Sitara.
- Set DRAM_START to 0x80000000, and have a kernel which will boot on TI Sitara, but fail on iMX6 with less than 2GiB of memory (0x70000000 bytes to be exact.)
This is why multiplatform doesn't make sense for noMMU - you can't actually build a multiplatform kernel that will work across all these platforms.
You'd have to re-link it (at the very least) to place the data section elsewhere in physical memory to make it work.
It's this reason that I don't like removing the "depends on MMU" from multiplatform - it gives the incorrect impression that we _can_ support a wide range of systems, but what it will lead to is a kernel that will work on some platforms but not others. The result will be more "bug" reports because the kernel fails to boot...
In any case, I think kernelci and similar would first need to be updated to avoid trying to boot noMMU kernels on hardware which it just can't boot on - we _really_ do not want to be randomly scribbling into physical memory, potentially hitting devices, especially with devices that contain OTP fuses that set options as security features.
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.
RFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
Quoted 5 lines · Russell King - ARM Linux
It's this reason that I don't like removing the "depends on MMU" from multiplatform - it gives the incorrect impression that we _can_ support a wide range of systems, but what it will lead to is a kernel that will work on some platforms but not others. The result will be more "bug" reports because the kernel fails to boot...
Do you think extra guarding with CONFIG_EXPERIMENTAL would be appropriate to reduce number of such reports?
Cheers
Vladimir
Tony Lindgren
maintainerRFC PATCH 11/11 ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
In reply to Vladimir MurzinQuoted 11 lines · Vladimir Murzin
Quoted 9 lines · Arnd Bergmann
Another question is what architecture levels and what platforms we want to support without MMU. The only ARMv4/v5 platform we still have that can actually use NOMMU cores is Integrator with its ARM7TDMI, ARM920T and ARM966E core tiles (and possibly others I couldn't immediately find). Do we actually care about them any more now that all the NOMMU world is ARMv7-M? Are there any benefits in running an ARM920T or ARM926E core with MMU disabled, and does this work with your patches?
Quoted 3 lines
I don't have such hardware, so I can't acctually test it - it is why "there is no guaranty" :( OTOH, if sombody has these platforms these pathces is a good start to try NOMMU.
I believe the reason to run them without MMU might be still valid if we ever get mainline Linux kernel working on some 3G/LTE modems for latency reasons. Not that I know of any use cases, but if we have it working we might as well keep it working.
Regards,
Tony