From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7631BC432BE for ; Tue, 3 Aug 2021 13:13:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5023A604AC for ; Tue, 3 Aug 2021 13:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236408AbhHCNNZ (ORCPT ); Tue, 3 Aug 2021 09:13:25 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56184 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236232AbhHCNNR (ORCPT ); Tue, 3 Aug 2021 09:13:17 -0400 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1627996385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Qr1/Kql4O0uUbgY9eaNCn9AjwMvkGvYOIbAKwtn7DQ=; b=l7gAQM6vPEFU3q48/AIDY/E5KMgsfBKluKK2sHEkc6iK5ofJlzL6jlU/2MkzrD4ND8sFB5 CE+7+MVik84513uwVP0Fk/HJYNulgNtEdffhPmgZm8JdFebQ6sUaKOHKNgw170FoGj3S4/ GiCNLOjt7gQX+H8SAO+futriABH1bpyFHzyF1/vCVleMmG1lF63lJOspnFYnH1WRf4uCwR BORqpgsMsJuim+9JoOQS/x7acqw7OcEanCBDJcwTRuq/k+02sv4tZGn+vaEvxi5ei8b+oo BptfMVYEVTCbDFc68eIEneJlPcyhnzG3UtKwsfptX8TC2gVIpr+shb9XKNzotg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1627996385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Qr1/Kql4O0uUbgY9eaNCn9AjwMvkGvYOIbAKwtn7DQ=; b=8iQnPrlVkMTkTFvufX6/nDahtEIhBbn10FVm0uK/6R1D0PUjy7CGZKIbkQcFlQFzpyZ5fX ie151AQHliJ/tFCA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v1 04/10] printk: relocate printk_delay() Date: Tue, 3 Aug 2021 15:18:55 +0206 Message-Id: <20210803131301.5588-5-john.ogness@linutronix.de> In-Reply-To: <20210803131301.5588-1-john.ogness@linutronix.de> References: <20210803131301.5588-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move printk_delay() "as is" further up so that it can be used by new functions in an upcoming commit. Signed-off-by: John Ogness --- kernel/printk/printk.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 1b546e117f10..8bdfac4c9ee9 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1875,6 +1875,20 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) return do_syslog(type, buf, len, SYSLOG_FROM_READER); } +int printk_delay_msec __read_mostly; + +static inline void printk_delay(void) +{ + if (unlikely(printk_delay_msec)) { + int m = printk_delay_msec; + + while (m--) { + mdelay(1); + touch_nmi_watchdog(); + } + } +} + /* * Special console_lock variants that help to reduce the risk of soft-lockups. * They allow to pass console_lock to another printk() call using a busy wait. @@ -2129,20 +2143,6 @@ static u8 *__printk_recursion_counter(void) local_irq_restore(flags); \ } while (0) -int printk_delay_msec __read_mostly; - -static inline void printk_delay(void) -{ - if (unlikely(printk_delay_msec)) { - int m = printk_delay_msec; - - while (m--) { - mdelay(1); - touch_nmi_watchdog(); - } - } -} - static inline u32 printk_caller_id(void) { return in_task() ? task_pid_nr(current) : -- 2.20.1