diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-03 05:39:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-03 05:49:01 -0400 |
commit | 8c0cc8a5d90bc7373a7a9e7f7a40eb41f51e03fc (patch) | |
tree | 387581931c685a5366871c790ff3d1a9e128c698 /arch/arm | |
parent | e0d407564b532d978b03ceccebd224a05d02f111 (diff) |
ARM: fix nommu builds with 48be69a02 (ARM: move signal handlers into a vdso-like page)
Olof reports that noMMU builds error out with:
arch/arm/kernel/signal.c: In function 'setup_return':
arch/arm/kernel/signal.c:413:25: error: 'mm_context_t' has no member named 'sigpage'
This shows one of the evilnesses of IS_ENABLED(). Get rid of it here
and replace it with #ifdef's - and as no noMMU platform can make use
of sigpage, depend on CONIFG_MMU not CONFIG_ARM_MPU.
Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/elf.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/signal.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index 9c9b30717fda..56211f2084ef 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -130,8 +130,10 @@ struct mm_struct; | |||
130 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); | 130 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); |
131 | #define arch_randomize_brk arch_randomize_brk | 131 | #define arch_randomize_brk arch_randomize_brk |
132 | 132 | ||
133 | #ifdef CONFIG_MMU | ||
133 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 134 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
134 | struct linux_binprm; | 135 | struct linux_binprm; |
135 | int arch_setup_additional_pages(struct linux_binprm *, int); | 136 | int arch_setup_additional_pages(struct linux_binprm *, int); |
137 | #endif | ||
136 | 138 | ||
137 | #endif | 139 | #endif |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 39e7105a9b70..ab3304225272 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -402,7 +402,8 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
402 | __put_user(sigreturn_codes[idx+1], rc+1)) | 402 | __put_user(sigreturn_codes[idx+1], rc+1)) |
403 | return 1; | 403 | return 1; |
404 | 404 | ||
405 | if ((cpsr & MODE32_BIT) && !IS_ENABLED(CONFIG_ARM_MPU)) { | 405 | #ifdef CONFIG_MMU |
406 | if (cpsr & MODE32_BIT) { | ||
406 | struct mm_struct *mm = current->mm; | 407 | struct mm_struct *mm = current->mm; |
407 | 408 | ||
408 | /* | 409 | /* |
@@ -412,7 +413,9 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
412 | */ | 413 | */ |
413 | retcode = mm->context.sigpage + signal_return_offset + | 414 | retcode = mm->context.sigpage + signal_return_offset + |
414 | (idx << 2) + thumb; | 415 | (idx << 2) + thumb; |
415 | } else { | 416 | } else |
417 | #endif | ||
418 | { | ||
416 | /* | 419 | /* |
417 | * Ensure that the instruction cache sees | 420 | * Ensure that the instruction cache sees |
418 | * the return code written onto the stack. | 421 | * the return code written onto the stack. |