Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp849557pxb; Wed, 6 Apr 2022 01:52:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8oXRkJNU19cHpyzr4iX2hboQGkTdArfJNgMHCUxm4WwBJj5XjMXNRulQhkLyRnqjMssLA X-Received: by 2002:a17:90a:a78c:b0:1b8:b769:62d0 with SMTP id f12-20020a17090aa78c00b001b8b76962d0mr8686657pjq.227.1649235176349; Wed, 06 Apr 2022 01:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649235176; cv=none; d=google.com; s=arc-20160816; b=XASwE/TwzjgOs+aSP2PRM1M01oWljqhRvV1l4NC+TTKmDpPkPxPNKU5AfMgG3bxFs2 DnaaB481KsYi1ZB73VH/Es8CvW8HCmn9Dy17IaKjUW4Z3vd6knlw5i9EHEKspqYfWjhm CHYothEU1mB/8tMb7xGeEibKSYDGGO2IXVNGCdF4K5UWU96A4HSfChmol+70HMconjHk v37Nvhg/T2r7XUtXfrjpjNQPg0AOTHIOrHLtdBhjoypYL5BlzLkBPr+tmRVd1K3pi5DA 5vkGMJGnsjiuAtbY+ibkjD0JfYY3pRL2NFceUA7bu7yoIhhG5zV8n0Nl3rbhK6Rp6s4V SMLw== 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=qCoK+UpOteRpKNTnktOH3CIds5NlB8/teGpvkNbdm/o=; b=Mr+Ped/i2TjfhrgGF3K2EUWQ7IV5l6Y/HrN/WhY4LKAQYEg1N8tioLDqtEbhKjl2Nq la9+yj6stGcuYl+YYWGV05BAS5+4A2WyHt8GzojhwYqSgU1AH4kuGGgAdVzCvYpFXLyc zlcRWWPlcc7l3lpmo0++GEkC8RyZ/XfyaGjQa6ikQ2h5OFEWt48zXhAB4E0RwqXCyDeH CYEkIyEE3SdwGl2FyxmL8Z9uCHUJCFNx+hQmWhpDNNgY7yDxRCa9FlT+d22p2/3NVvGo P9DFdDhExcQc4iAskf1egOB2d+rypoIBBHCawBYkBWLryhFamc/+RaC1a1a0WAdJQiO0 KFuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nlTj3Ce3; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 123-20020a620581000000b004fa3a8e0039si14184410pff.240.2022.04.06.01.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 01:52:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nlTj3Ce3; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E50975994FE; Wed, 6 Apr 2022 01:38:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386908AbiDEVut (ORCPT + 99 others); Tue, 5 Apr 2022 17:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352080AbiDEPLv (ORCPT ); Tue, 5 Apr 2022 11:11:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C37EC108752 for ; Tue, 5 Apr 2022 06:25:40 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649165139; 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=qCoK+UpOteRpKNTnktOH3CIds5NlB8/teGpvkNbdm/o=; b=nlTj3Ce3uqHvPzkg5VT1YJISIBYJx6jyrBJVZoP/zoMQLOBYgS9/mz/tHZE57dbpsLvNBG t3ogRuHEKYIcxGgFaevsxEf2AYhOY3mUFDRUbwLIGIx8Kd8C/RW5uYx8S6/ElCEM+e+iHc xdmjb2goJeW3HQ1KtK3wdUeHZcVbDA1ikrd81KM/ULK+xqNyVpanpukrYeqdhMEsWsQh/G 98YDrl2rHa862AaLUcBSBUmbdqYnGA2GT8n9OyoVrHwuDawdhy8XzINEFz9E4ttF2FGi0u gGisRV2mVOScC29wyoMvhJEfRfEa1cxDWzH09AG4kJe/MSmj94+sb8ZelUna1g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649165139; 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=qCoK+UpOteRpKNTnktOH3CIds5NlB8/teGpvkNbdm/o=; b=qey4gXgl+SNWj8Z+K+7T2T0bm3TGMoJicFXj/uRlHpCjXmlqqNNcWYuvLnlVZ3dNii6g4t r6scoEhXCL6Ms8CA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v2 04/12] printk: call boot_delay_msec() in printk_delay() Date: Tue, 5 Apr 2022 15:31:27 +0206 Message-Id: <20220405132535.649171-5-john.ogness@linutronix.de> In-Reply-To: <20220405132535.649171-1-john.ogness@linutronix.de> References: <20220405132535.649171-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org boot_delay_msec() is always called immediately before printk_delay() so just call it from within printk_delay(). Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 9774a3f6bafb..fb9a6eaf54fd 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2026,8 +2026,10 @@ static u8 *__printk_recursion_counter(void) int printk_delay_msec __read_mostly; -static inline void printk_delay(void) +static inline void printk_delay(int level) { + boot_delay_msec(level); + if (unlikely(printk_delay_msec)) { int m = printk_delay_msec; @@ -2252,8 +2254,7 @@ asmlinkage int vprintk_emit(int facility, int level, in_sched = true; } - boot_delay_msec(level); - printk_delay(); + printk_delay(level); printed_len = vprintk_store(facility, level, dev_info, fmt, args); -- 2.30.2