* [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM
@ 2016-11-29 12:39 Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 01/23] ARM: NOMMU: define stubs for fixup Vladimir Murzin
` (22 more replies)
0 siblings, 23 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
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 23/23 which allows to select
ARCH_MULTIPLATFORM even for NOMMU. This is controlled with EXPERT
config option. All patches prior 23/23 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.
It was build tested with allmodconfig and defconfigs [1] with !MMU. I
had to keep following diff on top:
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index 40a7c4a..c737124 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -65,7 +65,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
*/
register uint64_t x asm ("r2");
- asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base));
+// asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base));
buf64[i++] = x;
}
i *= 8;
Not sure all cases are fixed yet, so keep running randconfig.
Patches can be pulled from Git tree:
git://linux-arm.org/linux-vm.git (branch: nommu-rfc-v2)
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>
Thanks!
Vladimir Murzin (23):
ARM: NOMMU: define stubs for fixup
ARM: NOMMU: define debug_ll_io_ini
ARM: NOMMU: define SECTION_xxx macros
ARM: NOMMU: define dummy user structure for feroceon
ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions
ARM: NOMMU: relax restriction on MPU existence
ARM: NOMMU: fix head-nommu build for pre-ARMv7 CPUs
ARM: NOMMU: implement secondary_startup_arm
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: setup: move call to erratum_a15_798181_init under CONFIG_MMU
ARM: kexec: disallow kexec for NOMMU builds
ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only
ARM: omap: do not select HIGHMEM explicitly
ARM: sa1100: move CPU specific copy code under its own config
ARM: sa11x0: assabet: add dependency on MMU
ARM: i.MX: remove map_io callback
PCI: tegra: limit to MMU build only
IB: add dependency on MMU
cnic: add dependency on MMU
scsi: bnx2i: bnx2fc: add dependency on MMU
ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
arch/arm/Kconfig | 27 ++++++++++++++++++++-----
arch/arm/include/asm/fixmap.h | 6 ++++++
arch/arm/include/asm/mach/map.h | 2 ++
arch/arm/include/asm/page.h | 2 +-
arch/arm/include/asm/pgtable-nommu.h | 6 ++++++
arch/arm/include/asm/tlbflush.h | 2 +-
arch/arm/kernel/Makefile | 5 +++++
arch/arm/kernel/head-nommu.S | 22 ++++++++++++++++++---
arch/arm/kernel/setup.c | 4 ++--
arch/arm/kernel/sleep.S | 4 ----
arch/arm/mach-imx/mach-imx1.c | 1 -
arch/arm/mach-omap2/Kconfig | 1 -
arch/arm/mach-sa1100/Kconfig | 1 +
arch/arm/mm/Kconfig | 4 ++++
arch/arm/mm/Makefile | 2 +-
arch/arm/mm/flush.c | 15 --------------
arch/arm/mm/iomap.c | 17 ++++++++++++++++
arch/arm/mm/nommu.c | 35 +++++++++++++++++++++++++++++++++
drivers/infiniband/Kconfig | 1 +
drivers/net/ethernet/broadcom/Kconfig | 1 +
drivers/pci/host/Kconfig | 2 +-
drivers/scsi/bnx2fc/Kconfig | 1 +
drivers/scsi/bnx2i/Kconfig | 1 +
23 files changed, 127 insertions(+), 35 deletions(-)
[1] List of errors/warnings from defconfigs:
acs5k_defconfig
arch/arm/mach-ks8695/cpu.c:37:24: warning: 'ks8695_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ks8695_io_desc[] __initdata = {
^
acs5k_tiny_defconfig
arch/arm/mach-ks8695/cpu.c:37:24: warning: 'ks8695_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ks8695_io_desc[] __initdata = {
^
am200epdkit_defconfig
aspeed_g4_defconfig
aspeed_g5_defconfig
assabet_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
/work/tools/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: no machine record defined
make: *** [vmlinux] Error 1
at91_dt_defconfig
axm55xx_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
badge4_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/badge4.c:295:24: warning: 'badge4_io_desc' defined but not used [-Wunused-variable]
static struct map_desc badge4_io_desc[] __initdata = {
^
bcm2835_defconfig
cerfcube_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/cerf.c:137:24: warning: 'cerf_io_desc' defined but not used [-Wunused-variable]
static struct map_desc cerf_io_desc[] __initdata = {
^
clps711x_defconfig
cm_x2xx_defconfig
cm_x300_defconfig
cns3420vb_defconfig
arch/arm/mach-cns3xxx/core.c:29:24: warning: 'cns3xxx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc cns3xxx_io_desc[] __initdata = {
^
arch/arm/mach-cns3xxx/cns3420vb.c:230:24: warning: 'cns3420_io_desc' defined but not used [-Wunused-variable]
static struct map_desc cns3420_io_desc[] __initdata = {
^
colibri_pxa270_defconfig
colibri_pxa300_defconfig
collie_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/collie.c:403:24: warning: 'collie_io_desc' defined but not used [-Wunused-variable]
static struct map_desc collie_io_desc[] __initdata = {
^
corgi_defconfig
davinci_all_defconfig
dove_defconfig
arch/arm/mach-dove/common.c:50:24: warning: 'dove_io_desc' defined but not used [-Wunused-variable]
static struct map_desc dove_io_desc[] __initdata = {
^
ebsa110_defconfig
arch/arm/mach-ebsa110/core.c:72:24: warning: 'ebsa110_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ebsa110_io_desc[] __initdata = {
^
efm32_defconfig
em_x270_defconfig
ep93xx_defconfig
arch/arm/mach-ep93xx/core.c:56:24: warning: 'ep93xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ep93xx_io_desc[] __initdata = {
^
arch/arm/mach-ep93xx/ts72xx.c:32:24: warning: 'ts72xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ts72xx_io_desc[] __initdata = {
^
arch/arm/mach-ep93xx/vision_ep9307.c:51:24: warning: 'vision_io_desc' defined but not used [-Wunused-variable]
static struct map_desc vision_io_desc[] __initdata = {
^
eseries_pxa_defconfig
exynos_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
arch/arm/mach-exynos/exynos.c:31:24: warning: 'exynos4_iodesc' defined but not used [-Wunused-variable]
static struct map_desc exynos4_iodesc[] __initdata = {
^
ezx_defconfig
footbridge_defconfig
arch/arm/mach-footbridge/common.c:140:24: warning: 'fb_common_io_desc' defined but not used [-Wunused-variable]
static struct map_desc fb_common_io_desc[] __initdata = {
^
arch/arm/mach-footbridge/common.c:153:24: warning: 'ebsa285_host_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ebsa285_host_io_desc[] __initdata = {
^
h3600_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/h3xxx.c:274:24: warning: 'h3600_io_desc' defined but not used [-Wunused-variable]
static struct map_desc h3600_io_desc[] __initdata = {
^
h5000_defconfig
hackkit_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/hackkit.c:64:24: warning: 'hackkit_io_desc' defined but not used [-Wunused-variable]
static struct map_desc hackkit_io_desc[] __initdata = {
^
hisi_defconfig
arch/arm/mach-hisi/hisilicon.c:31:24: warning: 'hi3620_io_desc' defined but not used [-Wunused-variable]
static struct map_desc hi3620_io_desc[] __initdata = {
^
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
imote2_defconfig
imx_v4_v5_defconfig
arch/arm/mach-imx/mm-imx21.c:33:24: warning: 'imx21_io_desc' defined but not used [-Wunused-variable]
static struct map_desc imx21_io_desc[] __initdata = {
^
arch/arm/mach-imx/mm-imx27.c:33:24: warning: 'imx27_io_desc' defined but not used [-Wunused-variable]
static struct map_desc imx27_io_desc[] __initdata = {
^
arch/arm/mach-imx/mach-mx27ads.c:381:24: warning: 'mx27ads_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx27ads_io_desc[] __initdata = {
^
imx_v6_v7_defconfig
arch/arm/mach-imx/mm-imx3.c:119:24: warning: 'mx31_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx31_io_desc[] __initdata = {
^
arch/arm/mach-imx/mm-imx3.c:216:24: warning: 'mx35_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx35_io_desc[] __initdata = {
^
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
arch/arm/mach-imx/mach-mx31ads.c:542:24: warning: 'mx31ads_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx31ads_io_desc[] __initdata = {
^
arch/arm/mach-imx/mach-mx31lite.c:236:24: warning: 'mx31lite_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx31lite_io_desc[] __initdata = {
^
arch/arm/mach-imx/mach-kzm_arm11_01.c:262:24: warning: 'kzm_io_desc' defined but not used [-Wunused-variable]
static struct map_desc kzm_io_desc[] __initdata = {
^
integrator_defconfig
iop13xx_defconfig
iop32x_defconfig
iop33x_defconfig
ixp4xx_defconfig
jornada720_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/jornada720.c:277:24: warning: 'jornada720_io_desc' defined but not used [-Wunused-variable]
static struct map_desc jornada720_io_desc[] __initdata = {
^
keystone_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
ks8695_defconfig
arch/arm/mach-ks8695/cpu.c:37:24: warning: 'ks8695_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ks8695_io_desc[] __initdata = {
^
lart_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/lart.c:115:24: warning: 'lart_io_desc' defined but not used [-Wunused-variable]
static struct map_desc lart_io_desc[] __initdata = {
^
lpc18xx_defconfig
lpc32xx_defconfig
arch/arm/mach-lpc32xx/common.c:70:24: warning: 'lpc32xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc lpc32xx_io_desc[] __initdata = {
^
lpd270_defconfig
lubbock_defconfig
magician_defconfig
mainstone_defconfig
mini2440_defconfig
arch/arm/mach-s3c24xx/common.c:155:24: warning: 's3c_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c244x.c:49:24: warning: 's3c244x_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c244x_iodesc[] __initdata = {
^
mmp2_defconfig
arch/arm/mach-mmp/common.c:28:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
moxart_defconfig
mps2_defconfig
multi_v4t_defconfig
arch/arm/mach-clps711x/board-dt.c:33:24: warning: 'clps711x_io_desc' defined but not used [-Wunused-variable]
static struct map_desc clps711x_io_desc __initdata = {
^
multi_v5_defconfig
arch/arm/mach-imx/mm-imx21.c:33:24: warning: 'imx21_io_desc' defined but not used [-Wunused-variable]
static struct map_desc imx21_io_desc[] __initdata = {
^
arch/arm/mach-imx/mm-imx27.c:33:24: warning: 'imx27_io_desc' defined but not used [-Wunused-variable]
static struct map_desc imx27_io_desc[] __initdata = {
^
arch/arm/mach-imx/mach-mx27ads.c:381:24: warning: 'mx27ads_io_desc' defined but not used [-Wunused-variable]
static struct map_desc mx27ads_io_desc[] __initdata = {
^
multi_v7_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
arch/arm/mach-exynos/exynos.c:31:24: warning: 'exynos4_iodesc' defined but not used [-Wunused-variable]
static struct map_desc exynos4_iodesc[] __initdata = {
^
arch/arm/mach-hisi/hisilicon.c:31:24: warning: 'hi3620_io_desc' defined but not used [-Wunused-variable]
static struct map_desc hi3620_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:141:24: warning: 'omap34xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap34xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:188:24: warning: 'omapti81xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omapti81xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:199:24: warning: 'omapam33xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omapam33xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:216:24: warning: 'omap44xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap44xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:239:24: warning: 'omap54xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap54xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:268:24: warning: 'dra7xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc dra7xx_io_desc[] __initdata = {
^
arch/arm/mach-tegra/io.c:33:24: warning: 'tegra_io_desc' defined but not used [-Wunused-variable]
static struct map_desc tegra_io_desc[] __initdata = {
^
arch/arm/mach-vt8500/vt8500.c:52:24: warning: 'vt8500_io_desc' defined but not used [-Wunused-variable]
static struct map_desc vt8500_io_desc[] __initdata = {
^
arch/arm/mach-spear/spear13xx.c:60:24: warning: 'spear13xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc spear13xx_io_desc[] __initdata = {
^
arch/arm/mach-spear/spear1310.c:43:24: warning: 'spear1310_io_desc' defined but not used [-Wunused-variable]
static struct map_desc spear1310_io_desc[] __initdata = {
^
mv78xx0_defconfig
mvebu_v5_defconfig
mvebu_v7_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
mxs_defconfig
neponset_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
/work/tools/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: no machine record defined
make: *** [vmlinux] Error 1
netwinder_defconfig
arch/arm/mach-footbridge/common.c:140:24: warning: 'fb_common_io_desc' defined but not used [-Wunused-variable]
static struct map_desc fb_common_io_desc[] __initdata = {
^
arch/arm/mach-footbridge/common.c:153:24: warning: 'ebsa285_host_io_desc' defined but not used [-Wunused-variable]
static struct map_desc ebsa285_host_io_desc[] __initdata = {
^
In file included from sound/oss/os.h:20:0,
from sound/oss/sound_config.h:20,
from sound/oss/midibuf.c:21:
sound/oss/midibuf.c: In function 'MIDIbuf_read':
./arch/arm/include/asm/uaccess.h:530:38: warning: 'tmp_data' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define __copy_to_user(to, from, n) (memcpy((void __force *)to, from, n), 0)
^
sound/oss/midibuf.c:316:16: note: 'tmp_data' was declared here
unsigned char tmp_data;
^
netx_defconfig
arch/arm/mach-netx/generic.c:33:24: warning: 'netx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc netx_io_desc[] __initdata = {
^
nhk8815_defconfig
arch/arm/mach-nomadik/cpu-8815.c:86:24: warning: 'cpu8815_io_desc' defined but not used [-Wunused-variable]
static struct map_desc cpu8815_io_desc[] __initdata = {
^
nuc910_defconfig
arch/arm/mach-w90x900/cpu.c:45:24: warning: 'nuc900_iodesc' defined but not used [-Wunused-variable]
static struct map_desc nuc900_iodesc[] __initdata = {
^
nuc950_defconfig
arch/arm/mach-w90x900/cpu.c:45:24: warning: 'nuc900_iodesc' defined but not used [-Wunused-variable]
static struct map_desc nuc900_iodesc[] __initdata = {
^
nuc960_defconfig
arch/arm/mach-w90x900/cpu.c:45:24: warning: 'nuc900_iodesc' defined but not used [-Wunused-variable]
static struct map_desc nuc900_iodesc[] __initdata = {
^
omap1_defconfig
omap2plus_defconfig
arch/arm/mach-omap2/io.c:71:24: warning: 'omap24xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap24xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:87:24: warning: 'omap242x_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap242x_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:111:24: warning: 'omap243x_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap243x_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:141:24: warning: 'omap34xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap34xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:188:24: warning: 'omapti81xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omapti81xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:199:24: warning: 'omapam33xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omapam33xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:216:24: warning: 'omap44xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap44xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:239:24: warning: 'omap54xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc omap54xx_io_desc[] __initdata = {
^
arch/arm/mach-omap2/io.c:268:24: warning: 'dra7xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc dra7xx_io_desc[] __initdata = {
^
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
orion5x_defconfig
palmz72_defconfig
pcm027_defconfig
pleb_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
prima2_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
pxa168_defconfig
arch/arm/mach-mmp/common.c:28:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
pxa255-idp_defconfig
pxa3xx_defconfig
pxa910_defconfig
arch/arm/mach-mmp/common.c:28:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
pxa_defconfig
qcom_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
raumfeld_defconfig
realview_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
rpc_defconfig
s3c2410_defconfig
arch/arm/mach-s3c24xx/common.c:155:24: warning: 's3c_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c2410.c:54:24: warning: 's3c2410_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c2410_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c2412.c:64:24: warning: 's3c2412_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c2412_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c2416.c:69:24: warning: 's3c2416_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c2416_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c244x.c:49:24: warning: 's3c244x_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c244x_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c2443.c:50:24: warning: 's3c2443_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c2443_iodesc[] __initdata = {
^
s3c6400_defconfig
arch/arm/mach-s3c64xx/common.c:106:24: warning: 's3c_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c_iodesc[] __initdata = {
^
s5pv210_defconfig
sama5_defconfig
shannon_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
shmobile_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
simpad_defconfig
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/simpad.c:121:24: warning: 'simpad_io_desc' defined but not used [-Wunused-variable]
static struct map_desc simpad_io_desc[] __initdata = {
^
socfpga_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
spear13xx_defconfig
arch/arm/mach-spear/spear13xx.c:60:24: warning: 'spear13xx_io_desc' defined but not used [-Wunused-variable]
static struct map_desc spear13xx_io_desc[] __initdata = {
^
arch/arm/mach-spear/spear1310.c:43:24: warning: 'spear1310_io_desc' defined but not used [-Wunused-variable]
static struct map_desc spear1310_io_desc[] __initdata = {
^
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
spear3xx_defconfig
spear6xx_defconfig
spitz_defconfig
stm32_defconfig
sunxi_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
tct_hammer_defconfig
arch/arm/mach-s3c24xx/common.c:155:24: warning: 's3c_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c_iodesc[] __initdata = {
^
arch/arm/mach-s3c24xx/s3c2410.c:54:24: warning: 's3c2410_iodesc' defined but not used [-Wunused-variable]
static struct map_desc s3c2410_iodesc[] __initdata = {
^
tegra_defconfig
arch/arm/mach-tegra/io.c:33:24: warning: 'tegra_io_desc' defined but not used [-Wunused-variable]
static struct map_desc tegra_io_desc[] __initdata = {
^
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
trizeps4_defconfig
u300_defconfig
u8500_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
versatile_defconfig
vexpress_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
vf610m4_defconfig
viper_defconfig
vt8500_v6_v7_defconfig
arch/arm/mach-vt8500/vt8500.c:52:24: warning: 'vt8500_io_desc' defined but not used [-Wunused-variable]
static struct map_desc vt8500_io_desc[] __initdata = {
^
xcep_defconfig
zeus_defconfig
zx_defconfig
arch/arm/kernel/smp.c:93:22: warning: 'get_arch_pgd' defined but not used [-Wunused-function]
static unsigned long get_arch_pgd(pgd_t *pgd)
^
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 01/23] ARM: NOMMU: define stubs for fixup
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 02/23] ARM: NOMMU: define debug_ll_io_ini Vladimir Murzin
` (21 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
When build for NOMMU following errors show up:
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.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/fixmap.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h
index 5c17d2d..0bfc2e3 100644
--- a/arch/arm/include/asm/fixmap.h
+++ b/arch/arm/include/asm/fixmap.h
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 02/23] ARM: NOMMU: define debug_ll_io_ini
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 01/23] ARM: NOMMU: define stubs for fixup Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 03/23] ARM: NOMMU: define SECTION_xxx macros Vladimir Murzin
` (20 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
We do not need to do anything in debug_ll_io_init in case of NOMMU.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/mach/map.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index 9b7c328..6b86b9c 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 03/23] ARM: NOMMU: define SECTION_xxx macros
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 01/23] ARM: NOMMU: define stubs for fixup Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 02/23] ARM: NOMMU: define debug_ll_io_ini Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 04/23] ARM: NOMMU: define dummy user structure for feroceon Vladimir Murzin
` (19 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
SECTION_SIZE is referenced from several places which breaks NOMMU
build:
CC arch/arm/kernel/setup.o
arch/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
...
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
...
In file included from arch/arm/mach-tegra/io.c:31:0:
arch/arm/mach-tegra/iomap.h:116:22: error: 'SECTION_SIZE' undeclared here (not in a function)
#define IO_PPSB_SIZE SECTION_SIZE
^
arch/arm/mach-tegra/io.c:37:13: note: in expansion of macro 'IO_PPSB_SIZE'
.length = IO_PPSB_SIZE,
^
arch/arm/mach-tegra/io.c:33:24: warning: 'tegra_io_desc' defined but not used [-Wunused-variable]
static struct map_desc tegra_io_desc[] __initdata = {
^
make[1]: *** [arch/arm/mach-tegra/io.o] Error 1
make: *** [arch/arm/mach-tegra] Error 2
Pickup defines from pgtable-2level.h to make NOMMU build happy.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/pgtable-nommu.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index add094d..9115801 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 04/23] ARM: NOMMU: define dummy user structure for feroceon
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (2 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 03/23] ARM: NOMMU: define SECTION_xxx macros Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 05/23] ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions Vladimir Murzin
` (18 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
While building for NOMMU the following link time error shows up:
arch/arm/mm/built-in.o:(.proc.info.init+0x2c): undefined reference to `feroceon_user_fns'
arch/arm/mm/built-in.o:(.proc.info.init+0x60): undefined reference to `feroceon_user_fns'
arch/arm/mm/built-in.o:(.proc.info.init+0x94): undefined reference to `feroceon_user_fns'
arch/arm/mm/built-in.o:(.proc.info.init+0xc8): undefined reference to `feroceon_user_fns'
Define dummy feroceon_user_fns for !MMU.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/pgtable-nommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index 9115801..bc1f6aa 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -113,6 +113,7 @@
#define v4wt_user_fns (0)
#define v6_user_fns (0)
#define xscale_mc_user_fns (0)
+#define feroceon_user_fns (0)
#endif /*__ASSEMBLY__*/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 05/23] ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (3 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 04/23] ARM: NOMMU: define dummy user structure for feroceon Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 06/23] ARM: NOMMU: relax restriction on MPU existence Vladimir Murzin
` (17 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Define __arm_ioremap_exec and pci_ioremap* functions fallowing pattern
for other ioremap functions.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/mm/nommu.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 2740967..681cec8 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 06/23] ARM: NOMMU: relax restriction on MPU existence
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (4 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 05/23] ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 07/23] ARM: NOMMU: fix head-nommu build for pre-ARMv7 CPUs Vladimir Murzin
` (16 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
MPU is must have if we run SMP configurations (since it sets Sharable
attribute), but for UP we can progress further if MPU is not presented.
This patch changes setup_mpu to return error code which we ignore for
boot cpu and only take into account for secondaries.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/kernel/head-nommu.S | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 6b4eb27..7317554 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -13,6 +13,7 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
+#include <linux/errno.h>
#include <asm/assembler.h>
#include <asm/ptrace.h>
@@ -112,6 +113,8 @@ ENTRY(secondary_startup)
/* Use MPU region info supplied by __cpu_up */
ldr r6, [r7] @ get secondary_data.mpu_szr
bl __setup_mpu @ Initialize the MPU
+ teq r0, #0
+ bne __error_p
#endif
badr lr, 1f @ return (PIC) address
@@ -201,7 +204,8 @@ ENDPROC(__after_proc_init)
* Region 3: Normal, shared, inaccessible from PL0 to protect the vectors page
*
* r6: Value to be written to DRSR (and IRSR if required) for MPU_RAM_REGION
-*/
+ * r0: non zero value indicates error
+ */
ENTRY(__setup_mpu)
@@ -209,13 +213,13 @@ ENTRY(__setup_mpu)
mrc p15, 0, r0, c0, c1, 4 @ Read ID_MMFR0
and r0, r0, #(MMFR0_PMSA) @ PMSA field
teq r0, #(MMFR0_PMSAv7) @ PMSA v7
- bne __error_p @ Fail: ARM_MPU on NOT v7 PMSA
+ bne __nompu
/* Determine whether the D/I-side memory map is unified. We set the
* flags here and continue to use them for the rest of this function */
mrc p15, 0, r0, c0, c0, 4 @ MPUIR
ands r5, r0, #MPUIR_DREGION_SZMASK @ 0 size d region => No MPU
- beq __error_p @ Fail: ARM_MPU and no MPU
+ beq __nompu
tst r0, #MPUIR_nU @ MPUIR_nU = 0 for unified
/* Setup second region first to free up r6 */
@@ -263,6 +267,11 @@ ENTRY(__setup_mpu)
orr r0, r0, #CR_M @ Set SCTRL.M (MPU on)
mcr p15, 0, r0, c1, c0, 0 @ Enable MPU
isb
+
+ mov r0, #0
+ ret lr
+__nompu:
+ mov r0, #-ENODEV
ret lr
ENDPROC(__setup_mpu)
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 07/23] ARM: NOMMU: fix head-nommu build for pre-ARMv7 CPUs
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (5 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 06/23] ARM: NOMMU: relax restriction on MPU existence Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm Vladimir Murzin
` (15 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
While building for pre-ARMv7 CPUs with ARM_MPU enabled following error
shows up:
AS arch/arm/kernel/head-nommu.o
arch/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
MPU setup code is available for ARMv7 only, but head-nommu.S is
generic, so build head-nommu.S with -march=armv7-a (and armv7-m for
M-calss to avoid "Conflicting architecture profiles M/A" link time)
flag; in case pre-ARMv7 it detects there there is no MPU is avaliable,
so it will never reach those instructions.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/kernel/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index ad325a8..6da8b04 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -84,6 +84,11 @@ endif
obj-$(CONFIG_PARAVIRT) += paravirt.o
head-y := head$(MMUEXT).o
+ifeq ($(CONFIG_CPU_V7M),y)
+AFLAGS_head-nommu.o :=-Wa,-march=armv7-m
+else
+AFLAGS_head-nommu.o :=-Wa,-march=armv7-a
+endif
obj-$(CONFIG_DEBUG_LL) += debug.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (6 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 07/23] ARM: NOMMU: fix head-nommu build for pre-ARMv7 CPUs Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 17:14 ` Russell King - ARM Linux
2016-11-29 12:39 ` [RFC v2 PATCH 09/23] ARM: move arm_heavy_mb to MMU/noMMU neutral place Vladimir Murzin
` (14 subsequent siblings)
22 siblings, 1 reply; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Mediatek's and Qualcomm's platform code has reference to
secondary_startup_arm and that breaks NOMMU build.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/kernel/head-nommu.S | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 7317554..2ab026f 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -89,6 +89,12 @@ ENDPROC(stext)
#ifdef CONFIG_SMP
.text
+ .arm
+ENTRY(secondary_startup_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: )
ENTRY(secondary_startup)
/*
* Common entry point for secondary CPUs.
@@ -126,6 +132,7 @@ ENTRY(secondary_startup)
mov fp, #0
b secondary_start_kernel
ENDPROC(secondary_startup)
+ENDPROC(secondary_startup_arm)
.type __secondary_data, %object
__secondary_data:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 09/23] ARM: move arm_heavy_mb to MMU/noMMU neutral place
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (7 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 10/23] ARM: tlbflush: drop dependency on CONFIG_SMP Vladimir Murzin
` (13 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
So it can be referenced from both camps.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/mm/flush.c | 15 ---------------
arch/arm/mm/iomap.c | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 3cced84..0c73969 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -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)
diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c
index 4614208..1b601db 100644
--- a/arch/arm/mm/iomap.c
+++ b/arch/arm/mm/iomap.c
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 10/23] ARM: tlbflush: drop dependency on CONFIG_SMP
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (8 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 09/23] ARM: move arm_heavy_mb to MMU/noMMU neutral place Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class Vladimir Murzin
` (12 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
While building NOMMU and UP following errors show up:
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();
^
CC arch/arm/mach-omap2/control.o
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-mvebu/pmsu.o] Error 1
...
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
...
arch/arm/mach-imx/pm-imx6.c: In function 'imx6q_suspend_finish':
arch/arm/mach-imx/pm-imx6.c:354: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-imx6.o] Error 1
Make local_* stuff available for UP (even though it doesn't make
sense) so build can progress.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/tlbflush.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index def9e57..d9a6e2e 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -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__
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (9 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 10/23] ARM: tlbflush: drop dependency on CONFIG_SMP Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 17:11 ` Russell King - ARM Linux
2016-11-29 12:39 ` [RFC v2 PATCH 12/23] ARM: setup: move call to erratum_a15_798181_init under CONFIG_MMU Vladimir Murzin
` (11 subsequent siblings)
22 siblings, 1 reply; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Dependency on MMU is quite strict and prevent R-class from being built -
relax this condition and guard against M-class only
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/Kconfig | 2 +-
arch/arm/kernel/sleep.S | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b5d529f..c462d9e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
index 0f6c100..0e7fddf 100644
--- a/arch/arm/kernel/sleep.S
+++ b/arch/arm/kernel/sleep.S
@@ -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:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 12/23] ARM: setup: move call to erratum_a15_798181_init under CONFIG_MMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (10 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 13/23] ARM: kexec: disallow kexec for NOMMU builds Vladimir Murzin
` (10 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
While building for NOMMU link time error shows up:
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'
It happens because erratum_a15_798181_init() lives under smp_tlb.c
which is build only for MMU configurations. So do call this function
only if build with CONFIG_MMU.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/kernel/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 34e3f3c..2254396 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -717,9 +717,9 @@ static void __init setup_processor(void)
#endif
#ifdef CONFIG_MMU
init_default_cache_policy(list->__cpu_mm_mmu_flags);
-#endif
- erratum_a15_798181_init();
+ erratum_a15_798181_init();
+#endif
elf_hwcap_fixup();
cacheid_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 13/23] ARM: kexec: disallow kexec for NOMMU builds
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (11 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 12/23] ARM: setup: move call to erratum_a15_798181_init under CONFIG_MMU Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 14/23] ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only Vladimir Murzin
` (9 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
While building for NOMMU the following error shows up:
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'
That comes from Kexec, add dependency on MMU there.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c462d9e..306a412 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 14/23] ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (12 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 13/23] ARM: kexec: disallow kexec for NOMMU builds Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 15/23] ARM: omap: do not select HIGHMEM explicitly Vladimir Murzin
` (8 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Building 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.
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 306a412..e78c822 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 15/23] ARM: omap: do not select HIGHMEM explicitly
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (13 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 14/23] ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 16/23] ARM: sa1100: move CPU specific copy code under its own config Vladimir Murzin
` (7 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
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.
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 0465338..daddddc 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -121,7 +121,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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 16/23] ARM: sa1100: move CPU specific copy code under its own config
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (14 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 15/23] ARM: omap: do not select HIGHMEM explicitly Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 17/23] ARM: sa11x0: assabet: add dependency on MMU Vladimir Murzin
` (6 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
By now there is no way to limit sa1100 specific copy code to MMU only
builds and that leads to the following error when built for NOMMU
arch/arm/mm/copypage-v4mc.c:26:35: error: 'L_PTE_PRESENT' undeclared (first use in this function)
#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
arch/arm/mm/copypage-v4mc.c:77:47: note: in expansion of macro 'minicache_pgprot'
set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
^
arch/arm/mm/copypage-v4mc.c:26:51: error: 'L_PTE_YOUNG' undeclared (first use in this function)
#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
arch/arm/mm/copypage-v4mc.c:77:47: note: in expansion of macro 'minicache_pgprot'
set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
^
arch/arm/mm/copypage-v4mc.c:27:7: error: 'L_PTE_MT_MINICACHE' undeclared (first use in this function)
L_PTE_MT_MINICACHE)
^
./arch/arm/include/asm/page-nommu.h:41:26: note: in definition of macro '__pgprot'
#define __pgprot(x) (x)
^
arch/arm/mm/copypage-v4mc.c:77:47: note: in expansion of macro 'minicache_pgprot'
set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
^
arch/arm/mm/copypage-v4mc.c: At top level:
arch/arm/mm/copypage-v4mc.c:112:8: error: variable 'v4_mc_user_fns' has initializer but incomplete type
struct cpu_user_fns v4_mc_user_fns __initdata = {
^
arch/arm/mm/copypage-v4mc.c:113:2: error: unknown field 'cpu_clear_user_highpage' specified in initializer
.cpu_clear_user_highpage = v4_mc_clear_user_highpage,
^
arch/arm/mm/copypage-v4mc.c:113:2: warning: excess elements in struct initializer
arch/arm/mm/copypage-v4mc.c:113:2: warning: (near initialization for 'v4_mc_user_fns')
arch/arm/mm/copypage-v4mc.c:114:2: error: unknown field 'cpu_copy_user_highpage' specified in initializer
.cpu_copy_user_highpage = v4_mc_copy_user_highpage,
^
arch/arm/mm/copypage-v4mc.c:114:2: warning: excess elements in struct initializer
arch/arm/mm/copypage-v4mc.c:114:2: warning: (near initialization for 'v4_mc_user_fns')
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mm/copypage-v4mc.o] Error 1
make: *** [arch/arm/mm] Error 2
Move that code under CPU_COPY_V4MC config option which we can guard
against NOMMU configuration.
Cc: Russell King <linux@armlinux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/include/asm/page.h | 2 +-
arch/arm/mm/Kconfig | 4 ++++
arch/arm/mm/Makefile | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h
index 4355f0e..6ec7bb6 100644
--- a/arch/arm/include/asm/page.h
+++ b/arch/arm/include/asm/page.h
@@ -75,7 +75,7 @@
# endif
#endif
-#ifdef CONFIG_CPU_SA1100
+#ifdef CONFIG_CPU_COPY_V4MC
# ifdef _USER
# define MULTI_USER 1
# else
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index c1799dd..6dffbe4 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -290,6 +290,7 @@ config CPU_SA1100
select CPU_ABRT_EV4
select CPU_CACHE_V4WB
select CPU_CACHE_VIVT
+ select CPU_COPY_V4MC if MMU
select CPU_CP15_MMU
select CPU_PABRT_LEGACY
select CPU_TLB_V4WB if MMU
@@ -524,6 +525,9 @@ config CPU_CACHE_V7M
if MMU
# The copy-page model
+config CPU_COPY_V4MC
+ bool
+
config CPU_COPY_V4WT
bool
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index e869824..2ac7988 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -53,7 +53,7 @@ obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o
obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o
obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o
obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o context.o
-obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o
+obj-$(CONFIG_CPU_COPY_V4MC) += copypage-v4mc.o
obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o
obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o
obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 17/23] ARM: sa11x0: assabet: add dependency on MMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (15 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 16/23] ARM: sa1100: move CPU specific copy code under its own config Vladimir Murzin
@ 2016-11-29 12:39 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 18/23] ARM: i.MX: remove map_io callback Vladimir Murzin
` (5 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Building for NOMMU configuration leads to following error:
arch/arm/mach-sa1100/generic.c:350:24: warning: 'standard_io_desc' defined but not used [-Wunused-variable]
static struct map_desc standard_io_desc[] __initdata = {
^
arch/arm/mach-sa1100/assabet.c: In function 'map_sa1100_gpio_regs':
arch/arm/mach-sa1100/assabet.c:496:38: error: 'PMD_MASK' undeclared (first use in this function)
unsigned long phys = __PREG(GPLR) & PMD_MASK;
^
arch/arm/mach-sa1100/assabet.c:496:38: note: each undeclared identifier is reported only once for each function it appears in
In file included from ./include/linux/list.h:7:0,
from ./include/linux/module.h:9,
from arch/arm/mach-sa1100/assabet.c:14:
./arch/arm/include/asm/pgtable-2level-hwdef.h:22:29: error: 'pmdval_t' undeclared (first use in this function)
#define PMD_TYPE_SECT (_AT(pmdval_t, 2) << 0)
^
./include/uapi/linux/const.h:21:20: note: in definition of macro '_AT'
#define _AT(T,X) ((T)(X))
^
arch/arm/mach-sa1100/assabet.c:498:13: note: in expansion of macro 'PMD_TYPE_SECT'
int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO);
^
arch/arm/mach-sa1100/assabet.c:503:2: error: implicit declaration of function 'flush_pmd_entry' [-Werror=implicit-function-declaration]
flush_pmd_entry(pmd);
^
arch/arm/mach-sa1100/assabet.c:497:16: warning: unused variable 'virt' [-Wunused-variable]
unsigned long virt = (unsigned long)io_p2v(phys);
^
arch/arm/mach-sa1100/assabet.c: At top level:
arch/arm/mach-sa1100/assabet.c:620:24: warning: 'assabet_io_desc' defined but not used [-Wunused-variable]
static struct map_desc assabet_io_desc[] __initdata = {
^
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-sa1100/assabet.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [arch/arm/mach-sa1100] Error 2
make: *** Waiting for unfinished jobs....
The code there performs the manual selection of page flags which makes
it dependant on MMU.
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/mach-sa1100/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 36e3c79..af8cd56 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -4,6 +4,7 @@ menu "SA11x0 Implementations"
config SA1100_ASSABET
bool "Assabet"
+ depends on MMU
select ARM_SA1110_CPUFREQ
help
Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 18/23] ARM: i.MX: remove map_io callback
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (16 preceding siblings ...)
2016-11-29 12:39 ` [RFC v2 PATCH 17/23] ARM: sa11x0: assabet: add dependency on MMU Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 19/23] PCI: tegra: limit to MMU build only Vladimir Murzin
` (4 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
There is no need to define map_io only for debug_ll_io_init() since it
is already called in devicemaps_init() if map_io is NULL.
Apart from that, for NOMMU build debug_ll_io_init() is a nop which
leads to following error:
CC arch/arm/mach-imx/mach-imx1.o
arch/arm/mach-imx/mach-imx1.c:40:13: error: 'debug_ll_io_init' undeclared here (not in a function)
.map_io = debug_ll_io_init,
^
make[1]: *** [arch/arm/mach-imx/mach-imx1.o] Error 1
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>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/mach-imx/mach-imx1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-imx/mach-imx1.c b/arch/arm/mach-imx/mach-imx1.c
index de5ab8d..3a8406e 100644
--- a/arch/arm/mach-imx/mach-imx1.c
+++ b/arch/arm/mach-imx/mach-imx1.c
@@ -37,7 +37,6 @@ static void __init imx1_init_irq(void)
};
DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
- .map_io = debug_ll_io_init,
.init_early = imx1_init_early,
.init_irq = imx1_init_irq,
.dt_compat = imx1_dt_board_compat,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 19/23] PCI: tegra: limit to MMU build only
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (17 preceding siblings ...)
2016-11-29 12:40 ` [RFC v2 PATCH 18/23] ARM: i.MX: remove map_io callback Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 20/23] IB: add dependency on MMU Vladimir Murzin
` (3 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
This driver rely on MMU for virtual address space optimisations (see
comment around tegra_pcie_bus_alloc()) and breaks NOMMU build, thus
add dependency on MMU.
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
drivers/pci/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index d7e7c0a..836fa02 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -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.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 20/23] IB: add dependency on MMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (18 preceding siblings ...)
2016-11-29 12:40 ` [RFC v2 PATCH 19/23] PCI: tegra: limit to MMU build only Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 21/23] cnic: " Vladimir Murzin
` (2 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
While building for NOMMU several link time issues were seen:
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'
...
ERROR: "zap_vma_ptes" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
ERROR: "zap_vma_ptes" [drivers/infiniband/hw/mlx4/mlx4_ib.ko] undefined!
ERROR: "can_do_mlock" [drivers/infiniband/core/ib_core.ko] undefined!
...
ERROR: "can_do_mlock" [drivers/infiniband/core/ib_core.ko] undefined!
...
ERROR: "zap_vma_ptes" [drivers/infiniband/hw/mlx4/mlx4_ib.ko] undefined!
It seems that Infiniband assumes that is it used in MMU configurations
only, so add dependency on CONFUG_MMU.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
drivers/infiniband/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index fb3fb89..5f17955 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -4,6 +4,7 @@ menuconfig INFINIBAND
depends on HAS_IOMEM
depends on NET
depends on INET
+ depends on MMU
depends on m || IPV6 != m
select IRQ_POLL
---help---
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 21/23] cnic: add dependency on MMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (19 preceding siblings ...)
2016-11-29 12:40 ` [RFC v2 PATCH 20/23] IB: add dependency on MMU Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 22/23] scsi: bnx2i: bnx2fc: " Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU Vladimir Murzin
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
CNIC selects UIO framework which has dependency on MMU, so for NOMMU
builds following warning shows up:
warning: (CNIC) selects UIO which has unmet direct dependencies (MMU)
Fix it with making CNIC dependant on MMU.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
drivers/net/ethernet/broadcom/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index bd8c80c..ea04b36 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -83,6 +83,7 @@ config BNX2
config CNIC
tristate "QLogic CNIC support"
depends on PCI && (IPV6 || IPV6=n)
+ depends on MMU
select BNX2
select UIO
---help---
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 22/23] scsi: bnx2i: bnx2fc: add dependency on MMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (20 preceding siblings ...)
2016-11-29 12:40 ` [RFC v2 PATCH 21/23] cnic: " Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU Vladimir Murzin
22 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
Both SCSI_BNX2_ISCSI and SCSI_BNX2X_FCOE select CNIC which it turn
select UIO. The later one is dependant on MMU, so while fixing CNIC
for NOMMU build (by adding explicit dependency on MMU) following
warning shows up:
warning: (SCSI_BNX2_ISCSI && SCSI_BNX2X_FCOE) selects CNIC which has
unmet direct dependencies (NETDEVICES && ETHERNET &&
NET_VENDOR_BROADCOM && PCI && (IPV6 || IPV6=n) && MMU)
Fix it with making SCSI_BNX2_ISCSI and SCSI_BNX2X_FCOE dependant on
MMU.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
drivers/scsi/bnx2fc/Kconfig | 1 +
drivers/scsi/bnx2i/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/scsi/bnx2fc/Kconfig b/drivers/scsi/bnx2fc/Kconfig
index d401a09..7862f72 100644
--- a/drivers/scsi/bnx2fc/Kconfig
+++ b/drivers/scsi/bnx2fc/Kconfig
@@ -1,5 +1,6 @@
config SCSI_BNX2X_FCOE
tristate "QLogic FCoE offload support"
+ depends on MMU
depends on PCI
depends on (IPV6 || IPV6=n)
depends on LIBFC
diff --git a/drivers/scsi/bnx2i/Kconfig b/drivers/scsi/bnx2i/Kconfig
index ba30ff8..0549267 100644
--- a/drivers/scsi/bnx2i/Kconfig
+++ b/drivers/scsi/bnx2i/Kconfig
@@ -1,5 +1,6 @@
config SCSI_BNX2_ISCSI
tristate "QLogic NetXtreme II iSCSI support"
+ depends on MMU
depends on NET
depends on PCI
depends on (IPV6 || IPV6=n)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
` (21 preceding siblings ...)
2016-11-29 12:40 ` [RFC v2 PATCH 22/23] scsi: bnx2i: bnx2fc: " Vladimir Murzin
@ 2016-11-29 12:40 ` Vladimir Murzin
2016-11-29 17:22 ` Russell King - ARM Linux
22 siblings, 1 reply; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-29 12:40 UTC (permalink / raw)
To: linux-arm-kernel
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(-)
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)"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class
2016-11-29 12:39 ` [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class Vladimir Murzin
@ 2016-11-29 17:11 ` Russell King - ARM Linux
2016-11-30 9:54 ` Vladimir Murzin
0 siblings, 1 reply; 31+ messages in thread
From: Russell King - ARM Linux @ 2016-11-29 17:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 29, 2016 at 12:39:53PM +0000, Vladimir Murzin wrote:
> Dependency on MMU is quite strict and prevent R-class from being built -
> relax this condition and guard against M-class only
I thought I'd already commented on some of this change, but it seems
not.
> diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
> index 0f6c100..0e7fddf 100644
> --- a/arch/arm/kernel/sleep.S
> +++ b/arch/arm/kernel/sleep.S
> @@ -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
These ifdefs were introduced to fix EFM32. The commit description needs
to state why it's safe to remove them now (presumably because of the
dependency on !CPU_V7M). However, it also needs to explain why it's
not going to cause a regression for EFM32 - EFM32 _was_ capable of
building this code.
--
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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm
2016-11-29 12:39 ` [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm Vladimir Murzin
@ 2016-11-29 17:14 ` Russell King - ARM Linux
2016-11-30 9:57 ` Vladimir Murzin
0 siblings, 1 reply; 31+ messages in thread
From: Russell King - ARM Linux @ 2016-11-29 17:14 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 29, 2016 at 12:39:50PM +0000, Vladimir Murzin wrote:
> Mediatek's and Qualcomm's platform code has reference to
> secondary_startup_arm and that breaks NOMMU build.
This needs to explain why this is safe in the presence of EFM32.
> Cc: Russell King <linux@armlinux.org.uk>
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
> arch/arm/kernel/head-nommu.S | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
> index 7317554..2ab026f 100644
> --- a/arch/arm/kernel/head-nommu.S
> +++ b/arch/arm/kernel/head-nommu.S
> @@ -89,6 +89,12 @@ ENDPROC(stext)
>
> #ifdef CONFIG_SMP
> .text
> + .arm
> +ENTRY(secondary_startup_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: )
> ENTRY(secondary_startup)
> /*
> * Common entry point for secondary CPUs.
> @@ -126,6 +132,7 @@ ENTRY(secondary_startup)
> mov fp, #0
> b secondary_start_kernel
> ENDPROC(secondary_startup)
> +ENDPROC(secondary_startup_arm)
>
> .type __secondary_data, %object
> __secondary_data:
> --
> 1.7.9.5
>
--
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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
2016-11-29 12:40 ` [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU Vladimir Murzin
@ 2016-11-29 17:22 ` Russell King - ARM Linux
2016-11-30 10:01 ` Vladimir Murzin
0 siblings, 1 reply; 31+ messages in thread
From: Russell King - ARM Linux @ 2016-11-29 17:22 UTC (permalink / raw)
To: linux-arm-kernel
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.
--
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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class
2016-11-29 17:11 ` Russell King - ARM Linux
@ 2016-11-30 9:54 ` Vladimir Murzin
0 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-30 9:54 UTC (permalink / raw)
To: linux-arm-kernel
On 29/11/16 17:11, Russell King - ARM Linux wrote:
> On Tue, Nov 29, 2016 at 12:39:53PM +0000, Vladimir Murzin wrote:
>> Dependency on MMU is quite strict and prevent R-class from being built -
>> relax this condition and guard against M-class only
>
> I thought I'd already commented on some of this change, but it seems
> not.
>
>> diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
>> index 0f6c100..0e7fddf 100644
>> --- a/arch/arm/kernel/sleep.S
>> +++ b/arch/arm/kernel/sleep.S
>> @@ -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
>
> These ifdefs were introduced to fix EFM32. The commit description needs
> to state why it's safe to remove them now (presumably because of the
> dependency on !CPU_V7M). However, it also needs to explain why it's
> not going to cause a regression for EFM32 - EFM32 _was_ capable of
> building this code.
>
After looking at 2678bb9f ("ARM: fix EFM32 build breakage caused by
cpu_resume_arm") I think the right fix should be based on CONFIG_CPU_THUMBONLY
rather than disallowing this code to be build for CPU_V7M.
Indeed, I've just tried that it it works fine, so I'll update the patch to
reflect that.
Thanks for your valuable comment!
Cheers
Vladimir
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm
2016-11-29 17:14 ` Russell King - ARM Linux
@ 2016-11-30 9:57 ` Vladimir Murzin
0 siblings, 0 replies; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-30 9:57 UTC (permalink / raw)
To: linux-arm-kernel
On 29/11/16 17:14, Russell King - ARM Linux wrote:
> On Tue, Nov 29, 2016 at 12:39:50PM +0000, Vladimir Murzin wrote:
>> Mediatek's and Qualcomm's platform code has reference to
>> secondary_startup_arm and that breaks NOMMU build.
>
> This needs to explain why this is safe in the presence of EFM32.
>
It did not explode by pure luck M-class doesn't support SMP. The code needs to
include case for CONFIG_CPU_THUMBONLY. I'll include update in the next version.
Thanks
Vladimir
>> Cc: Russell King <linux@armlinux.org.uk>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>> arch/arm/kernel/head-nommu.S | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
>> index 7317554..2ab026f 100644
>> --- a/arch/arm/kernel/head-nommu.S
>> +++ b/arch/arm/kernel/head-nommu.S
>> @@ -89,6 +89,12 @@ ENDPROC(stext)
>>
>> #ifdef CONFIG_SMP
>> .text
>> + .arm
>> +ENTRY(secondary_startup_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: )
>> ENTRY(secondary_startup)
>> /*
>> * Common entry point for secondary CPUs.
>> @@ -126,6 +132,7 @@ ENTRY(secondary_startup)
>> mov fp, #0
>> b secondary_start_kernel
>> ENDPROC(secondary_startup)
>> +ENDPROC(secondary_startup_arm)
>>
>> .type __secondary_data, %object
>> __secondary_data:
>> --
>> 1.7.9.5
>>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
2016-11-29 17:22 ` Russell King - ARM Linux
@ 2016-11-30 10:01 ` Vladimir Murzin
2016-12-01 20:11 ` Chris Brandt
0 siblings, 1 reply; 31+ messages in thread
From: Vladimir Murzin @ 2016-11-30 10:01 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU
2016-11-30 10:01 ` Vladimir Murzin
@ 2016-12-01 20:11 ` Chris Brandt
0 siblings, 0 replies; 31+ messages in thread
From: Chris Brandt @ 2016-12-01 20:11 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2016-12-01 20:11 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 12:39 [RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 01/23] ARM: NOMMU: define stubs for fixup Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 02/23] ARM: NOMMU: define debug_ll_io_ini Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 03/23] ARM: NOMMU: define SECTION_xxx macros Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 04/23] ARM: NOMMU: define dummy user structure for feroceon Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 05/23] ARM: NOMMU: define __arm_ioremap_exec and pci_ioremap functions Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 06/23] ARM: NOMMU: relax restriction on MPU existence Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 07/23] ARM: NOMMU: fix head-nommu build for pre-ARMv7 CPUs Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 08/23] ARM: NOMMU: implement secondary_startup_arm Vladimir Murzin
2016-11-29 17:14 ` Russell King - ARM Linux
2016-11-30 9:57 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 09/23] ARM: move arm_heavy_mb to MMU/noMMU neutral place Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 10/23] ARM: tlbflush: drop dependency on CONFIG_SMP Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 11/23] ARM: sleep: allow it to be build for R-class Vladimir Murzin
2016-11-29 17:11 ` Russell King - ARM Linux
2016-11-30 9:54 ` Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 12/23] ARM: setup: move call to erratum_a15_798181_init under CONFIG_MMU Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 13/23] ARM: kexec: disallow kexec for NOMMU builds Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 14/23] ARM: ep93xx: select ARM_PATCH_PHYS_VIRT for MMU builds only Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 15/23] ARM: omap: do not select HIGHMEM explicitly Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 16/23] ARM: sa1100: move CPU specific copy code under its own config Vladimir Murzin
2016-11-29 12:39 ` [RFC v2 PATCH 17/23] ARM: sa11x0: assabet: add dependency on MMU Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 18/23] ARM: i.MX: remove map_io callback Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 19/23] PCI: tegra: limit to MMU build only Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 20/23] IB: add dependency on MMU Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 21/23] cnic: " Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 22/23] scsi: bnx2i: bnx2fc: " Vladimir Murzin
2016-11-29 12:40 ` [RFC v2 PATCH 23/23] ARM: Allow ARCH_MULTIPLATFORM to be selected for NOMMU Vladimir Murzin
2016-11-29 17:22 ` Russell King - ARM Linux
2016-11-30 10:01 ` Vladimir Murzin
2016-12-01 20:11 ` Chris Brandt
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).