From 5d38000b3c97a1079734c0b4c5f87d5b935318cd Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Fri, 17 Apr 2015 21:51:38 +0100 Subject: ARM: 8342/1: VDSO: depend on CPU_V7 When targeting ARMv3 (e.g. rpc) and enabling CONFIG_VDSO we get: arch/arm/vdso/datapage.S:13: Error: selected processor does not support ARM mode `bx lr' One fix considered was to use 'ldr pc,lr' for such configurations, but since the VDSO is unlikely to be useful for pre-v7 hardware, just make it depend on CONFIG_CPU_V7. Reported-by: Arnd Bergmann Signed-off-by: Nathan Lynch Acked-by: Arnd Bergmann Signed-off-by: Russell King --- arch/arm/mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 8a5f1e644104..16ae9051b262 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -827,7 +827,7 @@ config KUSER_HELPERS config VDSO bool "Enable VDSO for acceleration of some system calls" - depends on AEABI && MMU + depends on AEABI && MMU && CPU_V7 default y if ARM_ARCH_TIMER select GENERIC_TIME_VSYSCALL help -- cgit v1.2.3-59-g8ed1b From 0a9024e80e85552b21076542355a4f4a7c0b9472 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 19 Apr 2015 20:28:53 +0100 Subject: ARM: Fix nommu booting Commit bf35706f3d09 ("ARM: 8314/1: replace PROCINFO embedded branch with relative offset") broke booting on nommu platforms as it didn't update the nommu boot code. This patch fixes that oversight. Fixes: bf35706f3d09 ("ARM: 8314/1: replace PROCINFO embedded branch with relative offset") Signed-off-by: Russell King --- arch/arm/kernel/head-nommu.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index cc176b67c134..aebfbf79a1a3 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -80,9 +80,9 @@ ENTRY(stext) ldr r13, =__mmap_switched @ address to jump to after @ initialising sctlr adr lr, BSYM(1f) @ return (PIC) address - ARM( add pc, r10, #PROCINFO_INITFUNC ) - THUMB( add r12, r10, #PROCINFO_INITFUNC ) - THUMB( ret r12 ) + ldr r12, [r10, #PROCINFO_INITFUNC] + add r12, r12, r10 + ret r12 1: b __after_proc_init ENDPROC(stext) @@ -117,9 +117,9 @@ ENTRY(secondary_startup) adr lr, BSYM(__after_proc_init) @ return address mov r13, r12 @ __secondary_switched address - ARM( add pc, r10, #PROCINFO_INITFUNC ) - THUMB( add r12, r10, #PROCINFO_INITFUNC ) - THUMB( ret r12 ) + ldr r12, [r10, #PROCINFO_INITFUNC] + add r12, r12, r10 + ret r12 ENDPROC(secondary_startup) ENTRY(__secondary_switched) -- cgit v1.2.3-59-g8ed1b From 2b507a2d9c7fdea3215aedf0a0e3660309f319e1 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sat, 18 Apr 2015 00:39:00 +0100 Subject: ARM: 8343/1: VDSO: add build artifacts to .gitignore vdsomunge and vdso.so.raw are outputs that don't get matched by the normal ignore rules. Signed-off-by: Nathan Lynch Signed-off-by: Russell King --- arch/arm/vdso/.gitignore | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/vdso/.gitignore b/arch/arm/vdso/.gitignore index f8b69d84238e..6b47f6e0b032 100644 --- a/arch/arm/vdso/.gitignore +++ b/arch/arm/vdso/.gitignore @@ -1 +1,3 @@ vdso.lds +vdso.so.raw +vdsomunge -- cgit v1.2.3-59-g8ed1b From f80f6531b47c538b69769ada5e9fbacad085b34d Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sat, 18 Apr 2015 00:39:16 +0100 Subject: ARM: 8344/1: VDSO: honor CONFIG_VDSO in Makefile When CONFIG_VDSO=n, the build normally does not enter arch/arm/vdso/ because arch/arm/Makefile does not add it to core-y. However, if the user runs 'make arch/arm/vdso/' the VDSO targets will get visited. This is because the VDSO Makefile itself does not consider the value of CONFIG_VDSO. It is arguably better and more consistent behavior to generate an empty built-in.o when CONFIG_VDSO=n and the user attempts to build arch/arm/vdso/. It's nicer because it doesn't try to build things that Kconfig dependencies are there to prevent (e.g. the dependency on AEABI), and it's less confusing than building objects that won't be used in the final image. Signed-off-by: Nathan Lynch Signed-off-by: Russell King --- arch/arm/vdso/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index bab0a8be7924..8aa791051029 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -10,8 +10,8 @@ ccflags-y := -shared -fPIC -fno-common -fno-builtin -fno-stack-protector ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 -DDISABLE_BRANCH_PROFILING ccflags-y += -Wl,--no-undefined $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) -obj-y += vdso.o -extra-y += vdso.lds +obj-$(CONFIG_VDSO) += vdso.o +extra-$(CONFIG_VDSO) += vdso.lds CPPFLAGS_vdso.lds += -P -C -U$(ARCH) CFLAGS_REMOVE_vdso.o = -pg -- cgit v1.2.3-59-g8ed1b