Commit 8c0cc8a5 authored by Russell King's avatar Russell King

ARM: fix nommu builds with 48be69a0 (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: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e0d40756
...@@ -130,8 +130,10 @@ struct mm_struct; ...@@ -130,8 +130,10 @@ struct mm_struct;
extern unsigned long arch_randomize_brk(struct mm_struct *mm); extern unsigned long arch_randomize_brk(struct mm_struct *mm);
#define arch_randomize_brk arch_randomize_brk #define arch_randomize_brk arch_randomize_brk
#ifdef CONFIG_MMU
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
struct linux_binprm; struct linux_binprm;
int arch_setup_additional_pages(struct linux_binprm *, int); int arch_setup_additional_pages(struct linux_binprm *, int);
#endif
#endif #endif
...@@ -402,7 +402,8 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, ...@@ -402,7 +402,8 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
__put_user(sigreturn_codes[idx+1], rc+1)) __put_user(sigreturn_codes[idx+1], rc+1))
return 1; return 1;
if ((cpsr & MODE32_BIT) && !IS_ENABLED(CONFIG_ARM_MPU)) { #ifdef CONFIG_MMU
if (cpsr & MODE32_BIT) {
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
/* /*
...@@ -412,7 +413,9 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, ...@@ -412,7 +413,9 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
*/ */
retcode = mm->context.sigpage + signal_return_offset + retcode = mm->context.sigpage + signal_return_offset +
(idx << 2) + thumb; (idx << 2) + thumb;
} else { } else
#endif
{
/* /*
* Ensure that the instruction cache sees * Ensure that the instruction cache sees
* the return code written onto the stack. * the return code written onto the stack.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment