Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp175504pxb; Tue, 2 Feb 2021 02:14:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqPESzPrT+CoymzHOysHH5Kcl/kEc3LdxugEt0fSS8jqM5y+MBCN4QUwlgklB/NrgSPF+a X-Received: by 2002:a05:6402:b07:: with SMTP id bm7mr23296282edb.104.1612260897349; Tue, 02 Feb 2021 02:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612260897; cv=none; d=google.com; s=arc-20160816; b=UwCscWZUj/faXHnMGTkwmACNVlpxo3rk+ff9AeajX9te1ikN808z2x17j0gcMM28Bl FDbP3D9JodAImcNN3Z66amtCrXK1p1rNAl9+HqBh/lT7QJxKuo4D1t+ynD/HRwgywvQ6 ggYUPYp9Vp/QRjHrOmNeeUH8joxHddA9W14qCgo7U6KcMsYCeSuPwn4TMwJ3L2fSXbnj HVyxN/XuVMY+bbuywiAbYhvSTZL1WJKURnCwvMl5ujss5lXLFHUGmF54tafWWsyk2vgB IrGrCDQkeChPWkbHB5iyV6+d1Z84JUEBNDLVSMNYv13t1mwd1OvpRGhhzyX2YPe3Xm1g Up8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wMof7LcX4o7KeUqML0BrcmCD2jjtLCjluAuaLMaeMMg=; b=Bg884pNXpRBe52v0peo3DVg0eFeaLGJyJKKl+T0algLrEDjlmCUxVMyKsE3zQJxAyr tPUwua63x5cRyuHERZxBK/vAM7Tdo+dNsb8h60UtUB2xigwDy8Pwz8UEKXxGsLH4XPx+ JnZrVEtuDoiHTd+dLAmyjTJVdp2tghM8EdBzEIvDLjB/PVlotWFznKgEJosay+Weecxm BD1pp1rw3d7i3whs0uYTr7u8fDQYQy9VfiQ2szMXF2e/tZNRb82eZ9sFgdxgYVllAGnn IEWOsccD/yDKrJVuAZHey307J2l+trmEcVbT2WzoGqKpsUQ68nkwMqlyfJvObH5M9Cww ocaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2G7Sa2W2; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si12100383edq.530.2021.02.02.02.14.31; Tue, 02 Feb 2021 02:14:57 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=2G7Sa2W2; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbhBBKNn (ORCPT + 99 others); Tue, 2 Feb 2021 05:13:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:46568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbhBBKNh (ORCPT ); Tue, 2 Feb 2021 05:13:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4D1AC64EE2; Tue, 2 Feb 2021 10:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612260775; bh=a9JpeLTPXuDOqgu+ithu1Vjt2uPFzg7y0tFXGXpxM34=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2G7Sa2W2ilSNpuWlzi5xy2tjO1cPC84KVISQKCBmXkdFncJ0agNWmtpKRNGXthS7M rd2RAlsEu/8qmLpx/S4Q9Tb4/zkCloMzc6hNLmvZhgw4B4eBq90pJ8K/CHAPqsTO5q /uTrJLoBQx5z3FubOBQqvQ5cnYa4wvWYyC/ml7P8= Date: Tue, 2 Feb 2021 11:12:53 +0100 From: Greg Kroah-Hartman To: Masahiro Yamada Cc: linux-kernel@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Ogness , Andy Shevchenko , Ard Biesheuvel , Borislav Petkov , Darren Hart , Dimitri Sivanich , "H. Peter Anvin" , Ingo Molnar , Jiri Slaby , Mike Travis , Peter Jones , Russ Anderson , Steve Wahl , Thomas Gleixner , dri-devel@lists.freedesktop.org, linux-efi@vger.kernel.org, linux-fbdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 1/3] printk: use CONFIG_CONSOLE_LOGLEVEL_* directly Message-ID: References: <20210202070218.856847-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210202070218.856847-1-masahiroy@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 04:02:16PM +0900, Masahiro Yamada wrote: > CONSOLE_LOGLEVEL_DEFAULT is nothing more than a shorthand of > CONFIG_CONSOLE_LOGLEVEL_DEFAULT. > > When you change CONFIG_CONSOLE_LOGLEVEL_DEFAULT from Kconfig, almost > all objects are rebuilt because CONFIG_CONSOLE_LOGLEVEL_DEFAULT is > used in , which is included from most of source files. > > In fact, there are only 4 users of CONSOLE_LOGLEVEL_DEFAULT: > > arch/x86/platform/uv/uv_nmi.c > drivers/firmware/efi/libstub/efi-stub-helper.c > drivers/tty/sysrq.c > kernel/printk/printk.c > > So, when you change CONFIG_CONSOLE_LOGLEVEL_DEFAULT and rebuild the > kernel, it is enough to recompile those 4 files. > > Remove the CONSOLE_LOGLEVEL_DEFAULT definition from , > and use CONFIG_CONSOLE_LOGLEVEL_DEFAULT directly. > > With this, the build system will rebuild the minimal number of objects. > > Steps to confirm it: > > [1] Do the full build > [2] Change CONFIG_CONSOLE_LOGLEVEL_DEFAULT from 'make menuconfig' etc. > [3] Rebuild > > $ make > SYNC include/config/auto.conf > CALL scripts/checksyscalls.sh > CALL scripts/atomic/check-atomics.sh > DESCEND objtool > CHK include/generated/compile.h > CC kernel/printk/printk.o > AR kernel/printk/built-in.a > AR kernel/built-in.a > CC drivers/tty/sysrq.o > AR drivers/tty/built-in.a > CC drivers/firmware/efi/libstub/efi-stub-helper.o > STUBCPY drivers/firmware/efi/libstub/efi-stub-helper.stub.o > AR drivers/firmware/efi/libstub/lib.a > AR drivers/built-in.a > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC init/version.o > AR init/built-in.a > LD vmlinux.o > ... > > For the same reason, do likewise for CONSOLE_LOGLEVEL_QUIET and > MESSAGE_LOGLEVEL_DEFAULT. > > Signed-off-by: Masahiro Yamada > --- > > arch/x86/platform/uv/uv_nmi.c | 2 +- > drivers/firmware/efi/libstub/efi-stub-helper.c | 6 +++--- > drivers/tty/sysrq.c | 4 ++-- > drivers/video/fbdev/core/fbcon.c | 2 +- > drivers/video/fbdev/efifb.c | 2 +- > include/linux/printk.h | 10 ---------- > init/main.c | 2 +- > kernel/printk/printk.c | 6 +++--- > 8 files changed, 12 insertions(+), 22 deletions(-) Reviewed-by: Greg Kroah-Hartman