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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 C3A7DC433E0 for ; Tue, 2 Feb 2021 10:13:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 687F464F54 for ; Tue, 2 Feb 2021 10:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbhBBKNj (ORCPT ); Tue, 2 Feb 2021 05:13:39 -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-fbdev@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