arm64: compat: fix compilation when using 64kB pages
PATCH 1/1 arm64: compat: fix compilation when using 64kB pages
When compiling for 64kB pages, we end-up having conflicting implementations for aarch32_break_handler().
Wrap the 4kB page implementation with a CONFIG_COMPAT guard and change the !CONFIG_COMPAT implementation to be static inline instead of simply static.
--- arch/arm64/include/asm/debug-monitors.h | 2 +- arch/arm64/kernel/debug-monitors.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm64/include/asm/debug-monitors.h +1 -1
@@ -86,7 +86,7 @@ static inline int reinstall_suspended_bps(struct pt_regs *regs)#ifdef CONFIG_COMPAT int aarch32_break_handler (struct pt_regs *regs);#else -static int aarch32_break_handler (struct pt_regs *regs) +static inline int aarch32_break_handler (struct pt_regs *regs) {return -EFAULT ; }
arch/arm64/kernel/debug-monitors.c +2 -0
@@ -246,6 +246,7 @@ static int brk_handler(unsigned long addr, unsigned int esr,return 0 ; } +#ifdef CONFIG_COMPAT int aarch32_break_handler (struct pt_regs *regs) {siginfo_t info;
@@ -285,6 +286,7 @@ int aarch32_break_handler(struct pt_regs *regs)force_sig_info (SIGTRAP , &info, current); return 0; } +#endif static int __init debug_traps_init (void ) {
Signature · 1 line
1.8.1.5
PATCH 1/1 arm64: compat: fix compilation when using 64kB pages
Quoted 9 lines · Marc Zyngier
When compiling for 64kB pages, we end-up having conflicting implementations for
aarch32_break_handler().Wrap the 4kB page implementation with a
CONFIG_COMPATguard and change the !CONFIG_COMPAT implementation to be static inline instead of simply static.Cc Will Deacon <[email protected]>Cc Catalin Marinas <[email protected]>Signed-off-by Marc Zyngier <[email protected]>
I think there was a better fix kicking around for this from Chen Gang already. I asked for a new commit message, but a v3 didn't appear:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/179418.html
Will