From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: compat: fix compilation when using 64kB pages
Date: Thu, 11 Jul 2013 15:30:36 +0100 [thread overview]
Message-ID: <1373553036-5418-1-git-send-email-marc.zyngier@arm.com> (raw)
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
next reply other threads:[~2013-07-11 14:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 14:30 Marc Zyngier [this message]
2013-07-15 10:02 ` [PATCH] arm64: compat: fix compilation when using 64kB pages Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373553036-5418-1-git-send-email-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).