Skip to contentSkip to conversation

arm64: compat: fix compilation when using 64kB pages

PATCH New Marc Zyngier 2 participants 2 messages Jul 11, 2013 – Jul 15, 2013 arm64

lore
Share & tools
lore
#0 lore raw

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.

Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[email protected]>
---
 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
index ef8235c..7c962f3 100644
@@ -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
index 08018e3..ceedcd7 100644
@@ -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
#1 lore raw

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_COMPAT guard and change the !CONFIG_COMPAT implementation to be static inline instead of simply static.

Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[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