From patchwork Wed Jan 25 20:37:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 48331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp477024wrn; Wed, 25 Jan 2023 12:44:30 -0800 (PST) X-Google-Smtp-Source: AK7set/LEo02+rnQ1OcNNDGoTdygLnCmiyiPLJtHXeD/yDtdVpLwDfBoUln0Xs0BtEJrihnkQz1J X-Received: by 2002:a05:6402:2687:b0:4a0:a8d6:f9b9 with SMTP id w7-20020a056402268700b004a0a8d6f9b9mr5081994edd.39.1674679470628; Wed, 25 Jan 2023 12:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674679470; cv=none; d=google.com; s=arc-20160816; b=gN6W1dL3fj/vT6cZocTregbxUGsLrKYppajELcImn7DSX4rKPeVxbDJsinvG7FFkQe Fi57TT59trrufoWLDhmWBJ6AA9pJov/RVtDuBKKacXEFqSMqhAb9gLBbEaGr0L7neLVg HF7BJBcVrfN0Ce/hVny2mHfaicdOe/klugQAZrvktgnoMoZ1+k08wA+GIyfpWuhmUAos fXv1rxWU6KzJWlIvgWEJ5qnHevdgthDFqoO83vkJfi1Ms+F5ZMifT0rJlHbJi1YDeVD0 PCLXwHsewDz7wBZ4E7GQZvsvksinJ6dMOLIsGr8EbCen7mcF+noF+kWPGAVmH6R9n6po 38Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vYPktuDkhsdEuRTk1MSfg8ZGrHbLgcCVScoM+jk3tZY=; b=WM7DKz3GXldp3VKIFYegcRw2kyLVtEvpxbWKTNjrdfOT2Blbeil+1hCpAGgffLaKr3 sOkxJvc/cuix9xs2PGJizY9DZhETYD3iIMkPCpVyvyqatqH97ENxBC0khloaJ1WvdY9r Y00JNZepjJD8/NKI+K+utLbT+Bxy9+4hCaiLa0T1xWx+UbFdh3XVwXQAg+vGJ2DZA+5o N5ypUA/cGAoNAFbzKISCVo58FpjCT7YWraTaufv2MRH2oJ2cchqj9K+Ro9GdyUmBQoIi wTc9CQj+e/xO4+rQY098CzS1q+pa+Jzd4Yb7ZYDC/ZzXiyWgb7FXFmk4nUglZA6IiyRN fdug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eppfcnpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a056402400e00b0049d789bee5dsi8937758eda.238.2023.01.25.12.44.07; Wed, 25 Jan 2023 12:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eppfcnpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236575AbjAYUjR (ORCPT + 99 others); Wed, 25 Jan 2023 15:39:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236570AbjAYUiq (ORCPT ); Wed, 25 Jan 2023 15:38:46 -0500 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513125E521 for ; Wed, 25 Jan 2023 12:38:17 -0800 (PST) Received: by mail-il1-x12b.google.com with SMTP id i17so4275ila.9 for ; Wed, 25 Jan 2023 12:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vYPktuDkhsdEuRTk1MSfg8ZGrHbLgcCVScoM+jk3tZY=; b=eppfcnpqmJh6rDvGyb5bXWEyiJssB/4JtHxIYQzimFJC+9A5AXJynKMCbSZKltuDWt qh2w3LNWKNxLDqQwWucoDBqIupHe2tKgxFxRj0bRhaxxTDgMlKvj7oQ8a+eYO4RRxv0L 6C+PPL3EsY7pOGp5BGarclSkuWzlej9nuSXDeP9b5H+Ni8bQmJrLGbUbC/Vbt8XuoXdj ilhsFUgPt3M4I6VGyNR/NTjxMHkIdzx7zHimkTgPw6Ngjn+ZgdpQVpjvoIq7UhwMu+Wn kmYKBaoUmNQgYvIE2uwIFVSGGLwe04puyw8dU3w3E9ndpDXFoe0SuJmB3hZtBNuAmeoI QXfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vYPktuDkhsdEuRTk1MSfg8ZGrHbLgcCVScoM+jk3tZY=; b=dsBBkwdC/wE9DyzKHWtPAA8biiqPsvHNrcvx87NZcrBCXn9x2NBXbSBhkXJYY1nA3f viNihouMng5TueA4TTuHxF41AAnYhUfBLYALcI+NWcxHQqnu5bkFDZNeuJ7QHWHSOz6X c2z9XBccVWuPIZ9jt/7OR7koJQfi61n7JoVPNLFDkQPhEiYDMO/9NPi4oigDaUeC8xxb GWZ3aCjJRAcmj1j3iTj03i3dyEC2NmdFxCTCAjud2DMpKUGVy/eNDBDr8bT5+V7MJbDp qyLfxxQnV/Qwz/57VkScSOMAc/arVIZD3X7jNGr8tv6DoRkQrU0PDm99cUJTHoykYWLO 13LA== X-Gm-Message-State: AFqh2krQT6Xv4LBbALMtnoYLbEdCbgljKMY0PuDVFmkUgMJlzbm/kYH1 4q4KwK/qhIqvDraL+j3bSqJiqrsiHgM= X-Received: by 2002:a05:6e02:12e8:b0:30e:f006:365 with SMTP id l8-20020a056e0212e800b0030ef0060365mr27732935iln.24.1674679096394; Wed, 25 Jan 2023 12:38:16 -0800 (PST) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id y11-20020a056e02128b00b00310a599fd43sm665104ilq.46.2023.01.25.12.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 12:38:15 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com, ville.syrjala@linux.intel.com, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, Jim Cromie Subject: [PATCH v3 18/19] test-dyndbg: tune sub-module behavior Date: Wed, 25 Jan 2023 13:37:42 -0700 Message-Id: <20230125203743.564009-19-jim.cromie@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125203743.564009-1-jim.cromie@gmail.com> References: <20230125203743.564009-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756028700970243997?= X-GMAIL-MSGID: =?utf-8?q?1756028700970243997?= lib/test_dynamic_debug.c is used to build 2 modules: test_dynamic_debug.ko and test_dynamic_debug_submod.ko Define DEBUG only in the main module, not in the submod. Its purpose is to insure that prdbgs are enabled by default, so that a modprobe without params actually logs something, showing that compile-time enablement works. This doesn't need to be repeated in the submodule. Rather, the submodule's purpose is to prove that classmaps defined and exported from a parent module are propagated to submodules, setting their class'd debugs accordingly. Signed-off-by: Jim Cromie --- lib/test_dynamic_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 6b7bd35c3e15..70a1e8955ad0 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -10,10 +10,9 @@ #define pr_fmt(fmt) "test_dd_submod: " fmt #else #define pr_fmt(fmt) "test_dd: " fmt + #define DEBUG /* enable all prdbgs (plain & class'd), to log by default */ #endif -#define DEBUG /* enable all prdbgs (plain & class'd) at compiletime */ - #include /* run tests by reading or writing sysfs node: do_prints */