From nobody Tue Apr 7 12:53:56 2026 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 5FEA9258CD9 for ; Fri, 13 Mar 2026 13:23:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773408184; cv=none; b=TepzaClVJizjNElYktxwfoFnlffkNi2vZPPcvDwdLIbGl7DW83m2ffxZCEr/u+j5jqeWWejdOtZ9IEDKpUC7wfCpdZhgtd8jw0npOs9Mj79GMhh8WI/QVBJJq75rmHcCj69ZayIXRdjQ5VfmukryCz68Krup20Sf46v2uwLHCiI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773408184; c=relaxed/simple; bh=+qoPaqFMZANZ5GO9HKrP/DwHGbD+bYFDH9gWrXYcZT4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B9g8x1hOsxJF5KnmMis+gAf9xUPjo+drYMOP+1KDe0PY6nzVm2DCU8/MC8eJUlWhHQNdlkeWg/uGk7DtwZHlXtNrPOzxrcXbp/ZgJsGWz95SpS3jgn6xzF1Qjuh6WJK6UwI87zFWzjXnYylDLkMMbteFVmuwEuFj72+u8pEXGBU= 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=lAKsXsxR; arc=none smtp.client-ip=209.85.167.182 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="lAKsXsxR" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-46702742c99so1400989b6e.3 for ; Fri, 13 Mar 2026 06:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773408182; x=1774012982; 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=AAl9+PvQAj0gWNHtBaTmlj5ZgTYMrxMbOjBXxAyMQwA=; b=lAKsXsxRfg3awgQjGNj4uSoz0qUztu/QwYs47VQFWE0X6tHFFo3Jp0X41jW34rg1c+ WwLznqkWtVoIdoKe7nTW2c2nCxi0GMwGZRqVzwYP1RZFn13oI/NTHvcqmrO1rc+dfueY O8NFA0td9uHoe0NaC1tX/z17qMNbOMnY2wmsrWjgcs2lum/Zb7ZLUzlXh7W+qtP+dDlR tCPYLYLMT0gbto6pMO/Z15iJTdEOsuSur5c/agAQFGPa8v5iHVapJKoVj48ygqtBHqDZ hujLBQp6DPCCcmDZEfWMyP+r8snlN64icYPCUR97fVvRyVLFzYb1FJLVhfBRhUCxrm5Q uAKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773408182; x=1774012982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AAl9+PvQAj0gWNHtBaTmlj5ZgTYMrxMbOjBXxAyMQwA=; b=NkN+3s/Y8/1ylyyYp5/lOD7afhZVUtJx2WRYljfwwaKm/OFKQHanOpKklvliFcWhbm rj9s5qG33VFTrnnltAyEGMW4CnFLjNhpOefftnBGVrON/Cfg/BzvbuIuQ3jhzFDci/5e BAWsGHfpY/grwnPcmVWkG7OQarAObdNPlJCSB2qfMiReKlYj9SID3BozrQC+NX4dQDTg +bbbXcBP6YhJmdWIvnwnmBNcb8wMoWz9G9x7UsEjo7V57YFFY1NF4rq2oU5DT/njsCz+ 0SJl0v0AejguNVpISl0TZ5cBzcw65Z0YTKaRVPRDb7/QV+S49Jgguxhnqv5GbZqySpZM ZcVw== X-Forwarded-Encrypted: i=1; AJvYcCX+pxzH1TOyc74+Ki1c8tT12LDl77+bIxK+J3O+AVqxEhuN3FtSb9KHWpuvLiXNoWouGEvasgDR/tHQCVI=@vger.kernel.org X-Gm-Message-State: AOJu0YyrVgE4OY9PiZyd+4YPePnH4j+66pAB/fQJkOe4Wv2gM9ghgbG3 cfv7NguanNnIc3wcOrGvQYNnfeE8+kJ6TA7jCbYUv4Y+yfN5atIyMVwY X-Gm-Gg: ATEYQzx6LgOhvW+1iqjsqZwU7GVsaDR7KumokRUNaxjHt2q+HrBiUFOiIfgf1MfrIka IyiBnUnS5b89iqYiFrKz5BZx/iSBZXmUYD/RNJ4J45JLyieFvagmQMdm610g8yR1hvZlHsDxFpK gNpjdsZNYWq3+Ab2d+rZXRNNN5C6EEtH1Z53eKQnLCC4dUFWFD5tbBFjZu2ks28rnqNVjFMn076 j/hZ+yW2HJ/dDjCp8AqJIJ7isOGo/k90xeSh3EGwoJZEzJ1uCQZdAj2QdMSs1Wz3yVppJu9UmvS GGwaq/jqTqEwnCsU4UfIZi/0bOfIVQIv5qK+ZRE4mD1e6RJztfRXt0oWA0JGpJ0lO987p515FTp zzDOlOlhDaFIIFq4RFnol3x4wL3N4wNemZSUnJ+LT4dZNRGWF3U02wXN2I5tvmb9WChRVCVQMgq 9cDles3oMXtzw4cLC1i9SKqoVN99RseKD8GzTiGdoF0JKcioOr X-Received: by 2002:a05:6808:19aa:b0:467:284:b3cb with SMTP id 5614622812f47-4675701cd1dmr1817809b6e.2.1773408182075; Fri, 13 Mar 2026 06:23:02 -0700 (PDT) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 5614622812f47-4673434a35csm4795987b6e.20.2026.03.13.06.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 06:23:01 -0700 (PDT) From: Jim Cromie To: airlied@gmail.com, simona@ffwll.ch, jbaron@akamai.com, gregkh@linuxfoundation.org, Jim Cromie , linux-kernel@vger.kernel.org Cc: mripard@kernel.org, tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, christian.koenig@amd.com, matthew.auld@intel.com, arunpravin.paneerselvam@amd.com, louis.chauvet@bootlin.com, skhan@linuxfoundation.org, pmladek@suse.com, ukaszb@chromium.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH v11 03/65] dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP Date: Fri, 13 Mar 2026 07:19:28 -0600 Message-ID: <20260313132103.2529746-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260313132103.2529746-1-jim.cromie@gmail.com> References: <20260313132103.2529746-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 the stub macro for !DYNAMIC_DEBUG builds, after moving the original macro-defn down under the big ifdef. Do it now so future changes have a cleaner starting point. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- include/linux/dynamic_debug.h | 43 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 05743900a116..a10adac8e8f0 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -93,27 +93,6 @@ struct ddebug_class_map { enum class_map_type map_type; }; =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 - */ -#define DECLARE_DYNDBG_CLASSMAP(_var, _maptype, _base, ...) \ - static const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ - static 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 NUM_TYPE_ARGS(char*, __VA_ARGS__), \ - .class_names =3D _var##_classnames, \ - } -#define NUM_TYPE_ARGS(eltype, ...) \ - (sizeof((eltype[]){__VA_ARGS__}) / sizeof(eltype)) - /* encapsulate linker provided built-in (or module) dyndbg data */ struct _ddebug_info { struct _ddebug *descs; @@ -138,6 +117,27 @@ struct ddebug_class_param { #if defined(CONFIG_DYNAMIC_DEBUG) || \ (defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE)) =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 + */ +#define DECLARE_DYNDBG_CLASSMAP(_var, _maptype, _base, ...) \ + static const char *_var##_classnames[] =3D { __VA_ARGS__ }; \ + static 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 NUM_TYPE_ARGS(char*, __VA_ARGS__), \ + .class_names =3D _var##_classnames, \ + } +#define NUM_TYPE_ARGS(eltype, ...) \ + (sizeof((eltype[]) {__VA_ARGS__}) / sizeof(eltype)) + extern __printf(2, 3) void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); =20 @@ -314,6 +314,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, =20 #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) #define DYNAMIC_DEBUG_BRANCH(descriptor) false +#define DECLARE_DYNDBG_CLASSMAP(...) =20 #define dynamic_pr_debug(fmt, ...) \ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) --=20 2.53.0