Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5607134img; Wed, 27 Mar 2019 11:35:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzTnUkj7miP6KqQBMyzUHL0aWhHgfoYHBAFW1/x5NyaLbFLepoB3PMFPSVAdySmMo7nmd7 X-Received: by 2002:a62:293:: with SMTP id 141mr36170877pfc.245.1553711712147; Wed, 27 Mar 2019 11:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553711712; cv=none; d=google.com; s=arc-20160816; b=X3qkZ3IIMMq2ykl4/t4VTChy1kcvRQv6q3LQJuKOC9wIl8Hw39M7GloYuzrF9JgfyN o7hHDpfOH5/BtI7NwCBuPJ9tHIIZ/AVnmJ+gKEucaQOtUBqMgE4dNjUEUfLo4hx/5FpN LYqlIYF6v1ZUBh3zLLIeKI/8TGTKW1deHkDHPSxoQn/KybXExo7wuyHfrEOUcadPyHUx xYIOauQYo4t8CohpMkBC/x/yu9q2cqNHDawjf09eNyTogWgj2ZCO3hgCmD1b34hl+LhX 5MLE6Zl673UFeALjEeTHXOqpDMw15Bf5rijVhHe72F2zw60Gf8oZ3CWf5i1u2QNkdydK jqxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fQWmfQuwbbGpwsSwKNGdy3w0A/D6zLDpCwe4m81yBWQ=; b=kEjL8UNTlW8+nbU7jE+x72uiZ+SEpecLTH69qfJvV3CBl+Vo1q8r+7YJ9H1uk6Kk2N bmMyOFl8bwx6VXutd2HUwCe4RXtYBMVv/aUS0c7RzpekCGYMwlDJnQGavBWRrIN8VbYz Zmgigs4RFlVrV/7Q9yLv8twzkVVygoKcWBBwGCqILvicbN3x892vr+OaAEVb2xvehr/r Oi86r1b4kF4tkTQ5JouIlDpeznb211dvvTnt4S6dk+cRhWrIoU4lkwci7P+sqpVIIGIn zZFaILax+TIi1E9/6CsY6zYTwws8RBNt56243pcW1pRtu3MJ7A1z61aiD95ZMSTQ1vZG lDsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cu15si9618077plb.83.2019.03.27.11.34.56; Wed, 27 Mar 2019 11:35:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391970AbfC0SdY (ORCPT + 99 others); Wed, 27 Mar 2019 14:33:24 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51487 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390945AbfC0SdX (ORCPT ); Wed, 27 Mar 2019 14:33:23 -0400 Received: from localhost ([127.0.0.1] helo=flow.W.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1h9DMM-0004Tc-OB; Wed, 27 Mar 2019 19:33:10 +0100 From: Sebastian Andrzej Siewior To: LKML , linux-rt-users Cc: Thomas Gleixner , Steven Rostedt Subject: [PATCH 1/4] printk: An all-in-one commit to fix build failures Date: Wed, 27 Mar 2019 19:33:07 +0100 Message-Id: <20190327183310.1015-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190320171511.icjhdlulgal2yeho@linutronix.de> References: <20190320171511.icjhdlulgal2yeho@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Ogness 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 Signed-off-by: John Ogness Signed-off-by: Sebastian Andrzej Siewior --- 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