From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH 1/4] printk: An all-in-one commit to fix build failures
Date: Wed, 27 Mar 2019 19:33:07 +0100 [thread overview]
Message-ID: <20190327183310.1015-1-bigeasy@linutronix.de> (raw)
In-Reply-To: <20190320171511.icjhdlulgal2yeho@linutronix.de>
From: John Ogness <john.ogness@linutronix.de>
This commit contains addresses several build failures which were
reported by the kbuild test robot.
The fixes were folded into the original commits.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/powerpc/kernel/traps.c | 1 -
arch/powerpc/kernel/watchdog.c | 5 -----
kernel/printk/printk.c | 16 ++++++++++++++--
lib/printk_ringbuffer.c | 8 +++++++-
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7a1de34f38c85..314be8e39d1fd 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -174,7 +174,6 @@ extern void panic_flush_kmsg_start(void)
extern void panic_flush_kmsg_end(void)
{
- printk_safe_flush_on_panic();
kmsg_dump(KMSG_DUMP_PANIC);
bust_spinlocks(0);
debug_locks_off();
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 3c6ab22a0c4e3..bf98181c5b309 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -181,11 +181,6 @@ static void watchdog_smp_panic(int cpu, u64 tb)
wd_smp_unlock(&flags);
- printk_safe_flush();
- /*
- * printk_safe_flush() seems to require another print
- * before anything actually goes out to console.
- */
if (sysctl_hardlockup_all_cpu_backtrace)
trigger_allbutself_cpu_backtrace();
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 5cfd8ea445362..997d07b6bf975 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -370,6 +370,18 @@ static u64 clear_seq;
#define LOG_LEVEL(v) ((v) & 0x07)
#define LOG_FACILITY(v) ((v) >> 3 & 0xff)
+/* Return log buffer address */
+char *log_buf_addr_get(void)
+{
+ return printk_rb.buffer;
+}
+
+/* Return log buffer size */
+u32 log_buf_len_get(void)
+{
+ return (1 << printk_rb.size_bits);
+}
+
/* human readable text of the record */
static char *log_text(const struct printk_log *msg)
{
@@ -1910,7 +1922,7 @@ asmlinkage int vprintk_emit(int facility, int level,
}
EXPORT_SYMBOL(vprintk_emit);
-__printf(1, 0) int vprintk_func(const char *fmt, va_list args)
+static __printf(1, 0) int vprintk_func(const char *fmt, va_list args)
{
return vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args);
}
@@ -2684,7 +2696,7 @@ static int __init init_printk_kthread(void)
}
late_initcall(init_printk_kthread);
-int vprintk_deferred(const char *fmt, va_list args)
+static int vprintk_deferred(const char *fmt, va_list args)
{
return vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args);
}
diff --git a/lib/printk_ringbuffer.c b/lib/printk_ringbuffer.c
index ce33b5add5a17..9a31d7dbdc005 100644
--- a/lib/printk_ringbuffer.c
+++ b/lib/printk_ringbuffer.c
@@ -196,8 +196,14 @@ void prb_commit(struct prb_handle *h)
if (changed) {
atomic_long_inc(&rb->wq_counter);
- if (wq_has_sleeper(rb->wq))
+ if (wq_has_sleeper(rb->wq)) {
+#ifdef CONFIG_IRQ_WORK
irq_work_queue(rb->wq_work);
+#else
+ if (!in_nmi())
+ wake_up_interruptible_all(rb->wq);
+#endif
+ }
}
}
--
2.20.1
next prev parent reply other threads:[~2019-03-27 18:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 17:15 [ANNOUNCE] v5.0.3-rt1 Sebastian Andrzej Siewior
2019-03-22 18:52 ` Julien Grall
2019-03-25 8:13 ` John Ogness
2019-03-25 10:18 ` Julien Grall
2019-03-25 10:34 ` John Ogness
2019-03-26 10:26 ` Julien Grall
2019-03-26 16:04 ` John Ogness
2019-03-27 18:33 ` Sebastian Andrzej Siewior [this message]
2019-03-27 18:33 ` [PATCH 2/4] powerpc/stackprotector: work around stack-guard init from atomic Sebastian Andrzej Siewior
2019-05-10 21:46 ` Steven Rostedt
2019-03-27 18:33 ` [PATCH 3/4] powerpc/pseries/iommu: Use a locallock instead local_irq_save() Sebastian Andrzej Siewior
2019-03-27 18:33 ` [PATCH 4/4] powerpc: reshuffle TIF bits Sebastian Andrzej Siewior
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=20190327183310.1015-1-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).