Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2422960pxy; Tue, 3 Aug 2021 06:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzkUlV8uYlYAaV5d7ImQUTXPiGOXa8Br8nUhdyJZfeVQr1JoWf+Fl3W9A1OXeiWCNqwTtX X-Received: by 2002:a50:ff19:: with SMTP id a25mr24716646edu.311.1627996503563; Tue, 03 Aug 2021 06:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627996503; cv=none; d=google.com; s=arc-20160816; b=kE+d9EWufyjFzXJGDLQl6p5tEgEwJiBaA35LCVwtNCYxYlZGSxs91EA0w7me4EOoKm 2n0GYt8Qr3ybMyZ3TDMaxpI5RZ2DBWLwXmUTAXVHSik6CuOHAAQWo0oScPonBciFp97f nJt31gLL3SBOAy50fBBqkn8EEJv8UVZka4rFwm9RU4WgmLiyz8Arsg/VXW27c9CuyKYN C0QomkmYB1sG+xCfd8YOSNL/7FawPtNG+fusqFwvj9s1DP8S/o8YCqccuLRhSyloHqO/ VfD6C/CP3X7hTsJkp20GHs/NXBe+1jbtXwtl9DMawP95htk5Zius82SvNhIpoHPsy1HL EMxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=1Qr1/Kql4O0uUbgY9eaNCn9AjwMvkGvYOIbAKwtn7DQ=; b=Noc4VqmeKFRqvjv9YGpRtoNIityy4J34cXKKvacntGJ2IWsyizMIJDUll5umnpSEk3 0aylW2pGTF3dTDYeyorW0rN3BJ/e9ck/NZAolYz9hCarrgLiwXkYOyCgnSpICxuVm493 7kWumJrw0uMpdFlAF5IhHFx5z5gt+jI0s/RJc3Pr4XJ896rvCJ6nYru5sYzkj8KCciU2 0e7AJ6IEUiEN7bZgSQjnU2v8yb+P6xl8QbgA4BgpufqjYvcriq8L6T9hRmt/Fzu0R7e0 UqcDowC6u1iY9GkBjX4kmzMzcG9oUw385GsITzZ/2djVnsfrGRpy879lonkbeq2Z20AJ KNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=l7gAQM6v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si8967196eds.326.2021.08.03.06.14.40; Tue, 03 Aug 2021 06:15:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=l7gAQM6v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236313AbhHCNNZ (ORCPT + 99 others); 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