Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1325627ybh; Sun, 19 Jul 2020 16:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEWN2K0alU3JrHHw6dhEYoRf9WARuYBOpaUL/enzjU9aXkC0b6ttIxpM4hVtllH0yvrbYg X-Received: by 2002:a50:93a2:: with SMTP id o31mr19382790eda.203.1595200335560; Sun, 19 Jul 2020 16:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595200335; cv=none; d=google.com; s=arc-20160816; b=i4eA1as0NqHvRzILfgO1COkAuCezEXjUcFzAfnf6o3IKIbZUcTT++Lz7oy3rpjwBtd vFYaTVy9+tFjqHJC64ickP1ha0RRGousN1C84xCkwaT0S9Aq04Zu/ue7bb9fpH2814dx F/z06vIl5OzIlSUQXWH80MMWQL+6s2jo9A6rCvsgoXSrtl6Qo0/aS47ZmymGoFQueP6k 5tJwIHpc9bXh/K5HyIRka7Cb8VnWrqDeHf7OdzAwWUL8IwnCS8m6v269cGjzArvVjvkq PgALgUSnjQ9CjZEW/s+cZ86S2iWpFHeC6wPBrUTUCujMMPC04AIeTzrNL1RNLLK5AEhU YPFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AwKxH7uulN78lPOAuHvbnpdPAfFWb64in5M4SkPyaMI=; b=aOy3BjOF+yEM6iFUz+yuSsQCrqHIEDGsSqoDba7BObetsKzQsmbEXCj27ihFbyePR9 m8EvL/MkloF8Xot5+RgZgJVIbJ40KKBm4107pVysHNN7LZk5fnCP2rFvETmV2x8XlQ7J k/xpQZw4jAdZIkdUNpwOWhHPt1dRetGevujss85hAsvvWm10xCCsHaLLsdo3mpZdzHh9 CfLNJ2nh03stwiwJOosbNEFKy6qJqXGpvLTSicP5QzPwmUOSgwaRcWzdP36QFPTEi5/y 9lNpWVTctWpK+s/4uaNuVySfJ/pRtwoIqJ5h27k/s1d3UGwJmK+agCkbTUTFoAVWqOBb ePTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkCjVdoW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si9112023eds.524.2020.07.19.16.11.52; Sun, 19 Jul 2020 16:12:15 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=nkCjVdoW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbgGSXLe (ORCPT + 99 others); Sun, 19 Jul 2020 19:11:34 -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-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