* [PATCHv3 0/4] arm/versatile: no-MMU support
@ 2017-03-01 1:39 Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing Greg Ungerer
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Greg Ungerer @ 2017-03-01 1:39 UTC (permalink / raw)
To: linux-arm-kernel
This is a rebased resend of the no-MMU patches to support the Versatile
platform. It in-corporates changes suggested by Russell (don't use a
multiplatorm arrangement) and rebased onto 4.10.
Linus I didn't include your acked-by because the 04 patch is a little
different to the original.
The following patches support configuring and building the versatile
machine with a no-MMU kernel.
There is only a few minor changes required. It was previously possible
in older kernels to build for versatile with CONFIG_MMU disabled, but
the change to devicetree lost that capability. These changes make it
possible again.
One patch is a fix for address translation (broken in older kernels too),
two are build problems when CONFIG_MMU is disabled, and the last is the
actuall configuration changes needed.
The motivation for this is that the versatile machine is well supported
in qemu. And this provides an excellent platform for development and
testing no-MMU support on ARM in general. With these patches applied
it is possible to build and run a kernel with MMU disabled in qemu.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/Kconfig | 11 +++++++++++
arch/arm/Kconfig.debug | 3 ++-
arch/arm/include/asm/mach/map.h | 1 +
arch/arm/mach-versatile/Kconfig | 5 +++--
arch/arm/mach-versatile/Makefile.boot | 3 +++
arch/arm/mach-versatile/versatile_dt.c | 4 ++++
6 files changed, 24 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing
2017-03-01 1:39 [PATCHv3 0/4] arm/versatile: no-MMU support Greg Ungerer
@ 2017-03-01 1:39 ` Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
2017-03-01 1:50 ` [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2 siblings, 0 replies; 6+ messages in thread
From: Greg Ungerer @ 2017-03-01 1:39 UTC (permalink / raw)
To: linux-arm-kernel
Currently for the versatile boards the IO_ADDRESS() macro applies static
virtual address mapping for built-in IO devices. When operating without
the MMU enabled IO devices are accessed at their physical address, no
address translation is required.
For the !CONFIG_MMU case then define the IO_ADDRESS() macro to return the
physical address.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/mach-versatile/versatile_dt.c | 4 ++++
1 file changed, 4 insertions(+)
v2: no change
v3: rebase on top of linux-4.10
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index 3c8d39c..8cfa05a 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -37,7 +37,11 @@
#include <asm/mach/map.h>
/* macro to get at MMIO space when running virtually */
+#ifdef CONFIG_MMU
#define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
+#else
+#define IO_ADDRESS(x) (x)
+#endif
#define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU
2017-03-01 1:39 [PATCHv3 0/4] arm/versatile: no-MMU support Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing Greg Ungerer
@ 2017-03-01 1:39 ` Greg Ungerer
2017-03-06 11:03 ` Vladimir Murzin
2017-03-01 1:50 ` [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2 siblings, 1 reply; 6+ messages in thread
From: Greg Ungerer @ 2017-03-01 1:39 UTC (permalink / raw)
To: linux-arm-kernel
No-MMU configured targets have no definition for debug_ll_io_init().
Not all machines use this and it will only be required if CONFIG_DEBUG_LL
is enabled.
But when compiling for a target that uses it and it is configured for
no-MMU (!CONFIG_MMU), for example the versatile machine, you will get:
CC arch/arm/mach-versatile/versatile_dt.o
arch/arm/mach-versatile/versatile_dt.c: In function ?versatile_map_io?:
arch/arm/mach-versatile/versatile_dt.c:283:2: error: implicit declaration of function ?debug_ll_io_init? [-Werror=implicit-function-declaration]
debug_ll_io_init();
^
Fix by adding a macro for it to the !CONFIG_MMU path in map.h.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/include/asm/mach/map.h | 1 +
1 file changed, 1 insertion(+)
v2: no change
v3: rebase on top of linux-4.10
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index 9b7c328..b1fe9c8 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -62,6 +62,7 @@ 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
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile
2017-03-01 1:39 [PATCHv3 0/4] arm/versatile: no-MMU support Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
@ 2017-03-01 1:50 ` Greg Ungerer
2017-03-01 1:50 ` [PATCHv3 4/4] ARM: versatile: support configuring versatile machine for no-MMU Greg Ungerer
2 siblings, 1 reply; 6+ messages in thread
From: Greg Ungerer @ 2017-03-01 1:50 UTC (permalink / raw)
To: linux-arm-kernel
To compile the arm versatile board with the MMU disabled (!CONFIG_MMU)
a Makefile.boot is required. Without it you get:
SYSMAP System.map
arch/arm/boot/Makefile:15: arch/arm/mach-versatile//Makefile.boot: No such file or directory
make[2]: *** No rule to make target `arch/arm/mach-versatile//Makefile.boot'. Stop.
Create an empty Makefile.boot for the versatile machine. This is a
copy of the other empty machine Makefile.boot files. (A few have this
same commented empty file: stm32, ep93xx, lpc18xx, efm32 and vexpress).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/mach-versatile/Makefile.boot | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 arch/arm/mach-versatile/Makefile.boot
v2: no change
v3: rebase on top of linux-4.10
diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
new file mode 100644
index 0000000..eacfc3f
--- /dev/null
+++ b/arch/arm/mach-versatile/Makefile.boot
@@ -0,0 +1,3 @@
+# Empty file waiting for deletion once Makefile.boot isn't needed any more.
+# Patch waits for application at
+# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCHv3 4/4] ARM: versatile: support configuring versatile machine for no-MMU
2017-03-01 1:50 ` [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
@ 2017-03-01 1:50 ` Greg Ungerer
0 siblings, 0 replies; 6+ messages in thread
From: Greg Ungerer @ 2017-03-01 1:50 UTC (permalink / raw)
To: linux-arm-kernel
Allow the arm versatile machine to be configured for no-MMU operation.
Older kernels had the ability to build the versatile machine with the MMU
disabled (!CONFIG_MMU). Recent changes to convert the versatile machine
to device tree lost this ability. (Although older kernels could be built
they did not run due to a bug in the IO_ADDRESS() mapping on this machine).
The motivation for this is that the versatile machine is well supported
in qemu. And this provides an excellent platform for development and
testing no-MMU support on ARM in general.
This patch adds a versatile platform selection in the upper level arm
system type menu - where it appeared in older kernel versions - when
configuring for the no-MMU case. There is no visible change to the way
versatile is selected for the MMU enabled case.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/Kconfig | 11 +++++++++++
arch/arm/Kconfig.debug | 3 ++-
arch/arm/mach-versatile/Kconfig | 5 +++--
3 files changed, 16 insertions(+), 3 deletions(-)
v2: don't use a multiplatform setup, move versatile choice to top level menu
v3: rebase on top of linux-4.10
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 186c4c2..1d9ac7c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -353,6 +353,17 @@ config ARM_SINGLE_ARMV7M
select SPARSE_IRQ
select USE_OF
+config ARM_SINGLE_ARCH_VERSATILE
+ bool "ARM Ltd. Versatile family"
+ depends on !MMU
+ select AUTO_ZRELADDR
+ select CLKSRC_OF
+ select COMMON_CLK
+ select GENERIC_CLOCKEVENTS
+ select GPIOLIB
+ select SPARSE_IRQ
+ select USE_OF
+
config ARCH_GEMINI
bool "Cortina Systems Gemini"
select CLKSRC_MMIO
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index d83f7c3..3f393e4 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1712,7 +1712,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_ARCH_VERSATILE
default "mach/uncompress.h"
config EARLY_PRINTK
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index c257d40..c03a8c8 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -1,6 +1,7 @@
config ARCH_VERSATILE
- bool "ARM Ltd. Versatile family"
- depends on ARCH_MULTI_V5
+ bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5
+ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE
+ default y if ARM_SINGLE_ARCH_VERSATILE
select ARM_AMBA
select ARM_TIMER_SP804
select ARM_VIC
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU
2017-03-01 1:39 ` [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
@ 2017-03-06 11:03 ` Vladimir Murzin
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Murzin @ 2017-03-06 11:03 UTC (permalink / raw)
To: linux-arm-kernel
On 01/03/17 01:39, Greg Ungerer wrote:
> No-MMU configured targets have no definition for debug_ll_io_init().
> Not all machines use this and it will only be required if CONFIG_DEBUG_LL
> is enabled.
>
> But when compiling for a target that uses it and it is configured for
> no-MMU (!CONFIG_MMU), for example the versatile machine, you will get:
>
> CC arch/arm/mach-versatile/versatile_dt.o
> arch/arm/mach-versatile/versatile_dt.c: In function ?versatile_map_io?:
> arch/arm/mach-versatile/versatile_dt.c:283:2: error: implicit declaration of function ?debug_ll_io_init? [-Werror=implicit-function-declaration]
> debug_ll_io_init();
> ^
>
> Fix by adding a macro for it to the !CONFIG_MMU path in map.h.
>
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> ---
> arch/arm/include/asm/mach/map.h | 1 +
> 1 file changed, 1 insertion(+)
>
> v2: no change
> v3: rebase on top of linux-4.10
>
> diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
> index 9b7c328..b1fe9c8 100644
> --- a/arch/arm/include/asm/mach/map.h
> +++ b/arch/arm/include/asm/mach/map.h
> @@ -62,6 +62,7 @@ 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
>
I ended up with the similar patch and I'd like to see fix merged, so FWIW
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Thanks
Vladimir
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-06 11:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 1:39 [PATCHv3 0/4] arm/versatile: no-MMU support Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing Greg Ungerer
2017-03-01 1:39 ` [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
2017-03-06 11:03 ` Vladimir Murzin
2017-03-01 1:50 ` [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2017-03-01 1:50 ` [PATCHv3 4/4] ARM: versatile: support configuring versatile machine for no-MMU Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).