linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: compat: fix compilation when using 64kB pages
@ 2013-07-11 14:30 Marc Zyngier
  2013-07-15 10:02 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Zyngier @ 2013-07-11 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

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 <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm64/include/asm/debug-monitors.h | 2 +-
 arch/arm64/kernel/debug-monitors.c      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index ef8235c..7c962f3 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -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;
 }
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index 08018e3..ceedcd7 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -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)
 {
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] arm64: compat: fix compilation when using 64kB pages
  2013-07-11 14:30 [PATCH] arm64: compat: fix compilation when using 64kB pages Marc Zyngier
@ 2013-07-15 10:02 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2013-07-15 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 11, 2013 at 03:30:36PM +0100, Marc Zyngier wrote:
> 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 <will.deacon@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-15 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 14:30 [PATCH] arm64: compat: fix compilation when using 64kB pages Marc Zyngier
2013-07-15 10:02 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).