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=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 1F2F9C433E7 for ; Sun, 19 Jul 2020 23:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBB3E21744 for ; Sun, 19 Jul 2020 23:11:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nkCjVdoW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726982AbgGSXLf (ORCPT ); Sun, 19 Jul 2020 19:11:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgGSXL3 (ORCPT ); Sun, 19 Jul 2020 19:11:29 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174B8C0619D2; Sun, 19 Jul 2020 16:11:29 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id w17so10827959otl.4; Sun, 19 Jul 2020 16:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AwKxH7uulN78lPOAuHvbnpdPAfFWb64in5M4SkPyaMI=; b=nkCjVdoW35estd0E/+4rGZux2X53m29lKzkDtHjkIvuUg6/K5Q0GSDz/YGABRupqvH 8zoEJ119yYSNNJJZkXkx3a95c6k1NMlXs9Lm8RVBq8TXprcbITNEy47YdTJujTNHlWsk 4iKtHP6ohDESx+qdhOHLpDcq2zMpl26DNpz0xOCNoYK8wvNZQS7ns4Q9QmBy1nccNiaw v/wlhrMdyrNyPqxs/K4v2lGrCfl5AocvzydKjUpac4hURa5UgwmWXpRuhbz7C8x7aVnV RkGC/7b+b0dREMT0kMwAdmURz/qpehdQ1DqX3M6BNlQ/yLhF4c09B7mNTBx56h/qC0FH 0Jrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AwKxH7uulN78lPOAuHvbnpdPAfFWb64in5M4SkPyaMI=; b=rhuA6WU71GCsuwndQshrIh3o83rLwcfKe561CSAWs6oJB8qvKD01Ox8QcbVS/eg3rB 4pmXhkgQh85DTFQF3TPOVFAIXDJRF6Amus0wud4ICjMkac9zRiaHFIcjirS+ZdqYJ5lO YWSVluA9C3VfYSCCVcvtJsQZkliE4+z9QEWXag06FV5Z45bysvrHGwA6f3d/BZ0srZCR ABe4ZN8VuFkDdqF83gJFMPTP+9EXR2ske+lMbmXdRhmSUj2y/3LcLzGINj/KYknKuwSe UHdRXLqjzPoxs2fhoToRf+SfBiRWsRxdUiNVKS3sQ799x8J6s92qABbBIP99IYmPCbug sCUQ== X-Gm-Message-State: AOAM530JmM7gGmqjvbt8tiqqDVh5Oi4JP0ggb9+gEhoTw7Hi/ZAJmP77 sXGSjCcYS4BXsjWufNBr9FSfvCj33vmD3w== X-Google-Smtp-Source: ABdhPJwPimm3H65ZodotVDBpJ5t/y+qiIz8+KhqF4M9TaMJcMu1mIjP94QsbZ8yINohXeXOTXQ//Sw== X-Received: by 2002:a9d:37ca:: with SMTP id x68mr17542292otb.60.1595200288454; Sun, 19 Jul 2020 16:11:28 -0700 (PDT) Received: from frodo.hsd1.co.comcast.net ([2601:284:8204:6ba0::5e16]) by smtp.googlemail.com with ESMTPSA id q19sm2394680ooi.14.2020.07.19.16.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 16:11:27 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, gregkh@linuxfoundation.org Cc: linux@rasmusvillemoes.dk, Jim Cromie , Arnd Bergmann , Jessica Yu , linux-arch@vger.kernel.org Subject: [PATCH v5 05/18] dyndbg: rename __verbose section to __dyndbg Date: Sun, 19 Jul 2020 17:10:45 -0600 Message-Id: <20200719231058.1586423-6-jim.cromie@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200719231058.1586423-1-jim.cromie@gmail.com> References: <20200719231058.1586423-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dyndbg populates its callsite info into __verbose section, change that to a more specific and descriptive name, __dyndbg. Also, per checkpatch: simplify __attribute(..) to __section(__dyndbg) declaration. and 1 spelling fix, decriptor Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 6 +++--- include/linux/dynamic_debug.h | 4 ++-- kernel/module.c | 2 +- lib/dynamic_debug.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..05af5cef1ad6 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -320,9 +320,9 @@ *(__tracepoints) \ /* implement dynamic printk debug */ \ . = ALIGN(8); \ - __start___verbose = .; \ - KEEP(*(__verbose)) \ - __stop___verbose = .; \ + __start___dyndbg = .; \ + KEEP(*(__dyndbg)) \ + __stop___dyndbg = .; \ LIKELY_PROFILE() \ BRANCH_PROFILE() \ TRACE_PRINTKS() \ diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index abcd5fde30eb..aa9ff9e1c0b3 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -80,7 +80,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ static struct _ddebug __aligned(8) \ - __attribute__((section("__verbose"))) name = { \ + __section(__dyndbg) name = { \ .modname = KBUILD_MODNAME, \ .function = __func__, \ .filename = __FILE__, \ @@ -133,7 +133,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, /* * "Factory macro" for generating a call to func, guarded by a - * DYNAMIC_DEBUG_BRANCH. The dynamic debug decriptor will be + * DYNAMIC_DEBUG_BRANCH. The dynamic debug descriptor will be * initialized using the fmt argument. The function will be called with * the address of the descriptor as first argument, followed by all * the varargs. Note that fmt is repeated in invocations of this diff --git a/kernel/module.c b/kernel/module.c index aa183c9ac0a2..e7b4ff7e4fd0 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3237,7 +3237,7 @@ static int find_module_sections(struct module *mod, struct load_info *info) if (section_addr(info, "__obsparm")) pr_warn("%s: Ignoring obsolete parameters\n", mod->name); - info->debug = section_objs(info, "__verbose", + info->debug = section_objs(info, "__dyndbg", sizeof(*info->debug), &info->num_debug); return 0; diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index c97872cffc8e..66c0bdf06ce7 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -39,8 +39,8 @@ #include -extern struct _ddebug __start___verbose[]; -extern struct _ddebug __stop___verbose[]; +extern struct _ddebug __start___dyndbg[]; +extern struct _ddebug __stop___dyndbg[]; struct ddebug_table { struct list_head link; @@ -1019,7 +1019,7 @@ static int __init dynamic_debug_init(void) int n = 0, entries = 0, modct = 0; int verbose_bytes = 0; - if (&__start___verbose == &__stop___verbose) { + if (&__start___dyndbg == &__stop___dyndbg) { if (IS_ENABLED(CONFIG_DYNAMIC_DEBUG)) { pr_warn("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n"); return 1; @@ -1028,10 +1028,10 @@ static int __init dynamic_debug_init(void) ddebug_init_success = 1; return 0; } - iter = __start___verbose; + iter = __start___dyndbg; modname = iter->modname; iter_start = iter; - for (; iter < __stop___verbose; iter++) { + for (; iter < __stop___dyndbg; iter++) { entries++; verbose_bytes += strlen(iter->modname) + strlen(iter->function) + strlen(iter->filename) + strlen(iter->format); @@ -1054,7 +1054,7 @@ static int __init dynamic_debug_init(void) ddebug_init_success = 1; vpr_info("%d modules, %d entries and %d bytes in ddebug tables, %d bytes in (readonly) verbose section\n", modct, entries, (int)(modct * sizeof(struct ddebug_table)), - verbose_bytes + (int)(__stop___verbose - __start___verbose)); + verbose_bytes + (int)(__stop___dyndbg - __start___dyndbg)); /* apply ddebug_query boot param, dont unload tables on err */ if (ddebug_setup_string[0] != '\0') { -- 2.26.2