From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 283AE205E11 for ; Tue, 2 Jul 2024 21:58:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957497; cv=none; b=gIuOagWeytan8JFFLU7k6tz5IxKTUuY+Ch+SDcvsOdJUjBrQ1lGtXLucKTCIgd6yEYaDN6xtSLhKn8g+PHsoY92yd+c5x58TT4/hVzpQi2n7i13/aql9xvZfxWyTrvUncF3zpp+pvCWchHwc2NkMgkH/MAazJjfZeZuNnkDUrMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957497; c=relaxed/simple; bh=wKsffOuXjQz6csIEgiqYbyUo9lvjHQdEP0b/s+bAJ7A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ib9Z68nXD7fRV1jGrnTI0JsUYSVirQKBwW70esfeUKZ/L/gs7kBILDpOnvSTf1zY6oan7XJRQ8Bdczx9r8IRkLrILR4Qq1n2N+8NiPKMu8RM6ZOu0N7GHWW8NEwXY+ODlsNsIEGO8E6KiuNoeVcez5072vHOd09eMTH0NHKC3T4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Yxt0rJiM; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yxt0rJiM" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f64942fc54so88535239f.3 for ; Tue, 02 Jul 2024 14:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957495; x=1720562295; darn=vger.kernel.org; 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=5R1ZNEsygnLGTQO2NIWkjU0SF7pc6VSZuM8NRzidmQA=; b=Yxt0rJiMPCXQE+CTmDJi3n2OijXY++ygC1NrxQrSduTxJmoghZDevNZDL6zeTobiWM a2QmNaWmsN4S4ok2uLgX5t1HoaviIhZ+MoUmCXdJ0p0hBenzv3B7L5gC7ATfeClS+apC o5nliP/i5KaXRql8kO/04ozZ/Q4sRQWkaQ8c0YKgh7cyIvOHCxiplctcRnr3JoS4QH5Q kV1Z7q54dGgrnRd0z1gjxtqFTgucnozFVpMHfYNak4062CeAvjPLDokJKPLDDJBHvmmM EwNQC8jUg5bgeJDFTX/AiI+pdCDUhLjGgHYwQ4nK+X3bNiSbs5noCQDsscvhnRj5wq9z Y68w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957495; x=1720562295; 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=5R1ZNEsygnLGTQO2NIWkjU0SF7pc6VSZuM8NRzidmQA=; b=VHNqHx3EyCOdMMSbct+l1ndfUEawRQ/7eUajHCp9abYFHBY43ukg9PmM0XVqMT7RjJ eNHrJp/HujJhs+ha6kavz1xtctd9niNa8/OkMCl0yKhvELIRmXSrolmKFF4gnz9aUhlk 5rJJoGi0qbNIqq4FE6chTVzqns5+AF0WJya1FzIkPFSmYB5GJ3AQL1luUhotKvK7UnJq H8V4DgtZUit5jJlhFVK6rBq3w5iNu8/yxyaGY+GTfF4ii87poAk1gkfz3jxNrylu4K0q 9BLu2FmNXrOzmHn/b1UZtvwKAVlmvl5AHPXKZXkSi5FqqnEbSoXX0EZmxk/k3OZlG8SO Mr6Q== X-Gm-Message-State: AOJu0YwYoJGzHXZ+YBFRrlEkUoVmyaSF9XPEH89bglg5Be0Uyo6bNM5d Iru7yKX1knzU8GwrkQeTISDBZT4Q9n9ALSEs1ummauXZlNFpGHa6 X-Google-Smtp-Source: AGHT+IE+ttIbCy0SMKnbv8P5dir5+2/h1iAP1anhrhtyYoJ/ag2FDZflxmfE4svH4Uxez+4Zs/MseA== X-Received: by 2002:a5d:9541:0:b0:7f3:cb2a:a1b2 with SMTP id ca18e2360f4ac-7f62ee85397mr1239939539f.13.1719957495211; Tue, 02 Jul 2024 14:58:15 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:14 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 01/52] docs/dyndbg: update examples \012 to \n Date: Tue, 2 Jul 2024 15:56:51 -0600 Message-ID: <20240702215804.2201271-2-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" commit 47ea6f99d06e ("dyndbg: use ESCAPE_SPACE for cat control") changed the control-file to display format strings with "\n" rather than "\012". Update the docs to match the new reality. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- Documentation/admin-guide/dynamic-debug-howto.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentat= ion/admin-guide/dynamic-debug-howto.rst index 0e9b48daf690..6a8ce5a34382 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -52,12 +52,12 @@ query/commands to the control file. Example:: # grease the interface :#> alias ddcmd=3D'echo $* > /proc/dynamic_debug/control' =20 - :#> ddcmd '-p; module main func run* +p' + :#> ddcmd '-p; module main func run* +p' # disable all, then enable main :#> grep =3Dp /proc/dynamic_debug/control - init/main.c:1424 [main]run_init_process =3Dp " with arguments:\012" - init/main.c:1426 [main]run_init_process =3Dp " %s\012" - init/main.c:1427 [main]run_init_process =3Dp " with environment:\012" - init/main.c:1429 [main]run_init_process =3Dp " %s\012" + init/main.c:1424 [main]run_init_process =3Dp " with arguments:\n" + init/main.c:1426 [main]run_init_process =3Dp " %s\n" + init/main.c:1427 [main]run_init_process =3Dp " with environment:\n" + init/main.c:1429 [main]run_init_process =3Dp " %s\n" =20 Error messages go to console/syslog:: =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36B6B205E22 for ; Tue, 2 Jul 2024 21:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957499; cv=none; b=g46JrEVTFOeqZwnIQlOaqnZ5WOmKO97B9ptY7LJ94MCEPirLotTDel/dzNpvoxLsEp2EbGZJP4RbaObX5586e4t3+NKRHhIbbeUJWtPT7uB20+EmReBF7sygpw96DARkSqD4ue3AdvIgU7WZYSAXIqYiLfw4DZumg4PhhMexQrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957499; c=relaxed/simple; bh=jMFJSvW8rwGwA9QU3Al6zitYRBQUQs9qdqLxCiJYGlM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NLM2vMy1VFxLBMCUocJUrx4sZ7dlreywCz6p7EUbP9hZZCB11Ekp5I4DLLf53RpARiJay21S00u/QSPKA90GIRs/BEtE9awYToNKSbAs24SC5ZPXXApYRAFFV3v87keINcxugqtCMeUpB7wT0rmwuM9owHFNVrOOr0nwbhonR1o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CChOgjvP; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CChOgjvP" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7f62bb42938so154623539f.2 for ; Tue, 02 Jul 2024 14:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957497; x=1720562297; darn=vger.kernel.org; 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=0jicnEuSikysNdrvNl4Iye9B1q1hn5wCOtgRQWjJh+Y=; b=CChOgjvP4G5QXgw/DezmE1G5y8kgxRAFXcnJ4yC/YR8JCJlJRvFMRVHEgu97q0d4kb Vvyf4118ioZV0Puc4qhfLC19kcq2Y2Zg1Hib0dNmXHbBYbLrVjq+IdTnHBbskgnTflXx /+sP/z9LcXBxESodlXWLXoBmsOWhdY01bx1zeNnzuX6e4dHwXIMn0EXkEwrDEvmlThOJ /yrYh5wjwVEXcgVgUV97sd1J/qItMpdt27yk/VbSoFy66THil8YHNua9iwo495zoq2i0 5kpRhi4OYmzPwB6kvpfJxjUG+YnQw9UO6lekd0NTwYy1c7SjRQiRYf2FLEPcTlep/D+Q AsTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957497; x=1720562297; 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=0jicnEuSikysNdrvNl4Iye9B1q1hn5wCOtgRQWjJh+Y=; b=PC2/NrBM7SnWt5FXOXizZzonCQVqu3dRSpi4Bf8ZjzQqoIV5NKixM85R6CaULJOlsI hY5luXHnkCFr01+8Y8QRIUiTizVG94L214eWyx8bvVeosFG7lXzIETbEEQIOaTs9S170 iduA43BDBJQfBaeTtguqEs1xf8xNdhJC80qanj9ZS1uLbiJYtqEnqsRWcfuKXBWye1RT mxty7e3EioFqb3XjP1SXuHJEBQAJvWe9TyK7w6fjItF2YVMikAlxFRfkcrewinrKD5cf /lNbiYybYO1RSYCCPbPSbXSSGvVHwThzrNQMhWilepE4OEMfR4SgsmpYJeik7FVjf6U2 MC3Q== X-Gm-Message-State: AOJu0YzkGd0IiFWC+zKadr+fpsXoQdizuO90hlvjQRnj3Z2tcTLhVFJp /7Os8Hrszss6fBOcDrlFRFaWFzUZWUv58xOqOhLFgBLPFIKc32jh X-Google-Smtp-Source: AGHT+IGgEpsraXVf8DsSJ53T9EEmQ2VNyi43sZWgM3hFXw7ayPt2A1BBLWk8VrVLBa5eFbK21ld0jQ== X-Received: by 2002:a05:6602:1224:b0:7f6:1ea5:de97 with SMTP id ca18e2360f4ac-7f62ee3d6bdmr1057195239f.3.1719957497302; Tue, 02 Jul 2024 14:58:17 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:15 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 02/52] test-dyndbg: fixup CLASSMAP usage error Date: Tue, 2 Jul 2024 15:56:52 -0600 Message-ID: <20240702215804.2201271-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A more careful reading of logging output from test_dynamic_debug.ko reveals: lib/test_dynamic_debug.c:103 [test_dynamic_debug]do_cats =3Dpmf "doing cate= gories\n" lib/test_dynamic_debug.c:105 [test_dynamic_debug]do_cats =3Dp "LOW msg\n" c= lass:MID lib/test_dynamic_debug.c:106 [test_dynamic_debug]do_cats =3Dp "MID msg\n" c= lass:HI lib/test_dynamic_debug.c:107 [test_dynamic_debug]do_cats =3D_ "HI msg\n" cl= ass unknown, _id:13 107 says: HI is unknown, 105,106 have LOW/MID and MID/HI skew. The enum's 1st val (explicitly initialized) was wrong; it must be _base, not _base+1 (a DECLARE_DYNDBG_CLASSMAP param). So the last enumeration exceeded the range of mapped class-id's, which triggered the "class unknown" report. I coded in an error, intending to verify err detection, then forgot, and missed that it was there. So this patch fixes a bad usage of DECLARE_DYNDBG_CLASSMAP(), showing that it is too error-prone. As noted in test-mod comments: * Using the CLASSMAP api: * - classmaps must have corresponding enum * - enum symbols must match/correlate with class-name strings in the map. * - base must equal enum's 1st value * - multiple maps must set their base to share the 0-62 class_id space !! Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/test_dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 8dd250ad022b..a01f0193a419 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -75,7 +75,7 @@ DD_SYS_WRAP(disjoint_bits, p); DD_SYS_WRAP(disjoint_bits, T); =20 /* symbolic input, independent bits */ -enum cat_disjoint_names { LOW =3D 11, MID, HI }; +enum cat_disjoint_names { LOW =3D 10, MID, HI }; DECLARE_DYNDBG_CLASSMAP(map_disjoint_names, DD_CLASS_TYPE_DISJOINT_NAMES, = 10, "LOW", "MID", "HI"); DD_SYS_WRAP(disjoint_names, p); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3666B205E34 for ; Tue, 2 Jul 2024 21:58:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957500; cv=none; b=bGe+xH1PLRIFtuj3HI9K+CDpJKUfhrw3ZXD08kuX891AR10cBTZxm9+ZpInbPaLedF5r3x0Wkfs2I79IxByiu+nEFSyFXws5t6fGNkRNAfK71SdRn+Na1BPxg+TNT/VQeLtRKtVBADfG/Lsdcmq3GqrROYd3oUfGX0zuhTuT8P8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957500; c=relaxed/simple; bh=SicJpcI+BtX1T3osyqjgxwJrfmLN+824rrUnpMOe6aU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UxtKAwcdpOQ8pHZUoyaYkZgHxo7hO6ic/+rq/B7zJ3PcG1C4yU2iVZ7W1YzAVOjMX4M2QE+U6IVZgRuFkeT3ZAvQa+aO+17vUG/27Dw6qSpiLW4m7aqApoFnNek1N4Lt6rv7jlUTSdOv5qN2N2traS+947Bjq2iZL3lm/+tbJkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kpRoPp/1; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kpRoPp/1" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7eb5dd9f994so174407539f.2 for ; Tue, 02 Jul 2024 14:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957498; x=1720562298; darn=vger.kernel.org; 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=4gHhZlZC9lRM4IBPTZ/FMwaYyy9pebB6jMENYSRc4Ds=; b=kpRoPp/1CbogXTPVq7cwDlzJRTSwFtINlL4Abd+NSWd8e3kASR3l8XKMscJi9GIbR+ 9za6Bzi8+zJ5RJuWgnk7zApyc0S1Xdn2cVUG5/TH7Ykw/3rdzEE6rnyPPWMuTk2WnurR S17JhUdrROGb9/L8yWio1ExWKLiWtpnsW9zQgqO6pyHy2o5hZJig2+NY2IUmULIB7HcK 3ffIwklI3k1jM9ThsMcqnmWtXA4FQXBE8/g5fZ/++d0N27L9fN2WMCeZIIUZpwyihWhS MALRAdBMBST+h1QzliXKgbiOPvwTrWHHaKwr3qittIb/qVstX/Um7a9PXCptmmxF7ipW px6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957498; x=1720562298; 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=4gHhZlZC9lRM4IBPTZ/FMwaYyy9pebB6jMENYSRc4Ds=; b=fP1V1s1u5yYe8ndXeq5+Z3mNjroeaCrUCkZd0Na+IPtJ7J9zHIedTiwWzWgZXHD1gw QV2q86vizkciMHmpoxzal8TF82Nvjm1j4kg2zSBtrvEKxUVvmz/C4CGK3YZFsOrDdnyy r8GjACMVSAr4LuC93cyDe0KEkCQpyUe1od9m77kk6g8/AXonVZmfvpwGIf9Oq7dC9TQ4 2KJxO2hU8LaXjttnfAUQOQjWfJCcM0AkUOl/plvzwGtqPptSynIuVNwLmxXMscqRptKh iAYJAYgX+DejP7xWRZMb9Pzpyn/gNbBMQxj0C6kB33paI99l1ym3rqPXyRqCDRWU5W1F rRuQ== X-Gm-Message-State: AOJu0Yx0Uttu7Ctmi5wN3DvXYrZUTbBGxcU7SQr3u3HpUXM/RRWYa9la oekgyMkwoQn5cm3YW6itn+5fSyYr6bGD7BywxKS0YgXtSTOdWKFM X-Google-Smtp-Source: AGHT+IGvsn87+MenBdfimxbbj/1jff8gsxfSw490RrEkjixo7jQ/GQOm1e+Gm6LnX0EupXDxk6SVWg== X-Received: by 2002:a05:6602:1651:b0:7f6:51ac:bba9 with SMTP id ca18e2360f4ac-7f651acbd92mr409433439f.10.1719957498297; Tue, 02 Jul 2024 14:58:18 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:17 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 03/52] dyndbg: reword "class unknown," to "class:_UNKNOWN_" Date: Tue, 2 Jul 2024 15:56:53 -0600 Message-ID: <20240702215804.2201271-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When a dyndbg classname is unknown to a kernel module (as before previous patch), the callsite is un-addressable via >control queries. The control-file displays this condition as "class unknown," currently. That spelling is sub-optimal/too-generic, so change it to "class:_UNKNOWN_" to loudly announce the erroneous situation, and to make it exceedingly greppable. NB: pr_debugs are only alterable via >control, and to protect class'd debug's from unintended alteration, "class name" must be given to change them. Classmaps map known classes to reserved .class_ids (the 1..64 val range per module). Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index f2c5e7910bb1..73ccf947d4aa 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1154,7 +1154,7 @@ static int ddebug_proc_show(struct seq_file *m, void = *p) if (class) seq_printf(m, " class:%s", class); else - seq_printf(m, " class unknown, _id:%d", dp->class_id); + seq_printf(m, " class:_UNKNOWN_ _id:%d", dp->class_id); } seq_puts(m, "\n"); =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 568A9205E25 for ; Tue, 2 Jul 2024 21:58:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957501; cv=none; b=s5R2MTJ8fEj25oRt6fakwd0+mpHOeTWFB/ly25RDuqxwbNW0a0dHokuT7Ec+hTnWVVJcS0eheRT9qB4KSidLtXR8csEMeuopLE5zCEv0/mcp0+jpo7FNOHhGX9rUstXqW58cNF0T5P7cmPlrsN6BdSI86gBzD020Po3s9KbQbZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957501; c=relaxed/simple; bh=uhPTREid/iI5QW+kDL12NrYcA8qj1btOyogJwiZFVEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aHq+BEHZ6AtCHjM8RYArUSltxI9jJWHeyP8G+B0h0eVd0jZfERlETkuzV1C2HRaJIa7G9oJNY84Mni6s06Pm5S9eccfttpiMpiMzkzSEebw06QChGYaVxb2eqWqAWyDqTHVk5Nq1zbXHeCMKkWz6UFguH4NyllR7EZt1HkbIhwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nEEJLvCA; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nEEJLvCA" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7f61549406eso180453439f.1 for ; Tue, 02 Jul 2024 14:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957499; x=1720562299; darn=vger.kernel.org; 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=p9Cfh8vQIJvZJJ9snElx0jBXe6PzWuVjUPtCeny8PSA=; b=nEEJLvCAtV1oZdR4UGorH1FppC3rjRJtAr2NFQhcJRHrC/sKiVg8JKr+bQUE8w6QzK ic6C8oWLZxI6Eekh1QD1zCv75dlCEeOfX3/cwBvfhI0QWDqcqYg/vgEB6d2zvXUh1IiP DCEYPH1cXdyshyCQbxUYRPUiiFr32jinACtaUy4wPl6s765CzDn5IjTa2wtTFHPXrB9J /Nz3VJWcxsMIkpaoXwl3KiFSQPi2kR9aV4jd4YPyZoeueTPYY8eP9Gi39y3aVXrG9TSG YSWM62bOASfvFMlKBoo6VzXb4O3crx/pMmYlowATeTipPUIwSYxHhBLJFBuClB3IhIsA VJUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957499; x=1720562299; 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=p9Cfh8vQIJvZJJ9snElx0jBXe6PzWuVjUPtCeny8PSA=; b=gVK6wiwhAtZd/uH0j97clv7ZvPSj67NFWSQMrsejSNBoxbSYpO4u539rh1htKzeT7C EntHL5RLfbC1SVZfSC3av8uuZ0basWFb19Xlzas/6X3Aavaidncrmfd2zqvW1LJBDsLX RYM9HFYOW/4XPl1nuEH1/zP1yYzswI0VhyO8DP5IUNIgpXTcwqbSZsUpCSfu0gOOsVA5 KzA09Vr5g/zwaoVHmn4Pl3KtE94XEmqrcMGnRZRWA6J0vjQ2PalV3XK8q/C8IvV8yRlt cf4Ys7W86UkHItNfn+aA/G6+bZFI+dQywxgj6dtfgD3FmSIuz6LXayazPDf0uJq8A36m WoaA== X-Gm-Message-State: AOJu0Yy/GIX83eQc49JCVRP9Ay+WGkTTM0+H+iytMZGlw+YyFTUF6a55 2OLORnDRUmj8PgXEpqGQjuvNmDaGIL/1mPIE1Pb6F2QcauFmOXe/ X-Google-Smtp-Source: AGHT+IG2ft1Pm2/g4PtzgBlVmK5r7iXT/FGK9csFrxluaEy4o+i8PIv1GdXT4+15tPtbVitEa/IibQ== X-Received: by 2002:a6b:5a0e:0:b0:7f6:210c:61b0 with SMTP id ca18e2360f4ac-7f62ee853a4mr1060817239f.20.1719957499460; Tue, 02 Jul 2024 14:58:19 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:18 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 04/52] dyndbg: make ddebug_class_param union members same size Date: Tue, 2 Jul 2024 15:56:54 -0600 Message-ID: <20240702215804.2201271-5-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" struct ddebug_class_param keeps a ref to the state-storage of the param; make both class-types use the same unsigned long storage type. ISTM this is simpler and safer; it avoids an irrelevant difference, and if 2 users somehow get class-type mixed up (or refer to the wrong union member), at least they will both see the same value. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- include/linux/dynamic_debug.h | 2 +- lib/dynamic_debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 4fcbf4d4fd0a..5231aaf361c4 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -124,7 +124,7 @@ struct _ddebug_info { struct ddebug_class_param { union { unsigned long *bits; - unsigned int *lvl; + unsigned long *lvl; }; char flags[8]; const struct ddebug_class_map *map; diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 73ccf947d4aa..152b04c05981 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -799,7 +799,7 @@ int param_get_dyndbg_classes(char *buffer, const struct= kernel_param *kp) =20 case DD_CLASS_TYPE_LEVEL_NAMES: case DD_CLASS_TYPE_LEVEL_NUM: - return scnprintf(buffer, PAGE_SIZE, "%d\n", *dcp->lvl); + return scnprintf(buffer, PAGE_SIZE, "%ld\n", *dcp->lvl); default: return -1; } --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E049205E36 for ; Tue, 2 Jul 2024 21:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957502; cv=none; b=LEMxV4fQqNFp/3LBvoxEKdLbiOnHTS76wPvQM1WTutSnAqbyHSys21m+XPDEeuCNjPxf1rmM6cWkOejlCBPj0Qi+ZC0ZrSLDmdEDTwTlbZV4yxXNkMGNvHyWsKOkAhbp9h23gaFkjpF7AEXX6FoTOqzABBTRjB5FWPd2MUKaK68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957502; c=relaxed/simple; bh=a62lPW7eVhSkQloPVjs9VB1a7U2lNEYmwgn/yXAkEJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QZeolK/L1FkYgTLtJ4O0Dp7rzYEMdC/4sobhP/Lub+5pUrTjbaskvELCkEh/JBRXTsarKEG+rTOMG6FR9/Q4/lXJ8JpiUwdyo0/TibCI/osWQiwPo3eJUc81sZehRJF924N73VtsBfi+GMhHX9c9OknjF1hSb2LgBV0e1bVFDTo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iwZiScSR; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iwZiScSR" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7eee7728b00so189198539f.3 for ; Tue, 02 Jul 2024 14:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957500; x=1720562300; darn=vger.kernel.org; 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=52iPg28HXqn4X2lm9WUrOmLU/4QpKAFdaAvrwuYTPPw=; b=iwZiScSRPU/UjVaV5KaabYmwUKKxslUEY9OJq/ByFgSP3rDeGNcOqir1ZqG2391BuL /c2veJBUpKwQGyRn7DhCB+dDSKgEhLIjj4pZgs4v4Grcn/W7Ky3QBZNggdtjhLa/a8nz JayTSKRnzoFC4EfOkcSXx63qN6/SlQx2/TR3XlSTc70qAv7JBWdMQysyN1z2eCdE9fm0 4QRm+9D8bCDVYXDSjTBhmG0j5xAXUCJWP9af+AiZhjP2c2uFKk9eDiQxEtuuL880monH abh3zXN1KtFWsuk+xmmkoKZE1NIjjda0YDZV9YHwEqsw2CUcTq5jo1LGMu10/03+0VpX pCzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957500; x=1720562300; 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=52iPg28HXqn4X2lm9WUrOmLU/4QpKAFdaAvrwuYTPPw=; b=Ib+6ACgOFOHW7ir733jjHYsKfd3sKg5jbHQIAr55gVGt321FzbJgz8B0MZNbKoFQbx C4XxNRHpyik94LSxLC7bNqhR8gJzf4TtCIZ9Nb5R8XvcTWVU9MrEt1lGONOmI5BpmGq4 XWmnrkjQ5TTzgWSNutSd5uaGSsN242FgGp9VP1velBwOJoDUvLHw1qwaMBVtcr2F/Edx x9cSq5ultgs62A3OSWf4/LqK1ZWNGFH1YSqhGP9HtYVQyr8EdgdzT7hrbx9fFigyGIQ1 r6ZzNFn2xhfxaRQd21BQNUS6MopnjEy5f7wKr3ll4Td0tc0MoyiXIOofH2MdY8AbCyq1 JfDQ== X-Gm-Message-State: AOJu0YzglWnIfbdAVNLk6rvkMJSsRno/s3M5y9MfWwyPCezenESfzecB TRc5mvEHdLlk1CbmYY1Ysl5f08Aoqmdqwwne20J7w6k8pQY21cF8 X-Google-Smtp-Source: AGHT+IFFbCIfl8bx2w+JuzIZmXvsJ6oAJ2Emqs0cnXdbK8ry2e4bmgYEQW6dg5QtzqjQCMNgfaCDxQ== X-Received: by 2002:a6b:5a0f:0:b0:7f6:1cd3:9659 with SMTP id ca18e2360f4ac-7f62ee0d9bfmr1193270039f.6.1719957500464; Tue, 02 Jul 2024 14:58:20 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:20 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 05/52] dyndbg: replace classmap list with a vector Date: Tue, 2 Jul 2024 15:56:55 -0600 Message-ID: <20240702215804.2201271-6-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Classmaps are stored in an elf section/array, but are individually list-linked onto dyndbg's per-module ddebug_table for operation. This is unnecessary; even when ddebug_attach_classmap() is handling the builtin section (with classmaps for multiple builtin modules), its contents are ordered, so a module's possibly multiple classmaps will be consecutive in the section, and could be treated as a vector/block, since both start-address and subrange length are in the ddebug_info arg. IOW, this treats classmaps similarly to _ddebugs, which are already kept as vector-refs (address+len). So this changes: struct ddebug_class_map drops list-head link. struct ddebug_table drops the list-head maps, and gets: classes & num_classes for the start-address and num_classes, placed to improve struct packing. The loading: in ddebug_attach_module_classes(), replace the for-the-modname list-add loop, with a forloop that finds the module's subrange (start,length) of matching classmaps within the possibly builtin classmaps vector, and saves those to the ddebug_table. The reading/using: change list-foreach loops in ddebug_class_name() & ddebug_find_valid_class() to walk the array from start to length. Also: Move #define __outvar up, above an added use in a fn-prototype. Simplify ddebug_attach_module_classes args, ref has both address & len. no functional changes Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- include/linux/dynamic_debug.h | 1 - lib/dynamic_debug.c | 61 ++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 5231aaf361c4..b53217e4b711 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -83,7 +83,6 @@ enum class_map_type { }; =20 struct ddebug_class_map { - struct list_head link; struct module *mod; const char *mod_name; /* needed for builtins */ const char **class_names; diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 152b04c05981..46e4cdd8e6be 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -45,10 +45,11 @@ extern struct ddebug_class_map __start___dyndbg_classes= []; extern struct ddebug_class_map __stop___dyndbg_classes[]; =20 struct ddebug_table { - struct list_head link, maps; + struct list_head link; const char *mod_name; - unsigned int num_ddebugs; struct _ddebug *ddebugs; + struct ddebug_class_map *classes; + unsigned int num_ddebugs, num_classes; }; =20 struct ddebug_query { @@ -147,13 +148,15 @@ static void vpr_info_dq(const struct ddebug_query *qu= ery, const char *msg) query->first_lineno, query->last_lineno, query->class_string); } =20 +#define __outvar /* filled by callee */ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_tabl= e const *dt, - const char *class_string, int *class_id) + const char *class_string, + __outvar int *class_id) { struct ddebug_class_map *map; - int idx; + int i, idx; =20 - list_for_each_entry(map, &dt->maps, link) { + for (map =3D dt->classes, i =3D 0; i < dt->num_classes; i++, map++) { idx =3D match_string(map->class_names, map->length, class_string); if (idx >=3D 0) { *class_id =3D idx + map->base; @@ -164,7 +167,6 @@ static struct ddebug_class_map *ddebug_find_valid_class= (struct ddebug_table cons return NULL; } =20 -#define __outvar /* filled by callee */ /* * Search the tables for _ddebug's which match the given `query' and * apply the `flags' and `mask' to them. Returns number of matching @@ -1114,9 +1116,10 @@ static void *ddebug_proc_next(struct seq_file *m, vo= id *p, loff_t *pos) =20 static const char *ddebug_class_name(struct ddebug_iter *iter, struct _dde= bug *dp) { - struct ddebug_class_map *map; + struct ddebug_class_map *map =3D iter->table->classes; + int i, nc =3D iter->table->num_classes; =20 - list_for_each_entry(map, &iter->table->maps, link) + for (i =3D 0; i < nc; i++, map++) if (class_in_range(dp->class_id, map)) return map->class_names[dp->class_id - map->base]; =20 @@ -1200,30 +1203,31 @@ static const struct proc_ops proc_fops =3D { .proc_write =3D ddebug_proc_write }; =20 -static void ddebug_attach_module_classes(struct ddebug_table *dt, - struct ddebug_class_map *classes, - int num_classes) +static void ddebug_attach_module_classes(struct ddebug_table *dt, struct _= ddebug_info *di) { struct ddebug_class_map *cm; - int i, j, ct =3D 0; + int i, nc =3D 0; =20 - for (cm =3D classes, i =3D 0; i < num_classes; i++, cm++) { + /* + * Find this module's classmaps in a subrange/wholerange of + * the builtin/modular classmap vector/section. Save the start + * and length of the subrange at its edges. + */ + for (cm =3D di->classes, i =3D 0; i < di->num_classes; i++, cm++) { =20 if (!strcmp(cm->mod_name, dt->mod_name)) { - - v2pr_info("class[%d]: module:%s base:%d len:%d ty:%d\n", i, - cm->mod_name, cm->base, cm->length, cm->map_type); - - for (j =3D 0; j < cm->length; j++) - v3pr_info(" %d: %d %s\n", j + cm->base, j, - cm->class_names[j]); - - list_add(&cm->link, &dt->maps); - ct++; + if (!nc) { + v2pr_info("start subrange, class[%d]: module:%s base:%d len:%d ty:%d\n= ", + i, cm->mod_name, cm->base, cm->length, cm->map_type); + dt->classes =3D cm; + } + nc++; } } - if (ct) - vpr_info("module:%s attached %d classes\n", dt->mod_name, ct); + if (nc) { + dt->num_classes =3D nc; + vpr_info("module:%s attached %d classes\n", dt->mod_name, nc); + } } =20 /* @@ -1256,10 +1260,9 @@ static int ddebug_add_module(struct _ddebug_info *di= , const char *modname) dt->num_ddebugs =3D di->num_descs; =20 INIT_LIST_HEAD(&dt->link); - INIT_LIST_HEAD(&dt->maps); =20 if (di->classes && di->num_classes) - ddebug_attach_module_classes(dt, di->classes, di->num_classes); + ddebug_attach_module_classes(dt, di); =20 mutex_lock(&ddebug_lock); list_add_tail(&dt->link, &ddebug_tables); @@ -1372,8 +1375,8 @@ static void ddebug_remove_all_tables(void) mutex_lock(&ddebug_lock); while (!list_empty(&ddebug_tables)) { struct ddebug_table *dt =3D list_entry(ddebug_tables.next, - struct ddebug_table, - link); + struct ddebug_table, + link); ddebug_table_free(dt); } mutex_unlock(&ddebug_lock); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 599E520FAB8 for ; Tue, 2 Jul 2024 21:58:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957503; cv=none; b=cg+uh29dRChEgVyVEhD+Td2P/SuFpGfvQgx3SwwSp2vR16PVoJOH90EsD4MK3hzIq8yWVzwYv3h5dYTzUglk1UWRsGBkus9sZaU4/uA+oqu0oWZnOMiQwDl6Wy+1r7sIuOZ+km94/FRuGhzqL1hLNz+f4S4XFKHVpWEOPSN9+3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957503; c=relaxed/simple; bh=zmxGi1tH6sFd6Ybk1duPh2EblNtdPK14vDVZ+goc9v0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EdeMAn5lTJikiD9NOP6AIBoGGPnAZEMhQaAFRh1Rq3GVZ2Sh2j5tQHcjJx2JNwsGtroeP8T3YqgtWeObJ4Bh5MusGpPZJJrr3kNgckf7KPe18tGXQy3a53vZSxMD9oyzMrcbkRlnckhErZ1KeMTv1zn/ELJQX947aeOebitLATI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HnYoHdwf; arc=none smtp.client-ip=209.85.166.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HnYoHdwf" Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7f6309e9f29so165178439f.0 for ; Tue, 02 Jul 2024 14:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957501; x=1720562301; darn=vger.kernel.org; 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=mgKlPNiKWVnT1pPVJRogWWF3tyIXWVHBmJ5ag9aE+c4=; b=HnYoHdwfoM3Ql+7HwqEsvLfGEGvbj9LgQQ2pTrt3HmVbfRO6k+xft4mHP+kihohUXM ojcnpwBkEhmxm0lhP1mbXyNHSYlnZA0F5d79x7KLPoisKD0Rh/jikuxVdvPa+7uGl1Cy u1AnSHL2QWqBhxLMkAym1wNf25DVI4+0NY8HhEAuXXgqsETs8CiN0wyNZV4alolHNKyV AV00yNp8vJ9UpAXN27y1BU8HHGPTSrbE49EU2LIu76JTeLNNu2l5wSsHRZNjCqi3UjQ7 xgIrBXW++hfhPRw73PJYrfoUcTqbIjkygYFYGKdpAe4q3uuTStnMmprxOzI7petsWuZ0 yryw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957501; x=1720562301; 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=mgKlPNiKWVnT1pPVJRogWWF3tyIXWVHBmJ5ag9aE+c4=; b=uQKzINCREe+07GrRBKpABp/IyNjSOJozDNG4scyDdtTJRo4U/AzIuj2nKJGGeOHNQQ DegHJ/C4zIPSZSifTUq7cKDi9/T4vhp9KfGkQWlg/jjDL378cESt38CI1Cd/VnCQXh1Q flHlAf0C38WsFiW2XFqBsNBYadzSX+zIcpWW2dKWjE8/59YnQ1dSL8zQ6NZZoxOwa0de FwEWt/zh3XeqeJFILwS9I8+yhAiYU4TlYc3InzAebvkMpvorpcdKY0hkSMHe2Amq83mI QYz96KxrNjoWMWWRE1nNPDszut9dOlGSvtvYXYqZNqeO0kxEDGDh200NSCdnx1IwFABE ln4A== X-Gm-Message-State: AOJu0Yw+Z3Sd6uLeBApc3z3JUE6A9t0ILevk/dQ66sYZaa3lC8sDXO62 8P27xtKh5bnCv2aFYhvvcYvn9XmDxFSkFSOW5S0sPG15HyAKXQ97 X-Google-Smtp-Source: AGHT+IEouPw8z+/+QZWHDW3dmgyQBg1bWleLTxR4pkI5y+9ohF4HuUpGu7gB4NJ1D41ODvUT06RDlQ== X-Received: by 2002:a5e:8d19:0:b0:7f6:2e72:e810 with SMTP id ca18e2360f4ac-7f62edffb18mr1166209939f.3.1719957501499; Tue, 02 Jul 2024 14:58:21 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:21 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 06/52] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it Date: Tue, 2 Jul 2024 15:56:56 -0600 Message-ID: <20240702215804.2201271-7-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add param: query_module to ddebug_apply_class_bitmap(), and pass it thru to _ddebug_queries(), replacing NULL with query_module. This allows its caller to update just one module, or all (as currently). We'll use this later to propagate drm.debug to each USEr as they're modprobed. No functional change. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- after `modprobe i915`, heres the module dependencies, though not all on drm.debug. bash-5.2# lsmod Module Size Used by i915 3133440 0 drm_buddy 20480 1 i915 ttm 90112 1 i915 i2c_algo_bit 16384 1 i915 video 61440 1 i915 wmi 32768 1 video drm_display_helper 200704 1 i915 drm_kms_helper 208896 2 drm_display_helper,i915 drm 606208 5 drm_kms_helper,drm_display_helper,drm_buddy= ,i915,ttm cec 57344 2 drm_display_helper,i915 --- lib/dynamic_debug.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 46e4cdd8e6be..a1fd2e9dbafb 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -605,7 +605,8 @@ static int ddebug_exec_queries(char *query, const char = *modname) =20 /* apply a new bitmap to the sys-knob's current bit-state */ static int ddebug_apply_class_bitmap(const struct ddebug_class_param *dcp, - unsigned long *new_bits, unsigned long *old_bits) + unsigned long *new_bits, unsigned long *old_bits, + const char *query_modname) { #define QUERY_SIZE 128 char query[QUERY_SIZE]; @@ -613,7 +614,8 @@ static int ddebug_apply_class_bitmap(const struct ddebu= g_class_param *dcp, int matches =3D 0; int bi, ct; =20 - v2pr_info("apply: 0x%lx to: 0x%lx\n", *new_bits, *old_bits); + v2pr_info("apply bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, *old_bits, + query_modname ?: ""); =20 for (bi =3D 0; bi < map->length; bi++) { if (test_bit(bi, new_bits) =3D=3D test_bit(bi, old_bits)) @@ -622,12 +624,15 @@ static int ddebug_apply_class_bitmap(const struct dde= bug_class_param *dcp, snprintf(query, QUERY_SIZE, "class %s %c%s", map->class_names[bi], test_bit(bi, new_bits) ? '+' : '-', dcp->flags); =20 - ct =3D ddebug_exec_queries(query, NULL); + ct =3D ddebug_exec_queries(query, query_modname); matches +=3D ct; =20 v2pr_info("bit_%d: %d matches on class: %s -> 0x%lx\n", bi, ct, map->class_names[bi], *new_bits); } + v2pr_info("applied bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, *old_bit= s, + query_modname ?: ""); + return matches; } =20 @@ -682,7 +687,7 @@ static int param_set_dyndbg_classnames(const char *inst= r, const struct kernel_pa continue; } curr_bits ^=3D BIT(cls_id); - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, dcp->bits); + totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, dcp->bits, NULL); *dcp->bits =3D curr_bits; v2pr_info("%s: changed bit %d:%s\n", KP_NAME(kp), cls_id, map->class_names[cls_id]); @@ -692,7 +697,7 @@ static int param_set_dyndbg_classnames(const char *inst= r, const struct kernel_pa old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); curr_bits =3D CLASSMAP_BITMASK(cls_id + (wanted ? 1 : 0 )); =20 - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, &old_bits); + totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, &old_bits, NULL); *dcp->lvl =3D (cls_id + (wanted ? 1 : 0)); v2pr_info("%s: changed bit-%d: \"%s\" %lx->%lx\n", KP_NAME(kp), cls_id, map->class_names[cls_id], old_bits, curr_bits); @@ -755,7 +760,7 @@ int param_set_dyndbg_classes(const char *instr, const s= truct kernel_param *kp) inrep &=3D CLASSMAP_BITMASK(map->length); } v2pr_info("bits:%lx > %s\n", inrep, KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, dcp->bits); + totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, dcp->bits, NULL); *dcp->bits =3D inrep; break; case DD_CLASS_TYPE_LEVEL_NUM: @@ -768,7 +773,7 @@ int param_set_dyndbg_classes(const char *instr, const s= truct kernel_param *kp) old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); new_bits =3D CLASSMAP_BITMASK(inrep); v2pr_info("lvl:%ld bits:0x%lx > %s\n", inrep, new_bits, KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, &old_bits); + totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, &old_bits, NULL); *dcp->lvl =3D inrep; break; default: --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BB28210199 for ; Tue, 2 Jul 2024 21:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957505; cv=none; b=SX5LJHLlEMo+Cq4CdZ1Dzvg1ikRC3x8qxSj7d+BaUqG5BaKchqEtq4Vddco0gqYj5kHFcAoY7uZHNa/FMEk4b9N8dsZLJErbdXFPjPU/zfqcQpQxUnGve4RLuTzRXZZAp82CRWOFohWd/VD4Bsp12JZ9lHsxXaoQZyQNRICEHlA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957505; c=relaxed/simple; bh=LfbPL0PeRvX6qcgfNwuiYcYLVX8gyNp/+Z0M/GkZpCE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sihy9k14kSRO2jJOVY0dUgcMi/7h3EhhwSzDiNwogESGJfWC+I9bfiiKG0X6KoZ+xQvWcSgtYVFs//wVNY0pCj3YVXEzA0IR0mqEpvjf3/4Y1McUqLGaowATSO8EJWcvLuwxoyvSymtCR8Vki2EsZMPl/3DUOnYcd+34+bbQyGk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IISy27uR; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IISy27uR" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7eba486df76so856139f.0 for ; Tue, 02 Jul 2024 14:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957503; x=1720562303; darn=vger.kernel.org; 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=6xZzQ/E3vZK+E5MMlKfK/qTb5+sylxnNOul573hVp9Y=; b=IISy27uR5ytBM+uB0P7NwvbwehUZeWtRCadF5zw30UeHvyK1TR4uyCfpfURbfNdWNa J45ECsExcS5Frwv2drOrhsD1dgvyw6EYbVxK+BTPUVHzyK4LpOAx+Qz6ubVZOQaYheBc VfjgHBVNHwaqLE87CBudpKm5382Mzv6HLBaixpQ0dYmY6RDsl5RdQZmDoLBtux/GdcNt RgLdUXlu/GoBVkv76+6vomZbWdcUrvNEhKUIdlrPbzGQN5bBbuVk99kP8p0u+8kmw17S 2c1ARKaMWOuvENQ9FrOAEZvWMA5/pwUqxRvIaax6mRkdzaJrP9eWqsVoJozvQe+SdVpc bRdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957503; x=1720562303; 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=6xZzQ/E3vZK+E5MMlKfK/qTb5+sylxnNOul573hVp9Y=; b=rS56DaSukG8Re9qCQmJEW+81ztiUbrmwK1IHROw3ECVHOg6bUhicXtrMq1ZBgn35yK f5CXiGZadUtSv8iNz5/uYDhyZJOjnYdK1WHBZnrFoV85lYgDZtLlVpUd47xqb2VkKAH/ subLSpI9oB5HRRTW8+fdiQbSxA6UvaLqOdAspmFzARUlJF6AcM9SMIktE1QUr1fQpIRp FdKzRyuHeW3z8jY1D7wJ0+IMntqaPi/ktRJpFXzqVzDpNnb4jlYgNFDiNTZu9bMls+yz UFhyU4IT4ukCN0q09Ve+3mpjudHqeAmrEhy+N3n/4iyr8O2G192v73QJLnPSTalP60Xq jyMA== X-Gm-Message-State: AOJu0Yx4O7iVeKqHxDjuG7XeHE2GY+FeZ5CnkbwsqAe+ju9JDGK9dGJP Me4t4z1pE7+UvuzDKC/3glYistAQTtxRjjof9JcyN3IMZ2pf5c41k+gslw== X-Google-Smtp-Source: AGHT+IGYdWlTTC7TRfqgE6BZNMFEtFIymMFnXp3OmPzaWNa0nuspcltmmeqiu/SmLsP4XIoxiBNboQ== X-Received: by 2002:a05:6602:178e:b0:7eb:eeba:5e83 with SMTP id ca18e2360f4ac-7f62eeab155mr453600539f.9.1719957502788; Tue, 02 Jul 2024 14:58:22 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:22 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 07/52] dyndbg: split param_set_dyndbg_classes to _module & wrapper fns Date: Tue, 2 Jul 2024 15:56:57 -0600 Message-ID: <20240702215804.2201271-8-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Split api-fn: param_set_dyndbg_classes(), adding modname param and passing NULL in from api-fn. The new arg allows caller to specify that only one module is affected by a prdbgs update. This selectivity will be used later to narrow the scope of changes made. no functional change. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index a1fd2e9dbafb..4a48f830507f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -711,18 +711,9 @@ static int param_set_dyndbg_classnames(const char *ins= tr, const struct kernel_pa return 0; } =20 -/** - * param_set_dyndbg_classes - class FOO >control - * @instr: string echo>d to sysfs, input depends on map_type - * @kp: kp->arg has state: bits/lvl, map, map_type - * - * Enable/disable prdbgs by their class, as given in the arguments to - * DECLARE_DYNDBG_CLASSMAP. For LEVEL map-types, enforce relative - * levels by bitpos. - * - * Returns: 0 or <0 if error. - */ -int param_set_dyndbg_classes(const char *instr, const struct kernel_param = *kp) +static int param_set_dyndbg_module_classes(const char *instr, + const struct kernel_param *kp, + const char *modnm) { const struct ddebug_class_param *dcp =3D kp->arg; const struct ddebug_class_map *map =3D dcp->map; @@ -759,8 +750,8 @@ int param_set_dyndbg_classes(const char *instr, const s= truct kernel_param *kp) KP_NAME(kp), inrep, CLASSMAP_BITMASK(map->length)); inrep &=3D CLASSMAP_BITMASK(map->length); } - v2pr_info("bits:%lx > %s\n", inrep, KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, dcp->bits, NULL); + v2pr_info("bits:0x%lx > %s.%s\n", inrep, modnm ?: "*", KP_NAME(kp)); + totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, dcp->bits, modnm); *dcp->bits =3D inrep; break; case DD_CLASS_TYPE_LEVEL_NUM: @@ -773,7 +764,7 @@ int param_set_dyndbg_classes(const char *instr, const s= truct kernel_param *kp) old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); new_bits =3D CLASSMAP_BITMASK(inrep); v2pr_info("lvl:%ld bits:0x%lx > %s\n", inrep, new_bits, KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, &old_bits, NULL); + totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, &old_bits, modnm); *dcp->lvl =3D inrep; break; default: @@ -782,6 +773,22 @@ int param_set_dyndbg_classes(const char *instr, const = struct kernel_param *kp) vpr_info("%s: total matches: %d\n", KP_NAME(kp), totct); return 0; } + +/** + * param_set_dyndbg_classes - class FOO >control + * @instr: string echo>d to sysfs, input depends on map_type + * @kp: kp->arg has state: bits/lvl, map, map_type + * + * Enable/disable prdbgs by their class, as given in the arguments to + * DECLARE_DYNDBG_CLASSMAP. For LEVEL map-types, enforce relative + * levels by bitpos. + * + * Returns: 0 or <0 if error. + */ +int param_set_dyndbg_classes(const char *instr, const struct kernel_param = *kp) +{ + return param_set_dyndbg_module_classes(instr, kp, NULL); +} EXPORT_SYMBOL(param_set_dyndbg_classes); =20 /** --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF0E421C163 for ; Tue, 2 Jul 2024 21:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957507; cv=none; b=YPw/kZd4CSp0msBrzb74hCOBgNBO/c7XgKd9lbhqZv2J57tTCYQ0/E+PG9MIXvZuYSmm9F+ySdW83m2Qpk5WMi/0Tcym/t6NIEzsuCN3axIypK02AVh5mC18OY8ONFXC9dVCrNmL4hKa57z5X4WcKP6tWBJFD+oZCTIbDx8H3CM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957507; c=relaxed/simple; bh=bu5iQ1cG044Jo0mJlX4LGPT0cAZfwuxc+xwuYO2ZPY4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O7SscQ6t/pfmGKwBKAu7GH6NdToKvquemEvqUQ/umg9bF/ix168ofY1oJk7/MSl5DICsiJyIzzvYzuBMSDn/uEPDxQNvgXNDXDOPx+oEYH2HV5hZlN2nVyAS+yVpGhf0wEuxEYwaxZrKW4Mn4jcN6yFiFfngEuZRdLefnF1sbfM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lWtHFDQJ; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lWtHFDQJ" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7f3d37d6bfdso440839f.1 for ; Tue, 02 Jul 2024 14:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957504; x=1720562304; darn=vger.kernel.org; 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=wso+Oi2/ut2legKe2oAWbXK/ItRspmzOjB4tGo2hISg=; b=lWtHFDQJEAgwAs2dhQsDQmnX0CNM8DD/d0M2+R9uJ675gk7lo6Gh1u7b03q7anqQpF uA8ew+ouOZpWOzTZInC/Yiy3NCTmfhSyPJ3uA49Szj/9EKirjBD7NuD2PRDwaSPWuyGi rG8u+gNKNKciQzCmWPVeFi2PKP9qM9+yPHYZL0iD3R3R0Uoa6kvOVR160s2+rpu0m71l fuuxQYHsn27eMKDSTDt5uBn8PCr0bqehJuSB8w7DrUCHemymBF1mtQck6NpDAo2ybqqE sD6yW9J3O31djPDgSuRIebH5LI2T228uuYqk+eGDduQfN4YBjB8t9igwkzOR5JietM76 mNJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957504; x=1720562304; 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=wso+Oi2/ut2legKe2oAWbXK/ItRspmzOjB4tGo2hISg=; b=q7AF6VnkmXiZYVFeKrR0rGms/kOX49MPJ0EW7ipryJkp8uDwbxRkeRq7AXjj69hX6U gi695qSbJQyWarhq1It+4WvFiRN0yMbkAqyE5txgi9IyKwLfFedTh7VSt0Imlgc4eGb2 YRtUlNO0lpTt+1JERJlec3W05Piwzls465GbUSs5T5Yq16cTozsgbaog18WRIx2+6QEi DvWoS10koSYsQoXPugcKlwSfQPEzIQyq1CSM0xz2e4mIk7HlOlGRXm+ynZIOv6l4xMvl OZTm1AcD1pbvr8eIvyl/qzDdmg/guj/SZhPgPwcmP/uTNMA4kw+bo26YLO2gwaAgwZBO XHfQ== X-Gm-Message-State: AOJu0YwWmQszld+cCSl3c4BD/nRhuQ2FCn7/PrENybbL5JsbNCKNpeOJ +S56IAvcXXPupfA8uRWxsWF9em4VWRqgK6MrWv+WwsnpIRn3L1fH X-Google-Smtp-Source: AGHT+IEjihZo5dhJ6MSq0XVTxwNq7IPZF6HNZIFL7WZIO/OulVmLPGqkTjVhpi6rvHnYoJxnqgO6CA== X-Received: by 2002:a05:6602:54:b0:7f3:9e2c:fdfd with SMTP id ca18e2360f4ac-7f62ee9d6e6mr484501939f.8.1719957504092; Tue, 02 Jul 2024 14:58:24 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:23 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 08/52] dyndbg: drop NUM_TYPE_ARRAY Date: Tue, 2 Jul 2024 15:56:58 -0600 Message-ID: <20240702215804.2201271-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- include/linux/dynamic_debug.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index b53217e4b711..8116d0a0d33a 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -106,11 +106,9 @@ struct ddebug_class_map { .mod_name =3D KBUILD_MODNAME, \ .base =3D _base, \ .map_type =3D _maptype, \ - .length =3D NUM_TYPE_ARGS(char*, __VA_ARGS__), \ + .length =3D ARRAY_SIZE(_var##_classnames), \ .class_names =3D _var##_classnames, \ } -#define NUM_TYPE_ARGS(eltype, ...) \ - (sizeof((eltype[]){__VA_ARGS__}) / sizeof(eltype)) =20 /* encapsulate linker provided built-in (or module) dyndbg data */ struct _ddebug_info { --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DF1A21C169 for ; Tue, 2 Jul 2024 21:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957507; cv=none; b=MxYCKubDEb5C5zVhZLbLhQtdnBvTQvNtbaRk9dTSxMVePWVlHJ8xgXsiOLT9osnhGis2Vx7FUlLMO4GEGcdwcfzfIx+PVlb++unQ4dN+uTb9GO+QnyfHAyWVMHe5VjhlzbXfQNw+HMU+LqfPjCJkQRD69EcNXCtV2zo04SkNEco= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957507; c=relaxed/simple; bh=2orYXb/DEjBbzyb8Caox8Abxcs9fSEtj7EsxKJLeFwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YYBdw1JBcxvi1DKPs1CHjIY8BUHhAKkxfWgdvd+PmigXu4AtjNutEAuv1xdgZ43pgB983PQE0sQJh5Pe9t5auBXLbk9QN3wkKiVxbBIl/bLk8DV60ZMVk5UWC8i1ORPbDGtr+m8yyotnIvs6qxLWZ7S6bW3V286+M/ArPM3dkEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bEPjBQNj; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bEPjBQNj" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f3d3f1294dso169373639f.2 for ; Tue, 02 Jul 2024 14:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957505; x=1720562305; darn=vger.kernel.org; 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=z/963zG9LNPxu+BVNW7S/xeH6c8P5d5ieMeYbq4Ngms=; b=bEPjBQNje3CYzAX9OK5EM0hPuhvQCqh4tveRBG+VbInTkv9C4prydv9dOJjeXV0tBC RzUT1o3d7GdfzNguyQv7e6xI5lM2ZgobEOeOLotGlrHpWtuUo3qxvry7DeVTtj8udLC1 vy5jU38tYOkSHKXARzpztSWqC2YX+BZzeHIunse0bOsIFJ1gFyMZKi36EmanwJuvaqVl uFyCJHOEZaoWQChK1IT1cUlnzFdiNemZo6apdtgSHrbxX0AeeMpvkyK/JZLhNaB17J11 R8oZqycaBYEknv3cwf2XRjqR8/CPfdKCrA2EPTyUDvi9ddDUM3udTiEFp6k5dO6TxKhU Nv5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957505; x=1720562305; 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=z/963zG9LNPxu+BVNW7S/xeH6c8P5d5ieMeYbq4Ngms=; b=l/g/LK4WO1Tjj0fi8DkPjBu9L05x9taFys561qhtgbcDJKlXUzxqkm/vblFcfm90bU mAV9xDKC8/vkch8NLa+1t371ivgKJjp4UPXf6mdLE3mUEmCfiRyaoExMyn0ruDDP6zTB 753qDfZYdJuhu0m8reJKIz8UUlk2m8q1yyO671VcXN/FJAspadScEdRpYtOWOi0n/DRp 9oTSZzay3vMHkiPIc27NZ72W/w8+1ihQ+FCGZYKL8/V9IpNgbgUplfK3SRX0/EB147H+ IvtfnlzXd4gNTZNgN28nyycRC5y03M52SuZE/cK3hxm6osem7Sqe7xylywGxcSeXeuV4 FTDg== X-Gm-Message-State: AOJu0Yx74o9gpkMftTULuG/Nlkq7wEmaRa4LUJ28ZRQUKbpA7eVwy2Q8 WYLgBfLpDWCPkDc43gVdkkgACUE5mpA7ZfSuKjEoQNC1ZlbhquOf X-Google-Smtp-Source: AGHT+IGX6ME8eGVqlfazOAcN/G0b48tkJYoxa8zIbYTUGgfze2KInpikaNyiDKbQdhqd9nSM7L0cIQ== X-Received: by 2002:a05:6602:808:b0:7f6:15be:a6e0 with SMTP id ca18e2360f4ac-7f62ee82b0cmr1045219839f.20.1719957505324; Tue, 02 Jul 2024 14:58:25 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:24 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 09/52] dyndbg: reduce verbose/debug clutter Date: Tue, 2 Jul 2024 15:56:59 -0600 Message-ID: <20240702215804.2201271-10-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" currently, for verbose=3D3, these are logged (blank lines for clarity): dyndbg: query 0: "class DRM_UT_CORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op=3D'+' dyndbg: flags=3D0x1 dyndbg: *flagsp=3D0x1 *maskp=3D0xffffffff dyndbg: parsed: func=3D"" file=3D"" module=3D"" format=3D"" lineno=3D0-0 c= lass=3D... dyndbg: no matches for query dyndbg: no-match: func=3D"" file=3D"" module=3D"" format=3D"" lineno=3D0-0= class=3D... dyndbg: processed 1 queries, with 0 matches, 0 errs That is excessive, so this patch: - shrinks 3 lines of 2nd stanza to single line - drops 1st 2 lines of 3rd stanza 3rd line is like 1st, with result, not procedure. 2nd line is just status, retold in 4th, with more info. New output: dyndbg: query 0: "class DRM_UT_CORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op=3D'+' flags=3D0x1 *flagsp=3D0x1 *maskp=3D0xffffffff dyndbg: no-match: func=3D"" file=3D"" module=3D"" format=3D"" lineno=3D0-0= class=3D... dyndbg: processed 1 queries, with 0 matches, 0 errs no functional change. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4a48f830507f..368381dbd266 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -266,9 +266,6 @@ static int ddebug_change(const struct ddebug_query *que= ry, } mutex_unlock(&ddebug_lock); =20 - if (!nfound && verbose) - pr_info("no matches for query\n"); - return nfound; } =20 @@ -501,7 +498,6 @@ static int ddebug_parse_flags(const char *str, struct f= lag_settings *modifiers) pr_err("bad flag-op %c, at start of %s\n", *str, str); return -EINVAL; } - v3pr_info("op=3D'%c'\n", op); =20 for (; *str ; ++str) { for (i =3D ARRAY_SIZE(opt_array) - 1; i >=3D 0; i--) { @@ -515,7 +511,6 @@ static int ddebug_parse_flags(const char *str, struct f= lag_settings *modifiers) return -EINVAL; } } - v3pr_info("flags=3D0x%x\n", modifiers->flags); =20 /* calculate final flags, mask based upon op */ switch (op) { @@ -531,7 +526,7 @@ static int ddebug_parse_flags(const char *str, struct f= lag_settings *modifiers) modifiers->flags =3D 0; break; } - v3pr_info("*flagsp=3D0x%x *maskp=3D0x%x\n", modifiers->flags, modifiers->= mask); + v3pr_info("op=3D'%c' flags=3D0x%x maskp=3D0x%x\n", op, modifiers->flags, = modifiers->mask); =20 return 0; } @@ -541,7 +536,7 @@ static int ddebug_exec_query(char *query_string, const = char *modname) struct flag_settings modifiers =3D {}; struct ddebug_query query =3D {}; #define MAXWORDS 9 - int nwords, nfound; + int nwords; char *words[MAXWORDS]; =20 nwords =3D ddebug_tokenize(query_string, words, MAXWORDS); @@ -559,10 +554,7 @@ static int ddebug_exec_query(char *query_string, const= char *modname) return -EINVAL; } /* actually go and implement the change */ - nfound =3D ddebug_change(&query, &modifiers); - vpr_info_dq(&query, nfound ? "applied" : "no-match"); - - return nfound; + return ddebug_change(&query, &modifiers); } =20 /* handle multiple queries in query string, continue on error, return --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CDB821C17B for ; Tue, 2 Jul 2024 21:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957508; cv=none; b=STu2eR94HdzsvH9gxNIMbz7lQMK0HQOo/2HPHa/ilTTPoKLHIhi5cB3Xu2styME7loKdGhMdSsZAwbMTNRGpQvfAnv+cB3b/HbBMqpodH+p7jeI5Xu06KDgR5rJw89zld4PmndCy4JT4fjKgHR/A0fl6qve6aNAUUM1hSDF5pC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957508; c=relaxed/simple; bh=hDky0tcbjpEUJlBM4lJpM2oQBO65Ubzgv+qLWDk5NXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gPXQyL9NnD1+/mSFomB8uJlTBsvXH8Hp2Hx98yGS0W/W8ITJ5ZXyIDGVk/o+saezWlvuMk/2aBCKKnyV1mcjIjpZ/C8aZT7vwq0skSAJz2ygiDSkXzgOSJ2tUYkOF9IvlhseU0uK1fa8PnkRME3H1X2LX2dia4inQ91tYQm5Q7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dSopgz0P; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dSopgz0P" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f3d3f1294dso169374439f.2 for ; Tue, 02 Jul 2024 14:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957506; x=1720562306; darn=vger.kernel.org; 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=Kihqcq8gEwvlFuKQVqVa3kRjj6JIPweX7rDvgcIT9h8=; b=dSopgz0P1nlCniv0FSUgIcfDL8XOvcxWDRvl+F1pOH3Qu/X+uGTUEF8raeF5imb/Bt 0tUiZrfIYRPXpJGgKTlvzdch5u7XvLF+mzE43IsuMCWVULspDm5oua7pDA3Cj7FW0QAZ WLYXLH0byupuC0eCUn5gwKAhcK7otpWrIkKVyKz5fGXcDQoQWIMJ5U9A/2HIK13DwYCD y5Jw8rmZ7Cz8FHS6TNMPX9OklPMtio/JJHcAh8ijZ79JxudXOHZaSm8Q7hGKFQjIkf8J gfAtc9K41hkTjehYZG2fY36lkY+P4zg+GfbO5dWarz/wObVsjXZ270oiB0Z12ujUJDd1 ECFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957506; x=1720562306; 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=Kihqcq8gEwvlFuKQVqVa3kRjj6JIPweX7rDvgcIT9h8=; b=HbF5PgwADj23d9GCxi9DocXg+rXCuIZcAqcD/cz1oD0UXnEXVeEk5MCL8ImB1gty/X oqkykMjMoZgmfBtJlVFd6U3lEFBlELqbIIi4Ii0+0LiKAgVInvV0WIywAlH7KvHcIrSR u9NzYbhoo2Wy/x0wy5q1MPvuZZsnYZ+x25bdQ1Vg2iSbATyCOWrFKAVbZ2ME1Q9CJL8s 6elgjcjiyJ4T3WvkiI6xABcM020OvXLQ4Nyp/ToeoXio2rCnRI6Ab2CtLoOrdUr/ARuN 3r5IaV+JbvE9OWbcslJzPZI6NGeyGEh8L2/V74R7nFW8c9fGsq69pc3d5hqO7joLBrRu Mknw== X-Gm-Message-State: AOJu0YyczwRnn7ZEhrGwECb/ME1ABxBziukLMEXWoQ46x/aWEybFQjYg 6P8GXUn5M3zrnwbYYVMD46dNvh6JiWcOmwXyz4eyPa42NocO4Vci X-Google-Smtp-Source: AGHT+IF8hAhxFCTOhvSpcCx/i+r/frukj2a98ZVky9/KM97IGZV37TQytURYtKcRbWkLrVOQ3MdKcA== X-Received: by 2002:a05:6602:349:b0:7eb:cba1:b19e with SMTP id ca18e2360f4ac-7f62ee0d9b4mr1212668139f.8.1719957506351; Tue, 02 Jul 2024 14:58:26 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:25 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 10/52] dyndbg: silence debugs with no-change updates Date: Tue, 2 Jul 2024 15:57:00 -0600 Message-ID: <20240702215804.2201271-11-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In ddebug_apply_class_bitmap(), check for actual changes to the bits before announcing them, to declutter logs. no functional change. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 368381dbd266..8320cadeb251 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -595,7 +595,7 @@ static int ddebug_exec_queries(char *query, const char = *modname) return nfound; } =20 -/* apply a new bitmap to the sys-knob's current bit-state */ +/* apply a new class-param setting */ static int ddebug_apply_class_bitmap(const struct ddebug_class_param *dcp, unsigned long *new_bits, unsigned long *old_bits, const char *query_modname) @@ -606,8 +606,9 @@ static int ddebug_apply_class_bitmap(const struct ddebu= g_class_param *dcp, int matches =3D 0; int bi, ct; =20 - v2pr_info("apply bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, *old_bits, - query_modname ?: ""); + if (*new_bits !=3D *old_bits) + v2pr_info("apply bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, + *old_bits, query_modname ?: "'*'"); =20 for (bi =3D 0; bi < map->length; bi++) { if (test_bit(bi, new_bits) =3D=3D test_bit(bi, old_bits)) @@ -622,8 +623,9 @@ static int ddebug_apply_class_bitmap(const struct ddebu= g_class_param *dcp, v2pr_info("bit_%d: %d matches on class: %s -> 0x%lx\n", bi, ct, map->class_names[bi], *new_bits); } - v2pr_info("applied bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, *old_bit= s, - query_modname ?: ""); + if (*new_bits !=3D *old_bits) + v2pr_info("applied bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, + *old_bits, query_modname ?: "'*'"); =20 return matches; } --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4000B21C193 for ; Tue, 2 Jul 2024 21:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957509; cv=none; b=Ih37bTpJ2454HxmmVrYRAV2ni2C9A09wKgftKFWVkjATHKV+jSF0llNRkAxmR8llI4ZxTdt0jU9ZTXrIH2RsAdPjQfot8vIMvqBAZ8sQSeonuyxGn8oC14lUDqKzDrA2aw58nLNGyJ22EstB0toLR0XiT5iA4EQvYivch5UKiOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957509; c=relaxed/simple; bh=uMahtcUZExquPuJFLJnN2pPquWpAjSBlWHTcT3D1arI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bJ4bWjrchKIblwrGY1PSsnSTWfm2PduGo2FMBCHvvu69Fo7Y5ARKw6RUA3vnyZVGT6Qc7mKupjpS13MG1adzs9JSs4ojbvCpoaAfkYR1spYftY5R2nfafbH2A2Alr1ukN9mU4qoSyHmaPpd6yX5aRpzOE0dLcE2oRMBroyKeiyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MNNckNkP; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MNNckNkP" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7ebde93bf79so181720539f.1 for ; Tue, 02 Jul 2024 14:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957507; x=1720562307; darn=vger.kernel.org; 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=3rzL7Ai7iKqeKJnszxdFQBmj3pbR9EFBsW0IKIFtNrQ=; b=MNNckNkPQltvJjDpdZ5i/6it1AvmrtkKw5+C89p1di4dqHUhElC7BuUW1FtNEqoo5F AbbZGCjzzJIXWcV6kM0XxQKuDqVoCSQax8eOTD8Tsa/llP7xmVHIj3gEhN6aa1W+2FGi dnVaR/+4Zpxtg/m9CVtd/0kndozIk4J4cYcKRN+TrixrPRrP5CWjAJYeaNryiRJ+VQpy MreMIrRN0IEDYRZ2PnB3KzdUZnH+dAwo3F0hcsdqqa54bR2RIm1S4iH7fAKrYD1eTr0i bP+Sp67bCBYezEec1aTWr1cU0oAtUQl9Hiht5TrXZTpT7q4UtvDNcGvsCx6HFsMDem0R 3FNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957507; x=1720562307; 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=3rzL7Ai7iKqeKJnszxdFQBmj3pbR9EFBsW0IKIFtNrQ=; b=UYLPjLxLarbjX28c73ePh73+ky2Crb53XbPP1aAN8S+dtro8tN7nGxJ4+7ebojqSn9 akXNS2/XSCp9Edpq6hgv1u7yOBfDKY7sLxmBQCyCWnJ1conPzUJIOKafAGJhaeBLYUY8 LtIQxKhK7pcPwvcVGvy4i1U0twdwBaIwkHpp4TbnQ54/Er7NsYOxYuXtM/gajon/xazD CdrnZdFcB/repUwr0JjsOhKY8ZHAuoVwI4vnUXDlaWIFIPDSeV+44J5S3NKgpRAy9bxs VeoY3bg22hqhUp4OdiyqbVlFQ3a+JlGWUcTclJ8DOuzhfc6kgF0/A2hy46YV0CkB9BeK k36g== X-Gm-Message-State: AOJu0YyQ8L9Ld4nnfrfflqgiabpXmKTYm21ApriEw4Gru9kI7cBR0UW9 wgcAfvicLctmXOmyYrbzvfmp+HxSxwY4YbutfGmKdYrMXERFLYtA X-Google-Smtp-Source: AGHT+IF56ls3w7f2WSNbJ8aXQHldMBv+gn+afom4mP2VlDrZdzOAf5MG5lr7DVKBeB+D9m7lbJ2S+w== X-Received: by 2002:a5d:840d:0:b0:7f3:d89c:601b with SMTP id ca18e2360f4ac-7f62ee54715mr1057898039f.5.1719957507558; Tue, 02 Jul 2024 14:58:27 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:26 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 11/52] dyndbg: tighten ddebug_class_name() 1st arg type Date: Tue, 2 Jul 2024 15:57:01 -0600 Message-ID: <20240702215804.2201271-12-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 8320cadeb251..882354e1e78f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1120,12 +1120,12 @@ static void *ddebug_proc_next(struct seq_file *m, v= oid *p, loff_t *pos) #define class_in_range(class_id, map) \ (class_id >=3D map->base && class_id < map->base + map->length) =20 -static const char *ddebug_class_name(struct ddebug_iter *iter, struct _dde= bug *dp) +static const char *ddebug_class_name(struct ddebug_table *dt, struct _ddeb= ug *dp) { - struct ddebug_class_map *map =3D iter->table->classes; - int i, nc =3D iter->table->num_classes; + struct ddebug_class_map *map =3D dt->classes; + int i; =20 - for (i =3D 0; i < nc; i++, map++) + for (i =3D 0; i < dt->num_classes; i++, map++) if (class_in_range(dp->class_id, map)) return map->class_names[dp->class_id - map->base]; =20 @@ -1159,7 +1159,7 @@ static int ddebug_proc_show(struct seq_file *m, void = *p) seq_puts(m, "\""); =20 if (dp->class_id !=3D _DPRINTK_CLASS_DFLT) { - class =3D ddebug_class_name(iter, dp); + class =3D ddebug_class_name(iter->table, dp); if (class) seq_printf(m, " class:%s", class); else --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 933683DABF3 for ; Tue, 2 Jul 2024 21:58:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957511; cv=none; b=qtoBtOVUnsJcK+H046ZxknEnE1IGnUfGBdvJOXP7eaOtBgVexDu8xp2rxf2zFBluahYq79/Zhnktbk2TwpblC3n5j/odIy6KMrzx4IVj0xHZpXT+JOMy+kEX3SMwoec+b8MnfbIcsH1jJWbPEfk+7SuKM2NKToxgPJEinOOwfZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957511; c=relaxed/simple; bh=kQpImjRpf3lCUXFxXFVQ9RLQLbMtMWnnOYX/irJ8EJ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SXEGaVylwkU9+4WewDOOSy2GlTkknrLPtwZmhbsBsQJDFh6J53NV93Gy1pVwwAkYenir2+GBtYYQ3voQf+EhWcjQ8XQvUzQ4cgU1lCQbuwXieAICpaebiHJ5ypIX8ovO1mI7qksRB8BCBB8X1xnBh1No8ZPTrAiSMTL+Y+AG4GY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DfvgmzBU; arc=none smtp.client-ip=209.85.166.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DfvgmzBU" Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7ebde93bf79so181721339f.1 for ; Tue, 02 Jul 2024 14:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957509; x=1720562309; darn=vger.kernel.org; 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=LLqcnZIYyHoDNxKwcA/NtHztZqWZ7lBC267I9FzlvwU=; b=DfvgmzBUfYqc/cuIJn+/WNwF0iU60vm5wsHrlyUFAJ4+A0NXUkVgdTsWwW1ebYysQ1 Z8i/h4177/9IqpWEZaepHEW2u0VcVHkiBLd5nKKFtb4UXVK7KXWq/MLLj3LBAep7Kig0 FdtUEei4J7FFOez3f+NAwMF4QY/jo19wiq4zFsZ51dIo/827NlgfHZFZTItN120V5Wl5 tcwhvG7cl7MaiT10PcA2ln9jztsfbum8q8VqaFQ7baVHGgAqtmD6383OPdylFTiZgsye pjLtHY3lJtQcCvU2om9KUR8B4b6gmummK63d0UUNbZttlf4iiIy74QE9JLluaapaEjG8 wvWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957509; x=1720562309; 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=LLqcnZIYyHoDNxKwcA/NtHztZqWZ7lBC267I9FzlvwU=; b=cOTtfHhN+UL12pYOlYXa1A+GPXKD3Ve47w8Gkn6//jkTYCfYw1IO0yvNWQKi1qL1XY yl4DArbOVXqjNs7YUUTul5Ry41BOxOouG8ST24aUqR0KQI9PG8+rzoDZtk4s5qRwZhZB S6t30qfD2sK4i//bMI4lUlySP16dxw794PW1gkGNW4kijmkj8Tf98DwFxDZwV7DGHcHQ hvIh1pdovLqE5JQMHsfl69QFVSholXawx47764XF7duSSzBMj8wzIZaMPPRl7HP390fS XD8BtxIt/LtACSyAb5zX2EO7GwlgwDHwcpXHz9kC1W6puyIrhlGDV7au/TIF8Itiekzw vo3g== X-Gm-Message-State: AOJu0YyDgNklQBVM1AGtzcq6AWosho0V00/YptrYwHrBxv/qmPKHRP5Z JDuMfclNkDjJZurJo3IZ4clI0dwe4/Rs0SDe9dZCJkP9Iz9L8oY1 X-Google-Smtp-Source: AGHT+IEGVNNIZc+H4xshZL2c97eLukzO+VTh9nx0u7xBoOYpjR9heRfhc2y94YMqLVUj1nsH5UD92Q== X-Received: by 2002:a5d:8455:0:b0:7f5:bd0c:b532 with SMTP id ca18e2360f4ac-7f62ed69020mr1001562739f.0.1719957508569; Tue, 02 Jul 2024 14:58:28 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:28 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 12/52] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap Date: Tue, 2 Jul 2024 15:57:02 -0600 Message-ID: <20240702215804.2201271-13-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" old_bits arg is currently a pointer to the input bits, but this could allow inadvertent changes to the input by the fn. Disallow this. And constify new_bits while here. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 882354e1e78f..d4a0ae31d059 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -597,7 +597,8 @@ static int ddebug_exec_queries(char *query, const char = *modname) =20 /* apply a new class-param setting */ static int ddebug_apply_class_bitmap(const struct ddebug_class_param *dcp, - unsigned long *new_bits, unsigned long *old_bits, + const unsigned long *new_bits, + const unsigned long old_bits, const char *query_modname) { #define QUERY_SIZE 128 @@ -606,12 +607,12 @@ static int ddebug_apply_class_bitmap(const struct dde= bug_class_param *dcp, int matches =3D 0; int bi, ct; =20 - if (*new_bits !=3D *old_bits) + if (*new_bits !=3D old_bits) v2pr_info("apply bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, - *old_bits, query_modname ?: "'*'"); + old_bits, query_modname ?: "'*'"); =20 for (bi =3D 0; bi < map->length; bi++) { - if (test_bit(bi, new_bits) =3D=3D test_bit(bi, old_bits)) + if (test_bit(bi, new_bits) =3D=3D test_bit(bi, &old_bits)) continue; =20 snprintf(query, QUERY_SIZE, "class %s %c%s", map->class_names[bi], @@ -623,9 +624,9 @@ static int ddebug_apply_class_bitmap(const struct ddebu= g_class_param *dcp, v2pr_info("bit_%d: %d matches on class: %s -> 0x%lx\n", bi, ct, map->class_names[bi], *new_bits); } - if (*new_bits !=3D *old_bits) + if (*new_bits !=3D old_bits) v2pr_info("applied bitmap: 0x%lx to: 0x%lx for %s\n", *new_bits, - *old_bits, query_modname ?: "'*'"); + old_bits, query_modname ?: "'*'"); =20 return matches; } @@ -681,7 +682,7 @@ static int param_set_dyndbg_classnames(const char *inst= r, const struct kernel_pa continue; } curr_bits ^=3D BIT(cls_id); - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, dcp->bits, NULL); + totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, *dcp->bits, NULL); *dcp->bits =3D curr_bits; v2pr_info("%s: changed bit %d:%s\n", KP_NAME(kp), cls_id, map->class_names[cls_id]); @@ -691,7 +692,7 @@ static int param_set_dyndbg_classnames(const char *inst= r, const struct kernel_pa old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); curr_bits =3D CLASSMAP_BITMASK(cls_id + (wanted ? 1 : 0 )); =20 - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, &old_bits, NULL); + totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, old_bits, NULL); *dcp->lvl =3D (cls_id + (wanted ? 1 : 0)); v2pr_info("%s: changed bit-%d: \"%s\" %lx->%lx\n", KP_NAME(kp), cls_id, map->class_names[cls_id], old_bits, curr_bits); @@ -745,7 +746,7 @@ static int param_set_dyndbg_module_classes(const char *= instr, inrep &=3D CLASSMAP_BITMASK(map->length); } v2pr_info("bits:0x%lx > %s.%s\n", inrep, modnm ?: "*", KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, dcp->bits, modnm); + totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, *dcp->bits, modnm); *dcp->bits =3D inrep; break; case DD_CLASS_TYPE_LEVEL_NUM: @@ -758,7 +759,7 @@ static int param_set_dyndbg_module_classes(const char *= instr, old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); new_bits =3D CLASSMAP_BITMASK(inrep); v2pr_info("lvl:%ld bits:0x%lx > %s\n", inrep, new_bits, KP_NAME(kp)); - totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, &old_bits, modnm); + totct +=3D ddebug_apply_class_bitmap(dcp, &new_bits, old_bits, modnm); *dcp->lvl =3D inrep; break; default: --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCC243DAC12 for ; Tue, 2 Jul 2024 21:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957512; cv=none; b=PQFRKyUWnzoFz1BAIguWup6k5hqQsMg10zjiv6AAlITS4UJMzdlT0g7Dj4p7WMty69pyokoptwMugDoV54LA7Pgun4CSR0bbyG0oprT5aOoZjRm38RYR+fGG15Z4aIE1ykdBIMpb68tYS3Hb/tL200izj0Enm7YcmkhsrhIO1s8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957512; c=relaxed/simple; bh=iJRabDk4n3FOVpiDfU5H29ecoGu4HIZhqD6br1cK+Tc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YzOYbhvWCSw9gtbgI9RwmuQf7EMly5NMpoRnnPKC1KD9O9d6erp7XP9v3JFBayAOe7NosHmdstq0cVpTvsmYYNrUuzQnIS9xWFzLz+wpXuvcGlMyL5dT+oANUh3VM0UX69prmd7DxljBqzNAoi985dsNzTTlq8KgEBF335FMG+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gwIgh2Yy; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gwIgh2Yy" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7f61549406eso180458239f.1 for ; Tue, 02 Jul 2024 14:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957510; x=1720562310; darn=vger.kernel.org; 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=PG0HixeKNGYC1yKqg8pO4K0aUEEvqiNOUzi5OjavD2Q=; b=gwIgh2YyMDZ4uovKxMK09D9HhYprvqN+6ToxttLkP4/rCOAZBo1v68G7Xu7LRkLcOq uujYwe/cEiUXKP4osSQgrwGlVuYQp94OsJ6XZF8IZwCBQ+gghiakmWQ/D31wg9HbPUdl /VUYCxQgqXcDEGyq8KIV8IcnsDXL+iGRzEViqyoFraqrdIRbOBjXWIdUI04KYYBeWJaE Q++WutMeMk7j+gS9Afi5CPQ6vYWls4QpqD+6bemVeX5FxtUzWGO9J2RA5bi4qn5yYO6a nLoR7WeW7UoNg8q/eoaDVesbtubR0tJK88oDuTkah3Rt6CGjLJNrwgm8F+jv46gGRNtR U7YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957510; x=1720562310; 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=PG0HixeKNGYC1yKqg8pO4K0aUEEvqiNOUzi5OjavD2Q=; b=KJydPkJRUvUCWibfN40VNDsbtXQt2prSyMgOOEJit3nIBjqJX+Pau5tvQDi9tq3T2r aGLvEmr8rXhklOEqRboM/SVxUhn1mZn8hl6D/JP3ytbItf5WLSORKyjvrVxAuyT9QZkH SJpxE26tfytBMbqgGgFjkH4mQZ7xJt7GnLgmTOb1I9fzrc8vKRchfcA7oJUY5KcSz2Ic GdUvHf+mcMFaMx9XGNbc0u8RdOHHlr2xOQmlZtMAqVa8ZETNh8xno2yq/W1T1fSzvGBu lIqyWA7FcabiTgHAjpl4QUm/EdkGS3+icJH3/EPQFkKlVd4ZRzx3De6X1c/2krOJsYmT U7bg== X-Gm-Message-State: AOJu0YyNUY7cXiSMHvt3spMW+Ov6tL9/Kvl4o0/JJM4AWIqUmHGXatAJ bPPWQ1w16vQ4C+Cqh116vnjuh9AOYemVO9eloEqBZB1bHnT/ecAR X-Google-Smtp-Source: AGHT+IHFxJvBXIHq5LZcv20uJ1NKUAM88ZngYdPTVnyFhFGhwG7OwIeFbtlBvY1gNg2J1W/h7jPgdQ== X-Received: by 2002:a05:6602:2be1:b0:7f6:1b3a:437b with SMTP id ca18e2360f4ac-7f62ee79e9emr1172631339f.17.1719957509908; Tue, 02 Jul 2024 14:58:29 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:29 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 13/52] dyndbg: reduce verbose=3 messages in ddebug_add_module Date: Tue, 2 Jul 2024 15:57:03 -0600 Message-ID: <20240702215804.2201271-14-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When modprobing a module, dyndbg currently logs/says "add-module", and then "skipping" if the module has no prdbgs. Instead just check 1st and return quietly. no functional change Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index d4a0ae31d059..43a8e04b8599 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1245,11 +1245,10 @@ static int ddebug_add_module(struct _ddebug_info *d= i, const char *modname) { struct ddebug_table *dt; =20 - v3pr_info("add-module: %s.%d sites\n", modname, di->num_descs); - if (!di->num_descs) { - v3pr_info(" skip %s\n", modname); + if (!di->num_descs) return 0; - } + + v3pr_info("add-module: %s %d sites\n", modname, di->num_descs); =20 dt =3D kzalloc(sizeof(*dt), GFP_KERNEL); if (dt =3D=3D NULL) { --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0725C17A593 for ; Tue, 2 Jul 2024 21:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957513; cv=none; b=bzIYv+Q/J+YWmtDLlvGhI9XiEPB5JM9SWcD49ajqHaxJFy6pfRj6dPzwCwbK9KnLmDvS5hVzkRRGGIgH7mG0krXqoRQahaIgLAm0G/QZcgwbbrugomd4wyeidBXxUAukEyGaGjsMBi0YtwgZEf9gmKI/dAuq55vJ/RVnjpcliuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957513; c=relaxed/simple; bh=KPHOJ2qx6gGP5/Xl6BQs20zrj9CytMjjZ8zgDxhl38g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eQGL6dubFaP17WNvAwkSZo+J/O78eWda05g3AKwlr5yLLw0CTJw90Axez/BaAmtTeAuKWyupKTYElMi70CKU/mu03LYcY4yAqRDWHXLdXzjitIE2eSY3nErR+2X9ZhAqKERtD1Dai9lNAtiTlGmNLcPBDR7ahaaUvstxPh79yBI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ELkjQzpQ; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ELkjQzpQ" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7f64f66fdd7so60607939f.0 for ; Tue, 02 Jul 2024 14:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957511; x=1720562311; darn=vger.kernel.org; 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=J1gI7qbjco2HRqZ8ZV0ffH9ED0+rFoWzKWM8P+jI2qo=; b=ELkjQzpQ6AL44o6H8LRsRMybRux66HHDjYCmmJMAb5HDy3QRM1Jwh+kihckshbEvfe EOuNGz5F3Gl1EulIyWEhL6JQU1QhInvIrWv7faUHIpVzNy6tOpYBUM5yaxRV3MnVNTz/ EoBHJFBhLIuPFQD2IjZVI1401jl78hDqsrSZPhMAKQcEhnEvLy3h1V1pr68JPcfO+IBt b6iKf1NFchsS9QDf7VKv5dJ5ZmHLHvpztgZYTa8bYpuV845xqu2PslyRE/lJFI+c4Rov 33YFIwC6zwIzyiZnoN74Jm34amA94p6CP71C1n9rGc726bxIZVHcSGnzLVkuOrD/2mUm CD1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957511; x=1720562311; 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=J1gI7qbjco2HRqZ8ZV0ffH9ED0+rFoWzKWM8P+jI2qo=; b=A+rh3h0Dn8bZ1EkyC20zoziNhwwEW3tvt3OrhikKaQrafydpHWC8RlXnXFo29PU75z LoAm7nJBpeTmr31QrDpJJdGrfJZTMLJoe0lneDmKsOPAJG697KMiBaW8p6MHpWm2VCKS 2dOxyyb9zXsQKX3IKWtdui1S2q6Ay4JEM4NtmdR7vrufiQunMxXk2mC1HlWqHaY330eW mUhDBUZ0GjuePj93JKd69z565/XqMWvuEI9AaVNHSamz2jkNfaj3/ZluzW75DjSfGz0D v5bydqIRlmlZm4VwbTXI/bw/GPnyv/zVnPSzE+8PSuVtru9i5GV/eRcwv6X7Q55la4iM j46g== X-Gm-Message-State: AOJu0YyVzHVJzPqyg525gv3LUuDET18aq9Vm3UiJFWZH6+IyVfVE5RSa mgeLtxbJhDLWrvS1ginnPEEgiTDwJfxt6xvnE5vOboct9ObfYwi4 X-Google-Smtp-Source: AGHT+IFQTY3k1juHbCCDKTSISOGes+jEb4muHARPPIzMJ17rPyweK6Ni9b6oleGGUS/Q+0AyDyIW7w== X-Received: by 2002:a05:6602:600d:b0:7f6:5035:1826 with SMTP id ca18e2360f4ac-7f650351c42mr444680339f.11.1719957510990; Tue, 02 Jul 2024 14:58:30 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:30 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 14/52] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code Date: Tue, 2 Jul 2024 15:57:04 -0600 Message-ID: <20240702215804.2201271-15-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove the NAMED class types; these 2 classmap types accept class names at the PARAM interface, for example: echo +DRM_UT_CORE,-DRM_UT_KMS > /sys/module/drm/parameters/debug_names The code works, but its only used by test-dynamic-debug, and wasn't asked for by anyone else, so reduce test-surface, simplify things. also rename enum class_map_type to enum ddebug_class_map_type. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- include/linux/dynamic_debug.h | 23 ++------ lib/dynamic_debug.c | 102 +++------------------------------- lib/test_dynamic_debug.c | 26 --------- 3 files changed, 14 insertions(+), 137 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 8116d0a0d33a..dd304e231f08 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -58,27 +58,16 @@ struct _ddebug { #endif } __attribute__((aligned(8))); =20 -enum class_map_type { +enum ddebug_class_map_type { DD_CLASS_TYPE_DISJOINT_BITS, /** - * DD_CLASS_TYPE_DISJOINT_BITS: classes are independent, one per bit. - * expecting hex input. Built for drm.debug, basis for other types. + * DD_CLASS_TYPE_DISJOINT_BITS: classes are independent, mapped to bits[0= ..N]. + * Expects hex input. Built for drm.debug, basis for other types. */ DD_CLASS_TYPE_LEVEL_NUM, /** - * DD_CLASS_TYPE_LEVEL_NUM: input is numeric level, 0-N. - * N turns on just bits N-1 .. 0, so N=3D0 turns all bits off. - */ - DD_CLASS_TYPE_DISJOINT_NAMES, - /** - * DD_CLASS_TYPE_DISJOINT_NAMES: input is a CSV of [+-]CLASS_NAMES, - * classes are independent, like _DISJOINT_BITS. - */ - DD_CLASS_TYPE_LEVEL_NAMES, - /** - * DD_CLASS_TYPE_LEVEL_NAMES: input is a CSV of [+-]CLASS_NAMES, - * intended for names like: INFO,DEBUG,TRACE, with a module prefix - * avoid EMERG,ALERT,CRIT,ERR,WARNING: they're not debug + * DD_CLASS_TYPE_LEVEL_NUM: input is numeric level, 0..N. + * Input N turns on bits 0..N-1 */ }; =20 @@ -88,7 +77,7 @@ struct ddebug_class_map { const char **class_names; const int length; const int base; /* index of 1st .class_id, allows split/shared space */ - enum class_map_type map_type; + enum ddebug_class_map_type map_type; }; =20 /** diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 43a8e04b8599..d5701207febc 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -636,76 +636,6 @@ static int ddebug_apply_class_bitmap(const struct ddeb= ug_class_param *dcp, =20 #define CLASSMAP_BITMASK(width) ((1UL << (width)) - 1) =20 -/* accept comma-separated-list of [+-] classnames */ -static int param_set_dyndbg_classnames(const char *instr, const struct ker= nel_param *kp) -{ - const struct ddebug_class_param *dcp =3D kp->arg; - const struct ddebug_class_map *map =3D dcp->map; - unsigned long curr_bits, old_bits; - char *cl_str, *p, *tmp; - int cls_id, totct =3D 0; - bool wanted; - - cl_str =3D tmp =3D kstrdup_and_replace(instr, '\n', '\0', GFP_KERNEL); - if (!tmp) - return -ENOMEM; - - /* start with previously set state-bits, then modify */ - curr_bits =3D old_bits =3D *dcp->bits; - vpr_info("\"%s\" > %s:0x%lx\n", cl_str, KP_NAME(kp), curr_bits); - - for (; cl_str; cl_str =3D p) { - p =3D strchr(cl_str, ','); - if (p) - *p++ =3D '\0'; - - if (*cl_str =3D=3D '-') { - wanted =3D false; - cl_str++; - } else { - wanted =3D true; - if (*cl_str =3D=3D '+') - cl_str++; - } - cls_id =3D match_string(map->class_names, map->length, cl_str); - if (cls_id < 0) { - pr_err("%s unknown to %s\n", cl_str, KP_NAME(kp)); - continue; - } - - /* have one or more valid class_ids of one *_NAMES type */ - switch (map->map_type) { - case DD_CLASS_TYPE_DISJOINT_NAMES: - /* the +/- pertains to a single bit */ - if (test_bit(cls_id, &curr_bits) =3D=3D wanted) { - v3pr_info("no change on %s\n", cl_str); - continue; - } - curr_bits ^=3D BIT(cls_id); - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, *dcp->bits, NULL); - *dcp->bits =3D curr_bits; - v2pr_info("%s: changed bit %d:%s\n", KP_NAME(kp), cls_id, - map->class_names[cls_id]); - break; - case DD_CLASS_TYPE_LEVEL_NAMES: - /* cls_id =3D N in 0..max. wanted +/- determines N or N-1 */ - old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); - curr_bits =3D CLASSMAP_BITMASK(cls_id + (wanted ? 1 : 0 )); - - totct +=3D ddebug_apply_class_bitmap(dcp, &curr_bits, old_bits, NULL); - *dcp->lvl =3D (cls_id + (wanted ? 1 : 0)); - v2pr_info("%s: changed bit-%d: \"%s\" %lx->%lx\n", KP_NAME(kp), cls_id, - map->class_names[cls_id], old_bits, curr_bits); - break; - default: - pr_err("illegal map-type value %d\n", map->map_type); - } - } - kfree(tmp); - vpr_info("total matches: %d\n", totct); - return 0; -} - static int param_set_dyndbg_module_classes(const char *instr, const struct kernel_param *kp, const char *modnm) @@ -714,29 +644,17 @@ static int param_set_dyndbg_module_classes(const char= *instr, const struct ddebug_class_map *map =3D dcp->map; unsigned long inrep, new_bits, old_bits; int rc, totct =3D 0; - - switch (map->map_type) { - - case DD_CLASS_TYPE_DISJOINT_NAMES: - case DD_CLASS_TYPE_LEVEL_NAMES: - /* handle [+-]classnames list separately, we are done here */ - return param_set_dyndbg_classnames(instr, kp); - - case DD_CLASS_TYPE_DISJOINT_BITS: - case DD_CLASS_TYPE_LEVEL_NUM: - /* numeric input, accept and fall-thru */ - rc =3D kstrtoul(instr, 0, &inrep); - if (rc) { - pr_err("expecting numeric input: %s > %s\n", instr, KP_NAME(kp)); - return -EINVAL; - } - break; - default: - pr_err("%s: bad map type: %d\n", KP_NAME(kp), map->map_type); + char *nl; + + rc =3D kstrtoul(instr, 0, &inrep); + if (rc) { + nl =3D strchr(instr, '\n'); + if (nl) + *nl =3D '\0'; + pr_err("expecting numeric input, not: %s > %s\n", instr, KP_NAME(kp)); return -EINVAL; } =20 - /* only _BITS,_NUM (numeric) map-types get here */ switch (map->map_type) { case DD_CLASS_TYPE_DISJOINT_BITS: /* expect bits. mask and warn if too many */ @@ -801,12 +719,8 @@ int param_get_dyndbg_classes(char *buffer, const struc= t kernel_param *kp) const struct ddebug_class_map *map =3D dcp->map; =20 switch (map->map_type) { - - case DD_CLASS_TYPE_DISJOINT_NAMES: case DD_CLASS_TYPE_DISJOINT_BITS: return scnprintf(buffer, PAGE_SIZE, "0x%lx\n", *dcp->bits); - - case DD_CLASS_TYPE_LEVEL_NAMES: case DD_CLASS_TYPE_LEVEL_NUM: return scnprintf(buffer, PAGE_SIZE, "%ld\n", *dcp->lvl); default: diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index a01f0193a419..9e950a911b6c 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -74,13 +74,6 @@ DECLARE_DYNDBG_CLASSMAP(map_disjoint_bits, DD_CLASS_TYPE= _DISJOINT_BITS, 0, DD_SYS_WRAP(disjoint_bits, p); DD_SYS_WRAP(disjoint_bits, T); =20 -/* symbolic input, independent bits */ -enum cat_disjoint_names { LOW =3D 10, MID, HI }; -DECLARE_DYNDBG_CLASSMAP(map_disjoint_names, DD_CLASS_TYPE_DISJOINT_NAMES, = 10, - "LOW", "MID", "HI"); -DD_SYS_WRAP(disjoint_names, p); -DD_SYS_WRAP(disjoint_names, T); - /* numeric verbosity, V2 > V1 related */ enum cat_level_num { V0 =3D 14, V1, V2, V3, V4, V5, V6, V7 }; DECLARE_DYNDBG_CLASSMAP(map_level_num, DD_CLASS_TYPE_LEVEL_NUM, 14, @@ -88,13 +81,6 @@ DECLARE_DYNDBG_CLASSMAP(map_level_num, DD_CLASS_TYPE_LEV= EL_NUM, 14, DD_SYS_WRAP(level_num, p); DD_SYS_WRAP(level_num, T); =20 -/* symbolic verbosity */ -enum cat_level_names { L0 =3D 22, L1, L2, L3, L4, L5, L6, L7 }; -DECLARE_DYNDBG_CLASSMAP(map_level_names, DD_CLASS_TYPE_LEVEL_NAMES, 22, - "L0", "L1", "L2", "L3", "L4", "L5", "L6", "L7"); -DD_SYS_WRAP(level_names, p); -DD_SYS_WRAP(level_names, T); - /* stand-in for all pr_debug etc */ #define prdbg(SYM) __pr_debug_cls(SYM, #SYM " msg\n") =20 @@ -102,10 +88,6 @@ static void do_cats(void) { pr_debug("doing categories\n"); =20 - prdbg(LOW); - prdbg(MID); - prdbg(HI); - prdbg(D2_CORE); prdbg(D2_DRIVER); prdbg(D2_KMS); @@ -129,14 +111,6 @@ static void do_levels(void) prdbg(V5); prdbg(V6); prdbg(V7); - - prdbg(L1); - prdbg(L2); - prdbg(L3); - prdbg(L4); - prdbg(L5); - prdbg(L6); - prdbg(L7); } =20 static void do_prints(void) --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FA3417A5B3 for ; Tue, 2 Jul 2024 21:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957516; cv=none; b=lpfIsbGqACvwdgeOF2e2nhAg+upxO6ToSIYTt6ZCjsgVOMkEmgagdzzC5a37uQ6kOXkMZSWCReP2lGMya/kYJkfIz2I/rYEZ6ZRa1mIlnf+VgprJapIqfQEHgYcXr90EvCZ9vIoqc7IH2IOHN+CDQ2PFYEl/ajOwZIFZ9vOTWWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957516; c=relaxed/simple; bh=ORboH71tzHU7CnNmDu7BhWRBkgzlqgglHiXKXSzgJkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qL+Hmel0uGFOHjClmYB4Gcykzhr5w6d87zjiMkyznL/FbhfwSLoKykbTL/eslymbEaM5FQ2TlvzxJgqkPyspv1WBQb40FO+tW6H7angwrjhs4lzgcnHTj8Gyhe4HVyQwSrN4UBr+TcN2+H6l+lOTXCm9Ezn8FCrWfJwzShI1Wlk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D+e8XWYa; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D+e8XWYa" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f63db7a69cso142335239f.2 for ; Tue, 02 Jul 2024 14:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957513; x=1720562313; darn=vger.kernel.org; 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=+nJakz52Sv/CtSZEYJn6GwOFm1g7btzQOY0AED19SRE=; b=D+e8XWYapLy2cVQ/M9QvNr/rDtI0yP9IGl+87RnU4c9qBPpacLEzeTWWCw8gSjScZm z7gIwAfznWB4vntJbUFvDULOWkhSzK82apiQ0OPtgAtzXPxiTBgOvnxdZPSvr/9DeRDJ 7yFuqzrex/LZ43a82DUYQpgwnHHtmPeapX3FOb/Yj5LF+vSRXWy5VJRcX9rLaU8HUdSg mTC+v9mGRYY1tmm9kbvn/HFr2vMu00GHjpMavhqLKFHbWYCG3trX9bU6MgD5qXqv+4ex Sp+I/q6dMsVGLY3EbKIdwMk3YArYdrgGkwI6Ic3l0FecCfuy5HJBZd9Rx/udCankf+6J KVFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957513; x=1720562313; 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=+nJakz52Sv/CtSZEYJn6GwOFm1g7btzQOY0AED19SRE=; b=LTX4zK97fA2jzhakc3UfRy8slY7n9wJHIN/eZxNiWjXtEH+WQaGab5xmmSqvFKuRFQ JdmxnGdZq7J7dl3046PmkpPKVO6Yt90eBqd1O/XQVTDXif+14gC67VeYCMLfz3r6wJtA /bIjIXdiBi8youPH5S1X66qmU15DOTbb3a7oigoaFKEbLSP5brp72mMfI9HeQg1F/VjL 9WD7C8j6/t6fXTSn4BDc0yede0OgenGQSPzjnGE5eXakOV3q+IEj75mEcXcFaFOfC0u2 qsFHrHJZPnSUJnTjmn9tgPW8YuAkxJh0FO6y5u3M8e9BtQ3yifhGp8IAexNSJtZCzapl CJZg== X-Gm-Message-State: AOJu0YzRFApkFzq8Zgu4esxricel5wxcpcCICRZYVaTsDMdHEwgL2Onw 8Ubwq/ph1j/kYeTMoGVDLP2KvsIILHIGeV7N9DD9Ofa6gnt+ZmIyrnylnw== X-Google-Smtp-Source: AGHT+IEuZy8Vgv5b+bOzfhyaySOnrkgTu3wLlzeOEen4503I5cIUNiME/kSyynp7tQIoWK1m30ED8g== X-Received: by 2002:a6b:dd12:0:b0:7f6:1ec3:a107 with SMTP id ca18e2360f4ac-7f62ee7a0d7mr1187913439f.18.1719957512586; Tue, 02 Jul 2024 14:58:32 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:31 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 15/52] dyndbg-API: fix DECLARE_DYNDBG_CLASSMAP Date: Tue, 2 Jul 2024 15:57:05 -0600 Message-ID: <20240702215804.2201271-16-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" DECLARE_DYNDBG_CLASSMAP() has a design error; its usage fails a basic K&R rule: "define once, refer many times". It is used across DRM core & drivers, each use re-defines the classmap understood by that module; and all must match for the modules to respond together when DRM.debug categories are enabled. This is brittle; a maintenance foot-gun. Worse, it causes the CONFIG_DRM_USE_DYNAMIC_DEBUG=3DY regression; 1st drm.ko loads, and dyndbg initializes its DRM.debug callsites, then a drm-driver loads, but too late - it missed the DRM.debug enablement. So replace it with 2 macros: DYNDBG_CLASSMAP_DEFINE - invoked once from core - drm.ko DYNDBG_CLASSMAP_USE - from all drm drivers and helpers. DYNDBG_CLASSMAP_DEFINE: it reuses a renamed DECLARE_DYNDBG_CLASSMAP to construct the struct classmap variable, but it drops the static qualifier, and exports it instead. DYNDBG_CLASSMAP_USE: then refers to the exported var by name: * used from drivers, helper-mods * lets us drop the repetitive "classname" args * fixes 2nd-defn problem * creates a ddebug_class_user record in new __dyndbg_class_users section this allows ddebug_add_module(etal) to handle them per-module. DECLARE_DYNDBG_CLASSMAP is preserved temporarily, to decouple DRM adaptation work and avoid compile-errs before its done. IOW, DRM gets fixed when they commit the adopt-new-api patches. The DEFINE,USE distinction, and the separate classmap-use record, allows dyndbg to initialize the driver's & helper's DRM.debug callsites separately after each is modprobed. Basically, the classmap init-scan repeated for classmap-users. To review, dyndbg's existing __dyndbg_classes[] section does: . catalogs the classmaps defined by a module (or builtin modules) . tells dyndbg the module has class'd prdbgs, allowing >control . DYNDBG_CLASSMAP_DEFINE creates classmaps in this section. This patch adds __dyndbg_class_users[] section: . catalogs uses/references to the classmap definitions. . authorizes dyndbg to >control those class'd prdbgs in ref'g module. . DYNDBG_CLASSMAP_USE() creates classmap-user records in this new section. Now ddebug_add_module(etal) can handle classmap-uses similar to (and after) classmaps; when a dependent module is loaded, if it has classmap-uses (to a classmap-def in another module), that module's kernel params are scanned to find if it has a kparam that is wired to dyndbg's param-ops, and whose classmap is the one being ref'd. To support this, theres a few data/header changes: new struct ddebug_class_user contains: user-module-name, &classmap-defn it records drm-driver's use of a classmap in the section, allowing lookup struct ddebug_info gets 2 more fields to keep the new section with the othe= rs: class_users, num_class_users. set by dynamic_debug_init() for builtins. or by kernel/module/main:load_info() for loadable modules. vmlinux.lds.h: new BOUNDED_SECTION for __dyndbg_class_users dynamic_debug.c has 2 changes in ddebug_add_module(), ddebug_change(): ddebug_add_module() already calls ddebug_attach_module_classes() to handle classmaps DEFINEd by a module, now it also calls ddebug_attach_user_module_classes() to handle USEd classmaps. To avoid this work when possible, 1st scan the module's descriptors and count the number of class'd pr_debugs. ddebug_attach_user_module_classes() scans the module's class_users section, follows the refs to the parent's classmap, and calls ddebug_apply_params() on each. It also avoids work by checking the module's class-ct. ddebug_apply_params(new fn): It scans module's/builtin kernel-params, calls ddebug_match_apply_kparam for each to find the params/sysfs-nodes which may be wired to a classmap. ddebug_match_apply_kparam(new fn): 1st, it tests the kernel-param.ops is dyndbg's; this guarantees that the attached arg is a struct ddebug_class_param, which has a ref to the param's state, and to the classmap defining the param's handling. 2nd, it requires that the classmap ref'd by the kparam is the one we're called for; modules can use many separate classmaps (as test_dynamic_debug does). Then apply the "parent" kparam's setting to the dependent module, using ddebug_apply_class_bitmap(). ddebug_change(and callees) also gets adjustments: ddebug_find_valid_class(): This does a search over the module's classmaps, looking for the class FOO echo'd to >control. So now it searches over __dyndbg_class_users[] after __dyndbg_classes[]. ddebug_class_name(): return class-names for defined AND used classes. test_dynamic_debug.c, test_dynamic_debug_submod.c: This demonstrates the 2 types of classmaps & sysfs-params, following the 4-part recipe: 1. define an enum for the classmap: DRM.debug has DRM_UT_{CORE,KMS,...} multiple classes must share 0-62 classid space. 2. DYNDBG_CLASSMAP_DEFINE(.. DRM_UT_{CORE,KMS,...}) 3. DYNDBG_CLASSMAP_PARAM* (classmap) 4. DYNDBG_CLASSMAP_USE() by _submod only, skipping 2,3 Move all the enum declarations together, to better explain how they share the 0..62 class-id space available to a module (non-overlapping subranges). reorg macros 2,3 by name. This gives a tabular format, making it easy to see the pattern of repetition, and the points of change. And extend the test to replicate the 2-module (parent & dependent) scenario which caused the CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy regression seen in drm & drivers. The _submod.c is a 2-line file: #define _SUBMOD, #include parent. This gives identical complements of prdbgs in parent & _submod, and thus identical print behavior when all of: >control, >params, and parent->_submod propagation are working correctly. It also puts all the parent/_submod declarations together in the same source, with the new ifdef _SUBMOD block invoking DYNDBG_CLASSMAP_USE for the 2 test-interfaces. I think this is clearer. These 2 modules are both tristate, allowing 3 super/sub combos: Y/Y, Y/M, M/M (not N/N). Y/Y testing exposed a missing __align(8) in the _METADATA macro, which M/M didn't see because the module-loader memory placement constrains it instead. DEBUG details: ``#define DEBUG`` in src enables all pr_debugs after it, including any class'd pr_debugs; its not necessarily all-or-nothing, unless you do the define in a header. Also, the only way to disable a class'd pr_debug is via the classmap-kparam or using "class foo" in control queries, to address the classes by name. NB: this patch ignores a checkpatch do-while warning; which is wrong for declarative macros like these: arch/powerpc/platforms/cell/spu_base.c 48:static DEFINE_SPINLOCK(spu_lock); 62:static DEFINE_SPINLOCK(spu_full_list_lock); 63:static DEFINE_MUTEX(spu_full_list_mutex); Fixes: aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- v8 - split drm parts to separate commits. preserve DECLARE_DYNDBG_CLASSMAP to decouple DRM, no flag day. fixup block comment v7 - previous submission-blocking bug: missing __align(8) in DYNAMIC_DEBUG_DECLARE_METADATA on ddebug_class_user caused corrupt records, but only for builtin modules; module loader code probably pinned allocations to the right alignment naturally, hiding the bug for typical builds. v6- get rid of WARN_ON_ONCE v?- fix _var expanded 2x in macro --- MAINTAINERS | 2 +- include/asm-generic/vmlinux.lds.h | 1 + include/linux/dynamic_debug.h | 62 ++++++++-- kernel/module/main.c | 3 + lib/Kconfig.debug | 24 +++- lib/Makefile | 3 + lib/dynamic_debug.c | 184 ++++++++++++++++++++++++++---- lib/test_dynamic_debug.c | 111 ++++++++++++------ lib/test_dynamic_debug_submod.c | 10 ++ 9 files changed, 332 insertions(+), 68 deletions(-) create mode 100644 lib/test_dynamic_debug_submod.c diff --git a/MAINTAINERS b/MAINTAINERS index 28e20975c26f..c9ed48109ff5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7526,7 +7526,7 @@ M: Jim Cromie S: Maintained F: include/linux/dynamic_debug.h F: lib/dynamic_debug.c -F: lib/test_dynamic_debug.c +F: lib/test_dynamic_debug*.c =20 DYNAMIC INTERRUPT MODERATION M: Tal Gilboa diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index f7749d0f2562..f1d8e64b244c 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -365,6 +365,7 @@ /* implement dynamic printk debug */ \ . =3D ALIGN(8); \ BOUNDED_SECTION_BY(__dyndbg_classes, ___dyndbg_classes) \ + BOUNDED_SECTION_BY(__dyndbg_class_users, ___dyndbg_class_users) \ BOUNDED_SECTION_BY(__dyndbg, ___dyndbg) \ LIKELY_PROFILE() \ BRANCH_PROFILE() \ diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index dd304e231f08..2c6944c0d6cd 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -72,8 +72,8 @@ enum ddebug_class_map_type { }; =20 struct ddebug_class_map { - struct module *mod; - const char *mod_name; /* needed for builtins */ + const struct module *mod; /* NULL for builtins */ + const char *mod_name; const char **class_names; const int length; const int base; /* index of 1st .class_id, allows split/shared space */ @@ -81,11 +81,34 @@ struct ddebug_class_map { }; =20 /** - * DECLARE_DYNDBG_CLASSMAP - declare classnames known by a module - * @_var: a struct ddebug_class_map, passed to module_param_cb - * @_type: enum class_map_type, chooses bits/verbose, numeric/symbolic - * @_base: offset of 1st class-name. splits .class_id space - * @classes: class-names used to control class'd prdbgs + * DYNDBG_CLASSMAP_DEFINE - define a set of debug-classes used by a module. + * @_var: name of the classmap, exported for other modules coordinated u= se. + * @_type: enum ddebug_class_map_type, chooses bits/verbose, numeric/name= s. + * @_base: offset of 1st class-name, used to share 0..62 classid space + * @classes: vals are stringified enum-vals, like DRM_UT_* + * + * Defines and exports a struct ddebug_class_map whose @classes are + * used to validate a "class FOO .." >control command on the module + */ +#define __DYNDBG_CLASSMAP_DEFINE(_var, _maptype, _base, ...) \ + const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ + struct ddebug_class_map __aligned(8) __used \ + __section("__dyndbg_classes") _var =3D { \ + .mod =3D THIS_MODULE, \ + .mod_name =3D KBUILD_MODNAME, \ + .base =3D _base, \ + .map_type =3D _maptype, \ + .length =3D ARRAY_SIZE(_var##_classnames), \ + .class_names =3D _var##_classnames, \ + } +#define DYNDBG_CLASSMAP_DEFINE(_var, ...) \ + __DYNDBG_CLASSMAP_DEFINE(_var, __VA_ARGS__); \ + EXPORT_SYMBOL(_var) + +/* + * XXX: keep this until DRM adapts to use the DEFINE/USE api, it + * differs from __DYNDBG_CLASSMAP_DEFINE only in the static on the + * struct decl. */ #define DECLARE_DYNDBG_CLASSMAP(_var, _maptype, _base, ...) \ static const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ @@ -99,12 +122,37 @@ struct ddebug_class_map { .class_names =3D _var##_classnames, \ } =20 +struct ddebug_class_user { + char *user_mod_name; + struct ddebug_class_map *map; +}; + +/** + * DYNDBG_CLASSMAP_USE - refer to a classmap, DEFINEd elsewhere. + * @_var: name of the exported classmap var + * + * This registers a module's use of another module's classmap defn, so + * dyndbg can authorize "class DRM_CORE ..." >control commands upon + * this module. + */ +#define DYNDBG_CLASSMAP_USE(_var) \ + DYNDBG_CLASSMAP_USE_(_var, __UNIQUE_ID(ddebug_class_user)) +#define DYNDBG_CLASSMAP_USE_(_var, _uname) \ + extern struct ddebug_class_map _var; \ + static struct ddebug_class_user __aligned(8) __used \ + __section("__dyndbg_class_users") _uname =3D { \ + .user_mod_name =3D KBUILD_MODNAME, \ + .map =3D &(_var), \ + } + /* encapsulate linker provided built-in (or module) dyndbg data */ struct _ddebug_info { struct _ddebug *descs; struct ddebug_class_map *classes; + struct ddebug_class_user *class_users; unsigned int num_descs; unsigned int num_classes; + unsigned int num_class_users; }; =20 struct ddebug_class_param { diff --git a/kernel/module/main.c b/kernel/module/main.c index e1e8a7a9d6c1..9f7ce0f0e6e5 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2217,6 +2217,9 @@ static int find_module_sections(struct module *mod, s= truct load_info *info) mod->dyndbg_info.classes =3D section_objs(info, "__dyndbg_classes", sizeof(*mod->dyndbg_info.classes), &mod->dyndbg_info.num_classes); + mod->dyndbg_info.class_users =3D section_objs(info, "__dyndbg_class_users= ", + sizeof(*mod->dyndbg_info.class_users), + &mod->dyndbg_info.num_class_users); #endif =20 return 0; diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 291185f54ee4..16288bdaa944 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2797,12 +2797,26 @@ config TEST_STATIC_KEYS If unsure, say N. =20 config TEST_DYNAMIC_DEBUG - tristate "Test DYNAMIC_DEBUG" - depends on DYNAMIC_DEBUG + tristate "Build test-dynamic-debug module" + depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE help - This module registers a tracer callback to count enabled - pr_debugs in a 'do_debugging' function, then alters their - enablements, calls the function, and compares counts. + This module exercises/demonstrates dyndbg's classmap API, by + creating 2 classes: a DISJOINT classmap (supporting DRM.debug) + and a LEVELS/VERBOSE classmap (like verbose2 > verbose1). + + If unsure, say N. + +config TEST_DYNAMIC_DEBUG_SUBMOD + tristate "Build test-dynamic-debug submodule" + default m + depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE + depends on TEST_DYNAMIC_DEBUG + help + This sub-module uses a classmap defined and exported by the + parent module, recapitulating drm & driver's shared use of + drm.debug to control enabled debug-categories. + It is tristate, independent of parent, to allow testing all + proper combinations of parent=3Dy/m submod=3Dy/m. =20 If unsure, say N. =20 diff --git a/lib/Makefile b/lib/Makefile index ffc6b2341b45..d3e6a48f202b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -82,6 +82,7 @@ obj-$(CONFIG_TEST_USER_COPY) +=3D test_user_copy.o obj-$(CONFIG_TEST_STATIC_KEYS) +=3D test_static_keys.o obj-$(CONFIG_TEST_STATIC_KEYS) +=3D test_static_key_base.o obj-$(CONFIG_TEST_DYNAMIC_DEBUG) +=3D test_dynamic_debug.o +obj-$(CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD) +=3D test_dynamic_debug_submod.o obj-$(CONFIG_TEST_PRINTF) +=3D test_printf.o obj-$(CONFIG_TEST_SCANF) +=3D test_scanf.o =20 @@ -240,6 +241,8 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) +=3D syscall.o obj-$(CONFIG_DYNAMIC_DEBUG_CORE) +=3D dynamic_debug.o #ensure exported functions have prototypes CFLAGS_dynamic_debug.o :=3D -DDYNAMIC_DEBUG_MODULE +CFLAGS_test_dynamic_debug.o :=3D -DDYNAMIC_DEBUG_MODULE +CFLAGS_test_dynamic_debug_submod.o :=3D -DDYNAMIC_DEBUG_MODULE =20 obj-$(CONFIG_SYMBOLIC_ERRNAME) +=3D errname.o =20 diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index d5701207febc..9150e0e5145f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -43,13 +43,16 @@ extern struct _ddebug __start___dyndbg[]; extern struct _ddebug __stop___dyndbg[]; extern struct ddebug_class_map __start___dyndbg_classes[]; extern struct ddebug_class_map __stop___dyndbg_classes[]; +extern struct ddebug_class_user __start___dyndbg_class_users[]; +extern struct ddebug_class_user __stop___dyndbg_class_users[]; =20 struct ddebug_table { struct list_head link; const char *mod_name; struct _ddebug *ddebugs; struct ddebug_class_map *classes; - unsigned int num_ddebugs, num_classes; + struct ddebug_class_user *class_users; + unsigned int num_ddebugs, num_classes, num_class_users; }; =20 struct ddebug_query { @@ -148,21 +151,39 @@ static void vpr_info_dq(const struct ddebug_query *qu= ery, const char *msg) query->first_lineno, query->last_lineno, query->class_string); } =20 +#define vpr_dt_info(dt_p, msg_p, ...) ({ \ + struct ddebug_table const *_dt =3D dt_p; \ + v2pr_info(msg_p " module:%s nd:%d nc:%d nu:%d\n", ##__VA_ARGS__, \ + _dt->mod_name, _dt->num_ddebugs, _dt->num_classes, \ + _dt->num_class_users); \ + }) + #define __outvar /* filled by callee */ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_tabl= e const *dt, const char *class_string, __outvar int *class_id) { struct ddebug_class_map *map; + struct ddebug_class_user *cli; int i, idx; =20 - for (map =3D dt->classes, i =3D 0; i < dt->num_classes; i++, map++) { + for (i =3D 0, map =3D dt->classes; i < dt->num_classes; i++, map++) { idx =3D match_string(map->class_names, map->length, class_string); if (idx >=3D 0) { *class_id =3D idx + map->base; + vpr_dt_info(dt, "good-class: %s.%s ", map->mod_name, class_string); return map; } } + for (i =3D 0, cli =3D dt->class_users; i < dt->num_class_users; i++, cli+= +) { + idx =3D match_string(cli->map->class_names, cli->map->length, class_stri= ng); + if (idx >=3D 0) { + *class_id =3D idx + cli->map->base; + vpr_dt_info(dt, "class-ref: %s.%s ", + cli->user_mod_name, class_string); + return cli->map; + } + } *class_id =3D -ENOENT; return NULL; } @@ -559,7 +580,7 @@ static int ddebug_exec_query(char *query_string, const = char *modname) =20 /* handle multiple queries in query string, continue on error, return last error or number of matching callsites. Module name is either - in param (for boot arg) or perhaps in query string. + in the modname arg (for boot args) or perhaps in query string. */ static int ddebug_exec_queries(char *query, const char *modname) { @@ -688,12 +709,12 @@ static int param_set_dyndbg_module_classes(const char= *instr, } =20 /** - * param_set_dyndbg_classes - class FOO >control + * param_set_dyndbg_classes - set all classes in a classmap * @instr: string echo>d to sysfs, input depends on map_type - * @kp: kp->arg has state: bits/lvl, map, map_type + * @kp: kp->arg has state: bits/lvl, classmap, map_type * - * Enable/disable prdbgs by their class, as given in the arguments to - * DECLARE_DYNDBG_CLASSMAP. For LEVEL map-types, enforce relative + * For all classes in the classmap, enable/disable them per the input + * (depending on map_type). For LEVEL map-types, enforce relative * levels by bitpos. * * Returns: 0 or <0 if error. @@ -1038,12 +1059,17 @@ static void *ddebug_proc_next(struct seq_file *m, v= oid *p, loff_t *pos) static const char *ddebug_class_name(struct ddebug_table *dt, struct _ddeb= ug *dp) { struct ddebug_class_map *map =3D dt->classes; + struct ddebug_class_user *cli =3D dt->class_users; int i; =20 for (i =3D 0; i < dt->num_classes; i++, map++) if (class_in_range(dp->class_id, map)) return map->class_names[dp->class_id - map->base]; =20 + for (i =3D 0; i < dt->num_class_users; i++, cli++) + if (class_in_range(dp->class_id, cli->map)) + return cli->map->class_names[dp->class_id - cli->map->base]; + return NULL; } =20 @@ -1124,31 +1150,134 @@ static const struct proc_ops proc_fops =3D { .proc_write =3D ddebug_proc_write }; =20 +static const char * const ddebug_classmap_typenames[] =3D { + "DISJOINT_BITS", "LEVEL_NUM" +}; + +#define vpr_cm_info(cm_p, msg_p, ...) ({ \ + struct ddebug_class_map const *_cm =3D cm_p; \ + v2pr_info(msg_p " module:%s base:%d len:%d type:%s\n", ##__VA_ARGS__, \ + _cm->mod_name, _cm->base, _cm->length, \ + ddebug_classmap_typenames[_cm->map_type]); \ + }) + +static void ddebug_sync_classbits(const struct ddebug_class_param *dcp, co= nst char *modname) +{ + /* clamp initial bitvec, mask off hi-bits */ + if (*dcp->bits & ~CLASSMAP_BITMASK(dcp->map->length)) { + *dcp->bits &=3D CLASSMAP_BITMASK(dcp->map->length); + v2pr_info("preset classbits: %lx\n", *dcp->bits); + } + /* force class'd prdbgs (in USEr module) to match (DEFINEr module) class-= param */ + ddebug_apply_class_bitmap(dcp, dcp->bits, ~0, modname); + ddebug_apply_class_bitmap(dcp, dcp->bits, 0, modname); +} + +static void ddebug_match_apply_kparam(const struct kernel_param *kp, + const struct ddebug_class_map *map, + const char *modnm) +{ + struct ddebug_class_param *dcp; + + if (kp->ops !=3D ¶m_ops_dyndbg_classes) + return; + + dcp =3D (struct ddebug_class_param *)kp->arg; + + if (map =3D=3D dcp->map) { + v2pr_info("found kp:%s =3D0x%lx", kp->name, *dcp->bits); + vpr_cm_info(map, "mapped to:"); + ddebug_sync_classbits(dcp, modnm); + } +} + +static void ddebug_apply_params(const struct ddebug_class_map *cm, const c= har *modnm) +{ + const struct kernel_param *kp; +#if IS_ENABLED(CONFIG_MODULES) + int i; + + if (cm->mod) { + vpr_cm_info(cm, "loaded class:"); + /* ifdef protects the cm->mod->kp deref */ + for (i =3D 0, kp =3D cm->mod->kp; i < cm->mod->num_kp; i++, kp++) + ddebug_match_apply_kparam(kp, cm, modnm); + } +#endif + if (!cm->mod) { + vpr_cm_info(cm, "builtin class:"); + for (kp =3D __start___param; kp < __stop___param; kp++) + ddebug_match_apply_kparam(kp, cm, modnm); + } +} + +/* + * Find this module's classmaps in a sub/whole-range of the builtin/ + * modular classmap vector/section. Save the start and length of the + * subrange at its edges. + */ static void ddebug_attach_module_classes(struct ddebug_table *dt, struct _= ddebug_info *di) { struct ddebug_class_map *cm; int i, nc =3D 0; =20 - /* - * Find this module's classmaps in a subrange/wholerange of - * the builtin/modular classmap vector/section. Save the start - * and length of the subrange at its edges. - */ - for (cm =3D di->classes, i =3D 0; i < di->num_classes; i++, cm++) { + for (i =3D 0, cm =3D di->classes; i < di->num_classes; i++, cm++) { =20 if (!strcmp(cm->mod_name, dt->mod_name)) { - if (!nc) { - v2pr_info("start subrange, class[%d]: module:%s base:%d len:%d ty:%d\n= ", - i, cm->mod_name, cm->base, cm->length, cm->map_type); + vpr_cm_info(cm, "classes[%d]:", i); + if (!nc++) dt->classes =3D cm; - } - nc++; } } - if (nc) { - dt->num_classes =3D nc; - vpr_info("module:%s attached %d classes\n", dt->mod_name, nc); + if (!nc) + return; + + vpr_info("module:%s attached %d classes\n", dt->mod_name, nc); + dt->num_classes =3D nc; + + for (i =3D 0, cm =3D dt->classes; i < dt->num_classes; i++, cm++) + ddebug_apply_params(cm, cm->mod_name); +} + +/* + * propagates class-params thru their classmaps to class-users. this + * means a query against the dt/module, which means it must be on the + * list to be seen by ddebug_change. + */ +static void ddebug_attach_user_module_classes(struct ddebug_table *dt, + const struct _ddebug_info *di) +{ + struct ddebug_class_user *cli; + int i, nc =3D 0; + + /* + * For builtins: scan the array, find start/length of this + * module's refs, save to dt. For loadables, this is the + * whole array. + */ + for (i =3D 0, cli =3D di->class_users; i < di->num_class_users; i++, cli+= +) { + + if (WARN_ON_ONCE(!cli || !cli->map || !cli->user_mod_name)) + continue; + + if (!strcmp(cli->user_mod_name, dt->mod_name)) { + + vpr_cm_info(cli->map, "class_ref[%d] %s -> %s", i, + cli->user_mod_name, cli->map->mod_name); + if (!nc++) + dt->class_users =3D cli; + } } + if (!nc) + return; + + dt->num_class_users =3D nc; + + /* now iterate dt */ + for (i =3D 0, cli =3D dt->class_users; i < dt->num_class_users; i++, cli+= +) + ddebug_apply_params(cli->map, cli->user_mod_name); + + vpr_dt_info(dt, "attach-client-module: "); } =20 /* @@ -1158,6 +1287,8 @@ static void ddebug_attach_module_classes(struct ddebu= g_table *dt, struct _ddebug static int ddebug_add_module(struct _ddebug_info *di, const char *modname) { struct ddebug_table *dt; + struct _ddebug *iter; + int i, class_ct =3D 0; =20 if (!di->num_descs) return 0; @@ -1181,13 +1312,20 @@ static int ddebug_add_module(struct _ddebug_info *d= i, const char *modname) =20 INIT_LIST_HEAD(&dt->link); =20 - if (di->classes && di->num_classes) + for (i =3D 0, iter =3D di->descs; i < di->num_descs; i++, iter++) + if (iter->class_id !=3D _DPRINTK_CLASS_DFLT) + class_ct++; + + if (class_ct && di->num_classes) ddebug_attach_module_classes(dt, di); =20 mutex_lock(&ddebug_lock); list_add_tail(&dt->link, &ddebug_tables); mutex_unlock(&ddebug_lock); =20 + if (class_ct && di->num_class_users) + ddebug_attach_user_module_classes(dt, di); + vpr_info("%3u debug prints in module %s\n", di->num_descs, modname); return 0; } @@ -1337,8 +1475,10 @@ static int __init dynamic_debug_init(void) struct _ddebug_info di =3D { .descs =3D __start___dyndbg, .classes =3D __start___dyndbg_classes, + .class_users =3D __start___dyndbg_class_users, .num_descs =3D __stop___dyndbg - __start___dyndbg, .num_classes =3D __stop___dyndbg_classes - __start___dyndbg_classes, + .num_class_users =3D __stop___dyndbg_class_users - __start___dyndbg_clas= s_users, }; =20 #ifdef CONFIG_MODULES diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 9e950a911b6c..ff9b879286d5 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -6,11 +6,15 @@ * Jim Cromie */ =20 -#define pr_fmt(fmt) "test_dd: " fmt +#if defined(TEST_DYNAMIC_DEBUG_SUBMOD) + #define pr_fmt(fmt) "test_dd_submod: " fmt +#else + #define pr_fmt(fmt) "test_dd: " fmt +#endif =20 #include =20 -/* run tests by reading or writing sysfs node: do_prints */ +/* re-gen output by reading or writing sysfs node: do_prints */ =20 static void do_prints(void); /* device under test */ static int param_set_do_prints(const char *instr, const struct kernel_para= m *kp) @@ -29,24 +33,39 @@ static const struct kernel_param_ops param_ops_do_print= s =3D { }; module_param_cb(do_prints, ¶m_ops_do_prints, NULL, 0600); =20 -/* - * Using the CLASSMAP api: - * - classmaps must have corresponding enum - * - enum symbols must match/correlate with class-name strings in the map. - * - base must equal enum's 1st value - * - multiple maps must set their base to share the 0-30 class_id space !! - * (build-bug-on tips welcome) - * Additionally, here: - * - tie together sysname, mapname, bitsname, flagsname - */ -#define DD_SYS_WRAP(_model, _flags) \ - static unsigned long bits_##_model; \ - static struct ddebug_class_param _flags##_model =3D { \ +#define CLASSMAP_BITMASK(width, base) (((1UL << (width)) - 1) << base) + +/* sysfs param wrapper, proto-API */ +#define DYNDBG_CLASSMAP_PARAM_(_model, _flags, _init) \ + static unsigned long bits_##_model =3D _init; \ + static struct ddebug_class_param _flags##_##_model =3D { \ .bits =3D &bits_##_model, \ .flags =3D #_flags, \ .map =3D &map_##_model, \ }; \ - module_param_cb(_flags##_##_model, ¶m_ops_dyndbg_classes, &_flags##_m= odel, 0600) + module_param_cb(_flags##_##_model, ¶m_ops_dyndbg_classes, \ + &_flags##_##_model, 0600) +#ifdef DEBUG +#define DYNDBG_CLASSMAP_PARAM(_model, _flags) DYNDBG_CLASSMAP_PARAM_(_mod= el, _flags, ~0) +#else +#define DYNDBG_CLASSMAP_PARAM(_model, _flags) DYNDBG_CLASSMAP_PARAM_(_mod= el, _flags, 0) +#endif + +/* + * Demonstrate/test all 4 class-typed classmaps with a sys-param. + * + * Each is 3 part: client-enum decl, _DEFINE, _PARAM. + * Declare them in blocks to show patterns of use (repetitions and + * changes) within each. + * + * 1st, dyndbg expects a client-provided enum-type as source of + * category/classid truth. DRM has DRM_UT_. + * + * Modules with multiple CLASSMAPS must have enums with distinct + * value-ranges, arranged below with explicit enum_sym =3D X inits. + * + * Declare all 4 enums now, for different types + */ =20 /* numeric input, independent bits */ enum cat_disjoint_bits { @@ -60,26 +79,51 @@ enum cat_disjoint_bits { D2_LEASE, D2_DP, D2_DRMRES }; -DECLARE_DYNDBG_CLASSMAP(map_disjoint_bits, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "D2_CORE", - "D2_DRIVER", - "D2_KMS", - "D2_PRIME", - "D2_ATOMIC", - "D2_VBL", - "D2_STATE", - "D2_LEASE", - "D2_DP", - "D2_DRMRES"); -DD_SYS_WRAP(disjoint_bits, p); -DD_SYS_WRAP(disjoint_bits, T); =20 /* numeric verbosity, V2 > V1 related */ enum cat_level_num { V0 =3D 14, V1, V2, V3, V4, V5, V6, V7 }; -DECLARE_DYNDBG_CLASSMAP(map_level_num, DD_CLASS_TYPE_LEVEL_NUM, 14, - "V0", "V1", "V2", "V3", "V4", "V5", "V6", "V7"); -DD_SYS_WRAP(level_num, p); -DD_SYS_WRAP(level_num, T); + +/* recapitulate DRM's parent(drm.ko) <-- _submod(drivers,helpers) */ +#if !defined(TEST_DYNAMIC_DEBUG_SUBMOD) +/* + * In single user, or parent / coordinator (drm.ko) modules, define + * classmaps on the client enums above, and then declares the PARAMS + * ref'g the classmaps. Each is exported. + */ +DYNDBG_CLASSMAP_DEFINE(map_disjoint_bits, DD_CLASS_TYPE_DISJOINT_BITS, + D2_CORE, + "D2_CORE", + "D2_DRIVER", + "D2_KMS", + "D2_PRIME", + "D2_ATOMIC", + "D2_VBL", + "D2_STATE", + "D2_LEASE", + "D2_DP", + "D2_DRMRES"); + +DYNDBG_CLASSMAP_DEFINE(map_level_num, DD_CLASS_TYPE_LEVEL_NUM, + V0, "V0", "V1", "V2", "V3", "V4", "V5", "V6", "V7"); + +/* + * now add the sysfs-params + */ + +DYNDBG_CLASSMAP_PARAM(disjoint_bits, p); +DYNDBG_CLASSMAP_PARAM(level_num, p); + +#else /* TEST_DYNAMIC_DEBUG_SUBMOD */ + +/* + * in submod/drm-drivers, use the classmaps defined in top/parent + * module above. + */ + +DYNDBG_CLASSMAP_USE(map_disjoint_bits); +DYNDBG_CLASSMAP_USE(map_level_num); + +#endif =20 /* stand-in for all pr_debug etc */ #define prdbg(SYM) __pr_debug_cls(SYM, #SYM " msg\n") @@ -115,6 +159,7 @@ static void do_levels(void) =20 static void do_prints(void) { + pr_debug("do_prints:\n"); do_cats(); do_levels(); } diff --git a/lib/test_dynamic_debug_submod.c b/lib/test_dynamic_debug_submo= d.c new file mode 100644 index 000000000000..9a893402ce1a --- /dev/null +++ b/lib/test_dynamic_debug_submod.c @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Kernel module for testing dynamic_debug + * + * Authors: + * Jim Cromie + */ + +#define TEST_DYNAMIC_DEBUG_SUBMOD +#include "test_dynamic_debug.c" --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 165B717DA09 for ; Tue, 2 Jul 2024 21:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957516; cv=none; b=bIZuzkQonKDb3L0QtUg7bNMYjKnkFFFT2qXpQVE+atZSpxUomZBLSfUY8+2Vv3EK1GB511FXo8HTkBJrzY8B699QCwT+1EbNB25gwHbb6zhPhCwZjIBgRCaq1cprQl5DNd8eJVuEXcYwJFp3Eh7UiX238vOmLPS0MCWMRgHg1u4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957516; c=relaxed/simple; bh=hJhE5lsBwgxxOdISpEA8GvMMkT46PJQbLaa7y9GcbT0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=L2hHjJikLQdxCvT3ab19lW7+nDT0BptsGJgVQxcKE+qveS7CNOqjvQMBGfhJmhnKS7IyeG5cykBuzgaYAZVsWB+4wV6lB96etFlWXrJtnvkqD/Ur+3Xwyn8f31lO7NLKphUEcMTZHDbZW3r4Iews/v7WBA8ZO8oOOzEIckM0QHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OHuMQk5n; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OHuMQk5n" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7f63db7a69cso142335839f.2 for ; Tue, 02 Jul 2024 14:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957514; x=1720562314; darn=vger.kernel.org; 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=IV/+5wwHTeWzOxSke4OB6kYyIW8aBgx7MWxd77xRKcc=; b=OHuMQk5nJfP2czBBtPdCdjsEGXyM5far2IAhWaw8TFFlZRruth+emQjULMeMlIj73u lVXrpfagdWBkQsF0PZx/Tr4R5xspzOPNsxfN8LXrv06Yp564JXaH7CsNaI9caaKvPb9a AXFFV+4O8RakH/b6fy3Z8BIS3f/MScqbm07+2VpoEx7qXFUGWiQ3wbZpg5qlv2KsHXxc Ok4sinJECRVcJGm2kAGEZaCCYbeukYQCH2QUc704T3ZxkZZWQtC+apy+Hf7UhVssi4FY 36A9mmT2TPJweWK5Chs4+O7P72AAHEy/G3uGNnMMfFasHJa7+yWpMaP35gB9JjHepbpP r43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957514; x=1720562314; 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=IV/+5wwHTeWzOxSke4OB6kYyIW8aBgx7MWxd77xRKcc=; b=XqkbvUlsfgE7xx8b1Sb26/VE/dPGBa4+TogiSsE3mVzzaJU4CUl85dApvcBVUghL/W nfTSvmge4Y9xB1NR7OhBaw6qCoyQS597bo53Avl1v5JDRwXCvF1el+3bbHSwSvEf/Mxm KXSncrKohtAs2TCYTYTc1WaFftFXxcWPh6s1y9IPu7AU/xmMNIUlNZP0/rsWyq5V28HE kuAocU3SzBHvU13FgsKUFf6hsoEZ3aj+E7PI7opPnKdjr1VlsQLZuYZz7FPjk9RSnkI2 yxpXCQbHaYLjjE0q66rA6BGLTskt1Vfc/OpydGNUWctqZSTO7mkL5DNN4xKa5cSIsfJ4 Sh1A== X-Gm-Message-State: AOJu0YzU71FfNlTQS01EjiX+ORplmZqY5mW0NGBCiQynKOCMEVikdp3v vDQLosUMMiYNbk0HIGsXqQZrekgxTOoWBLuEE2kIie7xcQE6L4X+ X-Google-Smtp-Source: AGHT+IFIuGEFSJwD0zrikgcy7eyzzh9OMyzELZnPifGHnbyDqr+YvwVITj3dJs9GO2JbYNz3OWCbyA== X-Received: by 2002:a6b:5a0e:0:b0:7f6:210c:61b0 with SMTP id ca18e2360f4ac-7f62ee853a4mr1060872939f.20.1719957514134; Tue, 02 Jul 2024 14:58:34 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:33 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 16/52] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/* Date: Tue, 2 Jul 2024 15:57:06 -0600 Message-ID: <20240702215804.2201271-17-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Add a selftest script for dynamic-debug. The config requires CONFIG_TEST_DYNAMIC_DEBUG=3Dm (and CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=3Dm), which tacitly requires either CONFIG_DYNAMIC_DEBUG=3Dy or CONFIG_DYNAMIC_DEBUG_CORE=3Dy ATM this has just basic_tests(), it modifies pr_debug flags in a few builtins (init/main, params), counts the callsite flags changed, and verifies against expected values. This is backported from another feature branch; the support-fns (thx Lukas) have unused features at the moment, they'll get used shortly. The script enables simple virtme-ng testing: $> vng --verbose --name v6.8-32-g30d431000676 --user root \ --cwd ../.. -a dynamic_debug.verbose=3D2 -p 4 \ ./tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh virtme: waiting for virtiofsd to start virtme: use 'microvm' QEMU architecture ... [ 4.136168] virtme-init: Setting hostname to v6.8-32-g30d431000676... [ 4.240874] virtme-init: starting script test_dynamic_debug_submod not there test_dynamic_debug not there ... [ 4.474435] virtme-init: script returned {0} Powering off. [ 4.529318] ACPI: PM: Preparing to enter system sleep state S5 [ 4.529991] kvm: exiting hardware virtualization [ 4.530428] reboot: Power down And add dynamic_debug to TARGETS, so `make run_tests` sees it properly for the impatient, set TARGETS explicitly: bash-5.2# make TARGETS=3Ddynamic_debug run_tests make[1]: ... TAP version 13 1..1 [ 35.552922] dyndbg: read 3 bytes from userspace [ 35.553099] dyndbg: query 0: "=3D_" mod:* [ 35.553544] dyndbg: processed 1 queries, with 1778 matches, 0 errs ... TLDR: This selftest is slightly naive wrt the init state of call-site flags. In particular, it fails if class'd pr_debugs have been set $ cat /etc/modprobe.d/drm-test.conf options drm dyndbg=3Dclass,DRM_UT_CORE,+mfslt%class,DRM_UT_KMS,+mf By Contract, class'd pr_debugs are protected from alteration by default (only by direct "class FOO" queries), so the "=3D_" logged above (TAP version 13) cannot affect the DRM_UT_CORE,KMS pr_debugs. These class'd flag-settings, added by modprobe, alter the counts of flag-matching patterns, breaking the tests' expectations. Signed-off-by: Jim Cromie Co-developed-by: =C5=81ukasz Bartosik Signed-off-by: =C5=81ukasz Bartosik Tested-bys would help greatly, get it off the fence it straddles. --- MAINTAINERS | 1 + tools/testing/selftests/Makefile | 1 + .../testing/selftests/dynamic_debug/Makefile | 9 + tools/testing/selftests/dynamic_debug/config | 2 + .../dynamic_debug/dyndbg_selftest.sh | 231 ++++++++++++++++++ 5 files changed, 244 insertions(+) create mode 100644 tools/testing/selftests/dynamic_debug/Makefile create mode 100644 tools/testing/selftests/dynamic_debug/config create mode 100755 tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh diff --git a/MAINTAINERS b/MAINTAINERS index c9ed48109ff5..e7bb7b1c44c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7527,6 +7527,7 @@ S: Maintained F: include/linux/dynamic_debug.h F: lib/dynamic_debug.c F: lib/test_dynamic_debug*.c +F: tools/testing/selftest/dynamic_debug/* =20 DYNAMIC INTERRUPT MODERATION M: Tal Gilboa diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Mak= efile index e1504833654d..84edf0bd8e80 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -20,6 +20,7 @@ TARGETS +=3D drivers/s390x/uvdevice TARGETS +=3D drivers/net/bonding TARGETS +=3D drivers/net/team TARGETS +=3D dt +TARGETS +=3D dynamic_debug TARGETS +=3D efivarfs TARGETS +=3D exec TARGETS +=3D fchmodat2 diff --git a/tools/testing/selftests/dynamic_debug/Makefile b/tools/testing= /selftests/dynamic_debug/Makefile new file mode 100644 index 000000000000..6d06fa7f1040 --- /dev/null +++ b/tools/testing/selftests/dynamic_debug/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# borrowed from Makefile for user memory selftests + +# No binaries, but make sure arg-less "make" doesn't trigger "run_tests" +all: + +TEST_PROGS :=3D dyndbg_selftest.sh + +include ../lib.mk diff --git a/tools/testing/selftests/dynamic_debug/config b/tools/testing/s= elftests/dynamic_debug/config new file mode 100644 index 000000000000..d080da571ac0 --- /dev/null +++ b/tools/testing/selftests/dynamic_debug/config @@ -0,0 +1,2 @@ +CONFIG_TEST_DYNAMIC_DEBUG=3Dm +CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=3Dm diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh new file mode 100755 index 000000000000..1be70af26a38 --- /dev/null +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -0,0 +1,231 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only + +V=3D${V:=3D0} # invoke as V=3D1 $0 for global verbose +RED=3D"\033[0;31m" +GREEN=3D"\033[0;32m" +YELLOW=3D"\033[0;33m" +BLUE=3D"\033[0;34m" +MAGENTA=3D"\033[0;35m" +CYAN=3D"\033[0;36m" +NC=3D"\033[0;0m" +error_msg=3D"" + +function vx () { + echo $1 > /sys/module/dynamic_debug/parameters/verbose +} + +function ddgrep () { + grep $1 /proc/dynamic_debug/control +} + +function doprints () { + cat /sys/module/test_dynamic_debug/parameters/do_prints +} + +function ddcmd () { + exp_exit_code=3D0 + num_args=3D$# + if [ "${@:$#}" =3D "pass" ]; then + num_args=3D$#-1 + elif [ "${@:$#}" =3D "fail" ]; then + num_args=3D$#-1 + exp_exit_code=3D1 + fi + args=3D${@:1:$num_args} + output=3D$((echo "$args" > /proc/dynamic_debug/control) 2>&1) + exit_code=3D$? + error_msg=3D$(echo $output | cut -d ":" -f 5 | sed -e 's/^[[:space:]]*= //') + handle_exit_code $BASH_LINENO $FUNCNAME $exit_code $exp_exit_code +} + +function handle_exit_code() { + local exp_exit_code=3D0 + [ $# =3D=3D 4 ] && exp_exit_code=3D$4 + if [ $3 -ne $exp_exit_code ]; then + echo -e "${RED}: $BASH_SOURCE:$1 $2() expected to exit with code $= exp_exit_code" + [ $3 =3D=3D 1 ] && echo "Error: '$error_msg'" + exit + fi +} + +# $1 - pattern to match, pattern in $1 is enclosed by spaces for a match "= "\s$1\s" +# $2 - number of times the pattern passed in $1 is expected to match +# $3 - optional can be set either to "-r" or "-v" +# "-r" means relaxed matching in this case pattern provided in $1 is= passed +# as is without enclosing it with spaces +# "-v" prints matching lines +# $4 - optional when $3 is set to "-r" then $4 can be used to pass "-v" +function check_match_ct { + pattern=3D"\s$1\s" + exp_cnt=3D0 + + [ "$3" =3D=3D "-r" ] && pattern=3D"$1" + let cnt=3D$(ddgrep "$pattern" | wc -l) + if [ $V -eq 1 ] || [ "$3" =3D=3D "-v" ] || [ "$4" =3D=3D "-v" ]; then + echo -ne "${BLUE}" && ddgrep $pattern && echo -ne "${NC}" + fi + [ $# -gt 1 ] && exp_cnt=3D$2 + if [ $cnt -ne $exp_cnt ]; then + echo -e "${RED}: $BASH_SOURCE:$BASH_LINENO check failed expected $= exp_cnt on $1, got $cnt" + exit + else + echo ": $cnt matches on $1" + fi +} + +# $1 - trace instance name +# #2 - if > 0 then directory is expected to exist, if <=3D 0 then otherwise +# $3 - "-v" for verbose +function check_trace_instance_dir { + if [ -e /sys/kernel/tracing/instances/$1 ]; then + if [ "$3" =3D=3D "-v" ] ; then + echo "ls -l /sys/kernel/tracing/instances/$1: " + ls -l /sys/kernel/tracing/instances/$1 + fi + if [ $2 -le 0 ]; then + echo -e "${RED}: $BASH_SOURCE:$BASH_LINENO error trace instanc= e \ + '/sys/kernel/tracing/instances/$1' does exist" + exit + fi + else + if [ $2 -gt 0 ]; then + echo -e "${RED}: $BASH_SOURCE:$BASH_LINENO error trace instanc= e \ + '/sys/kernel/tracing/instances/$1' does not exist" + exit + fi + fi +} + +function tmark { + echo $* > /sys/kernel/tracing/trace_marker +} + +# $1 - trace instance name +# $2 - line number +# $3 - if > 0 then the instance is expected to be opened, otherwise +# the instance is expected to be closed +function check_trace_instance { + output=3D$(tail -n9 /proc/dynamic_debug/control | grep ": Opened trace= instances" \ + | xargs -n1 | grep $1) + if [ "$output" !=3D $1 ] && [ $3 -gt 0 ]; then + echo -e "${RED}: $BASH_SOURCE:$2 trace instance $1 is not opened" + exit + fi + if [ "$output" =3D=3D $1 ] && [ $3 -le 0 ]; then + echo -e "${RED}: $BASH_SOURCE:$2 trace instance $1 is not closed" + exit + fi +} + +function is_trace_instance_opened { + check_trace_instance $1 $BASH_LINENO 1 +} + +function is_trace_instance_closed { + check_trace_instance $1 $BASH_LINENO 0 +} + +# $1 - trace instance directory to delete +# $2 - if > 0 then directory is expected to be deleted successfully, if <= =3D 0 then otherwise +function del_trace_instance_dir() { + exp_exit_code=3D1 + [ $2 -gt 0 ] && exp_exit_code=3D0 + output=3D$((rmdir /sys/kernel/debug/tracing/instances/$1) 2>&1) + exit_code=3D$? + error_msg=3D$(echo $output | cut -d ":" -f 3 | sed -e 's/^[[:space:]]*= //') + handle_exit_code $BASH_LINENO $FUNCNAME $exit_code $exp_exit_code +} + +function error_log_ref { + # to show what I got + : echo "# error-log-ref: $1" + : echo cat \$2 +} + +function ifrmmod { + lsmod | grep $1 2>&1>/dev/null || echo $1 not there + lsmod | grep $1 2>&1>/dev/null && rmmod $1 +} + +# $1 - text to search for +function search_trace() { + search_trace_name 0 1 $1 +} + +# $1 - trace instance name, 0 for global event trace +# $2 - line number counting from the bottom +# $3 - text to search for +function search_trace_name() { + if [ "$1" =3D "0" ]; then + buf=3D$(cat /sys/kernel/debug/tracing/trace) + line=3D$(tail -$2 /sys/kernel/debug/tracing/trace | head -1 | sed -e = 's/^[[:space:]]*//') + else + buf=3D$(cat /sys/kernel/debug/tracing/instances/$1/trace) + line=3D$(tail -$2 /sys/kernel/debug/tracing/instances/$1/trace | head= -1 | \ + sed -e 's/^[[:space:]]*//') + fi + if [ $2 =3D 0 ]; then + # whole-buf check + output=3D$(echo $buf | grep "$3") + else + output=3D$(echo $line | grep "$3") + fi + if [ "$output" =3D "" ]; then + echo -e "${RED}: $BASH_SOURCE:$BASH_LINENO search for '$3' fai= led \ + in line '$line' or '$buf'" + exit + fi + if [ $V =3D 1 ]; then + echo -e "${MAGENTA}: search_trace_name in $1 found: \n$output \nin:${= BLUE} $buf ${NC}" + fi +} + +# $1 - error message to check +function check_err_msg() { + if [ "$error_msg" !=3D "$1" ]; then + echo -e "${RED}: $BASH_SOURCE:$BASH_LINENO error message '$error_m= sg' \ + does not match with '$1'" + exit + fi +} + +function basic_tests { + echo -e "${GREEN}# BASIC_TESTS ${NC}" + ddcmd =3D_ # zero everything (except class'd sites) + check_match_ct =3Dp 0 + # there are several main's :-/ + ddcmd module main file */module/main.c +p + check_match_ct =3Dp 14 + ddcmd =3D_ + check_match_ct =3Dp 0 + # multi-cmd input, newline separated, with embedded comments + cat <<"EOF" > /proc/dynamic_debug/control + module main +mf # multi-query + module main file init/main.c +ml # newline separated +EOF + # the intersection of all those main's is hard to track/count + # esp when mixed with overlapping greps + check_match_ct =3Dmf 21 + check_match_ct =3Dml 0 + check_match_ct =3Dmfl 6 + ddcmd =3D_ +} + + +tests_list=3D( + basic_tests +) + +# Run tests + +ifrmmod test_dynamic_debug_submod +ifrmmod test_dynamic_debug + +for test in "${tests_list[@]}" +do + $test + echo "" +done +echo -en "${GREEN}# Done on: " +date --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61E4B17DA15 for ; Tue, 2 Jul 2024 21:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957518; cv=none; b=dUlhodjC0h91ftg9gnZWI3iyvn7Ll6S4HpHtJMPhGUz8B2EvONSFv+IDMIVAMrPwEQWxC0e4NKCaNCrCmtNTF92rBV6hTJQkXVNeh+hQ+gmWeiZi7iyiCPRTpGSZ7gJ6+5vGqn677oi+PC6S4FMqFIL4LjUrRbLGfbx0KAonO4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957518; c=relaxed/simple; bh=rkyHyIRrVxPlQtQIJq+1MS/XFdntI2z6XQ5sFA29ViA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=llraE/dNfTCWVeOMr0YRUKQZNq2GrrD/XMB/6tQpfBK/wZGHAWpBne90KFjZYYr/2tp0dA/KtbKNpyPSzDj6zDm7ru1W7uvBnxx9rYS7xnJoj+YNoFrjIqNU4pFvyVKTeCX3sVmWd8uVgqTP4raPtQlIE0rzr6Vk4iFDdWgy9E8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FDDuS4Pj; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FDDuS4Pj" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7f649f7868dso113911339f.2 for ; Tue, 02 Jul 2024 14:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957515; x=1720562315; darn=vger.kernel.org; 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=ixqe2fvQ+p3xJowFXczfx5KdZEaC8a1vzuHPaRlFrmw=; b=FDDuS4PjtkFlT5VXvnbnbapgAvIpDYtoRUVRSm7oId75FzkLx9QgpXETbPxh1qkTaX od5he6XFsQ4SPSGVjIxP6yCmhu0L6G9a/2sPH0xqHvJc7gQ2MvXBZ5QjfpVOSJvDNOho vbScClwrx52RfSgNdcu05nI4FExmAkuvjnX/rnxc9xDNX6liwbf0YLjP5FmTm+apJGMt D1bb4OGOrYzWrOLBXsts+rDRnOZtYT1xoav8SMehvU/5OmPh31c8ORe5ub3iMaNHrrg0 rOhNSntsP0Se5lqP+SwOrgLU4qh7nqP5dYc/O+UbUwIJ2xtvIIgUVrcGIS9kUk9y+Np+ M//Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957515; x=1720562315; 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=ixqe2fvQ+p3xJowFXczfx5KdZEaC8a1vzuHPaRlFrmw=; b=EueAQZEHkvoLdAIEoX8FeJ9w+MarMU2ZJAfVb50Gf14viOCoO2ChaKVUkznYYFk+7P OXaKZQEMF0OJ4Rs1+3yz0GogeSkm9BNmQww3LUg10nDDkvKGksmwoewrpEyd0mYuT2az AvUTIjjgdVtqMjij1gSdxZhs0ZTFkwwGp4Lsc9UrddQCBW3Kp11Wtak6yyjzgO9gc8Ks Cjlvja8lLGhsyGHxG08NZ4AHzx+JvBJFNXUQWFXpoT9cw+xmxulGitmU9/WtoIZmW6m6 K7P95QP8zw4IUsp1LMWxxAExtaeleezCbIj5E0Cvpr01V46SKeQTCHW4aD0FVI89iPKU rh6Q== X-Gm-Message-State: AOJu0YwxdXWMGABsU/OwFJY5ygjV9lJZJwM1/7Q9W9jVN3K6FHdkLCSw ZKLZSD2drD4L25V70u+ffQQskMLuo1hMOz3+eY1gQ/27fyq04bus X-Google-Smtp-Source: AGHT+IGuF3X4wd/Q+QiMc/SNYxya2QDBND8SXs2NtMYBQ3/4cpFsTf5QXlJhmfj13W/6t+FhpK5Wug== X-Received: by 2002:a6b:6f02:0:b0:7f6:1f4c:96d2 with SMTP id ca18e2360f4ac-7f62ed42fbamr1056411939f.0.1719957515370; Tue, 02 Jul 2024 14:58:35 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:34 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 17/52] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API Date: Tue, 2 Jul 2024 15:57:07 -0600 Message-ID: <20240702215804.2201271-18-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" move the DYNDBG_CLASSMAP_PARAM macro from test-dynamic-debug.c into the header, and refine it, by distinguishing the 2 use cases: 1.DYNDBG_CLASSMAP_PARAM_REF for DRM, to pass in extern __drm_debug by name. dyndbg keeps bits in it, so drm can still use it as before 2.DYNDBG_CLASSMAP_PARAM new user (test_dynamic_debug) doesn't need to share state, decls a static long unsigned int to store the bitvec. __DYNDBG_CLASSMAP_PARAM bottom layer - allocate,init a ddebug-class-param, module-param-cb. Also clean up and improve comments in test-code, and add MODULE_DESCRIPTIONs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- fixup drm-print.h add PARAM_REF forwarding macros with DYNDBG_CLASSMAP_PARAM_REF in the API, add DRM_ variant --- include/linux/dynamic_debug.h | 37 ++++++++++++++++- lib/dynamic_debug.c | 70 ++++++++++++++++++++++----------- lib/test_dynamic_debug.c | 50 +++++++++-------------- lib/test_dynamic_debug_submod.c | 9 ++++- 4 files changed, 110 insertions(+), 56 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 2c6944c0d6cd..19f959f9a6b4 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -91,7 +91,7 @@ struct ddebug_class_map { * used to validate a "class FOO .." >control command on the module */ #define __DYNDBG_CLASSMAP_DEFINE(_var, _maptype, _base, ...) \ - const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ + static const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ struct ddebug_class_map __aligned(8) __used \ __section("__dyndbg_classes") _var =3D { \ .mod =3D THIS_MODULE, \ @@ -164,6 +164,41 @@ struct ddebug_class_param { const struct ddebug_class_map *map; }; =20 +/** + * DYNDBG_CLASSMAP_PARAM - wrap a dyndbg-classmap with a controlling sys-p= aram + * @_name sysfs node name + * @_var name of the struct classmap var defining the controlled classes + * @_flags flags to be toggled, typically just 'p' + * + * Creates a sysfs-param to control the classes defined by the + * classmap. Keeps bits in a private/static + */ +#define DYNDBG_CLASSMAP_PARAM(_name, _var, _flags) \ + static unsigned long _name##_bvec; \ + __DYNDBG_CLASSMAP_PARAM(_name, _name##_bvec, _var, _flags) + +/** + * DYNDBG_CLASSMAP_PARAM_REF - wrap a dyndbg-classmap with a controlling s= ys-param + * @_name sysfs node name + * @_bits name of the module's unsigned long bit-vector, ex: __drm_debug + * @_var name of the struct classmap var defining the controlled classes + * @_flags flags to be toggled, typically just 'p' + * + * Creates a sysfs-param to control the classmap, keeping bitvec in user @= _bits. + * This lets drm use __drm_debug elsewhere too. + */ +#define DYNDBG_CLASSMAP_PARAM_REF(_name, _bits, _var, _flags) \ + __DYNDBG_CLASSMAP_PARAM(_name, _bits, _var, _flags) + +#define __DYNDBG_CLASSMAP_PARAM(_name, _bits, _var, _flags) \ + static struct ddebug_class_param _name##_##_flags =3D { \ + .bits =3D &(_bits), \ + .flags =3D #_flags, \ + .map =3D &(_var), \ + }; \ + module_param_cb(_name, ¶m_ops_dyndbg_classes, \ + &_name##_##_flags, 0600) + /* * pr_debug() and friends are globally enabled or modules have selectively * enabled them. diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 9150e0e5145f..e9a95b0f3757 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -657,6 +657,30 @@ static int ddebug_apply_class_bitmap(const struct ddeb= ug_class_param *dcp, =20 #define CLASSMAP_BITMASK(width) ((1UL << (width)) - 1) =20 +static void ddebug_class_param_clamp_input(unsigned long *inrep, const str= uct kernel_param *kp) +{ + const struct ddebug_class_param *dcp =3D kp->arg; + const struct ddebug_class_map *map =3D dcp->map; + + switch (map->map_type) { + case DD_CLASS_TYPE_DISJOINT_BITS: + /* expect bits. mask and warn if too many */ + if (*inrep & ~CLASSMAP_BITMASK(map->length)) { + pr_warn("%s: input: 0x%lx exceeds mask: 0x%lx, masking\n", + KP_NAME(kp), *inrep, CLASSMAP_BITMASK(map->length)); + *inrep &=3D CLASSMAP_BITMASK(map->length); + } + break; + case DD_CLASS_TYPE_LEVEL_NUM: + /* input is bitpos, of highest verbosity to be enabled */ + if (*inrep > map->length) { + pr_warn("%s: level:%ld exceeds max:%d, clamping\n", + KP_NAME(kp), *inrep, map->length); + *inrep =3D map->length; + } + break; + } +} static int param_set_dyndbg_module_classes(const char *instr, const struct kernel_param *kp, const char *modnm) @@ -675,26 +699,15 @@ static int param_set_dyndbg_module_classes(const char= *instr, pr_err("expecting numeric input, not: %s > %s\n", instr, KP_NAME(kp)); return -EINVAL; } + ddebug_class_param_clamp_input(&inrep, kp); =20 switch (map->map_type) { case DD_CLASS_TYPE_DISJOINT_BITS: - /* expect bits. mask and warn if too many */ - if (inrep & ~CLASSMAP_BITMASK(map->length)) { - pr_warn("%s: input: 0x%lx exceeds mask: 0x%lx, masking\n", - KP_NAME(kp), inrep, CLASSMAP_BITMASK(map->length)); - inrep &=3D CLASSMAP_BITMASK(map->length); - } v2pr_info("bits:0x%lx > %s.%s\n", inrep, modnm ?: "*", KP_NAME(kp)); totct +=3D ddebug_apply_class_bitmap(dcp, &inrep, *dcp->bits, modnm); *dcp->bits =3D inrep; break; case DD_CLASS_TYPE_LEVEL_NUM: - /* input is bitpos, of highest verbosity to be enabled */ - if (inrep > map->length) { - pr_warn("%s: level:%ld exceeds max:%d, clamping\n", - KP_NAME(kp), inrep, map->length); - inrep =3D map->length; - } old_bits =3D CLASSMAP_BITMASK(*dcp->lvl); new_bits =3D CLASSMAP_BITMASK(inrep); v2pr_info("lvl:%ld bits:0x%lx > %s\n", inrep, new_bits, KP_NAME(kp)); @@ -1161,16 +1174,27 @@ static const char * const ddebug_classmap_typenames= [] =3D { ddebug_classmap_typenames[_cm->map_type]); \ }) =20 -static void ddebug_sync_classbits(const struct ddebug_class_param *dcp, co= nst char *modname) +static void ddebug_sync_classbits(const struct kernel_param *kp, const cha= r *modname) { - /* clamp initial bitvec, mask off hi-bits */ - if (*dcp->bits & ~CLASSMAP_BITMASK(dcp->map->length)) { - *dcp->bits &=3D CLASSMAP_BITMASK(dcp->map->length); - v2pr_info("preset classbits: %lx\n", *dcp->bits); + struct ddebug_class_param *dcp =3D kp->arg; + unsigned long new_bits; + + ddebug_class_param_clamp_input(dcp->bits, kp); + + switch (dcp->map->map_type) { + case DD_CLASS_TYPE_DISJOINT_BITS: + v2pr_info(" %s: classbits: 0x%lx\n", KP_NAME(kp), *dcp->bits); + ddebug_apply_class_bitmap(dcp, dcp->bits, 0UL, modname); + break; + case DD_CLASS_TYPE_LEVEL_NUM: + new_bits =3D CLASSMAP_BITMASK(*dcp->lvl); + v2pr_info(" %s: lvl:%ld bits:0x%lx\n", KP_NAME(kp), *dcp->lvl, new_bits= ); + ddebug_apply_class_bitmap(dcp, &new_bits, 0UL, modname); + break; + default: + pr_err("bad map type %d\n", dcp->map->map_type); + return; } - /* force class'd prdbgs (in USEr module) to match (DEFINEr module) class-= param */ - ddebug_apply_class_bitmap(dcp, dcp->bits, ~0, modname); - ddebug_apply_class_bitmap(dcp, dcp->bits, 0, modname); } =20 static void ddebug_match_apply_kparam(const struct kernel_param *kp, @@ -1185,9 +1209,9 @@ static void ddebug_match_apply_kparam(const struct ke= rnel_param *kp, dcp =3D (struct ddebug_class_param *)kp->arg; =20 if (map =3D=3D dcp->map) { - v2pr_info("found kp:%s =3D0x%lx", kp->name, *dcp->bits); - vpr_cm_info(map, "mapped to:"); - ddebug_sync_classbits(dcp, modnm); + v2pr_info(" found kp:%s =3D0x%lx", kp->name, *dcp->bits); + vpr_cm_info(map, " mapped to:"); + ddebug_sync_classbits(kp, modnm); } } =20 diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index ff9b879286d5..b3c6f90b9fe8 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Kernel module for testing dynamic_debug + * Kernel module to test/demonstrate dynamic_debug features, + * particularly classmaps and their support for subsystems like DRM. * * Authors: * Jim Cromie @@ -35,24 +36,8 @@ module_param_cb(do_prints, ¶m_ops_do_prints, NULL, 0= 600); =20 #define CLASSMAP_BITMASK(width, base) (((1UL << (width)) - 1) << base) =20 -/* sysfs param wrapper, proto-API */ -#define DYNDBG_CLASSMAP_PARAM_(_model, _flags, _init) \ - static unsigned long bits_##_model =3D _init; \ - static struct ddebug_class_param _flags##_##_model =3D { \ - .bits =3D &bits_##_model, \ - .flags =3D #_flags, \ - .map =3D &map_##_model, \ - }; \ - module_param_cb(_flags##_##_model, ¶m_ops_dyndbg_classes, \ - &_flags##_##_model, 0600) -#ifdef DEBUG -#define DYNDBG_CLASSMAP_PARAM(_model, _flags) DYNDBG_CLASSMAP_PARAM_(_mod= el, _flags, ~0) -#else -#define DYNDBG_CLASSMAP_PARAM(_model, _flags) DYNDBG_CLASSMAP_PARAM_(_mod= el, _flags, 0) -#endif - /* - * Demonstrate/test all 4 class-typed classmaps with a sys-param. + * Demonstrate/test both types of classmaps, each with a sys-param. * * Each is 3 part: client-enum decl, _DEFINE, _PARAM. * Declare them in blocks to show patterns of use (repetitions and @@ -64,7 +49,7 @@ module_param_cb(do_prints, ¶m_ops_do_prints, NULL, 06= 00); * Modules with multiple CLASSMAPS must have enums with distinct * value-ranges, arranged below with explicit enum_sym =3D X inits. * - * Declare all 4 enums now, for different types + * Declare all enums now, for different types */ =20 /* numeric input, independent bits */ @@ -83,12 +68,15 @@ enum cat_disjoint_bits { /* numeric verbosity, V2 > V1 related */ enum cat_level_num { V0 =3D 14, V1, V2, V3, V4, V5, V6, V7 }; =20 -/* recapitulate DRM's parent(drm.ko) <-- _submod(drivers,helpers) */ +/* + * use/demonstrate multi-module-group classmaps, as for DRM + */ #if !defined(TEST_DYNAMIC_DEBUG_SUBMOD) /* - * In single user, or parent / coordinator (drm.ko) modules, define - * classmaps on the client enums above, and then declares the PARAMS - * ref'g the classmaps. Each is exported. + * For module-groups of 1+, define classmaps with names (stringified + * enum-symbols) copied from above. 1-to-1 mapping is recommended. + * The classmap is exported, so that other modules in the group can + * link to it and control their prdbgs. */ DYNDBG_CLASSMAP_DEFINE(map_disjoint_bits, DD_CLASS_TYPE_DISJOINT_BITS, D2_CORE, @@ -107,19 +95,18 @@ DYNDBG_CLASSMAP_DEFINE(map_level_num, DD_CLASS_TYPE_LE= VEL_NUM, V0, "V0", "V1", "V2", "V3", "V4", "V5", "V6", "V7"); =20 /* - * now add the sysfs-params + * for use-cases that want it, provide a sysfs-param to set the + * classes in the classmap. It is at this interface where the + * "v3>v2" property is applied to DD_CLASS_TYPE_LEVEL_NUM inputs. */ - -DYNDBG_CLASSMAP_PARAM(disjoint_bits, p); -DYNDBG_CLASSMAP_PARAM(level_num, p); +DYNDBG_CLASSMAP_PARAM(p_disjoint_bits, map_disjoint_bits, p); +DYNDBG_CLASSMAP_PARAM(p_level_num, map_level_num, p); =20 #else /* TEST_DYNAMIC_DEBUG_SUBMOD */ - /* - * in submod/drm-drivers, use the classmaps defined in top/parent - * module above. + * the +1 members of a multi-module group refer to the classmap + * DEFINEd (and exported) above. */ - DYNDBG_CLASSMAP_USE(map_disjoint_bits); DYNDBG_CLASSMAP_USE(map_level_num); =20 @@ -180,5 +167,6 @@ static void __exit test_dynamic_debug_exit(void) module_init(test_dynamic_debug_init); module_exit(test_dynamic_debug_exit); =20 +MODULE_DESCRIPTION("test/demonstrate dynamic-debug features"); MODULE_AUTHOR("Jim Cromie "); MODULE_LICENSE("GPL"); diff --git a/lib/test_dynamic_debug_submod.c b/lib/test_dynamic_debug_submo= d.c index 9a893402ce1a..0d15f3ffe466 100644 --- a/lib/test_dynamic_debug_submod.c +++ b/lib/test_dynamic_debug_submod.c @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Kernel module for testing dynamic_debug + * Kernel module to test/demonstrate dynamic_debug features, + * particularly classmaps and their support for subsystems, like DRM, + * which defines its drm_debug classmap in drm module, and uses it in + * helpers & drivers. * * Authors: * Jim Cromie @@ -8,3 +11,7 @@ =20 #define TEST_DYNAMIC_DEBUG_SUBMOD #include "test_dynamic_debug.c" + +MODULE_DESCRIPTION("test/demonstrate dynamic-debug subsystem support"); +MODULE_AUTHOR("Jim Cromie "); +MODULE_LICENSE("GPL"); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71D2717DA22; Tue, 2 Jul 2024 21:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957519; cv=none; b=WFt51S0BK5QG+mAlhVpSAdeD+s2P3LBMbMsYPqz01mgCSTAmmyEz2x0C1fC/0TaU6UCgdcxzZKYFHX0Dl8f3DONv6+SLQh+5WWeNGdD5jRIlup9ZALUb3DPsmJtvQWMy87ch91O/TPw+Zo3fa1xCcFOWof5pyh2AXEenE3tyw04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957519; c=relaxed/simple; bh=BW4pO7uYwWxn0ojsfglU05J91bpCDuylVWspoKc2hXA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kr4/dJdnXQ7XExKLcp0f0LFIhONeI2NHPB7gPA0l4waPuTB4ed84y2rwpjCx9Z9Zp+x/ruILeEVygj86IIAPSSJu6g97jSzi5Jrdo0YwTdCHtWaGBB1ZMxW2DZ+cC8CLFR5GtcUNXaYloPc6VVaJx7kcSZDaR4bP5waR0h1AOP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aBFrM+oq; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aBFrM+oq" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f3d884e70bso237612039f.3; Tue, 02 Jul 2024 14:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957517; x=1720562317; darn=vger.kernel.org; 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=gkFYDr1/VaUp9nR5GtDe+QedLaRcp6UcXGPB2Rd9f4k=; b=aBFrM+oqYgM89FB4oWMiwIVd0vonjcj6j78KDq7E8mZeNyf1JdJaOTOp6cOD2pvjcG qJo9+tR9akqJ+mKf2m4BJM3Cw64ccWlQfuu9ZnM1rLayMZe+y2fBTAbgFkrF/0IJ9vcV eZBLTzPoYv93VhxW/CbJyRalF9pcH07+ze8He46SPmaX6onEPMFjU4dWVdaGlMyGIXAe FG3CpM4KScitmhc1crsg/nI8gfu3QqinXgE0bgcSpMjetCP+y+dUkS74gQcobZVNocA5 B9i5ZQXWz58qm/BtIItK+DjZDrxpcO7/E94wQBU583q13WCTwwr16DFVTxop33yXq7sP UcPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957517; x=1720562317; 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=gkFYDr1/VaUp9nR5GtDe+QedLaRcp6UcXGPB2Rd9f4k=; b=nzcqHBl9z8s7nXnKAraL5o9EO+k38s9IsqagokGr5UnJnmR8QLGnfRJrLsPJDnxcsu zyvAe+ZVqDdYPLGocegfEhU6SetiMjXVR2LfhlBtk6A8ClU8QqIzd2EGY/ZM6JXisML9 FzIkMrgXC6fdA8VmUxOKBL7l94INpyPm4eo4dAU8fZb8JG/9RUYyWJ4rv4KmjAgnC/se ++A0d9K0O4nCzpEUO50oBB61eCG03MVJAYQwmZ2Dms0FQb2rhg6jRfwY8gIB8c0TPizJ 6OoaQ4CB43ZLJtKY5JqWjiEvNZ2cjp1u+G/x2P7noezhNQFJERLN+0zfpptDQPqxdCl5 TvwA== X-Forwarded-Encrypted: i=1; AJvYcCUOg1l7uxwRnD8WpMIRDcXqYr17AMAOz9CvVsFQq594hZlp8qha7hm4FnjxVIvoQOhaLP82OXvM9UJyQhNJl94DRoX2A2IMAvYg X-Gm-Message-State: AOJu0Ywo9451ITIdefKu3By7V9dVOw6LNDi48zJAPwbKeWrCfpTs2Ako YJaIZfpHnKZTvfu0rvL/mXyWmP2/TXv5qgNvIxciwcIZntH07jDb X-Google-Smtp-Source: AGHT+IHrYge+G9SxEL7voNd3XWXoqJIq9/3lBcjxHvh2FJylH832o2Rfwee+jZnNxzuJYbl2IZHY9Q== X-Received: by 2002:a05:6602:355:b0:7f6:1dff:e364 with SMTP id ca18e2360f4ac-7f62ee02647mr1168440039f.1.1719957516607; Tue, 02 Jul 2024 14:58:36 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:36 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie , linux-doc@vger.kernel.org Subject: [PATCH v9 18/52] dyndbg-doc: add classmap info to howto Date: Tue, 2 Jul 2024 15:57:08 -0600 Message-ID: <20240702215804.2201271-19-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Describe the 3 API macros providing dynamic_debug's classmaps DYNDBG_CLASSMAP_DEFINE - create, exports a module's classmap DYNDBG_CLASSMAP_USE - refer to exported map DYNDBG_CLASSMAP_PARAM - bind control param to the classmap DYNDBG_CLASSMAP_PARAM_REF + use module's storage - __drm_debug cc: linux-doc@vger.kernel.org Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- v5 adjustments per Randy Dunlap v7 checkpatch fixes v8 more --- .../admin-guide/dynamic-debug-howto.rst | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentat= ion/admin-guide/dynamic-debug-howto.rst index 6a8ce5a34382..742eb4230c6e 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -225,7 +225,6 @@ the ``p`` flag has meaning, other flags are ignored. Note the regexp ``^[-+=3D][fslmpt_]+$`` matches a flags specification. To clear all flags at once, use ``=3D_`` or ``-fslmpt``. =20 - Debug messages during Boot Process =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 @@ -375,3 +374,65 @@ just a shortcut for ``print_hex_dump(KERN_DEBUG)``. For ``print_hex_dump_debug()``/``print_hex_dump_bytes()``, format string is its ``prefix_str`` argument, if it is constant string; or ``hexdump`` in case ``prefix_str`` is built dynamically. + +Dynamic Debug classmaps +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Dyndbg allows selection/grouping of *prdbg* callsites using structural +info: module, file, function, line. Classmaps allow authors to add +their own domain-oriented groupings using class-names. Classmaps are +exported, so they referencable from other modules. + + # enable classes individually + :#> ddcmd class DRM_UT_CORE +p + :#> ddcmd class DRM_UT_KMS +p + # or more selectively + :#> ddcmd class DRM_UT_CORE module drm +p + +The "class FOO" syntax protects class'd prdbgs from generic overwrite:: + + # IOW this doesn't wipe any DRM.debug settings + :#> ddcmd -p + +To support the DRM.debug parameter, DYNDBG_CLASSMAP_PARAM* updates all +classes in a classmap, mapping param-bits 0..N onto the classes: +DRM_UT_<*> for the DRM use-case. + +Dynamic Debug Classmap API +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + +DYNDBG_CLASSMAP_DEFINE - modules use this to create classmaps, naming +each of the classes (stringified enum-symbols: "DRM_UT_<*>"), and +type, and mapping the class-names to consecutive _class_ids. + +By doing so, modules tell dyndbg that they have prdbgs with those +class_ids, and they authorize dyndbg to accept "class FOO" for the +module defining the classmap, and its contained classnames. + +DYNDBG_CLASSMAP_USE - drm drivers invoke this to ref the CLASSMAP that +drm DEFINEs. This shares the classmap definition, and authorizes +dyndbg to apply changes to the user module's class'd pr_debugs. It +also tells dyndbg how to initialize the user's prdbgs at modprobe, +based upon the current setting of the parent's controlling param. + +There are 2 types of classmaps: + + DD_CLASS_TYPE_DISJOINT_BITS: classes are independent, like DRM.debug + DD_CLASS_TYPE_LEVEL_NUM: classes are relative, ordered (V3 > V2) + +DYNDBG_CLASSMAP_PARAM - modelled after module_param_cb, it refers to a +DEFINEd classmap, and associates it to the param's data-store. This +state is then applied to DEFINEr and USEr modules when they're modprobed. + +This interface also enforces the DD_CLASS_TYPE_LEVEL_NUM relation +amongst the contained classnames; all classes are independent in the +control parser itself. + +Modules or module-groups (drm & drivers) can define multiple +classmaps, as long as they share the limited 0..62 per-module-group +_class_id range, without overlap. + +``#define DEBUG`` will enable all pr_debugs in scope, including any +class'd ones. This won't be reflected in the PARAM readback value, +but the class'd pr_debug callsites can be forced off by toggling the +classmap-kparam all-on then all-off. --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26262205E3C for ; Tue, 2 Jul 2024 21:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957520; cv=none; b=WtS9KVxzP+pJFPgYTj6hn4QmtS0mIRzOaG+lrN4dLlQ72F+9dvcJT8AgAGh92YQPPVfwED6F+5KWz1OF2IlTZEciuStibDKINmQfLcjn2BfnAfDyT3NKcGa5dlMsCmoRHDM3xYkYVPVJYjkcyXdX9aTAD6BFfE/ZTV8X1lQ1KEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957520; c=relaxed/simple; bh=icwqeywsyrttsSDlGtVX51FXgI87DPMODzf+SUKMTJ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bwMUvcPN2HKujvbe8QZE94HMHFp7mTWtVe9Qb+vho5mgdZA5trncpWWyBDFMVpDraZOrnoy6NNVwHJCyCHD0HoLc4lqjleFT3lkEpiemvU18SMOaav7ZpJt3lhFEoja0JIkToMw3hfCJ4DK3R/1EBWyzSwFyZeDOyWVxN3rReeg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CDUKS2oB; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CDUKS2oB" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7f65715fe2cso34945439f.0 for ; Tue, 02 Jul 2024 14:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957518; x=1720562318; darn=vger.kernel.org; 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=xowWZ+ekpberKm26oOQ15iL0A2hZa3GfKHRI1+lg3PY=; b=CDUKS2oBC3O0yTIFkaPKK8EADDkiMmo6xQZYmnYMNZAF55W9sPMo1cwiFGJwZVdi/z g3LTHIBlUDE8zOlT0p+yyZAvTWwVDKNSVcrWeRvJd/4yOeyka6WJsphjxtGH+c9Ju3o9 L8GsBQyjRc7S0Nvhw+BBfNwUEQxvKdmt1e12VeKjBjfTLVHiJ1jb7WcIRYlLOO34dKT7 zFBl/Q3fHvzKVW2wzNI36xZevFOiw4xq0k79ucAWVhE7stIxA4JwYG695pL6HbrtfVcH rnOE+ls+m1LDyH4P4A/egmDtS85khtFwm6SGMSv3JfCGefEnDYrN8g2iNK7x1QWnk8RK SZ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957518; x=1720562318; 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=xowWZ+ekpberKm26oOQ15iL0A2hZa3GfKHRI1+lg3PY=; b=n1bMz9gPd0SZClK6xM9CpnlOwF5x3IKAFwebx+kUsESlhSzAe+q+i0ORZt7hEb+iX3 jB+Yw0vW1Dsbrtf2gvV8AHHaflrhutcd99nppYzWyVc3QwjyCHV+5Vrw7V3XOHxdagjj rpEgmrfDvppIik5hSWH+LFnCze0QjZKeoVSpTXz7vGLHKz/LTHNoTOmy9CAQfkWdj24U XGoLNQBZNkc7nfdSC5P3abWLYvwOO8ichC1JVw7JY094OGxUGH9HilfqgYfvb7WxKSMR uNzfkQpiTHHu8byiVx99fXutDx+rQIjnZspGIhXdnsF/Ip3ihK1IHHsH96fZ/rxs5obR dNsA== X-Gm-Message-State: AOJu0YzyIzad+dpybtKhfxOPdyJew072z7QWe4VHWul5r9xMEls1bwLw OPH8/XFpaaoSwhHCzO3ecgRq7IDb5BVDNs6+h63DIxopjhfgE7DK X-Google-Smtp-Source: AGHT+IFEGPMJ0Jh14wpvUFc2djetIH1c1nAPVR9FTMSLomEU1MSc3gn/62MyPuGbMB621f76l28FXg== X-Received: by 2002:a05:6602:2bfa:b0:7f3:d731:c6df with SMTP id ca18e2360f4ac-7f62ee501eamr1142864839f.10.1719957518165; Tue, 02 Jul 2024 14:58:38 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:37 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 19/52] dyndbg: treat comma as a token separator Date: Tue, 2 Jul 2024 15:57:09 -0600 Message-ID: <20240702215804.2201271-20-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Treat comma as a token terminator, just like a space. This allows a user to avoid quoting hassles when spaces are otherwise needed: :#> modprobe drm dyndbg=3Dclass,DRM_UT_CORE,+p\;class,DRM_UT_KMS,+p or as a boot arg: drm.dyndbg=3Dclass,DRM_UT_CORE,+p # todo: support multi-query here Given the many ways a boot-line +args can be assembled and then passed in/down/around shell based tools, this may allow side-stepping all sorts of quoting hassles thru those layers. existing query format: modprobe test_dynamic_debug dyndbg=3D"class D2_CORE +p" new format: modprobe test_dynamic_debug dyndbg=3Dclass,D2_CORE,+p Signed-off-by: Jim Cromie Co-developed-by: =C5=81ukasz Bartosik Signed-off-by: =C5=81ukasz Bartosik Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index e9a95b0f3757..235d85765b63 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -290,6 +290,14 @@ static int ddebug_change(const struct ddebug_query *qu= ery, return nfound; } =20 +static char *skip_spaces_and_commas(const char *str) +{ + str =3D skip_spaces(str); + while (*str =3D=3D ',') + str =3D skip_spaces(++str); + return (char *)str; +} + /* * Split the buffer `buf' into space-separated words. * Handles simple " and ' quoting, i.e. without nested, @@ -303,8 +311,8 @@ static int ddebug_tokenize(char *buf, char *words[], in= t maxwords) while (*buf) { char *end; =20 - /* Skip leading whitespace */ - buf =3D skip_spaces(buf); + /* Skip leading whitespace and comma */ + buf =3D skip_spaces_and_commas(buf); if (!*buf) break; /* oh, it was trailing whitespace */ if (*buf =3D=3D '#') @@ -320,7 +328,7 @@ static int ddebug_tokenize(char *buf, char *words[], in= t maxwords) return -EINVAL; /* unclosed quote */ } } else { - for (end =3D buf; *end && !isspace(*end); end++) + for (end =3D buf; *end && !isspace(*end) && *end !=3D ','; end++) ; if (end =3D=3D buf) { pr_err("parse err after word:%d=3D%s\n", nwords, @@ -592,7 +600,8 @@ static int ddebug_exec_queries(char *query, const char = *modname) if (split) *split++ =3D '\0'; =20 - query =3D skip_spaces(query); + query =3D skip_spaces_and_commas(query); + if (!query || !*query || *query =3D=3D '#') continue; =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6941218325C for ; Tue, 2 Jul 2024 21:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957521; cv=none; b=VGKM230BR5cxQr+jUb2A03Zdx3Pg0aAQXcvYDN4PgmfSKODSaCAA9fHYlKattI04I/DZj/nS30J/W6Sll6SuJbGgg+j/R5xnMhKgpl1FyE3ovhVgpqxW52fNhSg/vtqNMLUFzwTbQCsOWOzMU8EXny/M0YvoekrsetGasF5U4jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957521; c=relaxed/simple; bh=kNrEoJCOfsjI6sAferW1c8ANnU9jCPipaa5wQV97i2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cp5hDBMjiguaZJ0Cc67kGvbKjcg7oXG04ay2d1nWM9zehVVxab1an6tzjJMkdLfhhPVlyfo1EF4UztxHAwwrQyV976LiB+Q5Z5ShC3A4NP0Vx0/kYHh/yppHWuZ31dak/eZY9CtOkkqyYJeGmDHPvyOe+YNwXqBHzR6Sf4kzYtw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=F77Rfs9k; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F77Rfs9k" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7f65a32a58fso21859039f.1 for ; Tue, 02 Jul 2024 14:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957519; x=1720562319; darn=vger.kernel.org; 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=86vugQ8piC6pzh4RgCq/qOTI8lQn1pJMR2FsXqHUdq8=; b=F77Rfs9k1APuwTbkzMKl5tXZ79B7Gn8axNvf51vFXlOSYtnhOa7iW/XYS0XtTb1PrV w+xmMqDYIb7TsyEF33/7564Nt9dEBGZOhiKYJhgPSp1jFFdbqVaaPwhYXVkT+J5y6iaE F/yGEdm4SAlTSdWe4hfPrJUFKmJS2GK/iz5YO7AiffERLZsmp8cHKOf3k4if1N5/Kir5 mWl6e41liyHYyyKgocNknErK8FZmtaDANakgZjT+WMhDLQy48PQ6jo6e1YYh4/YTpXYG yAANef6IkucxXn6JHIKyxhzOXS+9muTup+RDlLWK5MLKlvyb/aDja7qYK2i0OgVqfJMX lr5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957519; x=1720562319; 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=86vugQ8piC6pzh4RgCq/qOTI8lQn1pJMR2FsXqHUdq8=; b=cCssZ/0IRYUDngGUkOv5QtAKayqDzegPiCAxoOLc1bM0MzwYDp5JJyWJbqB29D8S/j 2rM/KD01clTkGIK6kdVgCQoJkJqWTWXOxY0ZEMvmx0m3SBOfLuGRlILmjgXYPHmKUSN4 8vf+1JFywpsKYmG88KC0Dx10TKdD9Qna9bjJR9N6zefilHsJee91bZ52xN5VmJRup1Ps PcgHOeh1h6SSIY6KiwfxshhT6Lr/TV4+ZZWEwetAFDmxct1az66mqa2uwSSttFfbhmpq kTFW5fhh5+SzosbrYQolBC7kDYBakXF9T3aNdIQnqeiJb7GghksV+H5bdPElOf2a6hWw 7HLA== X-Gm-Message-State: AOJu0Yx62lweI3wZss+Cp1f2v56DZrwjMhQQBAYg78eRYmKbUg4ayeU3 XTTGexy1GVlFpvl1Oa84PmNySrdwp3299dPBtMnMcxU3+B3SSKDw X-Google-Smtp-Source: AGHT+IFh4NknMSqrRunexz7bPyO+GFuFsoZTUZjnQuX30OfvbKxEu2+OkmD/dNXRlYHLCXi/CEVDEA== X-Received: by 2002:a05:6602:15c2:b0:7f6:19b9:3a3b with SMTP id ca18e2360f4ac-7f62edfe2e9mr1313056939f.1.1719957519578; Tue, 02 Jul 2024 14:58:39 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:39 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 20/52] selftests-dyndbg: add comma_terminator_tests Date: Tue, 2 Jul 2024 15:57:10 -0600 Message-ID: <20240702215804.2201271-21-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" New fn validates parsing and effect of queries using combinations of commas and spaces to delimit the tokens. It manipulates pr-debugs in builtin module/params, so might have deps I havent foreseen on odd configurations. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- .../selftests/dynamic_debug/dyndbg_selftest.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index 1be70af26a38..b4ba293ab227 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -212,9 +212,23 @@ EOF ddcmd =3D_ } =20 +function comma_terminator_tests { + echo -e "${GREEN}# COMMA_TERMINATOR_TESTS ${NC}" + # try combos of spaces & commas + check_match_ct '\[params\]' 4 -r + ddcmd module,params,=3D_ # commas as spaces + ddcmd module,params,+mpf # turn on module's pr-debugs + check_match_ct =3Dpmf 4 + ddcmd ,module ,, , params, -p + check_match_ct =3Dmf 4 + ddcmd " , module ,,, , params, -m" # + check_match_ct =3Df 4 + ddcmd =3D_ +} =20 tests_list=3D( basic_tests + comma_terminator_tests ) =20 # Run tests --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0E3F20FA82 for ; Tue, 2 Jul 2024 21:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957523; cv=none; b=aSQg+3EOwW++Tn27i/vGeKhrubf8B/jP+Wr8IB/3BufAu5lsjXF+rCqlrYfIErcW9vQRlvULyncIlfV4IMrF1HON0UvnM9gdNR+Xz+h3uRLdZAIowPug59Pok7NmdQgSvZ6JaBQyQlsJpDI1uzJwa0ddUxeY92lX/gSLninmrJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957523; c=relaxed/simple; bh=OoinRYwI1RLCkMaax/q6nzarMvJOHgCe+p9o/nhwCQA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R8vndTxXDzzKrXuxH/mneZky0PvstFt2S0UNC+2izj03pJerflmQCQV5Rq7UwM2tOn/tp3KbIK3Jt0/dFGRYFc+DFfwP5xzBNIL+n9uAv5QdfgSIkFutyv68O5TQQi8/9KN0rPYD+qfRoE92j9kpSfqX/cGr5BVi0dqdVk1fyGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bb7BUTE5; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bb7BUTE5" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7e21dfbc310so177438339f.1 for ; Tue, 02 Jul 2024 14:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957521; x=1720562321; darn=vger.kernel.org; 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=VIvOBtUs6wwUYmdF+Bm1LKjLjq3TMDH2Ljy+h6N5XvY=; b=Bb7BUTE5Yl0XAOBG15VcOLeBXu/YalxFQD9pOIjPNsXsqOwIGNnACw03Au1HOcfLFX ESAxlfD/Mun/WU5JFAnBLVZQlEZm8pQjgyBNn/xAr5cvU966z7vjtMLJjWrm+Z/MR2wJ WbdjAh+yH+pFmHeQsSfSNDuoBnPyuyTO6aACAcryXsWggYSvtfEv++ToMLag+UVLlwva tPZBRJ7TxJNF22Iaw7W+2p6oIBrnA1NkVVBFumrict1n3ooaSO40xk/oMmemZPSkEmjN tXcaF4BxWbEkXQF20SBB1YYAUd2XgKMdRKqyvmEBF6S6vBkYUbn1yTC8SdObSm/AY5gJ TuHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957521; x=1720562321; 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=VIvOBtUs6wwUYmdF+Bm1LKjLjq3TMDH2Ljy+h6N5XvY=; b=GpkT61DnzsmjL8xvRnc/0mKdgj+qnsRLWYYXHVNsuazzdB5F5kwkY4mH6voRdgTSZB GUjjm8NByyAKb2o2CEJeowv1Lazhn/ZMRL45u5KIVDZ064P9VIK2ZR/XEoAAjPWL+m5L WWCiZtN7Z3qub6YYsAO2DSh/m3+zk/52fhY/kI6JRxDimhKkVAdexYJgRjCEcYIL6U9T Vd3yJb8ppRDf4tiIomwBKGoSko12OniXHM8q2sH7KnvECJwXr4FP8pSaykXz/iM1NS0G mRMSERiZUoNVMcC16eYIHN0wVjIBLioK/zBpx37auT+CC9iBzWL63jrRj5rckbrxUwDn Alig== X-Gm-Message-State: AOJu0YxdkkbYuY59XAvMx7PvetgGPjVCNgulZ6oswqQ0aeZdpbmJMUkD 1kFCLjZPVbI+Emd+v6iHjMN27Nk7gBjLjqg1Rnacy6xuxnqEl2F+ X-Google-Smtp-Source: AGHT+IEk2c1hL6ZUgrQgYe6v2wFx5FJYF6vj0/kQsd1seeLP/2lOU4aeFAE+8OqE7VHd9h3YIT7KPg== X-Received: by 2002:a05:6602:1209:b0:7f3:c683:2266 with SMTP id ca18e2360f4ac-7f62edff7b4mr1072199639f.4.1719957520998; Tue, 02 Jul 2024 14:58:40 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:40 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 21/52] dyndbg: split multi-query strings with % Date: Tue, 2 Jul 2024 15:57:11 -0600 Message-ID: <20240702215804.2201271-22-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since commit 85f7f6c0edb8 ("dynamic_debug: process multiple debug-queries on a line") Multi-query commands have been allowed: modprobe drm dyndbg=3D"class DRM_UT_CORE +p; class DRM_UT_KMS +p" modprobe drm dyndbg=3D< [ 203.902703] dyndbg: query parse failed [ 203.902871] dyndbg: processed 2 queries, with 0 matches, 2 errs bash: echo: write error: Invalid argument The '%' splits the input into 2 queries, and both fail. Given the limited utility of matching against the working parts of a format string "foo: %d bar %s", nothing is actually lost here. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 235d85765b63..dcec7b3657bb 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -596,7 +596,7 @@ static int ddebug_exec_queries(char *query, const char = *modname) int i, errs =3D 0, exitcode =3D 0, rc, nfound =3D 0; =20 for (i =3D 0; query; query =3D split) { - split =3D strpbrk(query, ";\n"); + split =3D strpbrk(query, "%;\n"); if (split) *split++ =3D '\0'; =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCC46189806 for ; Tue, 2 Jul 2024 21:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957524; cv=none; b=Xrf3g+WNo8cDggOU5olUng4tX8GKkXArlmUWlI/0kPfxHOxopgwaJ59ffVjTg3h/aeSUBWXgbnzhNXG2d91Fq7CwINpJir8E/XQKGHBwN1upDJcDdRVssrlzhFiGd6Us3RTILFk6fG1upy9cqFxF2flJzjUgOq9JPTzM6q45+u8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957524; c=relaxed/simple; bh=XNa+7BsfG3j+8ZebdUR1b6sN3/Wty2dm0XB0JSgVOIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nv6ooQPiv5g+qBbHlXCJz5Jwo7nSogZ9HqPulJUdu3H71d23OgPMhMDSqFMptbLtJD56iHQtZAHwZAQJLtXaibdJWFYxkRxZFpEfOZhdOMFvQ3y2GKH0PBcopAXWYP48NU7aHPMcsof2E2P+xq5huIRs/ns4M8xSS26IxZp5vzw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IxaZOwHe; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IxaZOwHe" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7f3d3919a4aso177936139f.1 for ; Tue, 02 Jul 2024 14:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957522; x=1720562322; darn=vger.kernel.org; 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=aFcSRVkNrMoAaN9TOyRvWGwNcmbCrlZN4vnmf8E27Go=; b=IxaZOwHe7eGUU8+9PyKEyvznMnudWGfnt5kVj0ZDXWdNTWCJ46HBSnnncbapMISEJF jVolwXW1/AgVSpcz4nIb4B+lo2pTovJWvgWxWpMZT6QwsDXerLKueKakNfJ7M18eDBmo qkAJUNqOwWu82dg+ISrWrnQuGQg248zzFHzChNNXODI2WDhMyTgn2IrJofap1UPn9E7r 1hVvo0n5Wz9RzCkAz58ij///H/XHJeCKxTPGc9gR62eWF6qyiKGdkODt4GV8ceIz4q/H DTPx1mrA1Fi1SGX/gS+dbPuW2f+vJmdaOSwgPQFn3O4Hr8yms/M/6aNtO4fZMBXKTGcP Meag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957522; x=1720562322; 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=aFcSRVkNrMoAaN9TOyRvWGwNcmbCrlZN4vnmf8E27Go=; b=RrS0+rRKzl8qO+7zGnPV4qxmf8vS23Bm1EA0gKZ0nF5NOY/HXqRF0R3nli6O4opTFK cor2+DY6iqrrZEijO2Fqnm/93M6v7A28C6myEFQsjpSDOugS6VFBLHfCE+dNkJGeNKE0 kdm0mB3orv5DUwaisT+5vdE6UTsKcR9fBWKbtr+dhiEEpVOX65YGPWUKbbTiqy+XDBfD h3MQD6G3dzHtAXenHKuJdEemabq0fsbFaiiK/+BYeCGAhYh/0u3WH1fBPQCknrSvobe1 7j1v8p/uYUeEsw0TOgWk2BsbxZeyni2jcN+bKClSNEmnzt+8vblnNdED40QCOfWNlO+u noQA== X-Gm-Message-State: AOJu0Yw5SIDXduC/vOsWws68TwORQlbN4ubidI+3ao27KPwVDt0fNpih fHx+S8nfIhAokxVVzgnnyO4vxmC9dZxceHVlYyAaIAzlyP7+6X/0 X-Google-Smtp-Source: AGHT+IF5HPTrp3Ibm1axLqWBCHtlXKaMWg0JUdhWqqnYWUpVoXtgbCh5izMMhwYMrBWm7qH5p9dPSw== X-Received: by 2002:a05:6602:da:b0:7f6:1542:4e94 with SMTP id ca18e2360f4ac-7f62ee9d603mr1046263839f.20.1719957522025; Tue, 02 Jul 2024 14:58:42 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:41 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 22/52] selftests-dyndbg: test_percent_splitting Date: Tue, 2 Jul 2024 15:57:12 -0600 Message-ID: <20240702215804.2201271-23-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This does basic testing of classmaps using '%' separated multi-queries. It modprobes test_dynamic_debug with several classes enabled, and counts to verify that the expected sites show the enablement in the control file. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- .../dynamic_debug/dyndbg_selftest.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index b4ba293ab227..996e6fdcfb52 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -226,9 +226,30 @@ function comma_terminator_tests { ddcmd =3D_ } =20 + =20 +function test_percent_splitting { + echo -e "${GREEN}# TEST_PERCENT_SPLITTING - multi-command splitting on= % ${NC}" + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + ddcmd =3D_ + modprobe test_dynamic_debug dyndbg=3Dclass,D2_CORE,+pf%class,D2_KMS,+p= t%class,D2_ATOMIC,+pm + check_match_ct =3Dpf 1 + check_match_ct =3Dpt 1 + check_match_ct =3Dpm 1 + check_match_ct test_dynamic_debug 23 -r + # add flags to those callsites + ddcmd class,D2_CORE,+mf%class,D2_KMS,+lt%class,D2_ATOMIC,+ml + check_match_ct =3Dpmf 1 + check_match_ct =3Dplt 1 + check_match_ct =3Dpml 1 + check_match_ct test_dynamic_debug 23 -r + ifrmmod test_dynamic_debug +} + tests_list=3D( basic_tests comma_terminator_tests + test_percent_splitting ) =20 # Run tests --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A809817DA09 for ; Tue, 2 Jul 2024 21:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957525; cv=none; b=IV7qePR9T3wHHXPtBQByp0cFbarfmKOPF9K4TfzcS2xSR9lwMpFDFC1cB9F+mWkYgFcsh/METsbZIWEWcCgSZ31UAyJY4d7ix3EZH6/CGLKyeh6mxIIHXYYRpOIlEDwZkj3m9H4hXGT9A41yQZQqBR13ivf1YU6N1XlMU7lMLTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957525; c=relaxed/simple; bh=K2Pt5C7+uMfFDUJDGtIwDknCNCrErFm8MnfSc8YM8c0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g3rLloCQftHPf9EciPNVSkPiaWXeCB04UxpcRWqX81W/Ze68DXqrxnqyLvYyM+bZ/ZO8AYlthpgimcz0uxwFwYl4RumoR6QFsCJ2kalOUM0QFJPzqIb0fKm8tVFofkj31Sh+44A+8e51rwcmFOhIdl0qVMr7Im/N/SJIA1Y4nyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C2tjSWve; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C2tjSWve" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7f38da3800aso181523139f.0 for ; Tue, 02 Jul 2024 14:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957523; x=1720562323; darn=vger.kernel.org; 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=mXTp2HWUUrTrRl4eZ7svqhTsXgDwW8WuleRWg/xTtcY=; b=C2tjSWvewxr/umgzhV0pjeymWCpk37u0aTwXqFGNGpPdY3z0aLRmH+1KeWK805d3G9 3/t75WfoiJhd+fwImqDXAqksNQ4hkwq2QR29ZU9hal2HxoLtfQwVzkVrZrVsCT45rRVj r3aiUXGcRKYVRdZLg3MiU1tigKCjoeckC7u1XtXavlPbfdobUhZj1DsHknzybEW5qr1k VG/5GH39tQstLsbN7Y1Z+AIa8yrsVl4Pe4WjPgUaXrqR7yNMxhSHs7KUyjLju1HQc3CW E63k1xsbm0wDXMXpRCNTDZX9bcEsr93OSHR2q0Kt9shse27HSoQ6OHiX45xUx7XYAUI5 Cr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957523; x=1720562323; 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=mXTp2HWUUrTrRl4eZ7svqhTsXgDwW8WuleRWg/xTtcY=; b=FfttVBtEbnHXRFW6cCi7u0oOJ956feoGTjJoCnklpGXyd6GLE6Pai7ejiIemaLKXhz ZNm6b/WOmObqyPHbJqDYS5ktOCCujy+VshDxNWLd18nxiTq/rkbggZMYGFbTkHhX2Y8I epNkE36aPr6LWguJX5n5N6+kAZd7eaiw8hG+pX9UDQEnwrNPOhUQyZmxlMDNat6WIhow mSZ5VtSOUmHAmAX2UpD/mDjRxUk4DQ0p8cEHES+OpDzXFA863Zl9kwjtBeTEkDH9sFzM UweU6HTfDJUYPFbvW5ZsPKNZCWwdw/3JjyhGLfjQbT4MGH7riCzkaqWXTbK2PWt3cmJu 5Owg== X-Gm-Message-State: AOJu0YyHTHs+MV66C2wxGZWBZplYsFnhdVuYzS+RDLoV4iUTMNMyEHNB 96UzuBYT5cqWRXjucYVhglclQiYnyZkRjwmSyjnjhza6hZ5/u0MZ X-Google-Smtp-Source: AGHT+IFrIiyJSkf6W2TunW5BCKgPQouB2T+lSzdbM4fMP+xI9st2vbvsZqO7st8XPig5Y++ArDLzWQ== X-Received: by 2002:a05:6602:355:b0:7f6:1dff:e364 with SMTP id ca18e2360f4ac-7f62ee02647mr1168457139f.1.1719957523053; Tue, 02 Jul 2024 14:58:43 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:42 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 23/52] docs/dyndbg: explain new delimiters: comma, percent Date: Tue, 2 Jul 2024 15:57:13 -0600 Message-ID: <20240702215804.2201271-24-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add mention of comma and percent delimiters into the respective paragraphs describing their equivalents: space and newline. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- .../admin-guide/dynamic-debug-howto.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentat= ion/admin-guide/dynamic-debug-howto.rst index 742eb4230c6e..7b570f29ae98 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -73,16 +73,18 @@ Command Language Reference =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =20 At the basic lexical level, a command is a sequence of words separated -by spaces or tabs. So these are all equivalent:: +by spaces, tabs, or commas. So these are all equivalent:: =20 :#> ddcmd file svcsock.c line 1603 +p :#> ddcmd "file svcsock.c line 1603 +p" :#> ddcmd ' file svcsock.c line 1603 +p ' + :#> ddcmd file,svcsock.c,line,1603,+p =20 -Command submissions are bounded by a write() system call. -Multiple commands can be written together, separated by ``;`` or ``\n``:: +Command submissions are bounded by a write() system call. Multiple +commands can be written together, separated by ``%``, ``;`` or ``\n``:: =20 - :#> ddcmd "func pnpacpi_get_resources +p; func pnp_assign_mem +p" + :#> ddcmd func foo +p % func bar +p + :#> ddcmd func foo +p \; func bar +p :#> ddcmd <<"EOC" func pnpacpi_get_resources +p func pnp_assign_mem +p @@ -104,7 +106,6 @@ The match-spec's select *prdbgs* from the catalog, upon= which to apply the flags-spec, all constraints are ANDed together. An absent keyword is the same as keyword "*". =20 - A match specification is a keyword, which selects the attribute of the callsite to be compared, and a value to compare against. Possible keywords are::: @@ -128,7 +129,6 @@ keywords are::: ``line-range`` cannot contain space, e.g. "1-30" is valid range but "1 - 30" is not. =20 - The meanings of each keyword are: =20 func @@ -153,9 +153,11 @@ module The given string is compared against the module name of each callsite. The module name is the string as seen in ``lsmod``, i.e. without the directory or the ``.ko`` - suffix and with ``-`` changed to ``_``. Examples:: + suffix and with ``-`` changed to ``_``. + + Examples:: =20 - module sunrpc + module,sunrpc # with ',' as token separator module nfsd module drm* # both drm, drm_kms_helper =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D881518B440 for ; Tue, 2 Jul 2024 21:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957526; cv=none; b=rIX5DJhbo7L9iwlt8yY0I/qD1qBxOl6yUqFDx1aDBJVQ8fYs8aY6DJGbVSJCdp+tKtj4HJ3mZ3DGELkuY/q7miVj949L0xDl9HBhW+F77x3ojwblaVVrryeCQy3InSVRPx2BxFCgYNDcksVP54heI/EUksRJ3Wp6Y7D06e3dZAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957526; c=relaxed/simple; bh=kN/R7Fl1F1fcLv8VsLR2kYVGn+R+bGjHHORasn7sytk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FY3hksE2v3nitmCevTjqxpeoS/KY64UUIoUd0G1ytUQEjQOLppaMmbabRrHXDRyyUF2obC1RuOlr1HrIyfG88Q6rhGc5emdJ8UyGxDOvZ83NIYVZDJZKyKaUFetlAAAaJCSyJFXiXXXsRcq3P5dYwQiZOHF3Nn0w6Y5z2zRj7eg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Yjlces7C; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yjlces7C" Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7f3cc78afb6so165123539f.0 for ; Tue, 02 Jul 2024 14:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957524; x=1720562324; darn=vger.kernel.org; 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=gJdYoevwZB2aGfv474+weXhid0sQKo8sv3F+UqQdL9E=; b=Yjlces7CuTWkj2oVILF5DJhk5j57veL/Buf3ux70FlJDFiI3MQHBN1RNJD9xet866P KCCVfhOVKPyqoFXSKhi6Uh2L029bUT8p/VAQquBorbZUia624B56/Yk4Otw/6ZPrnngd sr8GzCfgzaSFJVjyWEd/WoQwu8HhFzkzWHMFxzLfew3+avOSEa3+/iEvM0+0dIDgNX8R 6vUg1aKHw/pMd5haowayihPkwIqosnqtegyNVwAUOqMCTpxH6InfcL5+xEEqVtGzlKeM nY2PEkaucACaS5unaOc+ziNvdc5gPQjWAP6tOq1RyPv3fm32+MQ4XTby5+SQ2cNZwjrQ ADug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957524; x=1720562324; 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=gJdYoevwZB2aGfv474+weXhid0sQKo8sv3F+UqQdL9E=; b=DJUh3RNS+fPvnOahOs9nOCBz376a6QJjiq6d6Yx05eTP3USeFEFYimoLNK7k82I25g tG8adsJYkmPvZrmIolGAb5gNQwyysAadcc3/FA/jlb6VRXG6+c868qCn+HVd4ybYxrMQ ipfaG3OpukuKxhNORdPGJdyeKXX0qujZtBBQRyU3YcJIvdOM4njMc3t5ZGAbbp9EI0sS CF/qpX7Ayvip3QgY0AHO3w8cdysUCwkD0II2Qu7r/pYQFdj81CNfYnxe2T360G7NhOyW DI9RpGypWRKzqwfaPM8S44bg34a9nxYOIpUo6nAf58aM/e56m4QhsB8TEAxJGN29/dQ8 Bblg== X-Gm-Message-State: AOJu0YzEW+VFbyGR/DRmxnv+D1nfCyU8vusX9XOWoV4NNRCMG+kxQVQ0 LQrPjkBJRF3JJevGve1KrltiBYKqZMRedG2PAi0VERIgV5z71QKG X-Google-Smtp-Source: AGHT+IEgboiDOACnMDW/LW0FiCtZfq/bakC9SgKt/T+YKx18pvft97POgcA+NAVH1NrTKBqUsmzF2g== X-Received: by 2002:a5e:d606:0:b0:7eb:d640:274 with SMTP id ca18e2360f4ac-7f62ee622b1mr1057775039f.10.1719957524024; Tue, 02 Jul 2024 14:58:44 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:43 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 24/52] selftests-dyndbg: add test_mod_submod Date: Tue, 2 Jul 2024 15:57:14 -0600 Message-ID: <20240702215804.2201271-25-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This new test-fn runs 3 module/submodule modprobe scenarios, variously using both the generic dyndbg=3D modprobe arg, and the test-module's classmap-params to manipulate the test-mod*'s pr_debugs. In all cases, the current flag-settings are counted and tested vs expectations. The 3rd scenario recapitulates the DRM_USE_DYNAMIC_DEBUG=3Dy failure. 1. 2 modprobes (super then sub), with separate dyndbg=3Dclass-settings check module specific flag settings 2. modprobe submod, supermod is auto-loaded set supermod class-params check expected enablements in super & submod 3. modprobe super, with param=3Dsetting (like drm.debug=3D0x1ef) modprobe submod validate submod's class'd pr_debugs get properly enabled The test uses multi-queries, with both commas and percents (to avoid spaces and quoting). This is the main reason the test wasn't earlier in the patchset, closer to the classmap patches its validating. With some tedium, the tests could be refactored to split out early tests which avoid multi-cmds, and test only the class-params. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- .../dynamic_debug/dyndbg_selftest.sh | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index 996e6fdcfb52..fccd2012b548 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -246,10 +246,77 @@ function test_percent_splitting { ifrmmod test_dynamic_debug } =20 +function test_mod_submod { + echo -e "${GREEN}# TEST_MOD_SUBMOD ${NC}" + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + ddcmd =3D_ + + # modprobe with class enablements + modprobe test_dynamic_debug \ + dyndbg=3Dclass,D2_CORE,+pf%class,D2_KMS,+pt%class,D2_ATOMIC,+pm + + check_match_ct '\[test_dynamic_debug\]' 23 -r + check_match_ct =3Dpf 1 + check_match_ct =3Dpt 1 + check_match_ct =3Dpm 1 + + modprobe test_dynamic_debug_submod + check_match_ct test_dynamic_debug_submod 23 -r + check_match_ct '\[test_dynamic_debug\]' 23 -r + check_match_ct test_dynamic_debug 46 -r + + # no enablements propagate here + check_match_ct =3Dpf 1 + check_match_ct =3Dpt 1 + check_match_ct =3Dpm 1 + + # change classes again, this time submod too + ddcmd class,D2_CORE,+mf%class,D2_KMS,+lt%class,D2_ATOMIC,+ml "# add so= me prefixes" + check_match_ct =3Dpmf 1 -v + check_match_ct =3Dplt 1 -v + check_match_ct =3Dpml 1 -v + # submod changed too + check_match_ct =3Dmf 1 -v + check_match_ct =3Dlt 1 -v + check_match_ct =3Dml 1 -v + + # now work the classmap-params + # fresh start, to clear all above flags (test-fn limits) + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + modprobe test_dynamic_debug_submod # get supermod too + + echo 1 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 4 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( V1-3 + D2_CORE ) + check_match_ct =3Dp 8 -v + echo 3 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( D2_CORE, D2_DRIVER ) + check_match_ct =3Dp 4 -v + echo 0x16 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( D2_DRIVER, D2_KMS, D2_ATOMIC ) + check_match_ct =3Dp 6 -v + + # recap DRM_USE_DYNAMIC_DEBUG regression + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + # set super-mod params + modprobe test_dynamic_debug p_disjoint_bits=3D0x16 p_level_num=3D5 + check_match_ct =3Dp 7 -v + modprobe test_dynamic_debug_submod + # see them picked up by submod + check_match_ct =3Dp 14 -v +} + tests_list=3D( basic_tests + # these require test_dynamic_debug*.ko comma_terminator_tests test_percent_splitting + test_mod_submod ) =20 # Run tests --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03A6317DA15 for ; Tue, 2 Jul 2024 21:58:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957527; cv=none; b=eBfWSwe0il+WuO8jRLlWBURPvOEOxFeZyyNv36jEwD4P8THDbjX3tpYW7eBa3Atc16htRKhiTOscq7q64ns0+chILKxAh5BdAnld9NHC0vcLxKbM5zw3WqCLSCwwRt8pIQ0ZI+M+/LG9IayATMn0zz8h0ILcN0zPFfzGHSxLCiE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957527; c=relaxed/simple; bh=xz4ayeIEfnsbKz6byqcq4Sdf23ac6igLKRe8POg37eI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AuciXCTnTsUSsVrrhDQgfldbHsFBH9uGFdWWi4rljT+CN4t424BadTeAxEK7diWwPRQBukmqZsICgM7cKpRvunRSJDOXmfIx8cauWxIxZrA8iST/drj3jbIscyTbmD8fjrapWoYyh9sg7d32rsGjc+zxro1ap/l87tV+rfIk4QI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fqupiE4z; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fqupiE4z" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7f624e70870so253598839f.3 for ; Tue, 02 Jul 2024 14:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957525; x=1720562325; darn=vger.kernel.org; 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=c/0f+WJi9XEdvmbVJJgJH3wGY/BCuH90DF46SNcsdjc=; b=fqupiE4zyzFJAvG8kdyzP5xb1HViD9KhmdAXDZ9sHjVJfyKtRxBHUBUF8gUvg5tMwy gJ7YlNNXj+Bb1vENL2f31o1xUcD3FXbzJO/QCrnri3KT55JUOGF+YD1owsdGwtiLVvKT ely5jFIM1pLHrXS4sIGwcuaOW4Xrfzqc0Sh6ZhoeqC/HYszjEOKGT8Cjt+G61IQCXD1G vUKR6XYVcabuyH7TEiG9rAY3hkGTp6Oyeh5pJJlHzSHrUZUqzptZ+IEoQO3lGSHDtNKd PhftUG+MOYp/hbbZHNg9n+UXxuh81HMuQddruPIrdUvI+Trzy66kGGwGMJ75Ae5k/ckw ueZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957525; x=1720562325; 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=c/0f+WJi9XEdvmbVJJgJH3wGY/BCuH90DF46SNcsdjc=; b=SBIqX2A+7eA+hhGXoXYI4IAupmcifZeOJsvAB8sO0yf0V9XC5xI158g2FWVFMPScnD pS/HjKEKstRH14myFkO6NKGUd/lbqbKHUqJk5GQDGem4B26YjwEsudNNChxcG+a2GbWU Q0W1Ztc359BwYGPTjRqQfiY9OKuwzEn1dUEfPgTJJQkuWsHnOVKNxR5V8BZsOyzPdhBq 7yiBjvfsNgLn4PLGblrM35WN4P9U7TFe5bCtbePuIjoEGdvLDJU5AQvsJyE40dgNy/uw g5i9p/RiUgpO8iAhslxBqev+kyzlpFruky6m/nMcT7esI2hOMpTOkFq/B14Lww2Qk/U8 Yq4Q== X-Gm-Message-State: AOJu0YzAf5Lvj9ESmt1iSaVFsni92cFfExyQyY/6EvMaL2y9hCWrlrJw gIm52IaCkuK9gZucvX6GAiseBVEgNeOjn8hMaz7WJMTxw1I0UZqd X-Google-Smtp-Source: AGHT+IHLfOgNFYNQh7piopnisG8tXecKttMpNNloe2nsbJJt7+ulnb0/PNAJxeVF6b/DwLmUpVs2Gg== X-Received: by 2002:a6b:f212:0:b0:7f6:2b2d:8acd with SMTP id ca18e2360f4ac-7f62ee3d967mr1225918439f.8.1719957525100; Tue, 02 Jul 2024 14:58:45 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:44 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 25/52] dyndbg-doc: explain flags parse 1st Date: Tue, 2 Jul 2024 15:57:15 -0600 Message-ID: <20240702215804.2201271-26-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When writing queries to >control, flags are parsed 1st, since they are the only required field. So if the flags draw an error, then keyword errors aren't reported. This can be mildly confusing/annoying, so explain it instead. This note could be moved up to just after the grammar id's the flags, and before the match-spec is detailed. Opinions ? Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- Documentation/admin-guide/dynamic-debug-howto.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentat= ion/admin-guide/dynamic-debug-howto.rst index 7b570f29ae98..ccf3704f2143 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -106,6 +106,16 @@ The match-spec's select *prdbgs* from the catalog, upo= n which to apply the flags-spec, all constraints are ANDed together. An absent keyword is the same as keyword "*". =20 +Note: because the match-spec can be empty, the flags are checked 1st, +then the pairs of keyword values. Flag errs will hide keyword errs: + + bash-5.2# ddcmd mod bar +foo + dyndbg: read 13 bytes from userspace + dyndbg: query 0: "mod bar +foo" mod:* + dyndbg: unknown flag 'o' + dyndbg: flags parse failed + dyndbg: processed 1 queries, with 0 matches, 1 errs + A match specification is a keyword, which selects the attribute of the callsite to be compared, and a value to compare against. Possible keywords are::: --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E10FA18DB0E for ; Tue, 2 Jul 2024 21:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957528; cv=none; b=eoldUIS48hQuyVrThgSl6xg2IK1TMybW7sUDHN+W+nsOVqn5PpheyknAIsJIF1iiRlEdCqgBivABBiA563J7aAP28TRtmSzIz/2A0FvUcofNpOu0OJJhv4Lw8rfAbHrOS/v0RCzVodiGeucHGNB9noQ887GBYmQXS+Nq28VIAA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957528; c=relaxed/simple; bh=qGonLoeAF1nKI66oYiyq/9w8tauQ74p3yAoY7oXxkr8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eO+pm0fyV3O8/ByfaIBbLXqQWtanO1t4YEXPA0uZKm29ZRgd4KEGYvFsgOM8Ae8oqU3kf5H7ijw06NzaE2Gp9uVsfYKEn54Ha2Sr5K8bk4rXUbi9XIIPa4v/LL3sTAX5XsYDxVSM3nEsY72M/SeFvoN6t0+d/3xPJn9mJwjiFCI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L2bPSByt; arc=none smtp.client-ip=209.85.166.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L2bPSByt" Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7f3d3919a4aso177937839f.1 for ; Tue, 02 Jul 2024 14:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957526; x=1720562326; darn=vger.kernel.org; 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=AlDKvAdBKoPRv/bIs38+uKi/tkvNJDzr4jduq2zKdbM=; b=L2bPSBytG3u5hNKLMAYLiHPt3C5115tbK1AHbvoiU8XoUcwWqUGX3mYy9ejwLhH8NC Nd7k3eaTowtr7HNldX4mqZ38E/0FGNa900HPPKF1PVnFdUs48xogmZlvHPhalf14Kb/0 CcNeAB4rdbJxaI8YWL9kNXJGVQZUv6SsRyRxX7bnmuZTIOKCWUwvGefWGlqjkWHgogg5 cTArhqjd5e1ZPvCrZ41AK3+RgDdMUR+CzLlsPCujm1WHqFez5YmHB+nEXUzlPoJQtPrR u2oAXJAK5sc5rg5AB8tNHPZMV9fQW80+zIadLyAi9xVOG9mIj2OveIS4PcIKTErEVR6Q cnuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957526; x=1720562326; 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=AlDKvAdBKoPRv/bIs38+uKi/tkvNJDzr4jduq2zKdbM=; b=hXfplBui/Vw7/ZMBgc20xal9/7vMUtaZPjoXDQbbnfeMbbmSHuZ2RSQDeaCdibhI1s 7z+WQH3jCYk4P6+NmP0aL36CK+LJ5O1ExHq3PgdaLJxtdx2G4LZkghMHrBHoMVoQ/3xI 9GpIfcgL6SN0q7Yuh66lZ/3+teelGIcqlGulsXnzEO203HA1lESLrcLVomRGxhoVBprj E17kwNF8RMhHy/8ODJ4YUsrg8YjGAk4cQ3+cuRg6soeTSUXar9mBoJ1JXtvStz5W73e4 tjVob5lWdsXPzsxK1Jfjhcky8CqgJJxTvvpKMpT1LBbpQqJQoYY96VbSg1keWfIZ/o4t a5cg== X-Gm-Message-State: AOJu0YwQmO3GszyjTSOuX6G0+mZ1E278GbOITrJBwwbNvLkXOkga9Hb2 jZlSC6YCT4+CoWCVzx0FxBpVmai4B8HVxYhhKnUsln0J856oxlCI X-Google-Smtp-Source: AGHT+IEykACPg8Yuh6xy1PBNO3lKJQHFEEJ8ReiFUL2QHWIsQS/wu8Ny162mn5gSs3mLVbeCJLAYLw== X-Received: by 2002:a6b:ce01:0:b0:7eb:7887:a496 with SMTP id ca18e2360f4ac-7f62ee118a2mr1185180239f.4.1719957526148; Tue, 02 Jul 2024 14:58:46 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:45 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 26/52] dyndbg: change __dynamic_func_call_cls* macros into expressions Date: Tue, 2 Jul 2024 15:57:16 -0600 Message-ID: <20240702215804.2201271-27-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy because the invoked macro has a do-while-0 wrapper. if (cond && (drm_dbg("expr-form"),1)) { ... do some more stuff } Fix it by changing __dynamic_func_call_cls{,_no_desc} macros into expressions, by replacing the do-while-0s with a ({ }) wrapper. In C, all legal expressions are also legal statements, as converted by the trailing semi-colon in a statement-style macro invocation: drm_dbg("statement form"); Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- include/linux/dynamic_debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 19f959f9a6b4..121a66b0ca25 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -287,20 +287,20 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, * (|_cls): adds in _DPRINT_CLASS_DFLT as needed * (|_no_desc): former gets callsite descriptor as 1st arg (for prdbgs) */ -#define __dynamic_func_call_cls(id, cls, fmt, func, ...) do { \ +#define __dynamic_func_call_cls(id, cls, fmt, func, ...) ({ \ DEFINE_DYNAMIC_DEBUG_METADATA_CLS(id, cls, fmt); \ if (DYNAMIC_DEBUG_BRANCH(id)) \ func(&id, ##__VA_ARGS__); \ -} while (0) +}) #define __dynamic_func_call(id, fmt, func, ...) \ __dynamic_func_call_cls(id, _DPRINTK_CLASS_DFLT, fmt, \ func, ##__VA_ARGS__) =20 -#define __dynamic_func_call_cls_no_desc(id, cls, fmt, func, ...) do { \ +#define __dynamic_func_call_cls_no_desc(id, cls, fmt, func, ...) ({ \ DEFINE_DYNAMIC_DEBUG_METADATA_CLS(id, cls, fmt); \ if (DYNAMIC_DEBUG_BRANCH(id)) \ func(__VA_ARGS__); \ -} while (0) +}) #define __dynamic_func_call_no_desc(id, fmt, func, ...) \ __dynamic_func_call_cls_no_desc(id, _DPRINTK_CLASS_DFLT, \ fmt, func, ##__VA_ARGS__) --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FB9B18DB31 for ; Tue, 2 Jul 2024 21:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957529; cv=none; b=BGAyJEZmRyCWRyUaeOiq8vB+w20DgKjRAcJS8oGWI+CVFHOQGqCPMG5uKC0GGun4PneCiFVbAkLoIEoBTmrYKRBFYTN7OgmusQe+ydAR4vtFhPSuuRq4TZXBrRc2cUnPs98diFzdunqk0OcBDFdEXNjPBg0E4Q7xC9DP5+Inarg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957529; c=relaxed/simple; bh=ruM/z33ybyG4BT7EGafatX+PVpfZYy41EY6pGKapSCM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u3SczcwpGErv5CX7rxKjzbEYCkTL+5CGfIcXI3lqkYXfSbdoT3zgaTKBAL8mUwDon6FsqHK+WTvSiwBuEve+L5bzlKkHrO8vdPHTWzcPSpPrblDZ90c3sZ2X4WS+yPw7zNCZD6DMygMOsp6yIT4gIkPcR+OoptKNr7+2zQ64F8Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=duWbtE5O; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="duWbtE5O" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7f63db7a69cso142342639f.2 for ; Tue, 02 Jul 2024 14:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957527; x=1720562327; darn=vger.kernel.org; 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=Gt92vv+l+QrwNWjlUzQRBip24zXOkaNnGwWlphVTLFQ=; b=duWbtE5OIn/38AMUZrLNRaW1P8wd/508o+V0Vo1VymiHl2sg1czQ2p0VPfUQ1qUQ7H Xj/RgPwv6WQXIobXYe17TeFOC81HeqJeIlBvoZEegqJS2CsoqA/Himp4g1zY7HMmpzaW aNN3/G7O07lvjGYWRQM7r7mll627PpCykmxQIcxWbH4DhrLQFcVrcSSyV5dElStsblw/ EIB1S0tqPdt2zW0xp07Wh4gNRDaz1qUUPhI4xYM3WbrgMUYhYryXgK00nKhjr0yy5Az7 hAQlAxlyv/VBQjbAdYCOFRpMhIhz6oF/rUepc8rECB9yQql0BpL5njNI54taMjqrsjgR ihdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957527; x=1720562327; 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=Gt92vv+l+QrwNWjlUzQRBip24zXOkaNnGwWlphVTLFQ=; b=e9MI0Cx0pRBdkt+oa60/NnzhqfFLzHmiscyTYmIjGSAxR8z+9MlYWj996P4gev8LEv tSgBvTgH1MrTh6x+mmOAptsmWz2UZ2P006lNyExurf1UueIsIeZG3om/Uuy5emC7ET9c /R4uXHpG/MwC2SL1UFFkuDuPpIFGl7o2rImcBRmD3v1ogK+2XM0iiPsPt+AnO3Gw+enR MlZJfUWqAkEAz2fXQwQQBhpKGng5W/5qobp8WtVWA0uvgd2FZmggyJdQCt8w5vYOUZKo EaeyyJywr+eWRtAOT1skEisQx2gg5PaV96pdSSNYYS3N+AZL8DDQGK0sV8gTjiFf/bGJ M3ZA== X-Gm-Message-State: AOJu0YyJrnFwyc/3G79p2WG0I6XJXqZBExnZkuy1/YohvGSiM5i0BN39 T1a+phC0Fp8Q54NGb7nFih7bPwTiAojfwhVV/HGWAGfiB0qgyEPg X-Google-Smtp-Source: AGHT+IF3h87zduF7F4ddnH2q9ze+NFD9i3fNyFNxg/0ttCijjGWkOENGZRuQmey084nqd6Ft/oa1CQ== X-Received: by 2002:a5e:de4c:0:b0:7f6:20dd:7117 with SMTP id ca18e2360f4ac-7f62ed4675fmr1103892639f.0.1719957527247; Tue, 02 Jul 2024 14:58:47 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:46 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 27/52] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails Date: Tue, 2 Jul 2024 15:57:17 -0600 Message-ID: <20240702215804.2201271-28-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Several tests are dependent upon config choices. Lets avoid failing where that is noise. The KCONFIG_CONFIG var exists to convey the config-file around. If the var names a file, read it and extract the relevant CONFIG items, and use them to skip the dependent tests, thus avoiding the fails that would follow, and the disruption to whatever CI is running these selftests. If the envar doesn't name a config-file, ".config" is assumed. CONFIG_DYNAMIC_DEBUG=3Dy: basic-tests() and comma-terminator-tests() test for the presence of the builtin pr_debugs in module/main.c, which I deemed stable and therefore safe to count. That said, the test fails if only CONFIG_DYNAMIC_DEBUG_CORE=3Dy is set. It could be rewritten to test against test-dynamic-debug.ko, but that just trades one config dependence for another. CONFIG_TEST_DYNAMIC_DEBUG=3Dm As written, test_percent_splitting() modprobes test_dynamic_debug, enables several classes, and count them. It could be re-written to work for the builtin module also, but builtin test modules are not a common or desirable build/config. CONFIG_TEST_DYNAMIC_DEBUG=3Dm && CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=3Dm test_mod_submod() recaps the bug found in DRM-CI where drivers werent enabled by drm.debug=3D. It modprobes both test_dynamic_debug & test_dynamic_debug_submod, so it depends on a loadable modules config. It could be rewritten to work in a builtin parent config; DRM=3Dy is common enough to be pertinent, but testing that config also wouldn't really test anything more fully than all-loadable modules, since they default together. Signed-off-by: Jim Cromie fixup-kconfig Tested-bys would help greatly, get it off the fence it straddles. --- .../dynamic_debug/dyndbg_selftest.sh | 45 ++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index fccd2012b548..d09ef26b2308 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -11,6 +11,30 @@ CYAN=3D"\033[0;36m" NC=3D"\033[0;0m" error_msg=3D"" =20 +[ -e /proc/dynamic_debug/control ] || { + echo -e "${RED}: this test requires CONFIG_DYNAMIC_DEBUG=3Dy ${NC}" + exit 0 # nothing to test here, no good reason to fail. +} + +# need info to avoid failures due to untestable configs + +[ -f "$KCONFIG_CONFIG" ] || KCONFIG_CONFIG=3D".config" +if [ -f "$KCONFIG_CONFIG" ]; then + echo "# consulting KCONFIG_CONFIG: $KCONFIG_CONFIG" + grep -q "CONFIG_DYNAMIC_DEBUG=3Dy" $KCONFIG_CONFIG ; LACK_DD_BUILTIN= =3D$? + grep -q "CONFIG_TEST_DYNAMIC_DEBUG=3Dm" $KCONFIG_CONFIG ; LACK_TMOD=3D= $? + grep -q "CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=3Dm" $KCONFIG_CONFIG ; LACK_= TMOD_SUBMOD=3D$? + if [ $V -eq 1 ]; then + echo LACK_DD_BUILTIN: $LACK_DD_BUILTIN + echo LACK_TMOD: $LACK_TMOD + echo LACK_TMOD_SUBMOD: $LACK_TMOD_SUBMOD + fi +else + LACK_DD_BUILTIN=3D0 + LACK_TMOD=3D0 + LACK_TMOD_SUBMOD=3D0 +fi + function vx () { echo $1 > /sys/module/dynamic_debug/parameters/verbose } @@ -192,6 +216,10 @@ function check_err_msg() { =20 function basic_tests { echo -e "${GREEN}# BASIC_TESTS ${NC}" + if [ $LACK_DD_BUILTIN -eq 1 ]; then + echo "SKIP" + return + fi ddcmd =3D_ # zero everything (except class'd sites) check_match_ct =3Dp 0 # there are several main's :-/ @@ -214,6 +242,10 @@ EOF =20 function comma_terminator_tests { echo -e "${GREEN}# COMMA_TERMINATOR_TESTS ${NC}" + if [ $LACK_DD_BUILTIN -eq 1 ]; then + echo "SKIP" + return + fi # try combos of spaces & commas check_match_ct '\[params\]' 4 -r ddcmd module,params,=3D_ # commas as spaces @@ -226,9 +258,12 @@ function comma_terminator_tests { ddcmd =3D_ } =20 - =20 function test_percent_splitting { echo -e "${GREEN}# TEST_PERCENT_SPLITTING - multi-command splitting on= % ${NC}" + if [ $LACK_TMOD -eq 1 ]; then + echo "SKIP" + return + fi ifrmmod test_dynamic_debug_submod ifrmmod test_dynamic_debug ddcmd =3D_ @@ -248,6 +283,14 @@ function test_percent_splitting { =20 function test_mod_submod { echo -e "${GREEN}# TEST_MOD_SUBMOD ${NC}" + if [ $LACK_TMOD -eq 1 ]; then + echo "SKIP" + return + fi + if [ $LACK_TMOD_SUBMOD -eq 1 ]; then + echo "SKIP" + return + fi ifrmmod test_dynamic_debug_submod ifrmmod test_dynamic_debug ddcmd =3D_ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F0A6191F60 for ; Tue, 2 Jul 2024 21:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957530; cv=none; b=GSB4l1lkYTzteoMba3CNitZc1SwHOlZTOEpv7RzdY0yOyzucVKoyidB9X3X1LhT15QFl6F2RBv/kUPMlJ2nPscgZlJPTft4+Qbdi6se9ge+eFVElczoELfniqde+aiLt/3eTz62LlcSaiKN7t5MlQSGmFBId9cyt/QstWMgu1Mo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957530; c=relaxed/simple; bh=hyHbJk6o2snR4KrsEWVQDXEtI57f/QBUmVmXmJ8RFGc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PFMuW6cW2yJb1x/lkEO+0B2Lbe2QuOxYRjiRoeUCVXEhkqFkZx0sPIkX0o+lyvNba3eSsRB9+iuMeIG7jBEYjGXeNTtrrlE24dWXvicclk2oRUlhm8hi7DaI0YA7be5c3eUqV5+V2GMLfvaqPpwVRo9ToqP9qnPw+sP0Ys6LuuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bg4EIwOC; arc=none smtp.client-ip=209.85.166.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bg4EIwOC" Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7eee7728b00so189222439f.3 for ; Tue, 02 Jul 2024 14:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957528; x=1720562328; darn=vger.kernel.org; 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=FUz2fuyNm0/W+cer/IlT8tdUcSLjwR0swYFnYz1+7bA=; b=Bg4EIwOCbUgR+Z2uI7WAWdAhf+ETyTXCu1Oj10Jro0RvFBGzsbKEOdJ2U3qvIwXz3c f4S+PvdDr/NwPPRf9IJv9ck1LlI6pDPi1pQ6smomzujilUmLmTKuySMFaVwF44ZF6VFr A7pLP2S3uwDmz+3ZKk6kryxYSWyj5V02X9WcrOM8zLJhxS8YqgvZcYUYzul8nhBWIZsK fpRsWv/wffyew4AEr9FxzzaUT9wIXlNFnZZ0tZaJR2+KlTHHC+5V7Ak2n+pSxTm25VH8 DR9ZwOvTOjw9oOV2PbgP6TwHpzhX5oRGzsq1D3T59eDvxaE4prGJeeVqGrw9eJFxXD1J iwPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957528; x=1720562328; 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=FUz2fuyNm0/W+cer/IlT8tdUcSLjwR0swYFnYz1+7bA=; b=GX4sFVGoEd+LwU+BnVnoaQE35pUTS3A4u54uz4+f8ffpRizOkLmUpdCnD9GeOgXERl RbL+bFXBaiZgrmeyCFGZPsZ464uL6qsicFBCE8k/Ju3uWLiQtU09iLKWtZhtnzR4l27s Yz4EiykYLwH86/g6Q7obOmwo8InwgBmpVCUJcyAKMG9OipjryFclImy3THyQRQzxPtt6 V6r8tptm/6ESl1BEqwMoOfsTS//6Us/yfWMch/C5z2s9eEtOUxIKSuwapasym7djaWYw vrTFWrqphp3OsQiJ0S539IR8Y5N7hLLBEXXdI5EbtUeA3nk+2w3s2IJ6cPhii/e0W2g8 MpTg== X-Gm-Message-State: AOJu0Yw8WVkZtaaK6MmUdDc0/HaumMotcPz4/68+k0mmKcxPxCy9ZUsL EDpoDxhqO7b02m5zoCrJ6/awi5eKr0kWIN4IQev7gwEIJUDsp9WL X-Google-Smtp-Source: AGHT+IHBWcQbF7AzwbpraWmmrtlRBjOUVEzWk/QMFIDiv3bq2LCfSxlC7rVZKZrSP+Cf2khVoPBz0Q== X-Received: by 2002:a5d:8453:0:b0:7f3:d649:9fff with SMTP id ca18e2360f4ac-7f62ed4c918mr1080653939f.0.1719957528255; Tue, 02 Jul 2024 14:58:48 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:47 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 28/52] dyndbg-selftest: reduce default verbosity Date: Tue, 2 Jul 2024 15:57:18 -0600 Message-ID: <20240702215804.2201271-29-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove the '-v' arg from the tests in test_mod_submod(). Setting V=3D1 in the environment turns it back on, for all tests. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- .../dynamic_debug/dyndbg_selftest.sh | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index d09ef26b2308..b3d7155cb45c 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -168,7 +168,6 @@ function error_log_ref { } =20 function ifrmmod { - lsmod | grep $1 2>&1>/dev/null || echo $1 not there lsmod | grep $1 2>&1>/dev/null && rmmod $1 } =20 @@ -316,13 +315,13 @@ function test_mod_submod { =20 # change classes again, this time submod too ddcmd class,D2_CORE,+mf%class,D2_KMS,+lt%class,D2_ATOMIC,+ml "# add so= me prefixes" - check_match_ct =3Dpmf 1 -v - check_match_ct =3Dplt 1 -v - check_match_ct =3Dpml 1 -v + check_match_ct =3Dpmf 1 + check_match_ct =3Dplt 1 + check_match_ct =3Dpml 1 # submod changed too - check_match_ct =3Dmf 1 -v - check_match_ct =3Dlt 1 -v - check_match_ct =3Dml 1 -v + check_match_ct =3Dmf 1 + check_match_ct =3Dlt 1 + check_match_ct =3Dml 1 =20 # now work the classmap-params # fresh start, to clear all above flags (test-fn limits) @@ -333,25 +332,25 @@ function test_mod_submod { echo 1 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits echo 4 > /sys/module/test_dynamic_debug/parameters/p_level_num # 2 mods * ( V1-3 + D2_CORE ) - check_match_ct =3Dp 8 -v + check_match_ct =3Dp 8 echo 3 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num # 2 mods * ( D2_CORE, D2_DRIVER ) - check_match_ct =3Dp 4 -v + check_match_ct =3Dp 4 echo 0x16 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num # 2 mods * ( D2_DRIVER, D2_KMS, D2_ATOMIC ) - check_match_ct =3Dp 6 -v + check_match_ct =3Dp 6 =20 # recap DRM_USE_DYNAMIC_DEBUG regression ifrmmod test_dynamic_debug_submod ifrmmod test_dynamic_debug # set super-mod params modprobe test_dynamic_debug p_disjoint_bits=3D0x16 p_level_num=3D5 - check_match_ct =3Dp 7 -v + check_match_ct =3Dp 7 modprobe test_dynamic_debug_submod # see them picked up by submod - check_match_ct =3Dp 14 -v + check_match_ct =3Dp 14 } =20 tests_list=3D( --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2E72191F75 for ; Tue, 2 Jul 2024 21:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957531; cv=none; b=WBkdZiwFfiAo7VA4DFKfa5VZyvsr0ZtPS6f1SKCwueUrUg+nxbWCLHUKyyyEV/maf/B6pINzB9lIX4lZhQOk9eUUCnaj3MPxw647a9E1NFC0g+/L4OUtDEHtEX+xfawTs/gj4INGdHUpUIp8INMeNonADnFSLKS1dztYUmsi66w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957531; c=relaxed/simple; bh=a4W4s9BVRiPLm/yh9K6Hd3gD4zdb5i70EVvfIpE053k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dn4j/v4J8X82PtotcQ6Z3zdd5i5ZxhyruBPprH/iIMoysEbSVZXr7qN+5Bgif1WEVeJTkpBW24e7ZRSRifV9vhoLMsKvZ7M0mAYorvD4iI/feoLJHUxUJe/MF2XCn1MRTAxrVWqbYB5heeSLpfAC9zc7sn5HTqTMBOtnDj6Ozuo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gXldIh5D; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gXldIh5D" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7f3d59ff826so173101239f.3 for ; Tue, 02 Jul 2024 14:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957529; x=1720562329; darn=vger.kernel.org; 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=kydKHLvNbnZg3PNir0Er7pU83Hek2HX1+Oh0xgNXyIg=; b=gXldIh5Dl2jyJx74xYtLMa7+PPGZLs3Lkwc97KjTNSepyOCYE2gm4ASfNpIzxmABQ1 P0DwwX0TlfIw302Gjw3/hSUq+WIaA22omFuCYiJvibU+tO+KcrdAzhiy1tpAzIuRMUJ1 ZDWq4rmXcK1cMr9XjCpeDmKNvGKbegI8CVGpGNEdHDnSOg7rPJ8vnpnK5O8QEuN14kft X9M5b1Iw1JuGBXRACvDudyl8PWbmstJ4OM9i70IsBC1EXDVojOcHECbc7yvJXkw5FEJo NlZLmlq+2/QAmh+1aYV9TYyP2pvRM+pSwtUvsAE6MTZgUAxN9CD7zJbe9KjxY+mKOxT+ 7t6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957529; x=1720562329; 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=kydKHLvNbnZg3PNir0Er7pU83Hek2HX1+Oh0xgNXyIg=; b=S3MwLrwnIbBkRVnfqpo+6gJuGH/II5YkYA+pbbkKRP7f4j51sK53g7twRFDaUeP/x5 h7Psn0CXY3jyW81VpZrcMNmFk1hGDWoSgl79tO7lGLMaBzBQvhWXhNs1WMQyDOZhu0bv VMirEVLS0U7EoqOmudWP8N/YVqnZ1duVOlEILVQ53mtaueUJOcFYg7lMJd+l2sJhTsOO Y7MacGFblRPdNbc5a/o8mM+xmf5+GZVpPHKU3qceiABWU2ZNxCRwQTEc4gaPfipA1P0S pOvTnGp5qR0KaE3B7Fb6WWd7CdxZldHwcdmThd6PJEKrsrqS6cqaS8YPrJIZrVqbxegS MWkg== X-Gm-Message-State: AOJu0Yysz6LW98vV4Z0KJT/kXVk4+nD8+6t+iqPsz0V4lz6L6yYZPKFH x0jfxyJHf7TV+83/E4jisGZaYbIFwSDRmdpVth8u/WO29y181cid X-Google-Smtp-Source: AGHT+IHiT4qyllY61e86gEC6NbmhhO5i7DHIdNJWIww0KazUvs2igsL+Uh2C87ePfk+pKL5jlhS9Bw== X-Received: by 2002:a5d:8455:0:b0:7f5:bd0c:b532 with SMTP id ca18e2360f4ac-7f62ed69020mr1001616339f.0.1719957529366; Tue, 02 Jul 2024 14:58:49 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:48 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 29/52] drm: use correct ccflags-y spelling Date: Tue, 2 Jul 2024 15:57:19 -0600 Message-ID: <20240702215804.2201271-30-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Incorrectly spelled CFLAGS- failed to add -DDYNAMIC_DEBUG_MODULE, which broke builds with: CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy CONFIG_DYNAMIC_DEBUG_CORE=3Dy CONFIG_DYNAMIC_DEBUG=3Dn Also add subdir-ccflags so that all drivers pick up the addition. Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg descriptor factor= y macro") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 104b42df2e95..313516fc2ad5 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -3,7 +3,8 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. =20 -CFLAGS-$(CONFIG_DRM_USE_DYNAMIC_DEBUG) +=3D -DDYNAMIC_DEBUG_MODULE +ccflags-$(CONFIG_DRM_USE_DYNAMIC_DEBUG) +=3D -DDYNAMIC_DEBUG_MODULE +subdir-ccflags-$(CONFIG_DRM_USE_DYNAMIC_DEBUG) +=3D -DDYNAMIC_DEBUG_MODULE =20 drm-y :=3D \ drm_aperture.o \ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 313B2191F9D for ; Tue, 2 Jul 2024 21:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957532; cv=none; b=j4kAId4HMcOUqgdru42MXu+ZdFx5ibnu6PdUKz4pkRoaoFm/oGlKkeGkV/khSN0JpIaarg81dQUTM1ozxFg+F5WvySA3atBP/ruUaT2LIojNcavxr0FGLacZqg5NWvhGDSrmXn+m9Omv1VaJwE847rXQbjGL4aqMaZc7PLG7dbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957532; c=relaxed/simple; bh=SH68ssTO6mhZ+HkxrUbFb9+I+8S84avjy2ls7h7xvGk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hMbBJ31g9ASZCgY2J1pG/UadQ6QADHIbuNLZjsywlIj8poUeNWvY9tGAwAOM/fuRvXTLUwaHiD0yNAa5x2n/AcE2K3KXkpTCoLfWMPf4V+5mtQQ7MsiWo0GcDsJfhQzdhGVK/IuE32hnuRwS/dVi5KV6QsC9/W7V6f581HTpUmQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bVF+AWqI; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bVF+AWqI" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7f3c5af0a04so246289439f.0 for ; Tue, 02 Jul 2024 14:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957530; x=1720562330; darn=vger.kernel.org; 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=MxDd/jlN1Gw8bPV0q5UJew/A89joWXWCEanlG0C3i6Q=; b=bVF+AWqIifKfvmSu7wV/3GzPCahxrQvvnt33Kuj/4eh06KItCaOMDH3ttddhnACoaM kvL2URkmpOBYqCpX4NbPDs0ivEVX7tr/1SXv/Tw+4cpbgUGLw0myAFP8W46dFRp+8Hjc 2I2STtw1y2xU70aGXvrGk+SjcFkeBj0MD0fnWPtAKMxQux2b6OBMijp926tbv3SP+HMq tnUk0Cw2uuWa5BwQGKCA/sPlxL0Yc8/mgaO2Vm9z2hiJI2zm5bepDBIoIunVm6Qi5VjO 2qpod+dQrNkfJ7JHfUF3EBTdCawT1huktp0syCfa6VpdxKu478oRtDLevn0/VaLkKZAY nl3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957530; x=1720562330; 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=MxDd/jlN1Gw8bPV0q5UJew/A89joWXWCEanlG0C3i6Q=; b=bypfRNXb4C3if9ntgV+B8sh93gvtPvxaxqvOfU5pMOvEDA5Aw3USOKz9olgj9NbwpB stcfISLupZbQcw0KGjMeFm6hk5ch10vZcc15EuPCPsLDjPflE6Lf+4KJwYz5j1yxIHeb D11/1RVYJ7xH922xDwdXAwRF5jofrHvSWC6sW+pUolqS8DJH7driuAcWi+wI0LGDDHMf PiHOBTy8rW9TPEmvCgE36UDFzLzoluMZ7NqDXJk4+K5gguRUH8D0FwwwGWq0smMAPqwZ 1dKFrhOWi2NOTJVLEioQlOyl6Qwzt2Hvwx8vqRs5KyF/OnM5zXZgY6Xi2n2/voiu9C/y Ft7w== X-Gm-Message-State: AOJu0YxAePGA+mbCV2g+0NZ/Zwycvqo90NaspCm0YvKdvf8rU7ctQgaL GQ9MYZFwpOGx1YE43vuQM/GMEuVqjOLA4MuQu1VGKuaDkSCNErxD X-Google-Smtp-Source: AGHT+IHA5cWQwG7sGQgG2GsZbHmX9YOZDWo74Sg5hZzfWG9rJh2QlSDlAZETNf1gZpS7tHAO3w2Pzw== X-Received: by 2002:a05:6602:1816:b0:7f6:1f87:70c7 with SMTP id ca18e2360f4ac-7f62ee1b1d7mr1169478639f.11.1719957530383; Tue, 02 Jul 2024 14:58:50 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:49 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 30/52] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2 Date: Tue, 2 Jul 2024 15:57:20 -0600 Message-ID: <20240702215804.2201271-31-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dyndbg's CLASSMAP-v1 api was broken; DECLARE_DYNDBG_CLASSMAP tried to do too much. Its replaced by DRM_CLASSMAP_DEFINE, which creates & EXPORTs the classmap when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, for direct reference by drivers. The drivers still use DECLARE_DYNDBG_CLASSMAP for now, so they still redundantly re-declare the classmap, but we can convert the drivers later to DYNDBG_CLASSMAP_USE Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_print.c | 25 +++++++++++++------------ include/drm/drm_print.h | 8 ++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index 699b7dbffd7b..4a5f2317229b 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -55,18 +55,19 @@ MODULE_PARM_DESC(debug, "Enable debug output, where eac= h bit enables a debug cat #if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG) module_param_named(debug, __drm_debug, ulong, 0600); #else -/* classnames must match vals of enum drm_debug_category */ -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +/* classnames must match value-symbols of enum drm_debug_category */ +DRM_CLASSMAP_DEFINE(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, + DRM_UT_CORE, + "DRM_UT_CORE", + "DRM_UT_DRIVER", + "DRM_UT_KMS", + "DRM_UT_PRIME", + "DRM_UT_ATOMIC", + "DRM_UT_VBL", + "DRM_UT_STATE", + "DRM_UT_LEASE", + "DRM_UT_DP", + "DRM_UT_DRMRES"); =20 static struct ddebug_class_param drm_debug_bitmap =3D { .bits =3D &__drm_debug, diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 9cc473e5d353..905fc25bf65a 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -140,6 +140,14 @@ enum drm_debug_category { DRM_UT_DRMRES }; =20 +#ifdef CONFIG_DRM_USE_DYNAMIC_DEBUG +#define DRM_CLASSMAP_DEFINE(...) DYNDBG_CLASSMAP_DEFINE(__VA_ARGS__) +#define DRM_CLASSMAP_USE(name) DYNDBG_CLASSMAP_USE(name) +#else +#define DRM_CLASSMAP_DEFINE(...) +#define DRM_CLASSMAP_USE(name) +#endif + static inline bool drm_debug_enabled_raw(enum drm_debug_category category) { return unlikely(__drm_debug & BIT(category)); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DB661A51AE for ; Tue, 2 Jul 2024 21:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957533; cv=none; b=uQlCopgum77z04JhB3+kDbCbCY1mgSmlGDOVSwA83uijJlyrZEMm88rHT7D6RnEhlq0dCWqCb0tkCGRzrO0XPHeFxzhrBc/pUG/jAsF9fSFQBbqFkYVQOV6HKaLW+vcn6F4Za3LI0hu1OJ0im5GXgKijM26HDd3MQN8COqheLjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957533; c=relaxed/simple; bh=POnNemmaKMixF/7nR0EBXjmxEXWg84NxV4GYS+t83tg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jeq4Jh0NAJ29ft8Ov2zoaGVmrsfP7+FdrmWtKGOFTE2HLvN3FDIIdDU5WcL9jFHBJdGNhYT+hnNHmAvPIlf7uNHHUFQDW/MzAXiQlhQtPg0+xrN2EHRR+/t4Eg9W/auuKLq1snMq2OBd7f1H2ivAAKO03vvyIU3ixV7ZHttjM3w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SUbzpDT8; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SUbzpDT8" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7f5f7ecacc0so203281239f.0 for ; Tue, 02 Jul 2024 14:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957531; x=1720562331; darn=vger.kernel.org; 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=82cgNbRoYEtZbLGOSF5g6lGYBT3iAgTZZ5N8otaIkxw=; b=SUbzpDT88RVFsyVg2L+EP/MH11d2NBJfeFZt2HjJugr0FHfyFVySL0inwEF9FW/Xkl CaWT9WCwkMOffad/rGR92qqEfcFij+aMcSixP8GJpPSHS1v+xf8yQ3zgA/ow2BYXDHIe NK/riyw7ngM23RK4cczlNWX9/ND/6It6NavYfT7LMVFdoIV1i9HVqKFPXNhdf7CK6pPD /QF3dfdZVhdawemxk2sZ4fgZEsMnuMtYSudJ0Blqulspv1OcoCtcdPHfY/t4/oWHcYpf bBOGBq9/PrgiaqZlSNQwkfd+RSwWiVzMGXrP3V2JevzJe4hFeRP1+JiKFRIY19T45jfy Aw5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957531; x=1720562331; 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=82cgNbRoYEtZbLGOSF5g6lGYBT3iAgTZZ5N8otaIkxw=; b=BuaA3F/9gP1gOW8hbRx2+A4IVUxclNkiY/PRAdWui7pE+LoBar378zEEsh1NP5kYrE 8BGKYWgq7SewrGh+Nt/D13IOeaPHcq9L8FLDPQfTtqbxho0vo3b5JSSis3RFHa6MuEDu q22JjHIesIciFheV4+NCbCmrPhvvcryymGCn1Dq1HgdFxNOBhrxv1qwrD+wgGOEQNavI J/xdE25CPtMboBS1VzVTYkYyZaIzVG+NqAYToT9gxHmOtIlFiMVhFwamTC7dBa8YbkoQ X5nWtdu1afktbTw/INlLM/OXc4weE7v1VZbTHq+AcTUYVMnreUASVGO3+zSxFz+DtPFH pFgQ== X-Gm-Message-State: AOJu0YyHt3yLA93EDOsnA/YAlwyhJY2/zuZ1vTmEbO3WxVESfk5R5nkC mHkB/jCrNnTE36RC73v1U/lii+AixtiunWwW7A29ZYFp73Y1Nk+z X-Google-Smtp-Source: AGHT+IF0XfGuaBZergfyh09/+1cwiSfDW4SSxiw5JoBgqXQoqE0seQNYvFesDvoSIIDGsiZcxnz7Ow== X-Received: by 2002:a05:6602:42c8:b0:7f3:d811:d808 with SMTP id ca18e2360f4ac-7f62eeae89fmr1232570639f.17.1719957531440; Tue, 02 Jul 2024 14:58:51 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:50 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 31/52] drm-dyndbg: adapt DRM to invoke DYNDBG_CLASSMAP_PARAM Date: Tue, 2 Jul 2024 15:57:21 -0600 Message-ID: <20240702215804.2201271-32-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Invoke DYNDBG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_print.c | 8 ++------ include/drm/drm_print.h | 6 ++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index 4a5f2317229b..efdf82f8cbbb 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -69,12 +69,8 @@ DRM_CLASSMAP_DEFINE(drm_debug_classes, DD_CLASS_TYPE_DIS= JOINT_BITS, "DRM_UT_DP", "DRM_UT_DRMRES"); =20 -static struct ddebug_class_param drm_debug_bitmap =3D { - .bits =3D &__drm_debug, - .flags =3D "p", - .map =3D &drm_debug_classes, -}; -module_param_cb(debug, ¶m_ops_dyndbg_classes, &drm_debug_bitmap, 0600); +DRM_CLASSMAP_PARAM_REF(debug, __drm_debug, drm_debug_classes, p); + #endif =20 void __drm_puts_coredump(struct drm_printer *p, const char *str) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 905fc25bf65a..95c667934bbb 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -141,11 +141,13 @@ enum drm_debug_category { }; =20 #ifdef CONFIG_DRM_USE_DYNAMIC_DEBUG -#define DRM_CLASSMAP_DEFINE(...) DYNDBG_CLASSMAP_DEFINE(__VA_ARGS__) -#define DRM_CLASSMAP_USE(name) DYNDBG_CLASSMAP_USE(name) +#define DRM_CLASSMAP_DEFINE(...) DYNDBG_CLASSMAP_DEFINE(__VA_ARGS__) +#define DRM_CLASSMAP_USE(name) DYNDBG_CLASSMAP_USE(name) +#define DRM_CLASSMAP_PARAM_REF(...) DYNDBG_CLASSMAP_PARAM_REF(__VA_ARGS__) #else #define DRM_CLASSMAP_DEFINE(...) #define DRM_CLASSMAP_USE(name) +#define DRM_CLASSMAP_PARAM_REF(...) #endif =20 static inline bool drm_debug_enabled_raw(enum drm_debug_category category) --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADE9F1A51D5 for ; Tue, 2 Jul 2024 21:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957535; cv=none; b=S41uQ4s1HNhYmLwEIos6ygiwgDhfQhaUTOg3U6RGznwBDn1jyuwWJ3SQEfe3XdowbC7U2266Xw1Up2MKwXyBYCc5wXf7OFf/2LtbT7b6FXRvyqsqvBWpFQyHZP29SK1+/z0LWW9I/DTUhhD28VDvEPo2R0n1+BFKRFdNBD8OZlc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957535; c=relaxed/simple; bh=n1/hz4xykVkUk2xjKjG7eczT8WaUv3YrnseEt+1afak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jy/nwG/NUhuc0qhFkMlU+z30pg4lhoAG1F7H9Nyv9UJMS0pOtFwM4a0d4ezE339fqbyzGKz0CNnIk3ilneeKRlhNxiq0jg6MDvwYqKsJl6yZkEWU0o0312Ghx5IYNJJW1LrkB0KxfcaUCNSp5zAd5cGOLKx5X9nXnJ0dhQGefb0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jf9d4lcn; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jf9d4lcn" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f6309e9f29so165191139f.0 for ; Tue, 02 Jul 2024 14:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957533; x=1720562333; darn=vger.kernel.org; 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=FbmqLbQI8HTQzNGF8HQCP2HSLNy1cuHjZEiMFoqqHgs=; b=jf9d4lcnSHwIAX6nx4/x3UYU7ZGpkvIJ/XNvF1ljQ5ApTqRvuSZ477rzfwJSRr60lY vZ617hBNsgidyee0xGSstkTdl0uQalGuwvXwhJ8K6tFYXmXBN05a2ga8vupeQxCnGe7F l4spX7yajTYA4QtgxdIazSDhhdmY57iuC0WxsgySMqlXaBTxK1l8LZqjZKAJRWKEM180 dP/3tPa+7a3A8W+2yBxxIZGLU8C8zjQWqSTZmQY4+zm1ncVwoAGjudXKGfiN2C77EeZj MIlDjGcFvxYfNKni5LvQkIWL+uCySbvK1uVEEoYMXDzgF9ZX9mGH8nyVDIXD7ny7ZmQ/ JpTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957533; x=1720562333; 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=FbmqLbQI8HTQzNGF8HQCP2HSLNy1cuHjZEiMFoqqHgs=; b=QwQ8I9LKPDtBCGUUojlePUSjY4wmiqC4Xka4F7uCX13OQqWM8nPz0UvrJuGKdsg61C 5J5mj32dJANBV2jOfZ6yh2HB+FOLl3zxGDdTUAoUkoW4psw57PZtFj5sKjsl7nZkTXOz THiW+A8LPEdRm7DHHMmQiLJ9TVikd5qaLAqXsyeHO7pONJAuugCTojjilWBS8aRWh68l ro9Ji2j0ZTUaR6X4sNQmiKMkhWXHGo4+WFiRYqifbwjV9SWwIBAmEArN9o94nRWNekre Ul0De2pP988R515ivDRkAQ46C+YR9d2fVw6FcSs+BRXNz8FQPEZ7Dv/OlWkEUrnIxzDT LSQA== X-Gm-Message-State: AOJu0YxPEJquJHlZp0yXhwejtCUhlPWGmWaFBwtNr/tVRQnzPEqCajs8 L0Jslj7rEGrxMduBZBm6vPMV0XT7LIn5xKqSV6uo2f/cxIUUQqZu X-Google-Smtp-Source: AGHT+IGlV5e4CX2/hYLHSwwmfK8aU2Z7WZzMU6zQISMzjPh/8c+A5mSKEdQB89WlGTCmF6ZX4oDK1g== X-Received: by 2002:a5e:8c05:0:b0:7f6:2b2d:8ad4 with SMTP id ca18e2360f4ac-7f62edff929mr1067071239f.4.1719957532918; Tue, 02 Jul 2024 14:58:52 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:52 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 32/53] DRM-CLASSMAP-USE in drm-drv.c Date: Tue, 2 Jul 2024 15:57:22 -0600 Message-ID: <20240702215804.2201271-33-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 243cacb3575c..f511d40f577a 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -56,6 +56,9 @@ MODULE_LICENSE("GPL and additional rights"); static DEFINE_SPINLOCK(drm_minor_lock); static struct idr drm_minors_idr; =20 +/* single ref for all clients ? */ +DRM_CLASSMAP_USE(drm_debug_classes); + /* * If the drm core fails to init for whatever reason, * we should prevent any drivers from registering with it. --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E8251A8B04 for ; Tue, 2 Jul 2024 21:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957535; cv=none; b=M6qrcVFuvCBQhwH2Xf548UQeXap0aeTVFvqQ821cqXf4P2nPwyMD90e+Iet9G6NUnR4s2Tk+TwvMjxfLDynjf6TrUl94WF3JvHi14oC5z1pMnbW2WNN3V5x13Wd4unhmIi3NUQcXETOInSg3PVQvCCEUQOrccXKa+4IuycOHG9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957535; c=relaxed/simple; bh=ZaC1vkdGQIEO4AVm55hDQCbxRTzLsnX/1CWODuwSgZU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g8lUXUHh7vIJ8eHNsA1IQHu6f00ASFEn4U2sWdeVH9BfKUPoNTmBZXgxSOy+0DQyJnro0xHhvlwStjaDudAkX6Ou/7ghyb4tNjiCX/FIsJc4gqay6bjpekwk3N6brglDIbjvZWG9LzIkS7tUiggv01hCf4fSVjzE152W9Cyq1G8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T1S+sklg; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T1S+sklg" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7eba486df76so868139f.0 for ; Tue, 02 Jul 2024 14:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957534; x=1720562334; darn=vger.kernel.org; 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=UK1rhky1L0Uh2dLu61vy8boLc9OqspSM7tQ5uDrS370=; b=T1S+sklg982OboW8XCXsq2CIfO63KwLQaD5i9U7yrYNnO5WHsg9QEu/3n2wlf+NUu/ 3BMZUtY1MXt/rI3OhQLifgGIjnjZmkyr8cb4B8kHyeE0sggBLFUXYhAUWAbmRDXf5ULb OyFwOPDI8N81QRtLY1D37Z7+pDxFu5mhYHRJABZJKLHj/8AVXuTLhoXYv6/qYFzKwSLg cPuOO77N+a2Ksuu9HH8JBvCQLAqXt9h/KL0jBnIcBzksRxaEmHHSkmtTT3xua5rw/+Df g54FFPtV0MixEYa6/nXxLEy+VRHcrz0SJcmH8VgZ8CxRJFOBWZqcSa4QjM0bgFNglBzP Z9hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957534; x=1720562334; 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=UK1rhky1L0Uh2dLu61vy8boLc9OqspSM7tQ5uDrS370=; b=PamSEXFiH9GW6neZhEAHBPNyd+WQNaY2gQDNw20wDf38hJe0z9FjLpwTzarNR1YaJb fq945D/qvhTvVfd8es5zdnpH4pGH0zKJjiIMYKcsX5oZOZdLJvTSsQrcweJoP8cjthqU otsNFmcukv1wWeKxZBoRSpKhJZlT3NM8gnrGUKiq1J62ue9OyTjAu7XNiUDEwlQ1Da7Z z5ov5XmRIgH222pQS3PRmQHHjOYLsz3DF/ujzwnki0xrqPJLaoHNTSPxp4ltL6syAqCw Q7a9mxB39UTBOpxqYpUjKH+qf5K7bDA2RNIIwv1qbT5siWgL3hkTWpWslrAwWdFZWbwA J16A== X-Gm-Message-State: AOJu0YyWAavfTpCYMykhgkQ4f/p9z0SVCsFSwfk3D2cRLixbDnEzTttq b4hpIlzajru8xVw/Tg9KyNOEeA0oiFyj9MZlbRXzget4Zka/ZsGA X-Google-Smtp-Source: AGHT+IGYp0RboRXc4AYNUXGuU4aFvoVlXDTzLDPuxZv6t3qpmmIpFtCdOXEccDrNUTrugIVGTZM8hg== X-Received: by 2002:a05:6602:2558:b0:7eb:dac1:16bf with SMTP id ca18e2360f4ac-7f61f5243e0mr650832239f.6.1719957533818; Tue, 02 Jul 2024 14:58:53 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:53 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 32/52] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver Date: Tue, 2 Jul 2024 15:57:23 -0600 Message-ID: <20240702215804.2201271-34-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_drv.c index e4277298cf1a..b287f0cfd8fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -217,17 +217,7 @@ int amdgpu_damage_clips =3D -1; /* auto */ =20 static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work= ); =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 struct amdgpu_mgpu_info mgpu_info =3D { .mutex =3D __MUTEX_INITIALIZER(mgpu_info.mutex), --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C7EF1A8B38 for ; Tue, 2 Jul 2024 21:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957537; cv=none; b=KHuthtDEVxG+bH4SJOz7Aft4L/1GNpoGHV1nA/88gEhM0xMMwyUpTSifOix4Guq4Bgaus4/+ixBIUJQcEUrU9q8+Jskkz1xK8dPdzyvRp4gXmBkQRy8TicZUAyIZywbpCDH675GZNMQ+EihXJwt1ljfwz11Z5qPE8lLSer7MBs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957537; c=relaxed/simple; bh=BmoS/pi4WE3RilgtxDmWX/Z/qwCySxzocceyZaJhNAY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HEkHkE8Utr9ETHCaCTIdAiCj0WEAyrykDfBnXAOYkNVNCFZWDX/udK1rX+YTvRPFpISDmhUhZAR4lVZ/Eo6Z/Rd96HlaXZQWbUw8IsBOLC4MFZjiYfgokpbt5ud32Dv02fIyFFlygJeD7y+f55kdZpQPC/4lZ2hDet8AxSLDB0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Li2ZY6JM; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Li2ZY6JM" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7f61e75642cso212356839f.1 for ; Tue, 02 Jul 2024 14:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957536; x=1720562336; darn=vger.kernel.org; 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=94MIkUtYPNbEjf2ABNxMIbyceZTrdE5XkTP/b1VTHKc=; b=Li2ZY6JM3ytLILLFZycibU+iBmcnAs6x8gc7RXXMqccsZUZZ4Xpcq7utOnh/xYzOmG d+NUTqB7APPkk8AvHMmoXpmNNlREbV/Uv+cVPpz0AJ/Z/NjNGL7k8gm88MiJ1eCpm4cc S/eiwTAAsgO9BeSxInEHSiSNFRzKkLm6hspFihEmPxEpHLaDrBbGy9zk+imqONdicnp7 +AaTgitjO5ACAkJdLmj7oUU2mnTlAFAWnvmCgKzYdg5VaL7Amyz5qaRRWEK2Hl7wf3gJ kI5eajD6I7vMAsqnK7I7OYaOW24ngN0SWz6z6owiYbiCpaRhU+CwZZ9BxwHM6Pm087ng RbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957536; x=1720562336; 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=94MIkUtYPNbEjf2ABNxMIbyceZTrdE5XkTP/b1VTHKc=; b=kenGL1rNmoNwq7cji+TLQnGHi918axiSYsuAyYQmDTXjx1v79kJv3dLoUINJvQCFXp iXmTpFMwnKtfTA8YcKcnXU43MzK8E60sYsyDzQnz/zitYQewu93INR749veAOniRbTFf aUWn4PnNbodfIkKwhQy9Pwi6bbZCNdvQ63ysr9KqMzsZz6PWF6T/3TXU/UNP79ogA7DW ld6/UrYUamsbii0Qwii8c4TfZ3YYn2oEFjuCuXhvGG+Y7X5Dspq+PziHSopIYD3Kza2s w/GrofWK9ljObb6Kcl1ZsSyQNKwJx2S8nmKgmma5HDq8a6aITivO5i80kNCwJgm55dzA aLfw== X-Gm-Message-State: AOJu0Yz+WLXCyB9sEa2zSIV3o3QIzzXJKgAmnSg+WGHBBsbLgBtD7rA7 QK+SW6Fo3kv836TxLeDdbktuPKLGCdt6RLvj6NnI0hkWCKvuSHil X-Google-Smtp-Source: AGHT+IHWBl0Ygyolnpn0Hok9dt+fa5+/pnDWaVB438H2fcp/zc4YMHsu9praTrPy+xMKUV2fg9LvpA== X-Received: by 2002:a6b:5b09:0:b0:7eb:b592:6add with SMTP id ca18e2360f4ac-7f62eeb026dmr1066340839f.20.1719957535801; Tue, 02 Jul 2024 14:58:55 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:55 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 33/52] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver Date: Tue, 2 Jul 2024 15:57:25 -0600 Message-ID: <20240702215804.2201271-36-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/i915/i915_params.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915= _params.c index de43048543e8..dccf12d05105 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -29,17 +29,7 @@ #include "i915_params.h" #include "i915_drv.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 #define i915_param_named(name, T, perm, desc) \ module_param_named(name, i915_modparams.name, T, perm); \ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BBBD1A8B1A for ; Tue, 2 Jul 2024 21:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957536; cv=none; b=Sg15EruLHkS/CSsYulxbQCLwm52fzf4bCWu1CIAZmAU2fOCicNMbklpUd3o1glzc1ktUCBV/OtnTF98MYC22uf2AoziflbolrlsRN6bQMuPZzUzDsSEUal2mn3lpaDaNWF9SWuPcC/64rkulgEKq/rQOHSwrzda1aOXpdaPtQm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957536; c=relaxed/simple; bh=ZaC1vkdGQIEO4AVm55hDQCbxRTzLsnX/1CWODuwSgZU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M7IcT7tFBOZ2Bk3SvATFyVBOmdXI+uWqKV2lywNQFiAKOimg9EC+7D1irJfKa3bL4TJn5Nn2V54lZb41/N4bZReEGRDYlhTHknq43u9sEjaSomILrS1q0EF/YilZbIeOvWSNkjJrzVUfi4IkTxr6l8KT80qy+RpXNizWFXM+F3s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K1+zKXV4; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K1+zKXV4" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7f620f349f9so193146839f.0 for ; Tue, 02 Jul 2024 14:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957535; x=1720562335; darn=vger.kernel.org; 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=UK1rhky1L0Uh2dLu61vy8boLc9OqspSM7tQ5uDrS370=; b=K1+zKXV4cw2bANyNv4ltL20EEtXjjxF7Fupoy6RgpuPOnd2NwcZQSQQJmFzkTnvKYf CVO9yvWIihqjPsQJ1yQmKG72jKx8VBwWufX3s90ENdj2Pt6eoF9O3+o/fj2YUTZIXUAN ZiBkEcpgOK2PDDj7zDvvf1WXZHWgvgZO+EV3HbPf+kw9D3ayi298QNisTQqLPpxDAkVb sWs6SFKf8ViJXJpx0SiWn2aRKhxwnGRmklXpvDlAGaTOEI4tIOa1FiRwsQYwJYqAAP2Y UpEvsKg25n3DLsKyiPZtBYVjDCreK9lTyZWbSQ9VWCo6C4za1xBuscCAJ0z33s7iN15W uyIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957535; x=1720562335; 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=UK1rhky1L0Uh2dLu61vy8boLc9OqspSM7tQ5uDrS370=; b=BlElIWwqa6A0nHekxX9wiODDro3mTKy1va0RmIDTFxwFs/aNglZOa7ZUMug77qHtqt NIqj+1YUqruL8mrQzLxGnBFSSaiF7ylwh45S9w8gWOPUf7ZXN6cNxpgq4c2B/yTIhj0b mMmqt/6Y04t9eBAmy+e7P/2AX2CnMxCe0edssLMPBR2p3Dkr447Ec+ec+bVuN8OzA4qi VahZLZaAFqxzt3ZSltOIMBxrqTc4aH31NhpI6JsTEv5/RhQUD/raee1GxsY1tmBu/I2N 7mF+9sROl9IuYBa49kdzabtHzHaepT+hCtj8bfV3fHdbcTrzBTY3M4aEZzzOsMfajNEl CaPQ== X-Gm-Message-State: AOJu0YwaMbBrXp4G0lUzAwfC/V++i3cz7q6vjC4LNkfq3zmvHd8MKiSl FtFW/109K6Z8XV1jbAu5nmI6fPCP4CcPQUu7MYGZyioAhzlSWMwt X-Google-Smtp-Source: AGHT+IHLc/l4rSLolOTsFYm7TsKqkhWE4Jfzo0NU47TaXhV5RuwQAoXmcV+1NSMfPYNESCW3q8/CLQ== X-Received: by 2002:a6b:6106:0:b0:7f6:2e72:e81b with SMTP id ca18e2360f4ac-7f62ee168f6mr1110047139f.4.1719957534832; Tue, 02 Jul 2024 14:58:54 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:54 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 33/53] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver Date: Tue, 2 Jul 2024 15:57:24 -0600 Message-ID: <20240702215804.2201271-35-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_drv.c index e4277298cf1a..b287f0cfd8fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -217,17 +217,7 @@ int amdgpu_damage_clips =3D -1; /* auto */ =20 static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work= ); =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 struct amdgpu_mgpu_info mgpu_info =3D { .mutex =3D __MUTEX_INITIALIZER(mgpu_info.mutex), --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67E021ABC29 for ; Tue, 2 Jul 2024 21:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957538; cv=none; b=fboKfO2iaOtM+aJjjEAZYP/7SRA3kqE4KSkrCRF8go/5Qgp7AbuUH1CHyS5Jk4P/7oaoa9v0yG2fWafc4bbhlFQemAJ2O5vMueNVIrmBM6L7pmVXHSaLxHzNCvnOZ4JfjblRWCvfwvlcebQeucbBHiwY8X8DOUCPkladQNlJIuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957538; c=relaxed/simple; bh=gmzz9xKUKEU2FwGVjtUT8xi4cORsbLKLRijp90yxR0I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KOSlK0CAw27h5GmXrrvJgx5By7PStT6lDcAyy12QLQ5VJNzokI0S4SbujtmFuDBm8vptSHZ/hvOOcAazBzp9l3e5hDYB2Uz44rXWKJDl9GyvKdlTIWkyxlV2c9/LmqWmAHCM2Fwegiw9XCY6aXEChzAwrwKXfhJj7CoYZ1R6BaM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z1ISPZCH; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z1ISPZCH" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7eba486df76so869039f.0 for ; Tue, 02 Jul 2024 14:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957537; x=1720562337; darn=vger.kernel.org; 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=0SUm8Nyqte9xAsE2tQLuwSyCdCfAncJgW1l33uKzz4o=; b=Z1ISPZCHMpmR/juDZFPqc+FfFfdiExFEAn8QnzkGyYwA4C5WUdfTsNTmkQwlm366/j zmn4EtfEidPE5liJ4uKIfYpKQrXg/KVpji0ded+88EBYpzpwF6afV8BgtXgpg1wk1P/7 8vp63cxeoQ1ya1LC4TBgppDq342cgRMraWn0V26qPJXrLi7I5vv+EDs+5Tv4vZNR5RPQ JINmTRkug5KLcgIrrWpE1Y/4bEebZcgCsra927iJP1oDHFNWI65eJx+LR9kbvnjoDL1o eqzIyu9PWtNcgmvRAekTTOYmKSmCw5Y8AvNLDC5OQzentaJ6wnDbTW9L4l8NBV4U7D7G D2Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957537; x=1720562337; 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=0SUm8Nyqte9xAsE2tQLuwSyCdCfAncJgW1l33uKzz4o=; b=V4tDQXuRJh7rE6KBfdCLu6lZH5/Nea+dUAXmcpryuJ+H9NkQsIZi5Xj4dmka+r6dEp DzaPUfhlgg1Axx1CmEenoJ5pIm0Tnvz4vyVY8FnsYX0iqQW1BPrwLS1dbfLEA+QK8ybd EffNz6f3S3Nbzu+FaaIrp56VC3x4tExQ2iucFm+k/xUVhCV/LuUtkAeqsO4l968zsAq0 b+H1J1iSjABPmYo0SVqWIiLOWtQxzYRSH8OzYrQohsSXh4p6jbMLSIQC1SSGeLbvqBP6 PfA3aUy7PfsfZYBn0ggVvMHm5JI9D3lD7uD1U2ZQa5isCtmzM1v75S3Z05Y0IlyYgj5V B3og== X-Gm-Message-State: AOJu0Yw9OicNoJoCgDIGMx+qu8iQ7oA/skOsdX++fm2LzOTlT2N19I9Q nAaJUmCaQjBuy4XZTSCCGHe/mhdM3xbd1FXH+unebuswKCVRBKHW X-Google-Smtp-Source: AGHT+IED/9tj/T0S2oY6w3s41P63jq6wO6ykpkmAJc3dcy/2ScxeaNeGXWxznCgBmuXHX3egfMu8Vg== X-Received: by 2002:a5e:8d02:0:b0:7f3:d863:3cd5 with SMTP id ca18e2360f4ac-7f61f524391mr662424439f.5.1719957536733; Tue, 02 Jul 2024 14:58:56 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:56 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 34/52] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper Date: Tue, 2 Jul 2024 15:57:26 -0600 Message-ID: <20240702215804.2201271-37-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_crtc_helper.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_h= elper.c index 2dafc39a27cb..e9d229a393f4 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -50,17 +50,7 @@ =20 #include "drm_crtc_helper_internal.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 /** * DOC: overview --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB48D1ABC4C for ; Tue, 2 Jul 2024 21:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957540; cv=none; b=Qfyj2sRtFOL6fOmW2lHx+smjxJTtHVDP4kC/mYqAXowCIjhv9cuZ9/3LtGSlczdyISNUsjkj8ISmn5UVNzGOIR3pIWUutHKAGIfwYip2HcL1nIETCfhoc444XqTsphSwAGLY86pl3B7nWXNZ6HftH2Fnjc28LFp6cIy5dMu8e6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957540; c=relaxed/simple; bh=BmoS/pi4WE3RilgtxDmWX/Z/qwCySxzocceyZaJhNAY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BBLeWNzZtw5IKXIug7mi8fEbVJmsgu73zIjZag7A3jLlpzzlNOu8UV8kGZtadpqKt0oBCbEI45v+El82Lh5g9OEbd8kVyNQ6QFg2Ppvm5Y3dAsdZL5JrF4BcfIGCllTdfPXkw9uBEZwKYjpKctY4NvP4aJZcbvOATIdh5kCQ0HI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kG4j0ldx; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kG4j0ldx" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f64f66fdd7so60623139f.0 for ; Tue, 02 Jul 2024 14:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957538; x=1720562338; darn=vger.kernel.org; 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=94MIkUtYPNbEjf2ABNxMIbyceZTrdE5XkTP/b1VTHKc=; b=kG4j0ldxkZpfNsdamHeNpHlyzessz4115+aDbzJaBfmQQKf57CUWeq4YPgMRppD6KK mqKJor56qZsZ6nTn7KZBaJA9jIE7y/xmzp0luc9e3DjIPU8MtDluwxOOBApsrFW/B8Rk caBIdFUOq2PiXFWqcJwIScroO+ajxlYeABk03U3saQlZtt8GZiJb7oTwcZKqLSvISpnR z2EPLsL3f1mtlXRs+OTplaHDfrUgm4RodW31TdXnrs04yzViJSdgzUL9fUDmNT61LqQT L9375au7MNLafdfFH8bPWrru1S3i7sBx1UpdtA5vvDnk0UiheNLlir+EiR9CKCZiO9tj Wv6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957538; x=1720562338; 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=94MIkUtYPNbEjf2ABNxMIbyceZTrdE5XkTP/b1VTHKc=; b=gbz1QUfIYXyaJnOts0YUg67aLaF7QwjUL4ZJJPpGWtg35JKFbKtHZiJrFHRH9VA/Gg WAsx6H7rrsJk53fOMX/ww81MkfOWxtJa1ARWc5Pc9xVhP8dI6emhXSed0fWYG88Q3stc qiUXqePeurGShbqTYxVHv5Ci1oEHHA/4wOvlZU23CYWPf9ISpmI6cl40C7DguGqbSjNi 5gaXGreRAlmkHvjPQPhNq2Q2ZafeAwuVRVqJCEvNWACf7/jBbajSb0Y91vG5RAehVqrv WqpD2K9TgVLxS3u6Baxv3fMfKHgKlnfpuMn4DDHEBOTDR1azgkoCwlLwQeaU6TliKCNW wZbQ== X-Gm-Message-State: AOJu0YzqtHSGm0JPtufSPWbaJebTgswdbqRWp7yb0XySKxzCyTFECEWE 0iDIz9Pj7wsrWQF9Jl4tMPR0g9tAbo8hIBPK0dHxcvyE9BzME8/B X-Google-Smtp-Source: AGHT+IEeyfoDsrnF6r4ABpMFuIX2eN+Lbm0YqA2PfdZDRQYY0jl8O9vciO2Q9HKa3iN91XoM/brm0g== X-Received: by 2002:a05:6602:600d:b0:7f6:5035:1826 with SMTP id ca18e2360f4ac-7f650351c42mr444802439f.11.1719957538015; Tue, 02 Jul 2024 14:58:58 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:57 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 34/53] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver Date: Tue, 2 Jul 2024 15:57:27 -0600 Message-ID: <20240702215804.2201271-38-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/i915/i915_params.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915= _params.c index de43048543e8..dccf12d05105 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -29,17 +29,7 @@ #include "i915_params.h" #include "i915_drv.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 #define i915_param_named(name, T, perm, desc) \ module_param_named(name, i915_modparams.name, T, perm); \ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE55D20FAA9 for ; Tue, 2 Jul 2024 21:58:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957541; cv=none; b=IxvsQ1m7621txp92ugHKq6xfKJ+oI8cXawGtECtU2778GBe8XtG99doW+R7210CY2f8iF3PHBQXuGm1hqHKxQ/yOX793KqWWkWa0wkzF/sdBo/JjWp/PMr/HlzbHzZyU2yF15A3OtGNKAUjIukYde+OQzA/890e1bJLbldSg7+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957541; c=relaxed/simple; bh=gmzz9xKUKEU2FwGVjtUT8xi4cORsbLKLRijp90yxR0I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vr9jtI76IfYh8VNhXjE7ky4uj2xDThscW1gkbMAJi5yg+r5Qt2aLIgyasYW7yrMr4QniEW7sPIqdYbhEn5I3jhZ5qml0mVVdO1P66CwnrRvyPTUDgguPYOtQxbICMt3O68d9GCP6noJfdSlEnY6tOCEtZV6jm/mSPcpIAHVHyhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jkPczX4f; arc=none smtp.client-ip=209.85.166.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jkPczX4f" Received: by mail-io1-f45.google.com with SMTP id ca18e2360f4ac-7f3cc78afb6so165126239f.0 for ; Tue, 02 Jul 2024 14:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957539; x=1720562339; darn=vger.kernel.org; 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=0SUm8Nyqte9xAsE2tQLuwSyCdCfAncJgW1l33uKzz4o=; b=jkPczX4fYwyJuR8Z1/C3i/T+vPLVBrKbXj+ncrNLksqCYjhzRww62H2YlQRHLvmTBN 9BNUlPRa0Q23flr260ijxH7qrc0F200WFjV4a0gmcIq5xgZmAg5OlwKgM2m+wyCmaf08 na/PPFvRp/2rRMkAI/D+wSWQ8yvQVLHkmLnWc0vbppTpOU4/+rKWazHq77C1OKnJNnjU EKO31gmJtLT8Lz4uud7/aJ44SDc0i9gpiSrnkBMOaVY0EuT1rdTcpAYPiK8UqBIDngMB xGXE59OsNUVwAnWlVOEl+BevvOgOgqadcPLA2RiDAf32ztXPCR7LkeinM4l0unBYddv/ uiug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957539; x=1720562339; 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=0SUm8Nyqte9xAsE2tQLuwSyCdCfAncJgW1l33uKzz4o=; b=vvuH7zvMVxVkMFIjdoMkv9a4WDYDEz6YSl0zNR6wLohM1x3di9bFZ/J6xKHzK5Muzg 0XIK6NiUpw6aQwvAIbZxvUG7SHDz+h674Md5RWBE5gAjRarUJt82HN1LNoXrkpTpw3KU ub5fOnJgkRoXCMwkxVoBRZCRhqqQ/QK6N49ZIm1ImXOdK7MgKi4IDpVmlE8drqNutRdG G7Uvuoe2lZghhjgp71SQzf+SVlnDp7OMtSUzsnaExvxy7MaZkkG4ziJHl5b2wZmidRtu hWMYrlY83AuopTlREI9RpB7Y0Tf5FZiAwY4XEnMU1iixp8SFAgHdgA/g0M3cTJ/GuQKP QAWg== X-Gm-Message-State: AOJu0YxJdWf1uxDtn5KgSp/kCJUuTS5pAdcV59G3SiWSGlqmmaOFaqis WivpQZrjpWVdSrCwbuCcYL8nn/fG/vj6qxPSx1X4du66PeXLRzLF X-Google-Smtp-Source: AGHT+IEUnJOZJMWFZCPfI0cb1ttS0mdFvKdodraHs1JHxvSWaTiAIpWzxzSmb2Z5C00Z5H72ikNb1w== X-Received: by 2002:a5e:d606:0:b0:7eb:d640:274 with SMTP id ca18e2360f4ac-7f62ee622b1mr1057821039f.10.1719957538981; Tue, 02 Jul 2024 14:58:58 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:58 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 35/53] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper Date: Tue, 2 Jul 2024 15:57:28 -0600 Message-ID: <20240702215804.2201271-39-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_crtc_helper.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_h= elper.c index 2dafc39a27cb..e9d229a393f4 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -50,17 +50,7 @@ =20 #include "drm_crtc_helper_internal.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 /** * DOC: overview --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1E6C1AEFE2 for ; Tue, 2 Jul 2024 21:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957542; cv=none; b=YMA21TksdyxFe+2W0vfC+nWpCmSFXWyXIPFw/oz3erQ2sOCP3vdXqGq2VwQbbEPbtRWyYoXs7/FS7c4DuhsbocDU+5BFIbgGn+OHKl/CShC/mnmMZtuyGEfp3oMr8yuZpMQcwJ9tIYnohkk4Cd9kX9/lV6BRKKaxsY2MDwFEshU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957542; c=relaxed/simple; bh=WgSQyM39ri+VuoXguHdRb8eTg/UreiPzGYK2gYDMxNI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a1r5N2c3vvLlMO505S1P7LHo65vWCRsvi2VqA+zz04q7qq+oQEbTtUDoUYK89OQ2U4yTLGxb3mCWkddZ6cTSwXQZLFDoRxVpGL6PplrWWRgGIlaqZQ4f0wgRcLiNqYSGAKgRRgEMAbQoTek5syxYK8MTie2ixB5JH/cACz5ZsT4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eQzKzlPa; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eQzKzlPa" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7f65715fe2cso34953739f.0 for ; Tue, 02 Jul 2024 14:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957540; x=1720562340; darn=vger.kernel.org; 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=Axn4TdT8TpzxyaaFFwTK+y02x0fRA+xhIqgCPO86CS8=; b=eQzKzlPa8oImICgJ8Dx6fek7hF/kMGAmSACF2YTGuFeSLJkf2uMGjtFHFZxRCO79L0 0kJ5Qi2+8QPdBQ6jTS4yzgHZhCSSVgrXsxmFIXy2J4BIttNtqDw0q5AGcoMPxtGhfH4z /D4UzfYoRDLT+UGv0lZPzL0EXDSlM1U9BFSPQ3XGIOyzaYCfOEZL7ocznjvGo6uBEFO+ Z+6MdMv5YD6E05v36Vv9Ph5LZ96bTvgMf2bMIKolHDPuoMUJdpFr2b/Ntr/HUFMMv4rs aYycGHosUGY6od8aCelYbnNDDXdeQhALXHCSsBBRUUhyFxmpQUtIoXAZNhF6gVCc0Oyb 3Dkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957540; x=1720562340; 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=Axn4TdT8TpzxyaaFFwTK+y02x0fRA+xhIqgCPO86CS8=; b=SfBYQA1d4PfdM7Gz3Omy5QBxj6R40OPcOlLrPxvZU0njdfiDXeRILrZ5NvKEM2/uxq DlWxKYf2WXIAdsjfdk7d/bqUZN54o0uKwNGKDoorMjpyUygDYb9b6orwtW/XuljECclo 1cVof9TbDT9uq1wZMMVlUhp7GNnZBcTsjU7do0ReVmJUqMGgClS7aUA1mlXYZGgd6L/e JEUUCVK5x7Vf579ezg0UW4PxKXlKkT4Zn27zu/pI2t6t0is32y6yhRFctbgxYhQKz2bb aHOZ94GUs6zCjl1w31OrcJOw+WNySmCNMEToD8WjQhFFuwEWXSr+svChzAN3KwkJKQof TrHQ== X-Gm-Message-State: AOJu0YypU/0WmiXfle3fFRSL2VWEx5A1L1LiZsxJvi08laF5LHL6meeT ROUVdtLXDG+/KYjjkTR5Iao+HGvSFFX1f0mv888lb/TSorgGoygH X-Google-Smtp-Source: AGHT+IHaOAftkhtE+ssHNVJW7rv5RWXdozZEgyV+TC4e5xBaWpxyJ+CZnnidhCATtDhgoR7BAYqalA== X-Received: by 2002:a6b:d117:0:b0:7ea:fc3a:fff6 with SMTP id ca18e2360f4ac-7f62ee1da28mr1167201539f.6.1719957540118; Tue, 02 Jul 2024 14:59:00 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:58:59 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 35/52] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper Date: Tue, 2 Jul 2024 15:57:29 -0600 Message-ID: <20240702215804.2201271-40-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/display/drm_dp_helper.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/disp= lay/drm_dp_helper.c index f5d4be897866..d3a7df09846f 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -41,17 +41,7 @@ =20 #include "drm_dp_helper_internal.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 struct dp_aux_backlight { struct backlight_device *base; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B2101B11F4 for ; Tue, 2 Jul 2024 21:59:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957544; cv=none; b=ocqgJN2fIZeAQxAoE38dnGvscbRBPUdAYxRUl+jtlvgbDxiUEG2ENIexFXs0BfKspvVNdMbmhpjudb7WH0y6V8PUCtDbnD5DTn4ezB9YRx66qCIQt/6ppRjA/ya+rUJJrAZG0cVipm0wdhQtsuZt6UyBjXuTvRtPPfriiTZEk/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957544; c=relaxed/simple; bh=HsVJ+8bSyTwxbd5PVHZFf8uV50bzhcBL2G646/K/2NQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JgHAdcQnmzz6D/yaTyGglNMxZRK6YzdVxPi6wXJxsyL0i8PE5X/hEt/K/KqYYW56IScRRgOA8ZFtE+D2imS+EzKqV752pWPim9TxEItmInX+vSgCJG5yvWSUrhevRyNKaMJ6KMfUSWTD0jxOxGUz8rPncaf0/NQ2inlzihFlDgY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IJpCWqN0; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJpCWqN0" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f3d3f1294dso169391539f.2 for ; Tue, 02 Jul 2024 14:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957542; x=1720562342; darn=vger.kernel.org; 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=Qc7kDWbr1ZOLQ8+EMlKcMIOk0gPIa550UiXaV/Fsdqw=; b=IJpCWqN0O5YY+ciAbjwuYsqQlyT6Fc9eCUCSbtWegSSQYY++6nXFu0HotUrm+Gyb1R gP73l4DcyUUb9A0lTJ86fCXyhEiwz5mq+iAUl17i+QWNRaVRtsYyeIkCrgF3LTd788yk p3RNVawBu8tdy3VTHcMN2mcWfQERpqqmZ+8Be+er5p1j79N2hDov2YxBICAQb1HWkSy3 9jrivxWfJ3x5iFDXIfK1yux43edpI8FeojeGeAc5/LC23nTNcvoIt+SX9LLxATrwYrWd X2EUISyQLn+Eoe6AfKoRtDEnBUru//Hlkl13yvYQuVZSIvJvfwmS7sQrH6m3iEhK11s7 DVIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957542; x=1720562342; 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=Qc7kDWbr1ZOLQ8+EMlKcMIOk0gPIa550UiXaV/Fsdqw=; b=OUT186lm1i+fVprC4v9eBNWSZ6fKuG6n+ZP9VQQkOnJM931/7k9Tw3Qf8m39hzIwXJ rK1k1bsAO4sjL00l7U6Wv3vCkzNinyyAbwhj3f5rUPIYFySqD+WzvUp5yunrHTKdmTqb R8NE7zladuP016qwK7bvaGeeN0A7sdpr8aWCpF++LBta45lmPaOvtRgsQ2h0Ptr5cslq /pq/PS1RbeBPtx2GDOCUS52aZMhZ/zG8xJA000d/rk/1EWwDxgdrm1sGBFB4kWhzd7bm rq//HstJZmJ3pgyt8nN4k/3sJT61OCa7nv40gwXxKpmAAEIShR9nksQclpyuCbMQDfEl pBng== X-Gm-Message-State: AOJu0YyxzgISm4KSrW5i1VS5BCXq8aqluIRZBZFpe+eRhU4FwZhUvMMR FZ6oCUcMh1vuQseSpHH3kRd4Qivqk3zkC2US0XFPxqcPrBzl6FkW X-Google-Smtp-Source: AGHT+IEDyc9E1PwwY+Pk3LT0DP2fwrHuyrUsNmUtygBhUpQrRyXS1AQocEBRzUzkRTfsja1fYVr45A== X-Received: by 2002:a05:6602:54:b0:7f3:d795:d9f9 with SMTP id ca18e2360f4ac-7f62ee82b18mr1067791539f.18.1719957542151; Tue, 02 Jul 2024 14:59:02 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:01 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 36/52] drm-dyndbg: DRM_CLASSMAP_USE in nouveau Date: Tue, 2 Jul 2024 15:57:31 -0600 Message-ID: <20240702215804.2201271-42-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouvea= u/nouveau_drm.c index a947e1d5f309..27995c0c9b31 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -72,17 +72,7 @@ #include "nouveau_uvmm.h" #include "nouveau_sched.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 MODULE_PARM_DESC(config, "option string to pass to driver core"); static char *nouveau_config; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F037F1AEFF8 for ; Tue, 2 Jul 2024 21:59:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957543; cv=none; b=Kyhm9pUFqJTkPIxMwP1dmaJFwKM5S0uLyjfcQBl8DRzhSVl4vZfFMSVjhvwjk/JNKvK8RIONLU5ktWVn95TPyZrb+GDyG8DdaB1xbMxcJfmRBgmD7QUgWMQtYIrvNJX6oIlS4Un9U1Z5SvRIPa9ULy6dpJ03Vlc+h2I+xiB3t98= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957543; c=relaxed/simple; bh=WgSQyM39ri+VuoXguHdRb8eTg/UreiPzGYK2gYDMxNI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NQtYQL13EOzPyehX1AsHsMdn5LzCBjogJtJgLfk/fv7Ha8rKImfTzlP2J8NIPLEKc7RSfAw3LHzNpwXzFA+9mx5OHHQdbWpYwXht/VHH/V7AhfguoIegB+lMnOlpCG8q+hR+Jfn3URTb104xP5L7p94l5P9aVyJv6tdvA1OZxgI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hEGt/5Ei; arc=none smtp.client-ip=209.85.166.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hEGt/5Ei" Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7eeea388a8eso185103139f.2 for ; Tue, 02 Jul 2024 14:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957541; x=1720562341; darn=vger.kernel.org; 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=Axn4TdT8TpzxyaaFFwTK+y02x0fRA+xhIqgCPO86CS8=; b=hEGt/5EigLNhoix7iqlK7Hb5+2b340mjXMZJrdo3YtXAFJe9owIdNWjJH3+qvDHDQY COOfH9YHQkQI2Ks/p0LEpABBKtu+45VpDK4j5IKEMBvAfKnfFEjJ3Dvmo/8g8tCmgQyD rjyaMxXNNBJh+TuMcVmR8lnjXZkRIgQdJ9A8vhX0LLOXNvbGKY2aF5y+AOxg6YZsBah/ KCyOBXMD9dwoylM/VL5z0+vhourh9X/rFwBkXTXj48ccGTFyHf3DYgJ4Kt4XeTEhX9SG UYdHdYXRXu50scIegn9TcyhNEX4xeSX0v1ty+mJMihw0BEFbl6VPTS995hOBJtO1B+Hg ttig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957541; x=1720562341; 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=Axn4TdT8TpzxyaaFFwTK+y02x0fRA+xhIqgCPO86CS8=; b=fjYXr11+16DcNoLarcbEM1l3AgJD9XV5vuEkO3tnXw8Tl6XLZYR/uvpsVPwzCvktYi tVOimYdx1wnxoGaItfU6XTjlxedJHOrPfgKMMiPyhVmaxlT51wbYV1RDzszroVhfvKRb GF9oX+3+9aNHM+vK3bxDexHJmapb+ifcKQ99e4V9x6Ce7kMKe0kmgjqTc0AE85Fl8C36 LWdIIkQDQgqXBnImCJaDM4dGCdkJ1f9KVur/w3Dlpc8ZwVrC3GY7lFjgv6jqZmzxXk8v FkTvcJGhFgKDAbGYh5GBGLy5iac1jjBNK44i3heZx0cZJjTCT3/RIxBe5WwjkSDtprm6 s5Mw== X-Gm-Message-State: AOJu0YwgyfpmTyvRVS9xGWMgO2HMBNNilT8XnIPIOkNCjN9Q33PSXYxR rxgZLeqXy/p2i0tncYKC98HckugKVEby3NtNVA4m6t13DQ15WxGk X-Google-Smtp-Source: AGHT+IHjv9k2KwZ55PoCGQdZFNcDsK4OFlHELx0TrRLo/YHjIbxVBPr7YJh6jsm+YsFDmma01GPMGA== X-Received: by 2002:a5d:841a:0:b0:7f3:eda9:8037 with SMTP id ca18e2360f4ac-7f62ee3d7famr1042777939f.7.1719957541077; Tue, 02 Jul 2024 14:59:01 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:00 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 36/53] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper Date: Tue, 2 Jul 2024 15:57:30 -0600 Message-ID: <20240702215804.2201271-41-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/display/drm_dp_helper.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/disp= lay/drm_dp_helper.c index f5d4be897866..d3a7df09846f 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -41,17 +41,7 @@ =20 #include "drm_dp_helper_internal.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 struct dp_aux_backlight { struct backlight_device *base; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41B6E1B1215 for ; Tue, 2 Jul 2024 21:59:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957545; cv=none; b=TMdYMBmNgIgDl+sJEBW6Z3AouIfEFlUxNwGsqMbeqeBczop4T+WTjcVtP3KCe2npwJZdBYmIaSIVLDikPuXkuCN9spoWB9Y45QmHisD1i1h27AkJ9PLL9R8oHoNLpHliz4gykNC+5v5rg4Hluk5n04seUV6KUx/l6UCyS025pAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957545; c=relaxed/simple; bh=HsVJ+8bSyTwxbd5PVHZFf8uV50bzhcBL2G646/K/2NQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t92RZaFPSGXyWW+YthLBS4AAaUjdL6qmRZ+hT9jVIuUKu/2KHgFsCFW4iXmr2eGj8zbJPEwXVpwvVczalgPRuUaNYYSzQFhcMTlmQB5DPXnv1ZiepnEmzbQ9F7rIzQeix7OhOjDGhLBhG8HBv0xMA2cNGom2csfb2PJ+XNtNOVg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=G7Da93wx; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G7Da93wx" Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7f3ca6869e8so168994939f.3 for ; Tue, 02 Jul 2024 14:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957543; x=1720562343; darn=vger.kernel.org; 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=Qc7kDWbr1ZOLQ8+EMlKcMIOk0gPIa550UiXaV/Fsdqw=; b=G7Da93wx6fn1iPHLsVMNJ7ZK3+mNFvgg0SWnz6P7agZjhSsUM0SRaRavyZL20xVlsZ +nDuWfcoMK4HNFicOdpbHWVmBuHcY1mZrEnB3hr/0hqFwrTKwoSHR2IpyEUC+XB4jN1m VayGGRtNkzZoGbiVr9OdAy9feoNXiuzWgq5MsW3whKUW5LNn50G7nNJuf9m1QoPEle67 kGjJbJuBy9vmg6kDUYummVZW1ZVraQJ1uN648u8EnlIFPNRb+Gw8RJKZRFsGVxuPjDJ7 wJ5DCFJ8zZVJH3p7jUgk8rKy+e8dYtYJfDNTK0mFNrQE7gydWR3kRjDd/X0QZPLE7FyD bkHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957543; x=1720562343; 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=Qc7kDWbr1ZOLQ8+EMlKcMIOk0gPIa550UiXaV/Fsdqw=; b=T9QGAos6apQ32KtFKHkLm4B4EkUFiTj2JbAPCrrh11ncGRYWPd7I5ISrNlKHDexhIN st56wEXfDjg5hBCuImZfZy8+8kT9HO/FmrTKjVWCeR8r2DRlxEvydG68Ix2TYMxBCCY/ 483VpAdIxo6ka8h/jA7dcezAKw+5QEvFNQ8OdXtIwe4lUFMU4iOwgzziirOR2/eCYrdr fjaAOYBRApyUK0x1OboYTplaNxYJQpDkgGeTdtuBYi4W+qhWjRBmtc/yP63YGvA39ujW RyuuN69EuUND64pM0atX9YrRJabLqLURGNf6eFJt7Oii4+Ya9RKX5Is5VJ29Wr0yHq3J 72JA== X-Gm-Message-State: AOJu0YxZYsAgFBTUFc+Cdru+KGp7VAWnV5MOi0W5a0b/nu4o6yUaap2h FovtGZmlsE5fV+qyYY2BuCpIgUZ6yEhfrv9XWhCmQ48c+ZTIcL+n X-Google-Smtp-Source: AGHT+IFU7HE3OnORXf/jPfIvwK8ZL9okfkzaVw0Y9XlHErXhQ5Il5ia22RtTXqA/C72TmprohxCaoA== X-Received: by 2002:a5e:a819:0:b0:7eb:c68b:8250 with SMTP id ca18e2360f4ac-7f62ee8d422mr1089812139f.18.1719957543284; Tue, 02 Jul 2024 14:59:03 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:02 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 37/53] drm-dyndbg: DRM_CLASSMAP_USE in nouveau Date: Tue, 2 Jul 2024 15:57:32 -0600 Message-ID: <20240702215804.2201271-43-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 dr= ivers.") Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouvea= u/nouveau_drm.c index a947e1d5f309..27995c0c9b31 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -72,17 +72,7 @@ #include "nouveau_uvmm.h" #include "nouveau_sched.h" =20 -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); =20 MODULE_PARM_DESC(config, "option string to pass to driver core"); static char *nouveau_config; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE2701B6A73 for ; Tue, 2 Jul 2024 21:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957547; cv=none; b=TmWwtMfDEeEjVOlrYAO2d1ATsEFUiVMQMiu3+iFqW72aaYyhMgJ311dAuSKFXmf/1JhyanJGwoPGXBIGYbPUJZyXbdhZl11weviZW3bZybTRhBid4XtHfC6rUpB4jDOFrtRSVqsuY7UU7thbrC7ddtnvxuLtaHPTjpOjERGCQsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957547; c=relaxed/simple; bh=O9PUNSxHH2hOtI+j2/xlVettstmLCDGZaJ8HHPON96o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BEIrS/G2inWN1C9uO94X8cUxDnYnVby/Id1u/OsqcNQklLS5eEq95BnDnwhAFoco/D4m1+2hA6MvhJ1Q4G9CyRXcYiVNmPOM8CorkFvx+vRksVwBb+08p/1npqgI6xDIoNId5eCHSFLk4/vuRhBVBQU5ln+znJ6utMx7ODrS4dY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DuQr2WDO; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DuQr2WDO" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7f624e70870so253611539f.3 for ; Tue, 02 Jul 2024 14:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957545; x=1720562345; darn=vger.kernel.org; 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=+GNz3zEEsQ52HQj9oGak+wZ8oAPfmA3LCU3EZ10XWgs=; b=DuQr2WDOzqoh6jjtqdI3ek97VdZOrNvgoIiKFVH+rbZcEbpBcbMfkqKrNtC8GbEQAF ndOxt0ZjE62oVwYk0E6djF5Gsas1SNKkJjNRKRy417X+HPGIOFe7OB5wshXGMsoeg7DW jvM7YiYtKu98kZYtjLilulXFIoJL/I7lhktgqClk8+3jpKL1voDmVhlqI/3uR1Iky3HE jCSfLI4Ek3aMwFBiaOAGqoM5s1nvqXQ9Fj4FKmkFoUBhLtMNOszTdGPfvB9wNY/HuyaG HpEH/dRweg3pv7A6siPp0wFAnATBU0Im837TfXnpM7n9tcqsis5pIauvmrzl7gDBWoaj Y9RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957545; x=1720562345; 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=+GNz3zEEsQ52HQj9oGak+wZ8oAPfmA3LCU3EZ10XWgs=; b=KCSjEnfw9SPZYuSHziJ3hQ5QJAu8q2EqS1I99w8gjXpP8ThCO6nugL4bk7DGY8DJ12 eSUr2Ql7r5fsUhaKnYiSbwNYI8LBgR/C/ah8YyJO8oDNwvO0neWAifp32HOgtQ6HtHiO ZQ65UFS3igEX+LMavjJCVDgUlwedXundCusEOlZdsvy3J8KzHElrd6/yUPuhrxlxZ39I BV8yS8M5NHyipHTAH5ml5RcIhZIAsdLXqVWqNc/uYEDaJlWpHWnv0dxoPHexvCgab0x0 7Gk2OO5U2UxtQT3P6o8mwQ4x/2oMVKOmsWszYSIcT8+LCEnMewY1oWtay+jWGc5p/wOV /ouA== X-Gm-Message-State: AOJu0Yxu4zucUFBroWwK0JlTleGf0yu769jwqEbm7KWtW1NLY8dP9pxz vtAB1WjVz0YLgTTO16kF+Q9Kma6KE5+pJlTOVVTdMA6GCPPrARiP X-Google-Smtp-Source: AGHT+IEpSIuUlWiXo7AlLLZ9H4oUpyxuj1IwsW6JEpLdySuCQ2Dy4tOK0pH6QgalXu1yNAVKG98Eig== X-Received: by 2002:a5e:cb42:0:b0:7f6:1f5d:3e02 with SMTP id ca18e2360f4ac-7f62ee18215mr1105126939f.2.1719957544885; Tue, 02 Jul 2024 14:59:04 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:04 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 37/52] drm-print: workaround unused variable compiler meh Date: Tue, 2 Jul 2024 15:57:33 -0600 Message-ID: <20240702215804.2201271-44-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, I'm getting an unused variable warning/error on 'category', though the usage follows immediately, in drm_debug_enabled(). This drops the local var and refs the field directly in the macro-call, which avoids the warning. For static-key optimized dyndbg, the macro doesn't actually check the category, since the static-key patches in the proper state. This is also likely why the auto var appears to be unused by the compiler. commit 9fd6f61a297e ("drm/print: add drm_dbg_printer() for drm device speci= fic printer") CC: Jani Nikula Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index efdf82f8cbbb..c400441cd77e 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -183,11 +183,10 @@ void __drm_printfn_dbg(struct drm_printer *p, struct = va_format *vaf) { const struct drm_device *drm =3D p->arg; const struct device *dev =3D drm ? drm->dev : NULL; - enum drm_debug_category category =3D p->category; const char *prefix =3D p->prefix ?: ""; const char *prefix_pad =3D p->prefix ? " " : ""; =20 - if (!__drm_debug_enabled(category)) + if (!__drm_debug_enabled(p->category)) return; =20 /* Note: __builtin_return_address(0) is useless here. */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 243471C094B for ; Tue, 2 Jul 2024 21:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957548; cv=none; b=E//Cs4D1SPYevaTifXlZ1Bc5uMLSvmaYzcQJid5Ao2Ip5KmHDsJHycZqqbqgDOTqp2aedkzrhdBIEEkbmPyG9SvLsZusnweo0K6JTOVHNSZ3kxU0GuQPFVyCUQfqjlEcnUtOE/WHO4/yJpWfOx7OR4yv+EQ30h3uZW10ODeAUfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957548; c=relaxed/simple; bh=LByawjcddd6Y7jpwbDz/sjAV8w3O5QnZzc7RlvHGwag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RNKJurdJibVYTgLoKLt7dSfBVQkIL+UaX+w9PaFUHQVBKkk40kmAklDKS4M01K9We5TSCTWtApdCtOCl0KWdblBu097MDUt4AqjCIhyF/FVvMTHgwnkkt4Myas6bLBRH0wJTKjhPM8QF4ZIPgx/qlRaRDPYkz6YWeU6LIE3mfZ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XWSCatHb; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XWSCatHb" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7f65a32a58fso21873739f.1 for ; Tue, 02 Jul 2024 14:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957546; x=1720562346; darn=vger.kernel.org; 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=0tTLQ7kYNablnENIf/KeDz5dGwor+/R9FnQHvwE/Et4=; b=XWSCatHbWhwxnDw84MkGqFcLmSjhA3ehklioVrAE7IPYc1GHw2HQUL30dwcbx56gL2 NxjICkHlkNznR/J4Yraiq2sknNSljEL2vjE0CkuuMWgRFq6M/XmGxGQ/6N4d5E7SjkOZ z1AWG7vXS7gcxD7UCi66LLbcWDtbeoFMc1ftd5C15vNXDjoZ+X1BjSvPJmWfiZlXtJRB 9lAVMgAk5l6HZmWM5DPSZI2azZIyN6t4MT/qjHNxSiQjlaBw1lJa/0VT/Ci0ciN4zJ0L lZWO7qKK/8TOLNJPHLC/m7FpJwwQe0UmTI8E8cknDgL5X4arXqNhOWj4Emtz2leyVkkP MTvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957546; x=1720562346; 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=0tTLQ7kYNablnENIf/KeDz5dGwor+/R9FnQHvwE/Et4=; b=F4Usyhn3QuFEBwWAq5NDGV4Znvx0O56aIM/73EV0g4ys1wLftp7Dh75wlh0v5+xOtC cpR3Ya1+jl//i72PvxfqbHzanBzrdGv0uNtzrf8kEi3k2TEmUxZpb3ClRpQZUZaRxWNk v0OT7vyql7PTXbOF+pOWlmeUMi2PeL8wXPwo80Msl/EWjMKUww63Nu5Q40Ct+RW6gplx +4e2byGhvcp/yP0V8nza0CwkxAfTHPp60OPTrFx5yBHyZi5tMETB0L0h4qLIeRvoKOeb 71lDq870l+CB5mwWyPzdCw5i1fKRV9lhSWgrE8ZLw7E+ES3iZwdPf7hXMiPRVK1Pi0dZ QZRQ== X-Gm-Message-State: AOJu0YxpazR+ykpYm6y7HOm777XrSX4LGBoA7RtzuNGzZgSgR/eb38xz VHrTtSo8PtXjxf/MKICMVd2qW3oxEVTopVyYxURvWbjKwuniPNn2 X-Google-Smtp-Source: AGHT+IHVzUq+7oBbjRhtfUg8hR7fA0Vm3TWdJRFj0erHJhGLHrI/NeeXyYjOwGHjAwtUEfGXKXA+rQ== X-Received: by 2002:a5e:8f49:0:b0:7f6:1d7e:a9c9 with SMTP id ca18e2360f4ac-7f62ee085a0mr1058272839f.6.1719957546282; Tue, 02 Jul 2024 14:59:06 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:05 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 38/52] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver Date: Tue, 2 Jul 2024 15:57:34 -0600 Message-ID: <20240702215804.2201271-45-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, this tells dydnbg that Xe uses has drm.debug calls. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm= _client.c index 87c10bd7958b..c61163d0d945 100644 --- a/drivers/gpu/drm/xe/xe_drm_client.c +++ b/drivers/gpu/drm/xe/xe_drm_client.c @@ -15,6 +15,8 @@ #include "xe_drm_client.h" #include "xe_trace.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /** * xe_drm_client_alloc() - Allocate drm client * @void: No arg --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AF2E1C2DCB for ; Tue, 2 Jul 2024 21:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957549; cv=none; b=lTeAYBxoQzmKtxzzgFm73hCVzMrh/TSj04+UfBWKTpoCXhRFt2jz82f228tKqtTRuP5KpZ/OI1st6fuwrLI1pxcB7pGw2Ci2fJAfnhnl5CfNb7m79ab3HlaIVKwSu921UZNJTmhkjmcqQXc0N6Bpy4fzYrsCjZJJAUew1x4vsQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957549; c=relaxed/simple; bh=O9PUNSxHH2hOtI+j2/xlVettstmLCDGZaJ8HHPON96o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PaAyPvFItKIU6evg343yfkQevIh8/poUdRJSydx8Xa4OFzC7kGxXdQr2xp/oZ0fTudkuaq0h9Oh6Iwsp4jeZRYCeYrNDcdKkN9LoObrsSUJkZwHx+0cbSbxdNu/jnSkQfze+aFi9p/9u1R0t6pdiaE9Xm3CaZdWksoA3Di6xFxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M23gvchS; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M23gvchS" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f5f7ecacc0so203291139f.0 for ; Tue, 02 Jul 2024 14:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957547; x=1720562347; darn=vger.kernel.org; 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=+GNz3zEEsQ52HQj9oGak+wZ8oAPfmA3LCU3EZ10XWgs=; b=M23gvchSNYLvS+GAS1zfU8t/ch1NOkKh/l7tS3PYnEGIRG3uUTbEElufEID5heKWZx xomqCjxOGxJB0csFManbI/ObGWBkRhuAPk6sIhAFvv86GVs95VGhZRwJ6n414kGJ46+Y zTBze4Q9iYPxmsyRPwcDmeQcgBLR5j6sDTYryR87zk9gblEYHWRV5bAmS0XgMtVTjTjF 85Xlgxo4e18dWmKN/6wYP4V8Sn9fWs21wIDz2aMI93rvFgMDtHH2TP6kGPZl8WqmrQj5 oVxraPfNS7mcVG1qzZt/Vn5mT6BTeybUQWAE1We03ALOPe8hepFQyT6/0MhB51oBgPNI xD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957547; x=1720562347; 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=+GNz3zEEsQ52HQj9oGak+wZ8oAPfmA3LCU3EZ10XWgs=; b=ZDmyZVXHgGSVidfToQR0/xv8odQpCXNRdePfXPhjFfZ4eaK3WJJ/y8c53Dmve51R8A puStcuuFp1knPXmTNwIEmDHP1gEkAiM2/k7ZyUNl/YZWlUg1ozwhEiDVvPt4lJOoGQ6r TKTIY4T9Ua8U/CL95YVi7O4ZqjYhlAuwUkuew8YmuqHVTOEuzgE23Z2G125ugQtK7Cu9 awZFyZ23J+AxEAs4kJKqp5/iLomRoxiD3ZkKYbq8gN2lektoUlOqaJLwnCK7BWFmTDre /WgHOFk5TXuPANp3tXjRfrtf/qycbV3jVHH3CmnJOB8TUq0ab3zfhxSjnWxZULZSFWFU Q2NQ== X-Gm-Message-State: AOJu0YzZ8mow+c463ezbyb6laQGnGXd0xyWAtXOfzgSiPpSxudXrmXUl 4BBHqNAUd5xtnaeWDQa4r2j4LPAneam37BMmP98BBJiV0cqQMSDb X-Google-Smtp-Source: AGHT+IGqAAyTYDzyBFrvtILHBMnk+bUW4/hZCTzpIaKmJrgPR4f3UslJ2gwGQZPDM8okTSwxG1QIrQ== X-Received: by 2002:a6b:7214:0:b0:7f3:d8ac:d15b with SMTP id ca18e2360f4ac-7f62ee54681mr1081093439f.11.1719957547290; Tue, 02 Jul 2024 14:59:07 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:06 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 38/53] drm-print: workaround unused variable compiler meh Date: Tue, 2 Jul 2024 15:57:35 -0600 Message-ID: <20240702215804.2201271-46-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, I'm getting an unused variable warning/error on 'category', though the usage follows immediately, in drm_debug_enabled(). This drops the local var and refs the field directly in the macro-call, which avoids the warning. For static-key optimized dyndbg, the macro doesn't actually check the category, since the static-key patches in the proper state. This is also likely why the auto var appears to be unused by the compiler. commit 9fd6f61a297e ("drm/print: add drm_dbg_printer() for drm device speci= fic printer") CC: Jani Nikula Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index efdf82f8cbbb..c400441cd77e 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -183,11 +183,10 @@ void __drm_printfn_dbg(struct drm_printer *p, struct = va_format *vaf) { const struct drm_device *drm =3D p->arg; const struct device *dev =3D drm ? drm->dev : NULL; - enum drm_debug_category category =3D p->category; const char *prefix =3D p->prefix ?: ""; const char *prefix_pad =3D p->prefix ? " " : ""; =20 - if (!__drm_debug_enabled(category)) + if (!__drm_debug_enabled(p->category)) return; =20 /* Note: __builtin_return_address(0) is useless here. */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 171211C2DF6 for ; Tue, 2 Jul 2024 21:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957550; cv=none; b=cIPZGNcSmNnYyN/SV/4BgUpVa598LTtbLtqr0PpdAmCoXgtFsQK91P4HXddjV94XgQtxa8/noQRjGf5cvGcX5uBb09xCyg805ueFrG67MDLcHkGmuZ4scIt5aCYgs9tpiQkuky9yYo6uLnCKTB5YzRUE1aipJaZMb5FwVMD1f+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957550; c=relaxed/simple; bh=BACRdEKE/EdGzYnQC1ja1K39qZMWUunTQiDC4kIMOMI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QAlUOW0goovDIfcDvMjToYzSrY/2sq7a10gS2K7MirmLo18x0Y9AddzSIvVm8tmJVAQfvf26Bj56/cephIqmB0BxJxRlVbJ086jnWCUY7EKQmiWRsuKrurKpSIv77BkdjGvRAHTTzPe/Avhz2jkxODaLfFyPcOhMdp+PMcyj15s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=I90IZucg; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I90IZucg" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f63db7a69cso142354439f.2 for ; Tue, 02 Jul 2024 14:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957548; x=1720562348; darn=vger.kernel.org; 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=V5Ysg7vbItKfqIGM0QbE+cddDiZC+jdjQozEcgbAHb0=; b=I90IZucgT2dfZRGI6NzcVJ2Fm8V0ZgDhURVBvGv2WAoxuJxtqm5TdBhFRaQA2MMe6j wR+ZstRwllJ0Y9DGMN1xot3cbU/GZxQsyLv5bxn2aEcjV+8psq+MM1ftp+sBmERYW6xh ULg558y8LuueGSFDAAswjCRRY8Xnn35n/3QkKdALy2rjp44JfiRlx2M3U7FRjoGOQeal YnJcX5TDjitPuUiyvbkNVZvHxo2dsXpK79iFqEZsuL1JlrE0mKl6Q/exCAusBS7pV1d5 pHhm1YQYhJqqj9bUX5BFh6dO4Fo+c5jPYiEqbrRg2q15G5hXi53r/IJ5qjI/n3JOrI5q ZnbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957548; x=1720562348; 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=V5Ysg7vbItKfqIGM0QbE+cddDiZC+jdjQozEcgbAHb0=; b=TrF0NO4RmFJcXCdcl96sl6np7jB6iFeDGoPf/fGjNAGcGwbENVYxJjY9csagIsHYHj FOeIvYS0z1yPhBnKHEEzPYyTaErbANWoTRaW4X9D5FLfLJZuaIu+5U6/aWhNVQJrc45N gdeIGFat4bIHLXrEvUOJImmsboNTtwiLGHWdWSaqIIee91SR/p4mfvhkqW7SLC6jN+de VDLc7+uUPnQdW64NRzHn1BnCCqIwPqA6Au4zc83XLbpq57EzL0mELFqoxsJL4jl6Th7B S+VHAUNCBN9cWcKw9Ub+agoeROgWUdeXpDoCCWZe5dqJErlj1zu2bZcA5mMTy6Vr/76d Juug== X-Gm-Message-State: AOJu0Yxoi6VZqJ67MSpvAyD65jsjZn1UXN6aSsrDDeN0XFVBWapm9bjs 2ACcK4R8fHPBzeH/YMFcV7bylE8bc0M8ti6l6mmqy2S0CKjED9kc X-Google-Smtp-Source: AGHT+IH8RzFKMibwRzTDXrCwMOD3IZhdcfxbN1Z946i9yurhqf82jrI7DF+TQJhSdQTj+9beODn4AQ== X-Received: by 2002:a5e:de4c:0:b0:7f6:20dd:7117 with SMTP id ca18e2360f4ac-7f62ed4675fmr1103968039f.0.1719957548243; Tue, 02 Jul 2024 14:59:08 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:07 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 39/52] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu Date: Tue, 2 Jul 2024 15:57:36 -0600 Message-ID: <20240702215804.2201271-47-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" virtio_gpu has 10 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/= virtgpu_drv.c index 9539aa28937f..bb3a3e042264 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -44,6 +44,8 @@ static const struct drm_driver driver; =20 static int virtio_gpu_modeset =3D -1; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, virtio_gpu_modeset, int, 0400); =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F5611C5A34 for ; Tue, 2 Jul 2024 21:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957552; cv=none; b=QMU1kHg9uku/XQbw73ItPJmfBn4NPaRMYSA46HCh8E00mvEAWs5LLx1T3b3DbO/MiS5pqFM7LfcviyU9NYyRAav75flimP3tD7NvI3OG7LYSV3Zuk/kV5jWiCmAyDIcEF3xR7X6qaX3oagcFX/cly8YqBaHVxC0l9ISU1ZuLFUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957552; c=relaxed/simple; bh=LByawjcddd6Y7jpwbDz/sjAV8w3O5QnZzc7RlvHGwag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dzoG0hpKnhWnbb8TW6hODSU1aiytf8/KYeDg/qJPAOvBn1MkSIFXiniCY64uZ6FOJ29dZ/l5kQzMh0IKUHRTJXBE2PbiaoW2x/gxOecdQdhAxDJgGbxaRCQvSzpP3GQ/WbDcqhDno1wkzqGxheWGGqb6JoK0iVy8N5D/OWqWIt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fYtvaE5b; arc=none smtp.client-ip=209.85.166.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fYtvaE5b" Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7f61f41eef0so205092639f.3 for ; Tue, 02 Jul 2024 14:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957549; x=1720562349; darn=vger.kernel.org; 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=0tTLQ7kYNablnENIf/KeDz5dGwor+/R9FnQHvwE/Et4=; b=fYtvaE5bzZTeVGwixK4JagclUCVImxuZpC+PrAPyo9VyKoLJ/QqC9dzoul5sMp/v89 UORd/1JRf1r+c7K8xHV9mQFSPZF8TY79DsHhbSekqSCtQgzEGGvqCCbfOul5B6uQUs+l L35PPMzR8nySZ+Q9M58vz31VNlT2bV8sJQ6BlZawwq0vjG9AcB5R6nHn56frpKc7nLiF d+hzdEMCinwQwHrxmFwLEVYXyHPLPeqkmOuj+JfKI0PHwXpwGJiCeC6rOFAxuyGlyl2l 3G1yA7m2zwxTcvaaOnFSb4lZHCm0LMeJiIwWVAvrV+MiJQ+hVNgSrz4IpoJ9zuLiw0Oy jWjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957549; x=1720562349; 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=0tTLQ7kYNablnENIf/KeDz5dGwor+/R9FnQHvwE/Et4=; b=tRMkIell0DA9BsBmdIW854LPt65hGWo4fNbtlTiPD6Yvl29k6fo77CxurNaqnIU/6L uTCgrm2fp+ILCnHqEAa+o5W7WmvIBFeeYlwVqk/ur3Ivyogr0/tZPrrKisNJ5hzYumF/ qZShF/IQD9+U4uuNEZ/hO55KTLccTu7js/ekmet8oY5YD2k3lQv62U/XovaYQmxxig5d 5Y/RbwdAMPRuudhKZ6PNdhMG9fMfTpW92+VX3mbUlrj5rOk1xWnfi9nfMU6phx36zfe/ 94wuXdP+hjh4Dnlhu2fR+eM7OxcycrAPG+JT8wwr6Gmi3JwJYso1k7+AvsPR/07mP6C0 HVvg== X-Gm-Message-State: AOJu0Yw05Rcxsmib5J1KudmW8z78Rl/qC42OpXIhVeroFebEotwSoRfq QTL8sCaup/kBDSdDEE9ZdWrMDVMxrEV/Sk3A7Km7MyIp34raJkM1 X-Google-Smtp-Source: AGHT+IE2I+kZLU2rS/pXH2LWHejqkkSB+OxH8ZpJWiyY2BdB6lV2bIk60uhOaSqkSLWh+0iOsTHn/w== X-Received: by 2002:a05:6602:1651:b0:7f6:51ac:bba9 with SMTP id ca18e2360f4ac-7f651acbd92mr409692939f.10.1719957549276; Tue, 02 Jul 2024 14:59:09 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:08 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 39/53] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver Date: Tue, 2 Jul 2024 15:57:37 -0600 Message-ID: <20240702215804.2201271-48-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, this tells dydnbg that Xe uses has drm.debug calls. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm= _client.c index 87c10bd7958b..c61163d0d945 100644 --- a/drivers/gpu/drm/xe/xe_drm_client.c +++ b/drivers/gpu/drm/xe/xe_drm_client.c @@ -15,6 +15,8 @@ #include "xe_drm_client.h" #include "xe_trace.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /** * xe_drm_client_alloc() - Allocate drm client * @void: No arg --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19D5B1C5A37 for ; Tue, 2 Jul 2024 21:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957552; cv=none; b=mqczB6PktNSswsgEg2VO/V6sbEvB06ljq9e2/+BMFZ+8LmfYIyDmpx6nFq4UbeHWf/DO8WxVSAJ075YhzRv1xZK+le55S1Zgf+nKWxEycvj2y/5TKz1onWXPFcvTDPcQIn2LDj85K8UZgRUmcAOSAQDw8PlZwDqGr0BqBkjU2c8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957552; c=relaxed/simple; bh=zmyLO65yPZ2P+sQ2d3HjTXHc3m95hCKtg7yLZG+YhsY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t8DqWelVuiP0YbLOtRD/kXf9AVUzZN0p+7AwwEdCsofZ78EzdFwyHvcWD5hy+sbbnckoOjv+j5VKvgQYvMkbi138AJs7e+o4gNZg950upMtpNN6l0FyeogDJfs/ZBQhTcvewECCgqNGe0nQAIjO6KZ89nHzq9WdsIlsX8yVRgvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IxZ/RwoW; arc=none smtp.client-ip=209.85.166.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IxZ/RwoW" Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7f61e75642cso212366939f.1 for ; Tue, 02 Jul 2024 14:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957550; x=1720562350; darn=vger.kernel.org; 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=wzxAaDu6jznCkYGTIESxKGj+agIaj+uEvHm/3W7k4f4=; b=IxZ/RwoWgCjp73yK4++Yy7t+ZQst7Ch1HkkTNIHfZcleWESj1IlypCshiZ3hQaa8Mk vUYNkIJJv/xPWt4b4Bmt+6+7QNc+0/hu0XyqrZnZMo4m/ZQK95mxRiGC6419Yhv6jyD5 xLT48CO2ZYoeWwrfDmx+gtAZ+mcJQarc934OQ88SPmJSLl5y6BFH8Oywkkw7quX7l/7/ otq8FW79imajBdL1RdHVgCh2uUoBDZKBIEt5MSiYdcQyXtUbZcdhjvfqMh288pIbxWjT Hp1nhJJN/U4tqNzAvXV3MXawrPbzfDOc5yEgmgaiGju8sjaIwlLQTfGWjEJcuWOZhuuf SimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957550; x=1720562350; 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=wzxAaDu6jznCkYGTIESxKGj+agIaj+uEvHm/3W7k4f4=; b=sTDj2dBmoaE74HtTa58padASvX/GQFDMviDgjShYD6DzqEF1o1IdUkXzsO/CXPxUaB LZlpGTEy8+gozrlGvsWP7dyBIbL03jegLjjdZF5mskidMJ5ntU4KXjOsS4OukcXrcZ51 y6eg83QM733W7z458GqpQGhPD+4fqs2mz7TEJdUGeNxyT+p2S6HgBXNychgJaq/I9dN3 qIZWZFBBKTn2Wo7JTVz0CWWSIcKy5WBGLo4fWW8I2Bok3zbGI9IXoeUwDXwUDfRvuJ9O ZAFjy8gDubYg4UR6OK5roVU0Oyl0pHqT3ZhqW+H30uCfe2vF+PF5agLfBBShZlMLv+VN HX6w== X-Gm-Message-State: AOJu0Yy9tUYvFMLyOuRrUo0uv7qL1I0vhIlE4YlnaVWLEvFCfRTKdhFI mUO8eCwmd6FCixnLegVXJzLPTIeDW2JynGiarnKf5MGzbO4lfQcG X-Google-Smtp-Source: AGHT+IH6FgmYtruVie6MYmI+39/gsTLr9f9UoNDdF0ISkmNJ1lHfdTSInJOZogzQSQ9dyJk1hbdfQA== X-Received: by 2002:a05:6602:600b:b0:7f6:4f7e:b87e with SMTP id ca18e2360f4ac-7f64f7eba13mr445681639f.21.1719957550253; Tue, 02 Jul 2024 14:59:10 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:09 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 40/52] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm Date: Tue, 2 Jul 2024 15:57:38 -0600 Message-ID: <20240702215804.2201271-49-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/tiny/simpledrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simple= drm.c index 7ce1c4617675..9cab48bd0581 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -33,6 +33,8 @@ #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * Helpers for simplefb */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 474E31C8132 for ; Tue, 2 Jul 2024 21:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957553; cv=none; b=NknRpWj/m7ykndDs7GMRa2CC13ocUMHNEx04bGc8dK/V17wP/59HDnb8QBXIOkO9rbJNIO2Ap/GoAePQH93eyOdZ2cNNV6s06gncB0rLkb3+7FJsOQNI72g03r2EIcJv6D2EdbINVykcSf0o3nWtgFUiQNN9GSPmuVFC6FH2r2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957553; c=relaxed/simple; bh=BACRdEKE/EdGzYnQC1ja1K39qZMWUunTQiDC4kIMOMI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HTJUDMBUDii1p0Oi75d8E3z6jJNp8F5Hqy/0f03jbsFdUOvdgwUv8riIMqxLWKJyMVX+hyoe3pKS8TLc6p7SpcYb0O2BKs8he42bXRltylCyO4pFHyzEgc9PaLPnEyJdLo1BT6uok3UXyrIrueidgE5S3aH9tRIBeSwniBkvoFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TwLicMRv; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TwLicMRv" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f3cd802729so172623639f.1 for ; Tue, 02 Jul 2024 14:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957551; x=1720562351; darn=vger.kernel.org; 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=V5Ysg7vbItKfqIGM0QbE+cddDiZC+jdjQozEcgbAHb0=; b=TwLicMRvESj6d9255tjFcrJlAZU02rNWR1ELZNWhezYCE8kXSzc9gRiJSDZLZCIgB7 sEj50/ZX1ZZ8hnE4oTpIjlMIuJTi0xghQ8B2OQb3GFyEk4EzVJR823iWxrRJkR/E54fR r4nXIeiWr059mThOoVaTL50sSmL7KRSJZBINyHV3dcOMTIBlj8gJnr1tTT2W17ZkbAvP mdf79mZLtNDI38j4PSb4Ww+iS46Msu7P7pnnk7fSvCZBLtbPA/hY14FQuVc2kEVQOPVi ezF2M6au1qYg1hAM+4l8jHI0U5aMvKLrsdfAHYNYYsOmANZC3MGri4XWQ/u2HAxaxs7U f/9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957551; x=1720562351; 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=V5Ysg7vbItKfqIGM0QbE+cddDiZC+jdjQozEcgbAHb0=; b=AdmB5nvV8DFD5kjjzP+tHAz6YhVcFGGI/Xx18nyYaanz+EuTyoETcFCqUbuCl0dPBE 9s8QDtvwJEc3+9vRZEkvR/nAMiB2g2FI1c4MdQDbtLaTumMUjZypdeCCiqgrNLtUX9JO 4k71ArSXDWvVoFzl1XibkoHA/zQorayvGFocrxzPyihN3xHcB5rSPlfGTzBVDtA845oT i8b4M1vH1w7EPnNBuYI8bv2YV4t2Qvcml7MdpYU8ofM3YPrATaIieS/zKUdni+B2g/DE Ay0QVZeJrjSckcwuJjiMPWbItP75h/O1+IymY6bqLzDCl5/M3t3X425ko3chU/jQQ0Iu J/Ow== X-Gm-Message-State: AOJu0Yz4Gw6ByK2nq+yWTNBCI3ayiiaqJFjX2+qtuFcMhWBS5yTCb/Uu uv+DXviQ51fNz0gFId5zdIYDCg0ITONnKDTmqh9uemaBDUoz353b X-Google-Smtp-Source: AGHT+IHqMpLCRs5CaWnYQ1hnUZnwKhYGHnh3SZ6WBUA2X+aJ/huxMzEjPlMSt2OgDoaqgK5zAZJzPA== X-Received: by 2002:a5e:c812:0:b0:7f3:d7cb:8464 with SMTP id ca18e2360f4ac-7f62ee559c4mr1048046639f.10.1719957551288; Tue, 02 Jul 2024 14:59:11 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:10 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 40/53] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu Date: Tue, 2 Jul 2024 15:57:39 -0600 Message-ID: <20240702215804.2201271-50-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" virtio_gpu has 10 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/= virtgpu_drv.c index 9539aa28937f..bb3a3e042264 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -44,6 +44,8 @@ static const struct drm_driver driver; =20 static int virtio_gpu_modeset =3D -1; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, virtio_gpu_modeset, int, 0400); =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F3C81C8158 for ; Tue, 2 Jul 2024 21:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957554; cv=none; b=RwhssFuzq95ri0k7emOmQbiY3azNV9rF/XlYX8uUPiyiue3+k0QOF0yUSqJMTEu/vC27knQEVFZejtekWATWZXyhNRK4bTNY36XczOdssTZLVqAZ3WWldHQMyFCSsLvZToPfMuD2pkgIke0qgxkS9EnIbFnPufRclrkH/0I0CFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957554; c=relaxed/simple; bh=tCPOUZzz1n3M3/Vbz4zH5Gffd4O1Gv0jydxTr8IfQGM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vB05msC+SsFpsDvYUP2hJlWYQ/4jvwxU0vb8cL0Enw3iTyHYOKML0s7AwU+ZRQKYvk6J14zAid5vrMlRzhGuUAfkdAk14ORMstkdcbqiD0dnMoWL425Qm2M85E3fbEbpz1qTcphb0lMj54jOBH42MDfX81XOvGO1+/epHCst0+I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JlUkpZLf; arc=none smtp.client-ip=209.85.166.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JlUkpZLf" Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7f649f7868dso113938939f.2 for ; Tue, 02 Jul 2024 14:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957552; x=1720562352; darn=vger.kernel.org; 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=BVVliFbCcRiwMu0SQpi190huBei8IpcPa+B6oudggrw=; b=JlUkpZLfVwEUayeQaV7eJqbWP+Krk/w7F9Ff7ZGq6mCVFkipzAjAvbrxgejY5Ia1lr nQs9QitQpXy+BvwlbLnTp/GWBCKwfX3d9pp1R0wR8Palf4Eqy+UCBg9uUZJ2dwbwHNc9 8cX13T9UnCrs7X1AP8+mzldwNoPklVFm3Qvronh+5d4ApXFrn1thdaEkqTM8UReAqYxu u++EjWMf1RoakRV1Pd9NbOkU4P+4mta34BBskFMv1jcixgm1HYtEya8lCIBhHi1eacgw z2iicItHwnbB/s0Z/rrfN8Ac2MGv/Zoh0bFxB9A7eT17g5xLXeWsuYxfmfV+Z2ojpZmq dFXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957552; x=1720562352; 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=BVVliFbCcRiwMu0SQpi190huBei8IpcPa+B6oudggrw=; b=HFfYZ1wh/fug1yKlcZUaYejuhgUnmtKi1YpbuflTeac9zrl7aoj2dmdiy7Tz8izX54 yWU9HUTOJUw0/ye2l+eu0eaf+oBDp0iw9lowjMaH3NMPoMOqeF2Ir/Ee3eGI3O9YJ0Wz zs/XDWIqFnZ/o4fxlaiP+f79FzG6rkTp3spvuNAfKWd2ZWtNB3KcbGz80792KQoyW7DO 9MQYJtomneAeO7M0/u7KuPU6+qdqKjaxZ4R6tLj65Wt8ZBV0DTOWeKc5x+r7pQov9sC/ 2YSC44QjXty7/lT3Bjn7dumjf/NceqCKe7U3vS/p8jddg/h5BuySryOUVEgo65SOM1Gu UOww== X-Gm-Message-State: AOJu0YxBXtC4oQQlnMtdkWTraDJBrjKlubxSR5vr+MKEcZMzBvYiKDkJ xDdsbOz4gBl07KNXk9B0WJHLP8Ov9uQV3gnLJjvC6rooU2FokUmg X-Google-Smtp-Source: AGHT+IGEAKvO56UJsUl2ag28O4BHU8pNps2SJqU5SLk78nG5JzHSvTWkp76KWdlSdUH9XcNNV90+ZQ== X-Received: by 2002:a05:6602:718:b0:7f6:1cd3:9660 with SMTP id ca18e2360f4ac-7f62ee647f7mr978614539f.13.1719957552546; Tue, 02 Jul 2024 14:59:12 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:11 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 41/52] drm-dyndbg: add DRM_CLASSMAP_USE to bochs Date: Tue, 2 Jul 2024 15:57:40 -0600 Message-ID: <20240702215804.2201271-51-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" tiny/bochs has 5 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index c23c9f0cf49c..ee98fab5597e 100644 --- a/drivers/gpu/drm/tiny/bochs.c +++ b/drivers/gpu/drm/tiny/bochs.c @@ -54,6 +54,8 @@ static int bochs_modeset =3D -1; static int defx =3D 1024; static int defy =3D 768; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + module_param_named(modeset, bochs_modeset, int, 0444); MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting"); =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 611C61CA2AB for ; Tue, 2 Jul 2024 21:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957555; cv=none; b=IKvUf58/qRsi2RO3hnJ18Xy7KGlecMgOQsgRqYKZUUUio4cZ4Y3yLxkTtqK4dwlv0TpCkc/t8RJOnFVtxvrRxolv9LLUjw+ziE2uXvfXWQUXjCnAIUyaBu17yfr9/YUC7EUPN6eziGHm3maFZkndyiDO3RoYAMKvzV7GsI9vW/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957555; c=relaxed/simple; bh=zmyLO65yPZ2P+sQ2d3HjTXHc3m95hCKtg7yLZG+YhsY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JkGa5RcfkCEOSUgOUTKAV1MmOafGm/h0Pdxv7PDC6dJ4rGj++xKYRLhg2++06mUCDCQKkRnzS72qDBCmltxRY2U+rtr4mUtVlaz4HypAny5LzDqeIx1KG/bugq5eqpfWe0/MMIMgKzLDCn/+6lMvjQ7RlihpIr1JqULfs4V1ROI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BiHcNwiV; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BiHcNwiV" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f3d884e70bso237627739f.3 for ; Tue, 02 Jul 2024 14:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957553; x=1720562353; darn=vger.kernel.org; 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=wzxAaDu6jznCkYGTIESxKGj+agIaj+uEvHm/3W7k4f4=; b=BiHcNwiVT7EJy4BMvXDyHErX1SJJ8X1BSl/BhEzMuYvnoKsqESBlFYmHwDLH5/vK2O kb6uHDkW5Utzd+3LokRR5hUBQzrrslQKzEH+dUTUFGgTVSZ7lb5MBymVjkol51ddfNyq A9Iftedl+WTXZrhTduXpokKA4GU6mEKOTSv1pXmQrocQc8genAR8/bKaHT9BxsHiaIEo KvOLmu+m5OAZ24EG2upYrtUE9y145hci6MF9l1ToxNDkvgYKxLIvLOAqkh7xTuFi/6/T rmq1N3TlxoDpP24107FoLr6zjS/3cnq7XHoIzLT/nE+zx+0sMsXvo7ddcorqL7GwgJ0N 5/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957553; x=1720562353; 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=wzxAaDu6jznCkYGTIESxKGj+agIaj+uEvHm/3W7k4f4=; b=fw3PKX9pHmuZCzsod/3G6bBHv0yC3FWVAbfHdgOg+OS8NPkdyUBk63qbd7VVdnicmI A63mjxdBIcJKOfJLRNANVKKsXAT/s2IXg7n+P/+4lmos4N9pehrNbqo3VAbxJDZxXs7d sBXua0jzrs7jQhWR9r/oeDFTtmr6YpXcXY80ZpSJlv7TmMPQ6VY7gYpdJqowq/js3cl6 XpmqmwGlCwnC5Tl/67VlgUE7eJ8sEX8s7VHy9rMh3RH3OfVuvVtD7THvr/3eKvreog72 MQcZHHoGn87qcpWZIXEE9k8Dw+pZV0aoUAZHOckM09VOkcEy1EWT6GL38Y95qSfjgYSj QB7g== X-Gm-Message-State: AOJu0Yy02+ACb0QhqxbnuxO0uQgrqKQQeS1OB6bFqJXHi1Z7rc3xK1w7 Oma2+DsWYp1VATh55vHC3GoiwipjpYQ4SSrzvMR97IMOlNgh44tmzR8iHA== X-Google-Smtp-Source: AGHT+IF2IV262mxUL5Fv2D4fSAIWDRHFT00nSwPai7dQls4045AmbHQ4mcu0vY1Ry054DisDUO53kA== X-Received: by 2002:a5d:954e:0:b0:7f3:c683:2257 with SMTP id ca18e2360f4ac-7f62ee79dacmr1311983139f.19.1719957553542; Tue, 02 Jul 2024 14:59:13 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:13 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 41/53] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm Date: Tue, 2 Jul 2024 15:57:41 -0600 Message-ID: <20240702215804.2201271-52-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/tiny/simpledrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simple= drm.c index 7ce1c4617675..9cab48bd0581 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -33,6 +33,8 @@ #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * Helpers for simplefb */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D3D81C5A37 for ; Tue, 2 Jul 2024 21:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957557; cv=none; b=nK2hl2+B1UxB/qndjtXlZmD+UvPffuqR9Hcivztrl7jkeqatNOTiPjmb/bwN0icNMVWB/ZeWKGPHTDmtB64UJB2J67bVMAuBFBMzV2OfbTVs+q+mqnC6+a5PT2iHaXRzHYnYkXBvV9+GogRgWflAeW4nUR+wyN2C5mS8wbZkau0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957557; c=relaxed/simple; bh=jGiueC+Dh5EN2Lejau2B4bSvCKR8MfH5CgBIgeJvpL8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TTYDlrgZfbKgCOmlMj3NBSK1ndLmanK9z5jlR6N55XLoU9qVKTUzmSAjDNR0EMbub0ggY50Pc33t5eMIlAnVY/gHv2SeXZlQpNq1h4bsppjtLCV7wvDLB9ORFwL4OcnKmf08c7shV1eqS5/vQZJZ6HuNe9DAzYRkSJGQDECB3Pk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cV105S+F; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cV105S+F" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7f3cd64e71cso138068139f.3 for ; Tue, 02 Jul 2024 14:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957555; x=1720562355; darn=vger.kernel.org; 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=pIsdMzCagTnPqkjtDJJFzcS6RuUfrVRwKo+d8V5q9yk=; b=cV105S+F/Lr88SjisUIE0nQEdsRjTH3WYhjcWXQngzzvzC2R0/cU+Mq+7Y7ZIzb7/L jfNKP6T+6bgPz+QOcz/SGc7TcOCsptpbTt0Ei45mQaJ3jEGfb1S4ui8oDt0fxZSPK7ZM r5pv0jAV/INgyyFTnRZDsoBF5TlkmZVh/DDXFVRfyY5XQXtSScIsRBlxnXOTSEnukR9x yfxbJX6NWg5yjgf23NKRRVub37rzSgjic3Kg/qreSkHYhhIkprT7bbM/460qNUoW/JT6 1Z/zrLYBgr/nSiM9Hs3poLBEqx4C+vXTWL5XrHVjGZdzlRohjbbb5w/8XvQvpOnEO/RU NU0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957555; x=1720562355; 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=pIsdMzCagTnPqkjtDJJFzcS6RuUfrVRwKo+d8V5q9yk=; b=hmjeo80xV5FnExIQE2DduaDo11gIfqZkrI3ffP0NlUgSMYpVfUD3AsDoVyF+e1fNf3 K81SSJ2Ct087t5anZ43cxftrZK++HODQ/b0ulPwG2Y3rBMh5hMJX44oRe0v44mLvdBhF U4+XU6zVwM54HSudbkyxOu882IpwaqMRK7xJwkI+9SguqMErJP9UnB4w9fyWGQaSPdpE CgBelBmLzxTDPJOkU2nyHl/UarvaA+rC41aNTjxUsx9iocYBuzRIE0IIGZ3uLbm49kLc yN9hggOWIHgC8VDLJJqo3DRq8ncZw7/dFVBLM/z0kZCMS3OqvDQxKvcWIZ3uos/BmJgV TnNQ== X-Gm-Message-State: AOJu0Yway2l0rb8tOp2LBBoMeFsSEbdLNYOxhyUcqAucVbY72qSVDWDp aUPoDhgjG6MyEAx+vp2Sh7GqeD+ChLrwr5DJ1oMgBfQ1cr+a7Ptl1l7Kkw== X-Google-Smtp-Source: AGHT+IFdYfSSGOVrNg8Fii4KNPEZjcEw1XtdTCCtZkWFk6OqEpHnTijp+0TjJsgDqve7B+0xLFhnQw== X-Received: by 2002:a6b:6113:0:b0:7f3:a7d9:5922 with SMTP id ca18e2360f4ac-7f62ee0c850mr1132473239f.8.1719957555439; Tue, 02 Jul 2024 14:59:15 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:15 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 42/52] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv Date: Tue, 2 Jul 2024 15:57:43 -0600 Message-ID: <20240702215804.2201271-54-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" etnaviv has 5 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs as well as plain-old pr_debug()s Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnavi= v/etnaviv_drv.c index 6500f3999c5f..1d1ddbedcb5a 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -25,6 +25,8 @@ #include "etnaviv_mmu.h" #include "etnaviv_perfmon.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * DRM operations: */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 681F21CA2CC for ; Tue, 2 Jul 2024 21:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957556; cv=none; b=pWJYueQdfm02irIQgduMSMzgTKeH1OI8KPMg+lRpOqpan1Cx14gt7Du8ULcGSWHC2avB7QdoIvnYAlXOB3t10/xdHhOTOlv15+565a4XHn0wSxD8uBPMMk0CakkSWUi7tmzWEK7/oolaebj8jDKGsBIyJJSSDhYIIJ8FwwkgfUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957556; c=relaxed/simple; bh=tCPOUZzz1n3M3/Vbz4zH5Gffd4O1Gv0jydxTr8IfQGM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VpqE1HdPBXEQStouha2bN+tGJLHQhc/T37fI0OHrCMPqR7s+0tDnD+1iB1eLm3cz/Qmr/KRIJGqjcX9qcZ7IsE78W0jn6T975r6+LjpTM21a+5eLSt4/Zf4tLghdleLFUYS5mRyhGgKWSSUd7PqVLCEUDTi5MTtcuPC9rqXdQB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RB8yFdvk; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RB8yFdvk" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7f61549406eso180475439f.1 for ; Tue, 02 Jul 2024 14:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957554; x=1720562354; darn=vger.kernel.org; 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=BVVliFbCcRiwMu0SQpi190huBei8IpcPa+B6oudggrw=; b=RB8yFdvkcwspmHLNXfZeaky4yUA2W65nYaJqpIkgt0nVA9ZZGlDySgS8DbeYvcUEXB YHWJI1nIBGZ+PzhSCC0/WtWJSTYDZsIasD7aVQQQS68WarrDZvAp1KR7QgnDmcz+GdFG 5P2yJFtpdtthXI9KHu87z6IHqzmkhfLCuySMq2pHUfqJG4Ch59hp4KZMEbM9scdw30oR Kk/N1V+t251NIuA3WS6yT/qXD646xDQc4tAfmHyJeiUs70pSP2oDk/owW9CI/MaeWQAh lmbSRr8y7WNb/d6ZER9kc8ayKr1LfO8vUHp18J/pmzByfDeRCSKYB20po1nai/xa53j0 bwnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957554; x=1720562354; 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=BVVliFbCcRiwMu0SQpi190huBei8IpcPa+B6oudggrw=; b=r7mvYc1PXe2prsaM2oSDmBjAPrzIPzDgW64I3ftg2y5WBhyb1J/lVqtlA/RFQr82aw 2mj28imUXOTcvNwAQLZdz3F7Mmp0tY4L4r0VKOYDzMkcHdKlWtHixafo5B5+lhGiQULn PEHk0aazOZNyCSKCkizTSBZrSNFfnNjb+VbXKgupHr9qSvRnILfxhibqjm2GPpC9q4Cv TgmO5ukYcOlCQjLRetG9vwVyyIj3ObWHM6vhwMIuEPRIgC9i1xCBmC6H9dMU2JVxGiSI Q2ZtRLP32Rarr/Bxly61aaCKUfnNmk9b0zb8GMxeaEqSWAXevZImLuFvMPpzFr5xUaSD hBgQ== X-Gm-Message-State: AOJu0YzjHoZ2YFpPSTJEjkeFBAkJnEhgvHeQ2azt1R+L61SdKv1+Ttp6 IUdkVmP3G2bqFDzy4C0zwSQNkqcvyijenxT6r/9bTi8UjTn9CKBU X-Google-Smtp-Source: AGHT+IFZ62yf97Gt7+RArnHZHhfQvkUmAT8LPZ/RRX0mXtYibWBEHGPj0AQZKFILtjlHvXFtoqdSew== X-Received: by 2002:a5e:8c05:0:b0:7f6:2b2d:8ad4 with SMTP id ca18e2360f4ac-7f62edff929mr1067144439f.4.1719957554487; Tue, 02 Jul 2024 14:59:14 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:14 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 42/53] drm-dyndbg: add DRM_CLASSMAP_USE to bochs Date: Tue, 2 Jul 2024 15:57:42 -0600 Message-ID: <20240702215804.2201271-53-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" tiny/bochs has 5 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index c23c9f0cf49c..ee98fab5597e 100644 --- a/drivers/gpu/drm/tiny/bochs.c +++ b/drivers/gpu/drm/tiny/bochs.c @@ -54,6 +54,8 @@ static int bochs_modeset =3D -1; static int defx =3D 1024; static int defy =3D 768; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + module_param_named(modeset, bochs_modeset, int, 0444); MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting"); =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 504651CD337 for ; Tue, 2 Jul 2024 21:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957558; cv=none; b=LLa7277lUHdHdRmI1OVfDP7welpI4I3JvVFqaQo5AAnEyWm09Uz12vcDN/YIO4zLQ6W2ESdmBoKOgI+4+/ShBJjaQAas6DrGxvL9tY9aZjP285h5iQqtGFqsWxh8/WHlaa6nMQkirEAgId/MH6XaT9VvfZJLKxLnNypJzXxoKf8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957558; c=relaxed/simple; bh=jGiueC+Dh5EN2Lejau2B4bSvCKR8MfH5CgBIgeJvpL8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hZa+1tGmkh3wsVNGPJPwUfTejPz9oHporxG1vHZfSRar25xWp4eTeiNcB0/piwQyfUA3RYc9LvUsshVw9PJN7M6vP9WJCcraCznCK/OhyUxPM3B+BmIRbpxiT0lbKUO+Qseh7BqifxlOkJ1sCcfDuuTrnl/3pt+5MHYJDH14f14= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XyA7MY+m; arc=none smtp.client-ip=209.85.166.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XyA7MY+m" Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7f61f41eef0so205097539f.3 for ; Tue, 02 Jul 2024 14:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957556; x=1720562356; darn=vger.kernel.org; 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=pIsdMzCagTnPqkjtDJJFzcS6RuUfrVRwKo+d8V5q9yk=; b=XyA7MY+m/EqNoEgzzSYCWZ5bGoPReQtgQPN8i3rfWZkJ71PdfL+UeLtYO8TLZsw8Bc lmz8l83LjgwgFxVhzvS9VzkLOjyXn8L3a+mE4jM0JFsXt4PucNLKW8lvtElDBXjhq+8X zmCo2/6OEdTs+/b4qjKSGaLPxpto1QjeXPXxCEcCSTOqz3eH2++B2UPXlahCygNeOr8V CCDnHqIeh+1CWrYaj6kfpyGFZeHuyMFksw2XzoL/t+Q5QyafLsMVIh3xldjdWaGQenf1 renpFHNttgcaeoexSRIkDUnfb35gNJW2lF0iBlkollM4IWk2UU3uq+Ik9P1Jv4r1wqai +cVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957556; x=1720562356; 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=pIsdMzCagTnPqkjtDJJFzcS6RuUfrVRwKo+d8V5q9yk=; b=Kdy7Joa2wWq0D22InxWyJNRtq8oyUL/DkmtiKyz57E+xi95cjQ8za3UnpcXKnr8pcD aMtyzRED3NuIQov2ku1bAjGV1KLWSkEbKYhcfpr0n5JS+Jwmak4ZfpWbMH8JtMzHGEuc m+YCVna43ePSux/FfGvnBsIwRTdzoi2WhpYC//m8N9Cmi8n0Ap5kNAdcf1Masgg4hbb2 g+NjP+VD+NiKpQS0G5sT2pUgUqwDbDDC2/m1DPWVfoaf1M3SFxrTBf4NIzTEVu+HfJgK ALXAxdEsmf0njO0hdN+EiPmVYgkTpNcECBWJ6z2zZVkXPsSP+wnqRxYPkmFi4eheCthm ZVGw== X-Gm-Message-State: AOJu0YxTXM87XaOdC0Y8Vu6Skdx/VUQxlkS0SXQ8W5eB7XgIkkW4zoOL Q2hkQAB1lixtCGDZuzIFdNwUBgsqijlkTAurbUDnNThB5KO1qaka X-Google-Smtp-Source: AGHT+IHkqfivsiD8dHTonTZAnkys7OGTa2LDBnrQBx2fInhOiG5IlwUdftnx+Nl9cVfwsK85+z/TuA== X-Received: by 2002:a5d:9544:0:b0:7f6:1f20:f137 with SMTP id ca18e2360f4ac-7f62ee3cc32mr1102400639f.5.1719957556538; Tue, 02 Jul 2024 14:59:16 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:16 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 43/53] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv Date: Tue, 2 Jul 2024 15:57:44 -0600 Message-ID: <20240702215804.2201271-55-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" etnaviv has 5 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs as well as plain-old pr_debug()s Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnavi= v/etnaviv_drv.c index 6500f3999c5f..1d1ddbedcb5a 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -25,6 +25,8 @@ #include "etnaviv_mmu.h" #include "etnaviv_perfmon.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * DRM operations: */ --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 375F21CD353 for ; Tue, 2 Jul 2024 21:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957559; cv=none; b=pHPFRbYw9jHi2hX4vHXo5AjN52eoatKtOCs0ALANaBOLwi4K36T1KrdEpPvaMqFWtkYHsJCfCGiJ5VlrJCpGSgbXVNLqI+doB+ZSBTuXuAM5Zc9jC5jqYC8YvaQz+Pb1IIAz9/X+tgETgaaCnVBalLzSM3DGvqovutBlhi/4RBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957559; c=relaxed/simple; bh=Bnq5BQKfMG5kstkLfy63VtsHV2NPk24N/ajWD1f0Eak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oKGMXwU4tFR36rCawKb6GcEP15f5iekZX0987fLlsmltj4MO8Gs0fOvQVCfPXq4T2MdGzAzcMzSy7XBj5W+mRsClxs6kIp/Z9/H5fpAKB/8o7w604DlgNQm7sithIf888FO7bBc/d9CsVhUM/VV6trVma0m8ccxgjwOYQZxsI9g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PCw0fPru; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PCw0fPru" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7eeea388a8eso185113539f.2 for ; Tue, 02 Jul 2024 14:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957557; x=1720562357; darn=vger.kernel.org; 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=MstXp7FK88BMTd8JHXdyfJJm9pHe+R2QRKpv7nuxLhw=; b=PCw0fPrufy3KASeYQEi9JBdVnNQJY+4+FHm2fAo3ao2G5AbuF+bSXXt2iedgf2mvcM ddN5IzIxTIvS/WRUGcX1ZYD/FSvJdpr7zR67NWFuAgl6uKriCSgz8cctemAbFa9Hj9sg RLDmmMiX/KFKv7sjVw9hKuufOFyLR/17h6xe43mbpef/4iitwPxQCdGXDZaX3Ah+X6HY 0McpftENGdL+n7wLIJGPeTkpUqX7p1iFyjhJwEzwTMmPQztg/1XY9dlUT4kBZlM8s+xy aOp+F7AtxcZYAtQ8dB3BpBxEX5cWExAfIVV1t3M/lZkq62dyfsOMqb6TUJkeT1VjviFE cH+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957557; x=1720562357; 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=MstXp7FK88BMTd8JHXdyfJJm9pHe+R2QRKpv7nuxLhw=; b=F733J8uhP+D0pPaB3Aafactdh4YMt+i2pqJxaxBrrVomK4+gp2+ErM2d/owP4OdDaq ceeTB2G2dH4EMPg4VJNrIQfYuQqxu8zQ2jLdArdGmFPY0idnFdp/C5Wq5oNFa7FQ5l7S dPvpfpmfsxTqZlAjEo2qB6OslXaI51YBaRyGDVpXPISxG3mBrahBi5VLXEMSEkt/Vbfu qk+bhV2CyssOHrwjGsrjWbPr/lxyR7+n07FTpG/SfiSLEd1LSqHxP3QVRcmE62N2cf6S P0pR0WXbG8LcNo++dsqxcMtI0JS3gE4noe0lGLBEezJEzJovmWsEMPj9lh7A5+aJzV8i 4Haw== X-Gm-Message-State: AOJu0Yx+ovTdGBMRi654q+FwMnBbsQyTmDr+bUg4NVpKV9vSdvEBKINi VCzDBzmkuA/n8XXAM7CcmNaUuXMaLupLj8gW5bvrcPM5GoYhpJLK X-Google-Smtp-Source: AGHT+IFELzazdv52SOJ609vTMnouJkmTMMLQschX/DEhQZmc7e+NLKxBenDxq+yCZxxLRM+vTht15w== X-Received: by 2002:a6b:6106:0:b0:7f6:2e72:e81b with SMTP id ca18e2360f4ac-7f62ee168f6mr1110126639f.4.1719957557504; Tue, 02 Jul 2024 14:59:17 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:17 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 43/52] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver Date: Tue, 2 Jul 2024 15:57:45 -0600 Message-ID: <20240702215804.2201271-56-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The gma500 has 126 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/gma500/psb_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_= drv.c index 8b64f61ffaf9..5e03ac7ff433 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -39,6 +39,8 @@ static const struct drm_driver driver; static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id = *ent); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * The table below contains a mapping of the PCI vendor ID and the PCI Dev= ice ID * to the different groups of PowerVR 5-series chip designs --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4466E1D19E8 for ; Tue, 2 Jul 2024 21:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957560; cv=none; b=uKbums1e+vTTdNx4vLMcnc7eiN2/QVupX65U8hbezJo7EWZGCSwMgHeApffH2FWFi7XYJvMrN/ahE/YD3MBRDCa7vpYxpVG0WcQxlELqpbjKRGUl+RIvgyTMiS3IxHSRFOnFw4vi7nolTgBdf7T+dHtq7MQB+6e9SX0rVBVUvsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957560; c=relaxed/simple; bh=Bnq5BQKfMG5kstkLfy63VtsHV2NPk24N/ajWD1f0Eak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qckfiAo/fnj0B8F36jATiCmFS2PMYVo1epcthEkwQ08GVbYbg0H98OjuVbKCYf8sfwGiz8ZyHHaifMxsqzqcL/CFWMDgm0Cm0bIPyGGhJuNZ8dJh8lZgQlhKKwKqv31sK4F5zA7RUZ8Qr1xx5u9newVDeXfyHcvSnLNaGGkfwkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=crmcLVPC; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="crmcLVPC" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7f64f66fdd7so60635739f.0 for ; Tue, 02 Jul 2024 14:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957558; x=1720562358; darn=vger.kernel.org; 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=MstXp7FK88BMTd8JHXdyfJJm9pHe+R2QRKpv7nuxLhw=; b=crmcLVPCRSIH0PeN9U1Xd4urGdBGo8rvqX/njvq760CsoqK9aFttyK7tgbq9SGteMq S1XrLlshKxjdYwcpFL+Pisb7frHNLg7GrB2ywU9Pxj3D+QGTZ6t026cAvLofjYsryk0s OY8MNq06YVTsPm/OFX0Py02EGSbqH/SapL89ai2TUTGMHXBNB2SZ3MjL7Qf2tNWwjBer JIeL8stCqI//H5fgZFjYTlI5PF4ietfIpkz8eXU2nYpxairye2ohLvCdG92/WJ1P692Y KNKyrOTCVY63A5Oa5SYISv5NiJm+wISh/I9fRlkSYWik0O9h9N4pKiOcyKtWrbp83eHZ ls+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957558; x=1720562358; 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=MstXp7FK88BMTd8JHXdyfJJm9pHe+R2QRKpv7nuxLhw=; b=hCfxHgjsqZyhM13XZq6uwlnz2jqflZvi+lL999/byPowE4JFjw4x2uI8f2sivqFwpx B2Sk2PohBw6wYdz7aYEFz2FlUynAiKZFPxKTRPYF44WzzK80gF5eXNPPe9bmD7KBKXO3 qX8RGED6gFmMotj8oOSVlfcWNfEg/09d3SelNWHeGQrDquoOLkw2nbKNmbfYK1L9Qp3R aOC/NRbFhECpUGvVXTV6+hVu7ljXktbCgXY3XP2RoIm4izBy7Dc6oxTJPwMUNgFj8X+P ME8fcijhdZ3lrUqCDdvTX1Y9MY3SY/6ZPz7SbUmfmesR6oaM9Cq0K903d3MmEjYlq7/S xumQ== X-Gm-Message-State: AOJu0YzGWZhu0U896xgSnY3L+4iYQyIUTYWRTEtlJKgO8eTE2Zq+FfRb 17eVzfWiYUMewx4GyCHFni7M0hxw4Ox2KMe9ZhTJjjfsJX7NyBNd X-Google-Smtp-Source: AGHT+IFcIORp9H/J73OiEqri32U4KgwsO40eee8n6IPtXvMuMDoj2ETHViN1dw0w41V6S4LRy3BoYA== X-Received: by 2002:a05:6602:1d15:b0:7f6:5c30:3717 with SMTP id ca18e2360f4ac-7f65c303a28mr121899839f.5.1719957558467; Tue, 02 Jul 2024 14:59:18 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:18 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 44/53] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver Date: Tue, 2 Jul 2024 15:57:46 -0600 Message-ID: <20240702215804.2201271-57-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The gma500 has 126 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/gma500/psb_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_= drv.c index 8b64f61ffaf9..5e03ac7ff433 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -39,6 +39,8 @@ static const struct drm_driver driver; static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id = *ent); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* * The table below contains a mapping of the PCI vendor ID and the PCI Dev= ice ID * to the different groups of PowerVR 5-series chip designs --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 471E01D1A05 for ; Tue, 2 Jul 2024 21:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957561; cv=none; b=enORbDK4VrWIbuG/UH9vWhKQveuX7xvhTA3mpT4nCRYOhEOSaliAt/czi8AjiGqlCJGqJSpLGbw6yBjjAHZZJLQaQF+gZtv9adog0bp7o9EoQuUGaFeK93/er3jR+ZxyrPAaDxXtM4/W677KvdCdOlnH0s/IvfLuO4X75CndM3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957561; c=relaxed/simple; bh=iX3YPrehKsc8JYsY/MYFOXIO6YJ0coOili+oIW2ckmc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YlTh4e83moPTdogjynr2AnAZvSwSnUjmvPQJurODS3z1tJV6N7XINIR61JBus3bFj56lZmwHS3LceAGFWjse2LWPLKrODqZuj0MVJP38IQp2CyIyxaRGwuNlVBL/2XFuEBGNVCBGC39MBmgI6Fl3et3Im3hFM1blSm2uTI9tL9M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=i1gxJkUu; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i1gxJkUu" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f5f7ecacc0so203298739f.0 for ; Tue, 02 Jul 2024 14:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957559; x=1720562359; darn=vger.kernel.org; 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=6+Eqreo55RWzciyFbwYCY+bKp2K8wKhzwrrhakb4uDM=; b=i1gxJkUuQLbmWihy0UR2M3MdIscIa0j6zCWsIS49pvVatdL/qeyMVim6Ar4KIWMZnQ cP/Fc2p0vReC4x9QTnfoxIb8Jq8MSG2tcDb5gUBQVp1Az7KKlU8qgjtGFHOcPb909V0S McSjQs9V3HvfxJdaGcwNLloasK62NW0Tk75un1g1jPwXSyicgLoKjuqXBiASrtu2j6WP QAWjWqaDnScrmfobL7is7nTiwhs1dHjnRUHhgjsdMlC5IVmfZkarzAJnJED7tov9DCfD 0HLIuitwLZWDkB5w/hQugXVUuoBWb+ix4kb/DQnkggRa6g3erlK6qKo3vvhk9DbfDn1p c/JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957559; x=1720562359; 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=6+Eqreo55RWzciyFbwYCY+bKp2K8wKhzwrrhakb4uDM=; b=vzpXviakhR1RILn0kg3zoxCDlF8zIuyTQKpV7e2jQGaqdwGQQkx2pGzYY+jg1GXBbM zz1PrqKHiXjW4mriS2Ol3iPPpiEnq+2gBOXqJ/xjpnrCiEM+UJFazZ3nQOyWh4EHAATz ZWmIa4iZJH208xDThMt1z/54KB1q3sIXlWbls8bNzUGzSTDAzUb64Fg10GinhQtQcMoQ DdQikSejfY2YZKj3yOozdbtRvNQwvRaR0tR0t6t6Q9KWU1jF9f+IeRio3k9bc7c6HRVL C+dAzyuwYmimYqMIlDEJ0Q2UDFRECYdWGziBrPWBMdmOVc74AHC3eQIsRzcrPlo5C/Sz FkLw== X-Gm-Message-State: AOJu0YyV3bzj++BoeVuEGecSW8VavCZl4QuCZtL1TIJX0XWaOGdTS7PS 13dwtiir1/4GmU8cSyB86XFQ6YFcihR8Oc88b2jsIzxlDdEKna0/ X-Google-Smtp-Source: AGHT+IGcyZCDZRZp6V6RnDZJi7b8GdP/ji76gbOaeQMp4gTOzKk8wvV+sE7C+kypGaK6A4D4KgsymQ== X-Received: by 2002:a05:6602:600b:b0:7f6:4f7e:b87e with SMTP id ca18e2360f4ac-7f64f7eba13mr445715539f.21.1719957559493; Tue, 02 Jul 2024 14:59:19 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:19 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 44/52] drm-dyndbg: add DRM_CLASSMAP_USE to radeon Date: Tue, 2 Jul 2024 15:57:47 -0600 Message-ID: <20240702215804.2201271-58-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" radeon has some DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg about its use of the class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/r= adeon_drv.c index 7bf08164140e..d22308328c76 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -247,6 +247,8 @@ int radeon_cik_support =3D 1; MODULE_PARM_DESC(cik_support, "CIK support (1 =3D enabled (default), 0 =3D= disabled)"); module_param_named(cik_support, radeon_cik_support, int, 0444); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static struct pci_device_id pciidlist[] =3D { radeon_PCI_IDS }; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A44E1D3096 for ; Tue, 2 Jul 2024 21:59:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957565; cv=none; b=ruZUQXFoizy9to1G3V4gB1Ca6DmtvoxR+nBt3sYuhML3gqTEFmDwUrAA5+CIWu2ZdogDeMmW5wTWfkCgg34HgVEq5FjX67RUXAvovQQ3UWvzBgDj6Oow17oCcqRWRX1LiAvm7fAkQ5xKzm72QJpApJk50yyfICmD5XhywW+PIZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957565; c=relaxed/simple; bh=Rk/f5dbxo8g7dEtgimss5pObm3l8F//bmBLgPo4cdzA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jVOLRml/Jm5WUrMSN229ayHW2UXb4EqTdmLswl+yxXaE0R49aQO/VZsNn1+npgnlEOc9W2S8Rz/pICpYaGMGm29yeRpNSMbSXZdww1mzR9/RWIyzonhHJ6EMRj8P1drfrVdRgb5GPJH1Ya2r1S9DnH6DZGUSuN4WVo8Ogc5fN9w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c+bFa4Ek; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c+bFa4Ek" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7f3d2d441e4so148787339f.2 for ; Tue, 02 Jul 2024 14:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957563; x=1720562363; darn=vger.kernel.org; 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=KEobEBAhQNxO/3OZFKP2IkCx5XlfGH8UelPAprxIIQY=; b=c+bFa4Eknxk7j//Pt///dniyJGiu1ddkvesSIF0eK0pGZq3I07h13kQyP9L+PVm+R0 ww1ByY4lJVgosGQwnpntB62ogXLrEGyejoQlf7zRqUclBtirgE5ooyNiqA1P3OB12Dnv G2JsRJe9SZte+IaeI1DeW37VkW1m7cZjOSiBfnT9altp/SIBz0Q2ihfVmAiNHBwvm8j6 Y8piz8/YaONWvBBgrsoCL15lxLEt0YSzwv7kARWNG4X1vTwAzPkDq8vrGnzcqHd/6cjv /90k6Gp02hNVXo6zQZ0pLSwSrvxP5ZFQCtOVxn9tKqbL+uBznR7/KZ3EB35Pob82G37H 6DeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957563; x=1720562363; 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=KEobEBAhQNxO/3OZFKP2IkCx5XlfGH8UelPAprxIIQY=; b=aspse8rErv59V0KajAvUWR5yKrZZ6kdrOoSRPWsKiWGjUohp97H8Iu8MDpe0ufQy36 RHVWTkeFwjnxNBY65+7f1FyZt8a3DQvoqkpOxZhe+IDVhsYp4lNd4+U7mM0LgfEplyFi ir9cHOmmitVrf/lGsb33k83ZAt/BXFzwL28QPvBA3Hn2AG9Ny3E58AMvLN148VUna3p1 WBydZT4xd5ECqsCujeo3jW5FYGir+9KfnnwX99ffhLpL1GqfmLXEzPEQOv2EGSUyGSF6 4eY9HIL0BYL7lkm87OhAYeTd4HotOlUxQSX4zKTVyF3rTv3r+XMumlyQamejMr7dPDe6 bUZQ== X-Gm-Message-State: AOJu0YyqqvbFLR2MnfF2FZDig0LjaEyxi2XNzQKXqBhnyzXA6XZarbCS ADIHsJkljuRHRyISL/QzJlktdXlIWl01SZeOq2EFb6e5ZJwIC/yc X-Google-Smtp-Source: AGHT+IEXFuB8CgCOnXQJuoSrwTgJZdvIHg9MnoO0JAh6apXbcdNr+8WN+3OWZHzErKCmZl0N7gDJwQ== X-Received: by 2002:a6b:7f02:0:b0:7f6:1b9f:8939 with SMTP id ca18e2360f4ac-7f62ee0c85bmr999438639f.7.1719957563268; Tue, 02 Jul 2024 14:59:23 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:22 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 45/52] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver Date: Tue, 2 Jul 2024 15:57:49 -0600 Message-ID: <20240702215804.2201271-60-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The vmwgfx driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/v= mwgfx_drv.c index 58fb40c93100..c159f4d186a3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -275,6 +275,8 @@ static int vmw_probe(struct pci_dev *, const struct pci= _device_id *); static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val, void *ptr); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages"); module_param_named(restrict_iommu, vmw_restrict_iommu, int, 0600); MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages"); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F37A61D3084 for ; Tue, 2 Jul 2024 21:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957564; cv=none; b=uTFxHkKRvmU+iPuaRbhEevvL+JKqEHcjBtpZq+WLK+cgdXBVBLakvJdWzCtKKhf9i2HWaEOqOxBF0TaMEO9O7E6PkMit9cco/1csq8ccH1224bG7vdDIrAEdsuDRiUEOHc7WaRsEfti5BqJ/NWJAYU0liE7s1ShYpCCYzOOb0u4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957564; c=relaxed/simple; bh=iX3YPrehKsc8JYsY/MYFOXIO6YJ0coOili+oIW2ckmc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S6VbWlStn6xOWCrPr856VEKnXrrkWvkThvKpuU7kGUdFVVAQlJTQgFCX22dUOa9E+32YZe/RaZf8rkToQ616hVsgBMIvVSj4hBhcD/LzMX8Qa6VU7nZ1ysLuvVPZUyMrBn5hRIf7wRAUfVlHaBs9irg+NL4L+hlG0+yOd1s1Etw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FU4soTcV; arc=none smtp.client-ip=209.85.166.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FU4soTcV" Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7f61549406eso180477939f.1 for ; Tue, 02 Jul 2024 14:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957562; x=1720562362; darn=vger.kernel.org; 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=6+Eqreo55RWzciyFbwYCY+bKp2K8wKhzwrrhakb4uDM=; b=FU4soTcVIx12MkyiaNVmjhN+aaGkwtxuo7YAHqEjT9jmBPAYYJKuzXVjZYSX6tyxBW +wFLHbe642sAYBp3Rw4U61RCHB3CD64L2TVQDjO2kAnIArd6bUu8oJvUDlB/YZmyXBuW HCCTSvjzZ5TC/CkjtL2Cow1hDBeYUoBeDIauafRk7qi4D/Uv14ZpbYLJCxMnrw3PPjuW nr/9zC9yMtrgJzLH6Jvl+Tmf7bjFm5Mw3y+3hvFcp30kbUNaHxyZFeNK5I/FlRomUPoS lM+BASTtS3uAqYYBbv03wD00UbKOi0MtDh48elzY+RsCa3c+STd/BVpkl8ga8XSvUrzv K0+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957562; x=1720562362; 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=6+Eqreo55RWzciyFbwYCY+bKp2K8wKhzwrrhakb4uDM=; b=FKvZm/rhoKD1KalBHYLzYu5+0W25hm67hwPwO4jvhswXqRKGa8LQ1hvo2TBua5UxXM ciTpLUVvlg1D/EJTzXftEkJaQVNLHFjuy7+d2BXDhtfgS5QBX473mLB9CS8GdYVkernh 62p7W5/OGI6vveluDAmPVPX3tWWSRPbEbOiuhmc3ZjuJV3pJIK/bgMrUU99f5Rz4/+oA TWAaKzObi2U4BfUyzXtWIIl+TFH7lyez9Dvs7wSqtV0pstUuOcDfFe+kPWuGO9Miq380 bt7mRuGOnyl2xwhLP0a1Crp8b7xM6QJF/ENbOIatzc0HpqU6DQqnjEpPhUrrfjtL7LOV WeCA== X-Gm-Message-State: AOJu0YwnSyuD1A9bG3sUeVxakSHTv53TjYsMJhmFM7ZRqxMvC+Q4/po8 wxjexwczciKGZ8V6FFI0cstIQhMP15LP0FxcQD/PtnXTYQuJYasN X-Google-Smtp-Source: AGHT+IFbVFUYm+0pu0T514FItDcAvbDhzBeP2fYzyyuJhvxQn5GvEZPQBzd7j+fZ1Xji8n6rJpg1qQ== X-Received: by 2002:a6b:cf18:0:b0:7eb:7f2e:5b41 with SMTP id ca18e2360f4ac-7f62ee196dcmr1130557639f.9.1719957562323; Tue, 02 Jul 2024 14:59:22 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:21 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 45/53] drm-dyndbg: add DRM_CLASSMAP_USE to radeon Date: Tue, 2 Jul 2024 15:57:48 -0600 Message-ID: <20240702215804.2201271-59-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" radeon has some DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg about its use of the class'd debugs. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/r= adeon_drv.c index 7bf08164140e..d22308328c76 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -247,6 +247,8 @@ int radeon_cik_support =3D 1; MODULE_PARM_DESC(cik_support, "CIK support (1 =3D enabled (default), 0 =3D= disabled)"); module_param_named(cik_support, radeon_cik_support, int, 0444); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static struct pci_device_id pciidlist[] =3D { radeon_PCI_IDS }; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AEB6210195 for ; Tue, 2 Jul 2024 21:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957566; cv=none; b=ch8mwUE+/LyrfUHOnExA3w5w432Gtitiuo7FkPW/DY4eMu361pahhgC3rF9QJ53jTIiXGny1Nr1oiFnN0VvaW2J+NAROTdMiYPr0GUiN55hvtpdu7Qpbis/9eoojkh28mpgjNehVaXBYD2MojTiMGpF+pcVe2o3Whd1Ux15OyWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957566; c=relaxed/simple; bh=oYOe2lhXkLlShr79+oMb5s3dimYUvU++xTU1aiSXEBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PjhegBtVIFVoevLzJmA47x7SQRXI1H2U8/a10HW4k/K9cpDHJoJj85tFUX/erdFBW0KZBREELzPpPJT1AVTVpMkp8oV5gNo7S8cmLMTYJaoLG2L5czOLz6g/xoVocaYXJX7cJruBG1x7J9vjAHDIVXv6AMrpvhRgtNVX10gm07g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gDa0ZIjP; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gDa0ZIjP" Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7eee7728b00so189237339f.3 for ; Tue, 02 Jul 2024 14:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957564; x=1720562364; darn=vger.kernel.org; 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=Wh8QJ3ROh21ShBzcCiOPzlcJgoRl8pzdhd6qJVNHlVY=; b=gDa0ZIjPxyHgwjq7ICLFDFzay+hYAps3BNt1d99rQiff8vY0aZjnyG8Rv7bk4ptoLY HNmkJbaFz5VLqyWqQTEvm31VDBypitdxWkl4Hygx73RwoDzQH5+gb0wtM6NpTvJlxnyV RHiaegFfhD7bJsB1jZmIXiCXv7Yq08SyCqriofkIZz/tZ26CASjfUugbr/ZNNuVsLi0j 03A9E8KRst42i6apqguAlKZxyzuHsibYBseVh0VMLsDZYlH3qFmEEUceX5oxFNy6hpZz D97C3RhXriMGkcX/mGg53qUg/Xv2ZX7BFlz6FBvWmN+OKgYNa0P+8mwVOpZF8HaL/60N 61cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957564; x=1720562364; 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=Wh8QJ3ROh21ShBzcCiOPzlcJgoRl8pzdhd6qJVNHlVY=; b=LezMPYgLG7jDtaXpYLV++1CwBZddDIbVv24jYzoh+zPG8IzJ4laEULoWu3rCjFhWdk 1K1ZJ/YzdJ9Psoypi8lfxCmsUTxL5SaUFXj0CAOErEdzwEK8TmoRYEvwJGYYn0lan38Y GVfMfFHn6MsDWOCrbD6GhS6PYYVBUoTDACjHu5tuGfzTVOVRdL3LcLJiuKdNw0nCwn0j vku4t2VDJsM1bhsUc0/rYZO8NL8n5AhzZMg6/P7X2gE8SBeqEWpF5I9b9gdaqG390sVz VtucOTXuPewBAPsil0XyfXvBcPfg2ALN+E2J+5pY5dDqdOKFlRizap9oxqkha70uAWc+ 8DlQ== X-Gm-Message-State: AOJu0YxzeNIWNlqYSBrgDMscbvMyISq9nJ2eo+oc6axrJqH6YEJAbmyh dkzOXW1ephWl3SJgWHwV/xqRBrBPuvlY0la61AB0llWva1ctQiaNfeOzzQ== X-Google-Smtp-Source: AGHT+IGsvIlCZD+c570Neze+GHw9bZoFgMkgtz4aIrGReUzG3qZZPt9ry6B+lTwl9sdSHvOE1K8YBA== X-Received: by 2002:a05:6602:304b:b0:7eb:8874:99e0 with SMTP id ca18e2360f4ac-7f62ee3a19amr1042539839f.12.1719957564338; Tue, 02 Jul 2024 14:59:24 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:23 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 46/52] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver Date: Tue, 2 Jul 2024 15:57:50 -0600 Message-ID: <20240702215804.2201271-61-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The vkms driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_dr= v.c index dd0af086e7fa..086797c4b82b 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -39,6 +39,8 @@ =20 static struct vkms_config *default_config; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static bool enable_cursor =3D true; module_param_named(enable_cursor, enable_cursor, bool, 0444); MODULE_PARM_DESC(enable_cursor, "Enable/Disable cursor support"); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76E101D4332 for ; Tue, 2 Jul 2024 21:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957567; cv=none; b=ZYYXLUsvAcHkWEHkazn2Z7Ne5XxchKvgvgbsZFiwHHxgszuOeZcNj5Y9DnHDPLpLpJhh7fT0wccLOJtu1VZK7FFg/0omROFHb8rXDPxeI5IrtG94kL/GM8oB9JwT/cO85mLDywHCIHJYeXSMxdlkiaWOcPFdGNjketrQiwHUvmg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957567; c=relaxed/simple; bh=Rk/f5dbxo8g7dEtgimss5pObm3l8F//bmBLgPo4cdzA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YOwkXwhcW7kchECVUNlJvFf36AR2U9kduCb/0m+G8Uby2O3QP/6sTTrRVWXxSC3Xqt1gk88D3wq4TSZZojj7aPmkNw97LoeyEmBZNrrgsJvpSVNQuKf+hnVixfXcY3TZFTIYtU1ICUOZ44j+9XAz8SIipM+HBN63vUbcZNo3Fjg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ehcn//tR; arc=none smtp.client-ip=209.85.166.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ehcn//tR" Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7f3cc78afb6so165132139f.0 for ; Tue, 02 Jul 2024 14:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957565; x=1720562365; darn=vger.kernel.org; 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=KEobEBAhQNxO/3OZFKP2IkCx5XlfGH8UelPAprxIIQY=; b=Ehcn//tRN9xwDizRRXoBVFyKl4+0aDWz8p0aQsVsXci2vQnX8XTcKC9O270EEm4BVA adhGuF8DI11PJCvYNpWOj/9+Vi2KAuQVW/za2j955o866HKCeauqDwxzyelebNI23DpK 3jWjI8VvW1KYabf+e+scernG25SCrKkhC0Ni7weQapfxiYiNbR5GI3Gqf6p/OK4GWKrI jqTKZ2Dxow8YcNQCEHefYzhWvlbG7JcvUufMK1PtrdtQvhTuJhAB00ijS4V7YL9g3BV2 cBsdMRBMIKDpIC7o5FJLdRbJBz7C7Hi6ogvGr0xkzqciEy7LwHMjjb3HIWo9VQMvSdIV VgCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957565; x=1720562365; 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=KEobEBAhQNxO/3OZFKP2IkCx5XlfGH8UelPAprxIIQY=; b=xJjkhRWVyO/vB6Eayf01iBhLbRg7wtERR7FMqxNmto7b/gLreXat0iAt5JxqWqfcH6 MYWuxgQiWeYh3ig0qNjJhjRb+c+GC6BqT+Qe58lwBv56zl4Ti0nLW1p71pSUPh30mKDc LmGvm3ilM5b2uGVtUvwX6q2vixYH9M4va016LHnND+987xWfsUaTlWn4lRa0+4GaA1Xp xVdPiMZnmWecG9UrNhMcuBczbfaQ49EreV3XiVjslWX69yQiS+zQhMdOJZo3VBNap2Jy S73NGbFCL2omribWKBfd0B6hbv7PjUkcOc+qVZ2GuyGApXkpaEWv4qCCImm1PHUOao6J JfLw== X-Gm-Message-State: AOJu0YxY65Z3G3sF25zZh71iuhvw7XVQoF75F0Gl9zZQjdpJw1Crq0ZU VZ9kg24I8BndLHK3wkUDtO/cDDiOH+E8VyqytqeXOY2ivork+aRr X-Google-Smtp-Source: AGHT+IFcOC83OBkwA2hxGjvMqaxztbP+AvzQjxD0yqNmEddDILLw49t8Koh55fzABZc6BNNbXU+pEw== X-Received: by 2002:a05:6602:1305:b0:7f6:5694:d874 with SMTP id ca18e2360f4ac-7f65694d913mr239273439f.20.1719957565593; Tue, 02 Jul 2024 14:59:25 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:24 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 46/53] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver Date: Tue, 2 Jul 2024 15:57:51 -0600 Message-ID: <20240702215804.2201271-62-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The vmwgfx driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/v= mwgfx_drv.c index 58fb40c93100..c159f4d186a3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -275,6 +275,8 @@ static int vmw_probe(struct pci_dev *, const struct pci= _device_id *); static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val, void *ptr); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages"); module_param_named(restrict_iommu, vmw_restrict_iommu, int, 0600); MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages"); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 776901D434C for ; Tue, 2 Jul 2024 21:59:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957568; cv=none; b=tTOjq519GQxn+UwGB3iWksbaZBmmD1zN4Yp4mLOAWF/hGbBhH+7VRUFyOnv7nH2DB7LV8ZMUJJxUfdxei3KJDcOZVuy5jC+wzuMd0tWusmob86sMOc4DGuVJgh92uxPwP8DIc0WexsJD1b5f8tJLT2vmIrU75x1+m6JJbo8JyT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957568; c=relaxed/simple; bh=y0Zoxeh2NDhcrC27lg8sSPwKxWiQbpVmdMoWiREKFWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NPqFDyLtz1QJ3C8Kjj+BK4UpKEOcogg76FvLT75PSkVJ/HLOdgfMkLTBNo+oXATKv55mUR3Dq0UM1ya8gozQNisNq1hL3Q0IVm+iZjzDcAyHyGzdfcFOwPQHb7qt7tAfRxVABr3QgPL3fSjnDktWlorfBDcX+EfSk2aGyqz1C/E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RM7mHek8; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RM7mHek8" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7eb5dd9f994so174440439f.2 for ; Tue, 02 Jul 2024 14:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957566; x=1720562366; darn=vger.kernel.org; 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=o0YsvOK5afJ8qV3rkuOU7CKX9HpGcds0hiKx8bDl++s=; b=RM7mHek8/SbHNyNOAJEqx21rAbgVG96xcsrf26ErhYfiNzGeVIbU8gg3r3j9WiEvxL lsvT4ewAGueITdYwpFGoPTjf/z6xypHUdUOWgSNS5SWCwt5AqJszci0WGhMRiT/tn8Eh 5ADrqeMY6qaPieUObdB3q+tmdOmIYKIzd5xCV7XAr9tUKV2+4Qwsn5uw3QubPfSzbqjO Agos5Ks0AnRW8PwoA7itr3eGkfqB5+Kg34yEmAZ2CDucQXCDWFHtruCpb/T6FQ0FrCjD PlKlZ7XtmCDCnsT+3hDxmY/MIvxRwhcQB1HAztLtNDLnBuUK+twqURCdH1M52ZiN+kep cUBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957566; x=1720562366; 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=o0YsvOK5afJ8qV3rkuOU7CKX9HpGcds0hiKx8bDl++s=; b=JSdzEly3/sKgyTbeW6h/GVj7F62MzumJcNzMuSR6XnaToIu3wuX21podQq80jXrvJP zu3MXlvKMOi2Yba0lzys8+wPGzmPCdCnMFCkJaBU7zaGMxqfk6HgrNwBcrKqNMCFcTkC EjCgDp/PcEcsNafio+JmAGB3zp/IKWAIdn7GXl7QNBoGaOkaYMbdiiAQU2Ws7J39/FVZ gNsWbW58w87n5Qzyf57xHZeYBnMsyPzvd5c533QToPYXX0oA8yiD1X5ctvqdbGBV1uRZ JkTOhpF5kSR2lW3YMCnNS0osP4mf63gY/wx5Ls9JKP/C16NvnK8tmJ/Fgaloq1Zxs5y/ SSaA== X-Gm-Message-State: AOJu0YzuHaVXdZEmtuQed9MfGp5NCjq8QGW20HpQ4Kc3wtmn0OE/wJ8V zii5PDVkwJxOlDm7vgBlLw/G8GRWAcJFndABTlq23xlEW02p9ecr X-Google-Smtp-Source: AGHT+IGvYws4ZnTk2jdkfQbNphXRfxlVgTR2bSz3FZORd7ias08UfIGbv4urN9er+A1Gk+gnXV2vKg== X-Received: by 2002:a05:6602:1306:b0:7f6:27cd:b054 with SMTP id ca18e2360f4ac-7f62ee17f56mr1125065139f.4.1719957566686; Tue, 02 Jul 2024 14:59:26 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:26 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 47/52] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver Date: Tue, 2 Jul 2024 15:57:52 -0600 Message-ID: <20240702215804.2201271-63-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The udl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/udl/udl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 3ebe2ce55dfd..ba57c14454e5 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -19,6 +19,8 @@ =20 #define NR_USB_REQUEST_CHANNEL 0x12 =20 +DRM_CLASSMAP_USE(drm_debug_classes); + #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE) #define WRITES_IN_FLIGHT (20) #define MAX_VENDOR_DESCRIPTOR_SIZE 256 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8733E21019B for ; Tue, 2 Jul 2024 21:59:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957569; cv=none; b=NIwsQebCe+arDjr4kVN1F5upEadi/UDm46ymhwsDRxAGvKzMtJ5n5xxnPV0CfigJ00uLovbLTH51qaSUM57/xqSLdH6q5Y5ipk4HgmUC4n50uK+ZXHRNSVycdMzecYxwEJoqv8wZF3f6GIVYppoZXwEbOG++utOBUTKjNbuKtg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957569; c=relaxed/simple; bh=oYOe2lhXkLlShr79+oMb5s3dimYUvU++xTU1aiSXEBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ER0XkgVbfhGHj2/rAkxXwdrjIRAIkI5ARbTLcF9sAVuFakZLGcB37MGxzGKPut0wsB6mO9SRA5hmnDFZE/AIRx95+XkafX46lzWj4L3iP25ZJj8vCYhpRqVzz2e/lzZ5HZje1xlqYLzZPpswT1FHQcn/Z7kMVq/7oFW0eqyiEcE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IgmyQL1r; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IgmyQL1r" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7f3d2d441e4so148789139f.2 for ; Tue, 02 Jul 2024 14:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957567; x=1720562367; darn=vger.kernel.org; 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=Wh8QJ3ROh21ShBzcCiOPzlcJgoRl8pzdhd6qJVNHlVY=; b=IgmyQL1rNeBr3v/GBGHQYNCSTf2se0onKda7nx8ViUz8pLybdd6a/ua1Xpt+NTYDPS dI4Jtd03yIAKVfy4zAyeDh0VK/pWyMGwXMVYUlWxpEDdoNCJDKyhUr57xHsF1WDx7XRB /mn9asuehn6TkU84s/HD2ZfDOdIu9j1ACiKZQVP/+LkAWPiUiDT03L/8xE2hggUqH3tJ LpmCLmhXLPa4nqoQsFRAZVWxDY4eGKyGhNJe2UBlrHYwVADQKPIGPyy1p4kaRuj6UCLh FvrZiPlmoKOqEyazbOrsDTSxMhaXZ/41KK359wL1ouC7mcKvvNGQga7RbbV2wEK9FE+B 2xZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957567; x=1720562367; 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=Wh8QJ3ROh21ShBzcCiOPzlcJgoRl8pzdhd6qJVNHlVY=; b=GDbk+e1bnftjz/V4nU4ZujOLybD1Pf3Zra4ib9ecaK2S02RwVoRAtlJ1oNFWHQCT8t WRQqtFkJonnZJIBeFF6exRGgIV3kxUTAiQK60suDti8G29sEUw67Z1k2rFYTTARIfUz+ IWGBigbRgExj0o7ZGOr1K4rsoPPvWIFXITXLAUHaVeIqwdLFhn6TF7uBHfPve6qmRpej 6hiMANv8C+9Mokc5IeVy0+Qd9ZUnO+v2igsiihJ71yKu/0tY/7hTO0a+xmwenbViQcqt /QxdVWMMxfjiDr+8GWCYptpSIlsR2dN+iHRUuMYJnj5ILSl8C68Spzan/Xb7j+UDAfZK Dl4w== X-Gm-Message-State: AOJu0Yx8X3ko+qEKrCsaRe/DrteV5VkXkoTi9UDUei026dQF8w7MfwNg 9lT/v5tl3ToIHvbt55zdFl9QZB4WbHVDjjt2W8W40lCX1m6+1Hu0 X-Google-Smtp-Source: AGHT+IH3xH7tho2sBM1GSeoWG+NM2MBhz/xyUPt2gcXQi9kj/rdgFoV4pSxxHWVcBZJh0cz14Ndmig== X-Received: by 2002:a6b:6514:0:b0:7f3:d5d3:3e56 with SMTP id ca18e2360f4ac-7f62ee8d268mr1165752739f.17.1719957567640; Tue, 02 Jul 2024 14:59:27 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:27 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 47/53] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver Date: Tue, 2 Jul 2024 15:57:53 -0600 Message-ID: <20240702215804.2201271-64-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The vkms driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_dr= v.c index dd0af086e7fa..086797c4b82b 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -39,6 +39,8 @@ =20 static struct vkms_config *default_config; =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static bool enable_cursor =3D true; module_param_named(enable_cursor, enable_cursor, bool, 0444); MODULE_PARM_DESC(enable_cursor, "Enable/Disable cursor support"); --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FF2F1D51AF for ; Tue, 2 Jul 2024 21:59:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957570; cv=none; b=loAfR3bgb2X/2qNxddQYDYdkHC+f9MkhWXselmA+1PlyAdr4cg6nXUu7aGUbIEbLApZI/Mki3niSlT1tInzwdxSH2o0xiU5VP6bnGnfDJ/CrgnLvBTlZyMkuus8oltStvGERaW9o2O69y0WZ7T89auZ/AjUmgg9kaW5GvKaFJAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957570; c=relaxed/simple; bh=TX38Fwwl2zTMhUpMRgW8omd+SgE7ILpv++5XKavk0hc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UzT8JiBqtrsnnnesT2BbzBtxvS8xVQ0w7YDdF4ZNmCVvEZq0HQ4xJZqNh2sdNkosETDXdZzE66ynAQ5iTNFca28bUxdgr+BMk6G8vVfNLNI6Bjk33bS+mMoANZjP43yGP6G9rilZoAAsD03dnbX0+w9CUYCIWfBrhhtgeXJ8Jho= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZuHDkr59; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZuHDkr59" Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7eeea388a8eso185119439f.2 for ; Tue, 02 Jul 2024 14:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957568; x=1720562368; darn=vger.kernel.org; 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=oC5iipR2BEVxGSl/++A4yY4qqMQYODae2mcnPNjxpHM=; b=ZuHDkr59LSlehCFgSsSuaI+ZGOBsIQrf5990PVpQhyx3NILnt2RzFUeBWcQ7f1TJf3 iBI20jk0wlJVKFg7ekesQ+sflp1mdm0XKv/OUtRwXiGfu3mqIERvy4yjskZndqPkxqIb E7G28a44VTIjNHBfyehTC9+/6eCNDDFOAhawy+PlumdfYDenezqDf23XQjgIUPvMRy9e 2/2g+i0KocG5+SVVg0DIm/glAf6n42Zzk0jRshb8+GQ6K/Fwar+egVwT2HY7DempD6qW jv+AoGg2W0+BXdX4wIOnXQizqiqS9IxxM9fG1rAuRNjTXV7/2YG9oTwTCgGHnGZalOaR lx2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957568; x=1720562368; 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=oC5iipR2BEVxGSl/++A4yY4qqMQYODae2mcnPNjxpHM=; b=I5ZGmdxNZ7ey0BRnt9CV0Pg/Nsq8zGarjzyMwIAySgAVWC5bR2xRw1ODNBFrmIzdeF Y/tp2r9g9G4/rnp6dqySTSt6uuVND+t5+9A3fuSt9H1AP1biIb3Pm8o6K3MJCqLk2B4Q kpe68cjUfywJ+iWAbKbAQx7a7qL4LTXEN43EQ4lPNVcS0lPOAJtcf85Gw1iD18V/eoHB fRv6h1sS9mKnZgOsd2X7fMcBv0OaDyWQ0T+gqidIjA5ZpXf14Qq/0rCViLcOlQPK+hKJ /PXfgyv1s74eAutyH/omHbvgHDfL5DafJ8C62RtVdpmtrlcROwPTZJudYvLf/cWh9iTS yEFQ== X-Gm-Message-State: AOJu0YzncDAf37jEen4X7l8fwtigRDqN8gkCIAdW8UXOghxU5qw6kx+M Nv63OXAI7m8TLYHaJmrdwmEYOFBzNk0BE3P1Y4qXQ/LA90JvpYPD X-Google-Smtp-Source: AGHT+IGxhTOcr4ji5IFiskQTbP7XplIk6SNXi5lLsntoYpdRCPZ1vof9lF5GiOngaUP5FSepVU/KWA== X-Received: by 2002:a6b:5113:0:b0:7f4:861a:5e5f with SMTP id ca18e2360f4ac-7f62eea3032mr999757239f.20.1719957568654; Tue, 02 Jul 2024 14:59:28 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:28 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 48/52] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver Date: Tue, 2 Jul 2024 15:57:54 -0600 Message-ID: <20240702215804.2201271-65-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The mgag200 driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag20= 0/mgag200_drv.c index 573dbe256aa8..88c5e24cc894 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -25,6 +25,8 @@ static int mgag200_modeset =3D -1; MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, mgag200_modeset, int, 0400); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + int mgag200_init_pci_options(struct pci_dev *pdev, u32 option, u32 option2) { struct device *dev =3D &pdev->dev; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 739AB1D51CC for ; Tue, 2 Jul 2024 21:59:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957571; cv=none; b=cNGUjkl3VE1KcRJjwQ+FwfrMbqsZF8nQpqITk+FV2f8AMvwpxQas73YC0EyY2/vSbISckP6ryyYg38gr7nBxtjGs+QfoVWi00k4M88JYFPt+K8RN4qxZtWgw5phLshqZBIxfVmnKpVer57mvCtw+GgXfMEq+6sYAAGjq1IOJBOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957571; c=relaxed/simple; bh=y0Zoxeh2NDhcrC27lg8sSPwKxWiQbpVmdMoWiREKFWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FE9A01qLjiujTK2GVTbZDw39v6VbVlbDbmhh8G+Uj3JUo826sc877pkUtvvhqQI0CuP1B6HKsx8BV6KUA9fc3fdiRi5hTMFxbuxFy8UIz2rRO6Jz25OfW3nx0Pq73wCFNeJkTc3Dzg5BiQqspbVS+3PoY1Npcp4Lv8VH0I58n7I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZayL7fBD; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZayL7fBD" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7f63db7a69cso142365539f.2 for ; Tue, 02 Jul 2024 14:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957569; x=1720562369; darn=vger.kernel.org; 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=o0YsvOK5afJ8qV3rkuOU7CKX9HpGcds0hiKx8bDl++s=; b=ZayL7fBDGeZb3xDduuUuU1fztwO7x2rdPiY5YLI2HNyop3bAvHdzz9IP/vx5wbd0y3 wOGxJ+7GmmxkwrFk5YFPohDdHHpicpQkQkAWPCiDpR3yZfazY0oiZyJaAnm2N/PpmTYo bFwX5B/1fUVr/lfh7GSa57ZmhaZzy/jQsjf1wf5uMS2aYo/pKJWE51MPtBOSySDu845Q ijk0MGUNihZv6Iy1RoxX2nKtOUmoOG85UR8nOj2NylfE3s3hOP8QLAEu6cyVAgVrqNNE LGFnQxwC+CgC7iCLTPqjMveeJJUIjcxS6FBCtM4hi45ZN55/0XmzhJXqmOKcoqoHUrB1 jB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957569; x=1720562369; 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=o0YsvOK5afJ8qV3rkuOU7CKX9HpGcds0hiKx8bDl++s=; b=qA+eOd8M4UJeE09VFZHQ1FoalCuIyrG9rzmNlsGfOGeaWMfZunVRTN0pwNMu5rkQtO fsPtKLktu49naaNcvxfRgMe17QNEjTXRvLjVY/CCVKippxXi49zr5Kj8caWgjno4tmSM vdN/4UiNmnZ+P3jadYKMulmXrOslsc3r2OyGsRBY5TEsqbqRJUmI20vSxbJfJ3xh+6tf Txh1YeyIxNJydd88nzu7TaW/9HXaYoVAGFTQIlk26QasJaHoQxbj2O9gtyj1yz1hGmyO HaJf3YUSRemuAql1aAGMhwZzYUIhOs56OccpOVaiMx0c/TT48/0c+P+Al6Q4CpGI209o kDpA== X-Gm-Message-State: AOJu0YwY/XZWVfW++2LDDjPPHlmrLVlY23Dr3YK+MZtp1mpceeIfNMKQ w2WcxzBLWTa26plU+5Oei3OM/IGQzi+6weuEP5GznmGEjcZKKCsV X-Google-Smtp-Source: AGHT+IERaSF1E7hyGHvqAXteBQDKZ2gIbvbhsAc5+kpyvD7v6UTlnyWFF6UFWiBkSylriwtIgT4LJw== X-Received: by 2002:a6b:5103:0:b0:7f3:9bde:f44 with SMTP id ca18e2360f4ac-7f62ee6eaf5mr1109295239f.14.1719957569649; Tue, 02 Jul 2024 14:59:29 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:29 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 48/53] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver Date: Tue, 2 Jul 2024 15:57:55 -0600 Message-ID: <20240702215804.2201271-66-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The udl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/udl/udl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 3ebe2ce55dfd..ba57c14454e5 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -19,6 +19,8 @@ =20 #define NR_USB_REQUEST_CHANNEL 0x12 =20 +DRM_CLASSMAP_USE(drm_debug_classes); + #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE) #define WRITES_IN_FLIGHT (20) #define MAX_VENDOR_DESCRIPTOR_SIZE 256 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66281205E34 for ; Tue, 2 Jul 2024 21:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957572; cv=none; b=oCt8VQcNTie2mkdicM86ffzlVgo5thWnGt4CeWk+hdQfbnujIXrEmWSvaGPJ//4+BC41V8wMS0w1YuZ6tGrO26/Na9GfhOWP4b82oIiM4mFVJ34WK+RRQ8fB3stT15wBN721gp45ElMr341svPpRisLl4LGl/hA+2WY2wlNKZTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957572; c=relaxed/simple; bh=TX38Fwwl2zTMhUpMRgW8omd+SgE7ILpv++5XKavk0hc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M1zEwHgcWP8r3xinjTd2682wtORAwIMNsFa1EBRiZUT/NqIH6cKW3jhhwBIoAJhyP29Hy+IOax/l4aXrx/Ym+V8w08fp218zrMSnSLtcyhCfPA/WYsfDkG8dbmDa6E0lQDWhuQZMQdOYRp5OE42gl59wHJoxzqnOK9/ORPTCYR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NRbFOtza; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NRbFOtza" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7eb5dd9f994so174442139f.2 for ; Tue, 02 Jul 2024 14:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957570; x=1720562370; darn=vger.kernel.org; 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=oC5iipR2BEVxGSl/++A4yY4qqMQYODae2mcnPNjxpHM=; b=NRbFOtzandE38DamL2a5tSKaTIOUIVEIV22AQt9pBTVtHCZf1+0r1X5xSvi+47blp6 /aI5CWG0ctYF5mSm2hAAbW3KEQHiXM9uuY8L6TdM1eOc1CeTmLZGA0XoRY2ypXm7XG9u as5Ssj8/00Ymr+fyKolVfhY0QqUV2+586wi63rz3AclNeL4bZhEJ8LM/ElGaxjUHmxNg vrgAdJhyMu4PuktPiby+eortCS64Pj56jjI9QD4MATJ3JiqiXB7pH4Potl7JH9WYihno RNyRANLuogJEIUmpkxB+ENOqx6+MTl8aXg5jmDymWnbYbq2gDFGkwvHoCPK5CzZ+Nrma FfNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957570; x=1720562370; 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=oC5iipR2BEVxGSl/++A4yY4qqMQYODae2mcnPNjxpHM=; b=c5bIhxdWE+kNp5bHgIQwKPYwx7h832VVNU1pXAXnx10aJeDPkj52cHLWXdeX6OeTub 8j5dhvcaAqF/sfHRrtGWBbpyCwUqIaVtociv2CgVymqp1RwbmylPl0UyT7PfE1GjKUCo YjPx9lj9ysRDV8ISVCWhMczsxnlOnuVrYbrVmmgEHlazTDjP+DEymHUbsmQPtrJDUKsx 3dQQ8qbPAHjiXY5lZvVqsrSkgf/+INW36jctYyuvVs4P1H69uxatCfwQg3WdXMTVaB2q fvoPT3LhIjnOthe0igO/YsKn4F9qo3Hks7bzeiPpLbOpeS0jwMS/QQ7j/m+wxNFeiqxQ xiSg== X-Gm-Message-State: AOJu0YyA1qHFsKVM5TeOBQUJJHf2gtb43ZedS5FxdAcOPTRbS1ffg9Oz QFplutf6ahazE0gVMB/Q7HGLUJsSexEW+p5eBOqWjyo7Dwq//PdQQ0DhUw== X-Google-Smtp-Source: AGHT+IG3KnjeWk+tAUHTPovE025jwoX/P1iby1t4AUaiPLy6INftMDEvgITc5Zor5sYmFDRxWWvjqA== X-Received: by 2002:a5d:8408:0:b0:7eb:d640:267 with SMTP id ca18e2360f4ac-7f62ed4df02mr1061790439f.0.1719957570618; Tue, 02 Jul 2024 14:59:30 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:30 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 49/53] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver Date: Tue, 2 Jul 2024 15:57:56 -0600 Message-ID: <20240702215804.2201271-67-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The mgag200 driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag20= 0/mgag200_drv.c index 573dbe256aa8..88c5e24cc894 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -25,6 +25,8 @@ static int mgag200_modeset =3D -1; MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, mgag200_modeset, int, 0400); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + int mgag200_init_pci_options(struct pci_dev *pdev, u32 option, u32 option2) { struct device *dev =3D &pdev->dev; --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB86C1D5A3D for ; Tue, 2 Jul 2024 21:59:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957574; cv=none; b=img94hbw8tLIOAf3aeiCcqiTsjnWpDtoB2HLn0PsO/n1qbhXZUGnN5+PLcTPXew8KvNpa8rdNFykd9ltXLVP/jTG7UtcTSxC2TUJKpPn6OCLRgRcFwxSOaU94LTCVRjtvN/ssM8wUWvC2gBz7el3XLx8uqAFkTdkm126m4/+No8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957574; c=relaxed/simple; bh=VcaoUfrcouQV0gFCR662Kxzm42SL0jyYYKIh4ngnOzI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E64upyIlzYAjibQR8y9j97WHCkuGUufZSI+4d4L7tK2/WwxJFrBMKz8L0+s/Yt7sevcqz8mP/fKhm4bJxEgC49OSOsG8bDwD5rQlzISs7rixfvubo/v+MQzE1FDBsESBBMDmAkVtpcJ4m5PNosjXY0+n8inyQYKMy7Y74FnDaPo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D0QwixSW; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D0QwixSW" Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7f5f7ecacc0so203306439f.0 for ; Tue, 02 Jul 2024 14:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957572; x=1720562372; darn=vger.kernel.org; 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=LdxS3Fv+DdtdyD/OX9RwYgW//DQBvhU2TaujYV4igeo=; b=D0QwixSWE6a2+Rqn0EF+aXCC9K78QKN8dngI5IIjVvDn3jDXKokmbTEf2w0jWMDMWR P/Hh4yxA+up9Xh2wZ42O2iCuZACuFBQ9ti6UCp6wmMy2KeGhLTMeQ6K7An4iGBC4/ida 0F39eyj8uh7Taux1n8JohLAYJO0RUldI1GSlrNy760vlz+e+1KaMAa5vCbTVvyMPj8nj kCdryI4VCFOfdBasxlCNJsQbGsdHj4KFzfExEwpOCkgRAoDAhO9A2JhWS8mIo6Jifx4i CdDJ2MNgUuyINbuRuV8TMkYT590PZZoxtb0lsvXA2hsffrCbXVOoA2RXFejVi3Fnsd4H L2sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957572; x=1720562372; 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=LdxS3Fv+DdtdyD/OX9RwYgW//DQBvhU2TaujYV4igeo=; b=T5ACEb5KWxCG7l8jE8jnYkpnEtl2CeP72f5KEfmKMmLsHuyBhwl6EAKW/rhH5g6GFx WaAYkfMAAYbq4+VgdR8Eb+39lSgobBX/IpiJpxdKtHSxM3EbSdFq4ePzXT8ckRe/Yn35 1UrwCi1xSR64V3i6zH3MAEAWIwvCzqxh4t7kWTCSWgT6T6zM5fUcvmSOezBAk9ckyTuw 4XQZzCrIq+vb2OGNS9kcBiGVMbUqxdPnTeN54MLTteKaOr/r+RQKgK0HUNUlr2gr9W31 4SRhSBiLmmHENs8fInHR1IbtGpMjyejnFu5VN4j3Uxm48akbEv7oRVy6Aif03VuRcUYs +s2A== X-Gm-Message-State: AOJu0YxO1GCe3vHjVe66OoLUeGYig5YCUGKxPe7E6i8pa49m/s7cz+em WV1rHIH1BDZq53Be+NYHj/pUMZmeumAhV6mOM/0KbIIRmCAhZLyF X-Google-Smtp-Source: AGHT+IG0BidfQmn2qvsEzI4yxcp7Po1yYyxiFL7MCjw8+FHvwJsFiaR7ArnybWXhDCww+r7LW6gVaQ== X-Received: by 2002:a6b:7411:0:b0:7eb:8ba1:b03 with SMTP id ca18e2360f4ac-7f62ee18032mr1037353639f.1.1719957571867; Tue, 02 Jul 2024 14:59:31 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:31 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 49/52] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver Date: Tue, 2 Jul 2024 15:57:57 -0600 Message-ID: <20240702215804.2201271-68-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The gud driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c index 9d7bf8ee45f1..5b555045fce4 100644 --- a/drivers/gpu/drm/gud/gud_drv.c +++ b/drivers/gpu/drm/gud/gud_drv.c @@ -31,6 +31,8 @@ =20 #include "gud_internal.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* Only used internally */ static const struct drm_format_info gud_drm_format_r1 =3D { .format =3D GUD_DRM_FORMAT_R1, --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A66521D5A5F for ; Tue, 2 Jul 2024 21:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957575; cv=none; b=IStvtXq5aXXKaGNGJBL1Tqt/2ggPCNcrw17vus3ljW+/MLNxvZ08v9qfgrRzBU+807dhI/jGePUA5bKV3KDBZfctP75jcsNB+1nJXEE5t7KEx7h0dt1w/1BS1kGp1rFCRY45hLr+A6dl+trd9bCxzTsT6m1zJaKm0OArJmT7L8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957575; c=relaxed/simple; bh=VcaoUfrcouQV0gFCR662Kxzm42SL0jyYYKIh4ngnOzI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KpbFr+RBr0rGJw+PDngiSSniyNxQ1/NuSrkthZKpmwRCvxbF8rtWTmpFuYIDfFv6HNRkqntIlNQ8eA8kYTMc+22VeGQh0gyl7MZ2QYbUqMSsN09fGhA4ugcfQUR7b+Q8WE+hcumBQ7BJ+Kv4CX+/MtXakHh8LEHc9/b6n1Kkp5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KvtZd7i0; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KvtZd7i0" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7f649f7868dso113951339f.2 for ; Tue, 02 Jul 2024 14:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957573; x=1720562373; darn=vger.kernel.org; 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=LdxS3Fv+DdtdyD/OX9RwYgW//DQBvhU2TaujYV4igeo=; b=KvtZd7i06r3sIcEr3lpypC4biScgTmhMfVUzX9koCpVu1TRj6cwZRis6SZ4T/e7gfW 86LihYia1smKtFqQitweBysh4REzmMnExAfo8fB48RWOR4oD0r7wC7a8P0cnNi1GjXGd CEJFLwdcybyBPKdJo6d/UvDyUdVBYVxgAQ7QsjVDV8i/9fj7jBxJiblNT86HYWRDGOMH koGVars7YSm1Sy+BPStVee1TnIl0Lq3nlJbMRskZa4XemzxCm2io+liHzLrIvHOAabig kjt8D7Il2NW19WNLl6OD7l7B5j3gMyuqnSYNkHmoLfBMCEopQA5pi0+fxWfgW87qFsnY 7C0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957573; x=1720562373; 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=LdxS3Fv+DdtdyD/OX9RwYgW//DQBvhU2TaujYV4igeo=; b=vj+8j8OHFHUvEqLd78hwpAYre+e3xQFMm3Vj0GA3KcB4gzTUm6VoPn39I/sbnCDPa+ Vq0emI5HFsVaPkGi1l1p2yq3STeIpV8fVvU5+wnhDfuzj/0ygdILCXMHboTrOoWtv8J1 fjZVtEonxg7lQtSpiDVamTbiTyVEvwRs/RlRB35/oGuC43g53i1txlMkFUwoBxSl/Kes vvdg+52slcwqq0+cmdqUUWxyiUwczBedEY1oN0MsF/VLKwDvhRQpVG7zM3JqN1AU8B6+ OCD/8dnQGENXMIH33oLAyL+FCW3XrMjoVdgFelx8WmZf10wCkqIRmOr930nxeuR3/WcH U4QA== X-Gm-Message-State: AOJu0Yzq1Dhg4i/GVmczUycSN4eAx8pLbt0blIeDCLtxe+D1cK4Dadim PJVpGthx+rlS0pndEtPr7rhFxCyZxzLHYyzQ4sdWmF0YyHcLCpwf X-Google-Smtp-Source: AGHT+IFp5rzNQzwb9sgT1JzgctraTYuaU8bCdfBAOCqgX/PcOHZ/BlCJIM7oWH0DudtrdomfiUMnhg== X-Received: by 2002:a05:6602:600d:b0:7f6:5035:1826 with SMTP id ca18e2360f4ac-7f650351c42mr444974339f.11.1719957572948; Tue, 02 Jul 2024 14:59:32 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:32 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 50/53] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver Date: Tue, 2 Jul 2024 15:57:58 -0600 Message-ID: <20240702215804.2201271-69-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The gud driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c index 9d7bf8ee45f1..5b555045fce4 100644 --- a/drivers/gpu/drm/gud/gud_drv.c +++ b/drivers/gpu/drm/gud/gud_drv.c @@ -31,6 +31,8 @@ =20 #include "gud_internal.h" =20 +DRM_CLASSMAP_USE(drm_debug_classes); + /* Only used internally */ static const struct drm_format_info gud_drm_format_r1 =3D { .format =3D GUD_DRM_FORMAT_R1, --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A15CF1D614E for ; Tue, 2 Jul 2024 21:59:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957576; cv=none; b=oTGjpfAIfU3N1LPV9HxbVpYmYBr7Hrh531BEasF+iPUL2IkQmVKQ/M6Ji2cPlDp4X6x3qJKIMRgpBFnuoHP8kLdKzrEPGKieIaj58PfpJyKr3Vn4+fNQ/sEooClFeHNP3PuvY0HtxrFCYLn5prZgku5PmOvHSzfIizxBTSoVw+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957576; c=relaxed/simple; bh=ZdgkYt8StKCj0Myc4WWZURkgaMtctnUiCw+YT1im5Eo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kOsz50yV1flBV2vNks4GUjqamIUuCSNuNGvtAvgMONZeJ/XSKqRrrLAdRsf7ANk86BAZBPRRjz9KugADXbdtuS0d7cO5hdTDAe2rIuTUF0Hhe0SNTgKfwIM96ZeUjEmjG9xAsXAy/qEbsgW2+IzRgJHsiLIdp9lvPmoMCdQOPtw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BI1nytXb; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BI1nytXb" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7eba486df76so882239f.0 for ; Tue, 02 Jul 2024 14:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957574; x=1720562374; darn=vger.kernel.org; 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=3JTbEivvcQUwAcXrAriYcuJGP77J1qAidh1sZIrKRVg=; b=BI1nytXbw+vE+XlY7M0Ut+wazskab07Sleqt/8445wXm2MMrzKW2TqXNMRDekpIU07 iDEv6aj/rG7G51a0IXEt86tkMRIONfElk3sd6oa8oLLGLGY6kMnwJK52MtZBDy8P8+7Q CVuu/M4U+wHhDVJdZSZC3lOFesZgmU/e5c7lNeyicpppSDyN2wBYDJBvIx/H2qz3Xo9k C7ZlH7tp3drxEyQNfPMmLckBKONaLTWULMreqHcfBDp7UhVkHUD4p90wy6IZVF5IwMTN ilHIKhZrl9rlubT1pzzZFLg65PoLZpUJgbLZM0J9vRw7kUK0MDFKolokJKXBusjRzBtj fGdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957574; x=1720562374; 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=3JTbEivvcQUwAcXrAriYcuJGP77J1qAidh1sZIrKRVg=; b=VStXRTiO3sp0MQrX0Bz5v1u7lfmJ2itc84ewuKJQwMCFt9LY2C5l5YWtEMwp+V/EXT r8X8EbTrNTgp1JfE5a7hB1x+nx54uL1GEfDbg651iGEGwIFubbz6uLhcQwxUAF7UQnAV fTVibY9cFuEzLPRVnBDUHfs5PoeASoGAyKsKhpVbhrSAxYL0voWx/ATcICg8LZuwmWWF nLizAf8AXIQ32SD5jI859aLd4C6qbh6TkYZxaqg4EJOuGuJ8CzjCxOw8JkcJRATzso7A Hh17BAJkfLWb8o2Ku9CZ9TyVibnyNcd8RemufmuGAi+giXb9jtLH1yu8RocFhLShCpjP +gGw== X-Gm-Message-State: AOJu0YyQ128UZZsI8DoODru9/l9ybzs+Jw43jXXpCrZS436r2ZL3PnTR AhYeOkY1qMSCcvREqtcVrbGxvSyhahbXbUm6t1yefg4IWq2vGLoR X-Google-Smtp-Source: AGHT+IHm0jXqTVtk7QVjjSb+zomWmd/7d6iWmMvK3abb0BF2wBUE0rEZf9n+FnhAA07EmTqJ9TZwcg== X-Received: by 2002:a05:6602:45b:b0:7f6:4c8b:efdc with SMTP id ca18e2360f4ac-7f64c8bf2a0mr206658639f.2.1719957573878; Tue, 02 Jul 2024 14:59:33 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:33 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 50/52] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver Date: Tue, 2 Jul 2024 15:57:59 -0600 Message-ID: <20240702215804.2201271-70-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The qxl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index beee5563031a..1971bfa8a8a6 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -65,6 +65,8 @@ module_param_named(modeset, qxl_modeset, int, 0400); MODULE_PARM_DESC(num_heads, "Number of virtual crtcs to expose (default 4)= "); module_param_named(num_heads, qxl_num_crtc, int, 0400); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static struct drm_driver qxl_driver; static struct pci_driver qxl_pci_driver; =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA2971D616F for ; Tue, 2 Jul 2024 21:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957577; cv=none; b=Z/HY6q9EfJHxX5NEbChzZdzWAL4+1LQ36C4RFJbZaENxxjdSCcT3W72rYCO/Mmqaw3nwiH5mNBAN/AoWlz3EOQvsTnpE1DktqspxBMUqYnUtieHQMVWOM+ZGjwYWU5b3SlJtrvgUld0FxIw8LqDiRPjaOOS7jok9yRjPTJPP+V8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957577; c=relaxed/simple; bh=RLkL7ykGMweuG/V8iZOSvPEUEytBCsbn4Qh/HeooHHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qDSTOGV/Ze+LMfsIVH/tbyTUs0hLkEIO3wi4vYRSFuKXlNgLtxfN6xK5EAu9twCbUkByN3elWJo6xA6/RblUSFnzX/GXuCmza2fKIKdQHPnVfiM7ZD/VH6tUurLP15jZ8R6TulBd65iMJLwS2DbsptK+zACzP6CaRcGXsrEk0gM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TIc7wcOA; arc=none smtp.client-ip=209.85.166.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TIc7wcOA" Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3738690172eso21851785ab.1 for ; Tue, 02 Jul 2024 14:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957575; x=1720562375; darn=vger.kernel.org; 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=QvF7XGglS4kHqkr9T4qnSlSKUYwSoR5J7DGEbyHu2+8=; b=TIc7wcOAyWs8XCSCnZKkQnzFtxX7Pb3sVLwGuw9cbuwX1VZf400p0SblVy4DwamdT1 LYLGMuD85DXWi2pKrlysYavl4wfQHMsHTwEevjZni/+/7hAQadfzL4aXltrt50/3hMi9 5ZRsDCHmeDce1rVwQpi8f2tJFQdYgwteMmqD8pRMqWJLPh0BjVPGhoqHIdvGkv0evttW /Ceh3AN0bHwzxBemyPPvkrbIaUGX9A6zQpUC8Fm7AVZeEC8BSariNvf8paMHIM+ql8Tw 6LYrZ9sn99BrQgX8kvFlnCJEED/iA6cfGu5eiEvL3e8+f9nM2Eqhi4Q+Pw5zpdXcM36c d/ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957575; x=1720562375; 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=QvF7XGglS4kHqkr9T4qnSlSKUYwSoR5J7DGEbyHu2+8=; b=oB1oTYZpgvEXFGP6LuIY0k++rM9hK4iZBdGeX/QwQWG/opZvFKP/IpMNBV4fRGoL0V +H2x3Qbz6PS6iMCNEICBgDrVURcZI4at0OQ2p/5atBgspbgv+Ku0IMs9Sa310EMXRLCd mQsi/2vq5vSFG5TmjpglPFIqJ8RWIHRGCDmDHPG5GwJHD62JtGaoCV6fUdpci/gyL2fH 9ag6SugqJOeHGZ/D8/RHyqeCCeEtyvAF2TAlZeGs3pEa45Vdb26L5YDPPjodWWviEWGo sfQpi8+DV3HjIWdLRf4/bZcm7z1kR05cjFlv3kiX5OPk+sWMKlT/ozxOVJd6i4SNr0nq bwhA== X-Gm-Message-State: AOJu0YyzATRKm5hI9qLEmxpEEtG3yNoASH0xtjcVr/D4yk/C0HRTFrP3 eKB2eD3N5iNzeSyajMI7B2ArMFlYC0/sseYaWhZN1XyTCmTig6WT X-Google-Smtp-Source: AGHT+IGZOevniVKgdZW5uEHvGIJ0Kpl5IPSqNwolDmOHxjI93GBuoaqkl3SY5q74c9J2pIm9X5kn6w== X-Received: by 2002:a05:6602:178b:b0:7eb:776f:d963 with SMTP id ca18e2360f4ac-7f62ee1db5cmr1186035939f.8.1719957574846; Tue, 02 Jul 2024 14:59:34 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:34 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 51/52] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver Date: Tue, 2 Jul 2024 15:58:00 -0600 Message-ID: <20240702215804.2201271-71-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_g= em_shmem_helper.c index e435f986cd13..066d906e3199 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -23,6 +23,8 @@ #include #include =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_IMPORT_NS(DMA_BUF); =20 /** --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D39FD2101A8 for ; Tue, 2 Jul 2024 21:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957578; cv=none; b=fZM4l+ANOdApLET3aSivmRyp5F1KQD1cygrc/bnDfFoKAqDU3NNc78QpjbboT6fH0mk/KxRwbrepKooefeiwZoqkrnhWiNDH9ScCGVP55ChHxgkLiom8UfDh2JWR+Z2RQHQBh8uYh6gXLT5K7cTYOHzq9P0wiMClyF3ElUjzG7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957578; c=relaxed/simple; bh=ZdgkYt8StKCj0Myc4WWZURkgaMtctnUiCw+YT1im5Eo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dZEbckaW8xrtXW+rYDp4HymTZ89h/OyMkkmZ3emlw2/kO0tLbA3p+tBRWev5enruCnBdVVRfbu7VeNOIlAVK584wFw0iaW6RNUbiKAnaVdVrqzbGvix1OMkrzJO8nvTwun23LVfIJ0HGr6vA3E7cq9L+Xab8HDgOab2CybN+uVo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jwZkUPbj; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jwZkUPbj" Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7eb895539e3so191297139f.2 for ; Tue, 02 Jul 2024 14:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957576; x=1720562376; darn=vger.kernel.org; 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=3JTbEivvcQUwAcXrAriYcuJGP77J1qAidh1sZIrKRVg=; b=jwZkUPbjtTXhZaiTt9SIxRtQ+ILP2KSSOMCThEIQilcng5ffQmKqMdman9rQnQMUMz DcG636n9XiFiDK+3qgEPG2LqMXnrrT3XEuqKBuBC0FSxCBOME0wmhwmBIH6h2JGw1hmS 1rlGOzRyP4RDIrQR9BVKw8q7rX0GWcr0izMW+k2bLNfeDI/eiFLujwKhWQp+9gH2Qg2d BglbzT+G0Fa9NzkwKOI6dJIj0GOHH2O9XErAb5jIcAu/GCr0hJhxQ4Y8Ja2INcWjvrIA XIHB9ChlhSvZfS2IHQGPkF7FfqejSOtMw/mtb05y+oeuueLKJJRs7qL82fhLFhEkEZOc 3D7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957576; x=1720562376; 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=3JTbEivvcQUwAcXrAriYcuJGP77J1qAidh1sZIrKRVg=; b=w91Y5lLk8ZjWeqgGz84aStOusWd/xVZlqtLrHxK+kowYNme4GN4ABSHgWW3H0EyRQQ Y2kpYgrMejm9l8xcEHcJIUqz/Nk18Jh0j+695cPdWQcdqsY10qppOxKohWU5YzuGL9Km 28NoIyVgESpGraB4man5FON76MpqoTgA2juNCbgA8LSv+px9fyOzQ0ae+FdiBm0McmlF 2KFWy2tvbEV9vEDqNI8DWsDRVyjZT5MOZamLXxAnUGbryDEF0hqhUaxlLhDc2m7OJvYM DCEUbnSt4cc8DD8mUlQc0uqaHgJSEBnX5UTmKWy4vZsHPIcTTxAnOlCit0nhxuQNTXbH yv3A== X-Gm-Message-State: AOJu0YwyfhsMHBjNHiQ8tOCcYKtobdcCgTeQcgwqlM2+lId2HSk8Yjj/ zuhkF3ok9FRP9FadhexgYz3fSAvZ+Unv4v968lr+6UpmISy6Bw+XxPZLlQ== X-Google-Smtp-Source: AGHT+IGZ5ru0Gbzul6gBrJZ696v99JPj2evs0BxHq6ZuGzyQecQi/AACVhwVexMDvP0Uufc1BvrHMA== X-Received: by 2002:a5e:c60c:0:b0:7f6:5143:34ba with SMTP id ca18e2360f4ac-7f65143367cmr343431839f.16.1719957576037; Tue, 02 Jul 2024 14:59:36 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:35 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 51/53] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver Date: Tue, 2 Jul 2024 15:58:01 -0600 Message-ID: <20240702215804.2201271-72-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The qxl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index beee5563031a..1971bfa8a8a6 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -65,6 +65,8 @@ module_param_named(modeset, qxl_modeset, int, 0400); MODULE_PARM_DESC(num_heads, "Number of virtual crtcs to expose (default 4)= "); module_param_named(num_heads, qxl_num_crtc, int, 0400); =20 +DRM_CLASSMAP_USE(drm_debug_classes); + static struct drm_driver qxl_driver; static struct pci_driver qxl_pci_driver; =20 --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D08071D691B for ; Tue, 2 Jul 2024 21:59:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957579; cv=none; b=EsFDarCGm0SXDkf7N440TGE5sM8/Oy4yRbyWvCki3QdPQXRKS8T27Lxw476F8rDFDGTvvBqgvUogtzXE2kmhyzXUPMjJkPpJ3OWyWeKRGyS3ErpXeuKqfX33lGxSR9paROJR1bIpBpKXskV/HSk2q8D+UVsdWGL2FRUJ8N03sdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957579; c=relaxed/simple; bh=RLkL7ykGMweuG/V8iZOSvPEUEytBCsbn4Qh/HeooHHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H04mQ22k6XsIeSbL5GWh4DImsWrMZhTAkHMH/xARlJInAJ24JnEmk3GMtQriSuaw30HniEfbJD6YHGX/KueyW+N5+/Fv3q0boEY1eSHU+G2wfAwbDC9N7ESkPYIrtqREQgkt89YBOQGnpfV8Az9RAdiXTtSDYlBQForX7pAP4T0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J127ICCx; arc=none smtp.client-ip=209.85.166.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J127ICCx" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7f3ca6869d1so192060539f.0 for ; Tue, 02 Jul 2024 14:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957577; x=1720562377; darn=vger.kernel.org; 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=QvF7XGglS4kHqkr9T4qnSlSKUYwSoR5J7DGEbyHu2+8=; b=J127ICCxZBixnJr6SzX4w1Fd4AOwPrI9wwi1ehwJTaCqamPGUnFaoGlCxOF9Tpe3Uo 2KLdZFWNHIT9EuLz2hSZhw//GVinwc1YPMMtmtMOil559tfQC4chSmNXn5l2jCNPKP+a kgtVW31xVaK/WHEx1w3sVzYbjjIxG0wwWEhjMSSuTlN+Vup6epf1uxCcgGcTUoy49ZPW 0CKFrGZC73Cai3bQ6BhYAB8XcopHiOvmnxWwq9/pKG0nraViBzkRGnayl/14y+i/xL/e jxwItrzOpu0597RUM0VE0ION0e3TQgSFiHVj/yiy/LNCgvER5E/bhqcghtDZuQMSM4fN 8eKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957577; x=1720562377; 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=QvF7XGglS4kHqkr9T4qnSlSKUYwSoR5J7DGEbyHu2+8=; b=R6TgdXqX0Aaoa2DZyIcSX0gDPIevCN3TFb4unUaDALgrxVJTSe1fodRLeAsk6RmRPD qS4fcJ/DuwmIJLBLtCMu+qORq0QhXk9xM+zdztbQ4Sg1XdgpaIypPn7ZCB+5HbNmYauX rOIBDAvp5vxc9u31NkA0/4r6HebiFc70TluvGKfllp8jcKb7zzbAoFSsdWzbS7oIL6no F9VivyUZsK0IJYUhrh6wI5nA2KaQV9+sy4BXrwC0VTC5j6zeSPG0nAosBLNau41rlLo9 pMZ8XFiaAzXh2no266Kqs5XqMnPFQalxj5wNuCM+ri6PAyxiVahY/iTFXWsVVL0G+HWO T23w== X-Gm-Message-State: AOJu0YwohuMCIp2jdM+6d7/F8EeRoq1SvZDiB8Ymj6lnuZ1XPtnrMvTW Dda8CjELIivXjRt7MOLEWKgDQhkiVuG1PQG+kmSYcp9gtr8Lag9Y X-Google-Smtp-Source: AGHT+IHr+XWp6uUkEIN9sTm3FPIKljPJiX78B0Egj7pbRiS24t9LgvM6Rlaa2+c/8txTvNCTHxslPw== X-Received: by 2002:a5d:8418:0:b0:7f6:2c16:149a with SMTP id ca18e2360f4ac-7f62ee6e7c0mr1127312339f.13.1719957577095; Tue, 02 Jul 2024 14:59:37 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:36 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 52/53] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver Date: Tue, 2 Jul 2024 15:58:02 -0600 Message-ID: <20240702215804.2201271-73-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_g= em_shmem_helper.c index e435f986cd13..066d906e3199 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -23,6 +23,8 @@ #include #include =20 +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_IMPORT_NS(DMA_BUF); =20 /** --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A519E1D6934 for ; Tue, 2 Jul 2024 21:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957580; cv=none; b=kiNS44+fSdz3Bzu5fzKWd8PJahi5MMEk91pfhQH8es+AAI9oOGP6xmJO6cIJk41ypMtYy3VO/oGZ63cYKXz1nmfvLHfAINZPN+YfGbB3BJQ9UFEOoya+UT2LZ7J5IKVLesjA/YM9eIgGrsNvMzHhIAMntXxfcILGsg2evAhlqUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957580; c=relaxed/simple; bh=NrZTh+SVApVcDabxYuiZu5lzSzV3H/ZDPU+/aI7Ofs0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EEbeTfDZQGnXXTbydJ4BPX7tqndHRTis31SL+lmatrl4afCNquuvolWdOCUrOShjUfU9vMNj8uJhwkx28dIMSQjTcLpY8LJKpC7daWivXfD4XTmemADimHSJdABt9BCXYfhyOl6foeUnNF7WWdtufNN8/tSuZsWV8YqweBbs5ls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IhcSgRzQ; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IhcSgRzQ" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7f64942fc54so88584739f.3 for ; Tue, 02 Jul 2024 14:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957578; x=1720562378; darn=vger.kernel.org; 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=ym+La6D/NLLhNjjl/GCbF3WdukVm3ek2K4bqw3UNhOo=; b=IhcSgRzQJUx8dQFCk/xD9IGqfmk9BuINIFscBzSVNx9h4uzWC1LURywCVbzLai7Jgc LpRB63Xcwa2J8C/4XY3BtQFbqyV1z/W2dz5zira8cXCmNW/IQV2MdqA3j1mnkgP36njO v/nlLx09NmMBQbLQZW9kZAJCzjo3U7VaO04EQ50w+QyiwREO14pRq6GXggwyFMzQoR0D cQqvamCFVCwcWxBIs+Pp4jVs/MRrft4dOYL5xQk+X66l+H0J7dzq2Za7m6Ddz6mrqFnv MxoBtiPqQmpN4CxNelJ5Cgqfh/dvxegOJDQfcwu1iW5yq3YORsH/YdwmIZ0xK/su7DRB hQqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957578; x=1720562378; 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=ym+La6D/NLLhNjjl/GCbF3WdukVm3ek2K4bqw3UNhOo=; b=fsF+PucGpca+7D3OmwC9g4pQks6qqamxlcIkoea2WC4VAGCOmDf8xP1+UYsKQuju5n j2Q0o7jscJkNqho7hjkew7QwCKXc2FfyxHVEOQqi7XI08QRBVxJ7U/ZmekO9fPz+yIUA 8UUQjj2Fxz7yj6wgdu6UpnbCXv+WgxEx2SYnWFegD0tQFFoszCHr4Ml4+wuAc5fAlf1V PcgspmBRSg4nLnw3CjBgSPXzXjINfAR5YBantDUdwc9v3dgiBogDM+mWeenq5mx+J+qm mdt09TOYjoVh+KLPxwrlg5y5lcif66+I6VVLX3mmu3/8NPGwV8/UE46P5H+aDJVyPOPl 60wA== X-Gm-Message-State: AOJu0Yzqw736OgOxfJBMzfJYykSVzyGvcAr3gvn/7xYlRH8R6D3nnttG WlAXLs3UCKL4E24d7IhpERjpZ3ZOk4hQGbxWIeHfic7i7bnwTlqW X-Google-Smtp-Source: AGHT+IEx2Gyrde0A2uOqS8y+YjAXzajqP8cUSrab+Dm1ugLLW9FFgCd4CeSHn5fLmUCcTWDUd94ipw== X-Received: by 2002:a6b:e01a:0:b0:7f6:1fcc:25c5 with SMTP id ca18e2360f4ac-7f62ee9b593mr1304401439f.19.1719957578034; Tue, 02 Jul 2024 14:59:38 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:37 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 52/52] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN Date: Tue, 2 Jul 2024 15:58:03 -0600 Message-ID: <20240702215804.2201271-74-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" end of official submission. Time for some quality CI Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 5a0c476361c3..b2ea73ae48f0 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -54,8 +54,7 @@ config DRM_DEBUG_MM =20 config DRM_USE_DYNAMIC_DEBUG bool "use dynamic debug to implement drm.debug" - default n - depends on BROKEN + default y depends on DRM depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE depends on JUMP_LABEL --=20 2.45.2 From nobody Wed Dec 17 15:32:44 2025 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64AB31D7036 for ; Tue, 2 Jul 2024 21:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957581; cv=none; b=d3Dt0MrIAIbr4Zm+F9CKRhqOQLAS6LMdhkVtqyNHcZ1OczcQv20MWDchLiFUKw4qaSNuLdfEfe88CRPtabBUOQ3yN7VycLtpzzKcuvlQkwMJjAGyGrZXLuwOMHBhFni7oO9TMX12bl0ZwBilyRkVFvUziB/89n5yJraiK8LeoWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719957581; c=relaxed/simple; bh=NrZTh+SVApVcDabxYuiZu5lzSzV3H/ZDPU+/aI7Ofs0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mQIczECiPr6wT/o7NMRDGygEsiN3L+EgaenfW0U5du5ALONY2WjYn0GeQigf2lQ2SMgt6wWtU0NGTaIIFtdYIFStnNSWDdj2OGMDk8cIk1H3acYnlKrEeDCzzm9GvoQ2CBGa2HmnBW3rIfevdyd0yeLj9WMOIl6MUVi1RZdo7Tw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LKutTrbJ; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LKutTrbJ" Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7f3c5af0a04so246317639f.0 for ; Tue, 02 Jul 2024 14:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719957579; x=1720562379; darn=vger.kernel.org; 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=ym+La6D/NLLhNjjl/GCbF3WdukVm3ek2K4bqw3UNhOo=; b=LKutTrbJ/rdYCmKym1NGbxk3QFipDqdro6jwousFvmzyZ9KEopBsMan1ui0JqYAdff 2JZifakBNMPHEqfAgof6mCkt5pfTSyHZDt9GST5PloYf95xJ+jDVVncAaJ0QwUPvHkPH 8AknhocYtTD4APmfihZ8MWgEGEqDps79k3wt8OUJgwgA9F6myvw3exk2jKrt7ZUUwyOD ZBZKYUdLZHneCp40ZhRIHED6pPUeBHaBrk177/MqYA6jkpgY2R+C4QjXlxikrTVNJEfl TUHaTeXuZyyHWueeb9nF2oH9ey/dBClAK9SuAMWCIDrgxiKxv1k+JOvR5M1AaxMQ/LyX kofQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719957579; x=1720562379; 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=ym+La6D/NLLhNjjl/GCbF3WdukVm3ek2K4bqw3UNhOo=; b=uWKn1KNsemQEgYVBjWc8P3kGwlpxsswCf5NZ+RlIkx8GJa5qI9crO3SOdMUMtngHeG Yw8g2YeWj5osZf+z11WYBTnSqbT+lQC6FVCsSjeH4iYhciZjBZdhN3rMRtW9fIIZ6z7N rjErWohSf77LPKxPNNNxgznu8ZwSig4dYkuOJ96UVM3njoKW0OaL334JflqATfUxcr5e sGxssiqC/JSJbDkTIeJkRIJ6jcxKeIYpRVuskCG3IsmB2J6sRWQt+yPSWZUs/qZ2FMMn Y//wG3h/buHx/gKn+O2uHsJRD3+4mhzGTHhWNCKuyK0oghKmxMhWcXWxquxiRNNc+ArI fiBg== X-Gm-Message-State: AOJu0YwajQH8Mveu3rZK73UfPOpXjxZ8QZVnzOxWqS9/Yx6QaouaHKt0 4bWvw9U8wU7z+SpYP70jblB9jj10Ni4noZfDu3oGXhwf3PZ2kWUS X-Google-Smtp-Source: AGHT+IHIRUIlmI3WUW2mIpy7hm5XHgMqtIZ7QkWlOh59CvhPr4UBjQt+AtFMIBoct5NjwYy95AHiIg== X-Received: by 2002:a5e:d606:0:b0:7f6:1fcc:25c9 with SMTP id ca18e2360f4ac-7f62ee19639mr1076084139f.9.1719957579545; Tue, 02 Jul 2024 14:59:39 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id ca18e2360f4ac-7f61d207fcesm279944739f.51.2024.07.02.14.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 14:59:38 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: 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, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, Jim Cromie Subject: [PATCH v9 53/53] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN Date: Tue, 2 Jul 2024 15:58:04 -0600 Message-ID: <20240702215804.2201271-75-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702215804.2201271-1-jim.cromie@gmail.com> References: <20240702215804.2201271-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" end of official submission. Time for some quality CI Signed-off-by: Jim Cromie Tested-bys would help greatly, get it off the fence it straddles. --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 5a0c476361c3..b2ea73ae48f0 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -54,8 +54,7 @@ config DRM_DEBUG_MM =20 config DRM_USE_DYNAMIC_DEBUG bool "use dynamic debug to implement drm.debug" - default n - depends on BROKEN + default y depends on DRM depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE depends on JUMP_LABEL --=20 2.45.2