Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp967595ybh; Wed, 18 Mar 2020 12:24:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtwOCePRphCWGhY/bHUIGMSnutD0khP2fC8qinpsd/ZholeYzsw+hgaeVCsxCxoK2f5BPzI X-Received: by 2002:aca:ebc5:: with SMTP id j188mr4574245oih.65.1584559483134; Wed, 18 Mar 2020 12:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584559483; cv=none; d=google.com; s=arc-20160816; b=CqwlUvIW73a5f1iREYOjfRXucUmtaWiVVyVYzeIRigY5TDi8OgGeWniE0PuwyzM/1i 4sAYXWNLrB8+Awk8fEqDm0MDUZwztOkxnRUppgSPaBbdp8BCQXlRVCmwLy3Z+WYawf36 94/05C4208gQ2+GVjBfAL7KdacDNcY9u8wwiuYc0X8UFW8pixnEDYI2vZYmQ7l4xEPG5 VpyQkGEGnAKUew6Wc56Irf9ni4ZnkZxDgiv9Ow7hA3l6zDQ4osOH7LHMBeMYL41THBst UbiodSdxtiWyMnjJzad972kBaZmh9E4QtS8ZqDbb5p+6+lrPw9bZH/VrMc5BKAbqVHtX MPYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mx7muvFpVwHYEDvvTglqZzExN2fbeOuxHjC1bhgAdgU=; b=tPt6H5VP1D6NBGtgGrFT5GoODP44HZfJFIwHsLMoXv99eZ27jGzNIe96xKs/QDuIOw OsvgmiuTUbk+ch1HZQjviXT4FOzfGRDd/lgBxFpKeIOKvV6Tt+IxFUyezWqxL0fG3OK9 ApvDVtuWX+jYI8Pc11HwsRV9aimEc4iXDdsaEWYBobzHBdLDkGbb98saIKmys70eQ3Ct oV3jV2uFd8FOV9BvS8cDqjXk+CIx0RVX9ueFxFdlpCrykDbjtiRY3S9EHJOpvkKpMZ6X FSLGeACmwj3O9S9unjaWXrvHgmQMwSoS6EV9KIEaNBkGDYXS7D6DGppmbfRkNXVRRESi 5aYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V4Ejzfsi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si3925047otp.98.2020.03.18.12.24.29; Wed, 18 Mar 2020 12:24:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V4Ejzfsi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727091AbgCRTXw (ORCPT + 99 others); Wed, 18 Mar 2020 15:23:52 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32814 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbgCRTXw (ORCPT ); Wed, 18 Mar 2020 15:23:52 -0400 Received: by mail-pg1-f194.google.com with SMTP id m5so14234662pgg.0 for ; Wed, 18 Mar 2020 12:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mx7muvFpVwHYEDvvTglqZzExN2fbeOuxHjC1bhgAdgU=; b=V4EjzfsifivBZOeNVuf5E/ZzbAnVnqdfIMiQvM1YbdrGSyKpF5Ml2X/4Az3TaQi+7w 7dUesMGQ9koBCSta2yamXw51TOIW34jToym2oh9aCFOoM0BIefPs0qwpO2oHp64amlJz 4An+Bj5TxrdDP80duXSfpjyLydXYYiCIvQLDSiJ5Ll6K4/HLzzqJOdCJmioNEx53LJn8 jehHbZ9S10lOoiHoDS1fBZEKO+ogq1yJks6GXozGN4KDHFQBhif+shUSGG66civ9LkG5 p7UEhhcJqoGwNtvnxTH+77ZtvDSuk08Zbi/UXx37nDUIcquagjOFmhml7X2LefyhCXhy qpQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mx7muvFpVwHYEDvvTglqZzExN2fbeOuxHjC1bhgAdgU=; b=kcpSZLttQOeU3OLTSvXjGOE8T1e6lUAXAc3Fj3KP3QUZS1UA093uEICAPBdilztR/0 kRZ8RVNbQsWD13WvRyxEXk9HBZBWxJnhm7LFaJdFYv4YcBVV/+34zAgbqO9qLZbFeQkX XExb40E2MjaX4YGx2IrQ9PjUWl6TFUa7sXY1acr17/PcJdwniUL83gUyxlkBZ0ahFOt2 nBExPawup9zIdKrqQVc+KpoMY9gO0QLHOK+FT9n7JZm2ArZXhvoMjRwE02K9j3slo4CZ ST2qucuf5Tzhv4bSw86JobgRXd+5QgZw7dRsz1bijYK+4dtnDfHSKz1qDjFBfx7XajNv aS2w== X-Gm-Message-State: ANhLgQ2yLDvB9+LfjH4IpFE+Hi3RRbSL3ZTjXr8bfD+so9AG+FXWz2uj YcVDIEBlZRNFWcMXcP+AqUUf05akP7eKHkiMeIA= X-Received: by 2002:aa7:8149:: with SMTP id d9mr5779069pfn.170.1584559430809; Wed, 18 Mar 2020 12:23:50 -0700 (PDT) MIME-Version: 1.0 References: <1584558186-23373-1-git-send-email-orson.unisoc@gmail.com> In-Reply-To: <1584558186-23373-1-git-send-email-orson.unisoc@gmail.com> From: Andy Shevchenko Date: Wed, 18 Mar 2020 21:23:43 +0200 Message-ID: Subject: Re: [RFC PATCH] dynamic_debug: Add config option of DYNAMIC_DEBUG_CORE To: Orson Zhai Cc: Jason Baron , Andrew Morton , Changbin Du , Randy Dunlap , Masahiro Yamada , Shuah Khan , Krzysztof Kozlowski , Masami Hiramatsu , Brendan Higgins , Herbert Xu , Ard Biesheuvel , Gary Hook , David Gow , Mark Rutland , orsonzhai@gmail.com, Linux Kernel Mailing List , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 18, 2020 at 9:04 PM Orson Zhai wrote: > > There is the requirement from new Android that kernel image (GKI) and > kernel modules are supposed to be built at differnet places. Some people > want to enable dynamic debug for kernel modules only but not for kernel > image itself with the consideration of binary size increased or more > memory being used. > > By this patch, dynamic debug is divided into core part (the defination of > functions) and macro replacement part. We can only have the core part to > be built-in and do not have to activate the debug output from kenrel image. > There are few grammar typos in above... > config DYNAMIC_DEBUG > bool "Enable dynamic printk() support" > default n > - depends on PRINTK > - depends on DEBUG_FS You may not touch this. By removing them you effectively removed dependencies :-( > + select DYNAMIC_DEBUG_CORE > help > > Compiles debug level messages into the kernel, which would not > @@ -164,6 +163,21 @@ config DYNAMIC_DEBUG > See Documentation/admin-guide/dynamic-debug-howto.rst for additional > information. > > +config DYNAMIC_DEBUG_CORE > + bool "Enable core functions of dynamic debug support" > + depends on PRINTK > + depends on DEBUG_FS > + help > + Enable this option to build ddebug_* and __dynamic_* routines > + into kernel. If you want enable whole dynamic debug features, > + select CONFIG_DYNAMIC_DEBUG directly and this option will be > + automatically selected. > + > + This option is selected when you want to enable dynamic debug > + for kernel modules only but not for the kernel base. Especailly Typo. > + in the case that kernel modules are built out of the place where > + kernel base is built. Highly recommend to ask somebody to do proof read. -- With Best Regards, Andy Shevchenko