From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/9] arm64: Move show_unhandled_signals_ratelimited into traps.c
Date: Thu, 22 Feb 2018 14:00:56 +0000 [thread overview]
Message-ID: <1519308057-4953-9-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1519308057-4953-1-git-send-email-will.deacon@arm.com>
show_unhandled_signals_ratelimited is only called in traps.c, so move it
out of its macro in the dreaded system_misc.h and into a static function
in traps.c
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm64/include/asm/system_misc.h | 11 -----------
arch/arm64/kernel/traps.c | 7 +++++++
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/include/asm/system_misc.h b/arch/arm64/include/asm/system_misc.h
index 07aa8e3c5630..28893a0b141d 100644
--- a/arch/arm64/include/asm/system_misc.h
+++ b/arch/arm64/include/asm/system_misc.h
@@ -45,17 +45,6 @@ extern void __show_regs(struct pt_regs *);
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
-#define show_unhandled_signals_ratelimited() \
-({ \
- static DEFINE_RATELIMIT_STATE(_rs, \
- DEFAULT_RATELIMIT_INTERVAL, \
- DEFAULT_RATELIMIT_BURST); \
- bool __show_ratelimited = false; \
- if (show_unhandled_signals && __ratelimit(&_rs)) \
- __show_ratelimited = true; \
- __show_ratelimited; \
-})
-
int handle_guest_sea(phys_addr_t addr, unsigned int esr);
#endif /* __ASSEMBLY__ */
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 637ae3702950..4231488a5a9f 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -223,6 +223,13 @@ void die(const char *str, struct pt_regs *regs, int err)
do_exit(SIGSEGV);
}
+static bool show_unhandled_signals_ratelimited(void)
+{
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
+ DEFAULT_RATELIMIT_BURST);
+ return show_unhandled_signals && __ratelimit(&rs);
+}
+
void arm64_force_sig_info(struct siginfo *info, const char *str,
struct task_struct *tsk)
{
--
2.1.4
next prev parent reply other threads:[~2018-02-22 14:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 14:00 [PATCH 0/9] arm64: Consolidate use of show_unhandled_signals Will Deacon
2018-02-22 14:00 ` [PATCH 1/9] arm64: signal: Make force_signal_inject more robust Will Deacon
2018-02-22 14:00 ` [PATCH 2/9] arm64: signal: Force SIGKILL for unknown signals in force_signal_inject Will Deacon
2018-02-22 14:00 ` [PATCH 3/9] arm64: Introduce arm64_force_sig_info and hook up in arm64_notify_die Will Deacon
2018-02-22 15:39 ` Mark Rutland
2018-02-22 14:00 ` [PATCH 4/9] arm64: signal: Don't print anything directly in force_signal_inject Will Deacon
2018-02-22 14:00 ` [PATCH 5/9] arm64: Pass user fault info to arm64_notify_die instead of printing it Will Deacon
2018-02-22 14:00 ` [PATCH 6/9] arm64: mm: Rework unhandled user pagefaults to call arm64_force_sig_info Will Deacon
2018-02-22 14:00 ` [PATCH 7/9] arm64: signal: Call arm64_notify_segfault when failing to deliver signal Will Deacon
2018-02-22 14:00 ` Will Deacon [this message]
2018-02-22 14:00 ` [PATCH 9/9] arm64: Use arm64_force_sig_info instead of force_sig_info Will Deacon
2018-02-22 15:48 ` Mark Rutland
2018-02-22 16:58 ` Will Deacon
2018-02-22 16:59 ` Mark Rutland
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=1519308057-4953-9-git-send-email-will.deacon@arm.com \
--to=will.deacon@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).