public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Shashank Balaji <shashank.mahadasyam@sony•com>
To: "Suzuki K Poulose" <suzuki.poulose@arm•com>,
	"James Clark" <james.clark@linaro•org>,
	"Alexander Shishkin" <alexander.shishkin@linux•intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation•org>,
	"Rafael J. Wysocki" <rafael@kernel•org>,
	"Danilo Krummrich" <dakr@kernel•org>,
	"Miguel Ojeda" <ojeda@kernel•org>,
	"Boqun Feng" <boqun@kernel•org>, "Gary Guo" <gary@garyguo•net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail•com>,
	"Benno Lossin" <lossin@kernel•org>,
	"Andreas Hindborg" <a.hindborg@kernel•org>,
	"Alice Ryhl" <aliceryhl@google•com>,
	"Trevor Gross" <tmgross@umich•edu>,
	"Jonathan Corbet" <corbet@lwn•net>,
	"Shuah Khan" <skhan@linuxfoundation•org>,
	"Luis Chamberlain" <mcgrof@kernel•org>,
	"Petr Pavlu" <petr.pavlu@suse•com>,
	"Daniel Gomez" <da.gomez@kernel•org>,
	"Sami Tolvanen" <samitolvanen@google•com>,
	"Aaron Tomlin" <atomlin@atomlin•com>,
	"Mike Leach" <mike.leach@arm•com>, "Leo Yan" <leo.yan@arm•com>,
	"Thierry Reding" <thierry.reding@kernel•org>,
	"Jonathan Hunter" <jonathanh@nvidia•com>,
	"Mike Leach" <mike.leach@arm•com>
Cc: Rahul Bukte <rahul.bukte@sony•com>,
	 Shashank Balaji <shashank.mahadasyam@sony•com>,
	 linux-kernel@vger•kernel.org, coresight@lists•linaro.org,
	 linux-arm-kernel@lists•infradead.org,
	driver-core@lists•linux.dev,  rust-for-linux@vger•kernel.org,
	linux-doc@vger•kernel.org,
	 Daniel Palmer <daniel.palmer@sony•com>,
	Tim Bird <tim.bird@sony•com>,
	 linux-modules@vger•kernel.org, linux-tegra@vger•kernel.org,
	 Sumit Gupta <sumitg@nvidia•com>
Subject: [PATCH v5 1/4] soc/tegra: cbb: Move driver registration from pure_initcall to core_initcall
Date: Mon, 18 May 2026 19:19:57 +0900	[thread overview]
Message-ID: <20260518-acpi_mod_name-v5-1-705ccc430885@sony.com> (raw)
In-Reply-To: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com>

Commit "driver core: platform: set mod_name in driver registration" will set
struct device_driver's mod_name member for platform driver registration. For a
driver to be registered with its mod_name set, module_kset needs to be
initialized, which currently happens in a subsys_initcall in param_sysfs_init().
The tegra cbb drivers register themselves before module_kset init, in a
pure_initcall. This works currently because lookup_or_create_module_kobject(),
which dereferences module_kset via kset_find_obj(), is not called if mod_name
is not set, which is the case now.

So in preparation for the commit "driver core: platform: set mod_name in driver registration",
move tegra cbb driver registration to core_initcall level, and commit
"kernel: param: initialize module_kset in a pure_initcall" will move module_kset
init to pure_initcall level, ensuring module_kset init happens before tegra cbb
driver registration.

Suggested-by: Gary Guo <gary@garyguo•net>
Acked-by: Sumit Gupta <sumitg@nvidia•com>
Co-developed-by: Rahul Bukte <rahul.bukte@sony•com>
Signed-off-by: Rahul Bukte <rahul.bukte@sony•com>
Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony•com>
---
Patch 4 depends on this patch
---
 drivers/soc/tegra/cbb/tegra194-cbb.c | 2 +-
 drivers/soc/tegra/cbb/tegra234-cbb.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/tegra/cbb/tegra194-cbb.c b/drivers/soc/tegra/cbb/tegra194-cbb.c
index ab75d50cc85c..2f69e104c838 100644
--- a/drivers/soc/tegra/cbb/tegra194-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra194-cbb.c
@@ -2342,7 +2342,7 @@ static int __init tegra194_cbb_init(void)
 {
 	return platform_driver_register(&tegra194_cbb_driver);
 }
-pure_initcall(tegra194_cbb_init);
+core_initcall(tegra194_cbb_init);
 
 static void __exit tegra194_cbb_exit(void)
 {
diff --git a/drivers/soc/tegra/cbb/tegra234-cbb.c b/drivers/soc/tegra/cbb/tegra234-cbb.c
index fb26f085f691..785072fa4e85 100644
--- a/drivers/soc/tegra/cbb/tegra234-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra234-cbb.c
@@ -1774,7 +1774,7 @@ static int __init tegra234_cbb_init(void)
 {
 	return platform_driver_register(&tegra234_cbb_driver);
 }
-pure_initcall(tegra234_cbb_init);
+core_initcall(tegra234_cbb_init);
 
 static void __exit tegra234_cbb_exit(void)
 {

-- 
2.43.0



  reply	other threads:[~2026-05-18 10:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21  6:02 [PATCH v2 0/2] Enable sysfs module symlink for more built-in drivers Shashank Balaji
2026-04-21  6:02 ` [PATCH v2 1/2] kernel: param: handle NULL module_kset in lookup_or_create_module_kobject() Shashank Balaji
2026-04-21  6:27   ` Greg Kroah-Hartman
2026-04-21 14:59     ` Shashank Balaji
2026-04-21 15:20       ` Greg Kroah-Hartman
2026-04-21  6:02 ` [PATCH v2 2/2] driver core: platform: set mod_name in driver registration Shashank Balaji
2026-04-21  6:24   ` Greg Kroah-Hartman
2026-04-22  9:49 ` [PATCH v3 0/4] Enable sysfs module symlink for more built-in drivers Shashank Balaji
2026-04-22  9:49   ` [PATCH v3 1/4] kernel: param: initialize module_kset on-demand Shashank Balaji
2026-04-24  9:16     ` Shashank Balaji
2026-04-24 19:26     ` Gary Guo
2026-04-22  9:49   ` [PATCH v3 2/4] coresight: pass THIS_MODULE implicitly through a macro Shashank Balaji
2026-04-22  9:49   ` [PATCH v3 3/4] driver core: platform: set mod_name in driver registration Shashank Balaji
2026-04-22  9:49   ` [PATCH v3 4/4] docs: driver-api: add mod_name argument to __platform_register_drivers() Shashank Balaji
2026-04-22 11:27     ` Greg Kroah-Hartman
2026-04-27  2:41   ` [PATCH v4 0/4] Enable sysfs module symlink for more built-in drivers Shashank Balaji
2026-04-27  2:41     ` [PATCH v4 1/4] kernel: param: initialize module_kset before do_initcalls() Shashank Balaji
2026-04-27 13:29       ` Gary Guo
2026-04-28  0:37         ` Shashank Balaji
2026-04-28 11:10           ` Gary Guo
2026-04-28 13:07             ` Shashank Balaji
2026-05-12  2:12               ` Shashank Balaji
2026-05-12  8:55                 ` Jon Hunter
2026-05-12 12:14                   ` Sumit Gupta
2026-05-12 13:32                     ` Shashank Balaji
2026-04-27  2:41     ` [PATCH v4 2/4] coresight: pass THIS_MODULE implicitly through a macro Shashank Balaji
2026-04-27 10:49       ` Leo Yan
2026-04-27  2:41     ` [PATCH v4 3/4] driver core: platform: set mod_name in driver registration Shashank Balaji
2026-04-27  2:41     ` [PATCH v4 4/4] docs: driver-api: add mod_name argument to __platform_register_drivers() Shashank Balaji
2026-05-18 10:19     ` [PATCH v5 0/4] Enable sysfs module symlink for more built-in drivers Shashank Balaji
2026-05-18 10:19       ` Shashank Balaji [this message]
2026-05-27 11:19         ` [PATCH v5 1/4] soc/tegra: cbb: Move driver registration from pure_initcall to core_initcall Gary Guo
2026-05-28 21:09         ` Thierry Reding
2026-05-18 10:19       ` [PATCH v5 2/4] kernel: param: initialize module_kset in a pure_initcall Shashank Balaji
2026-05-22 13:06         ` Petr Pavlu
2026-05-23  3:24           ` Shashank Balaji
2026-06-01 10:19             ` [PATCH v6] " Shashank Balaji
2026-06-01 15:48               ` Danilo Krummrich
2026-05-27 11:19         ` [PATCH v5 2/4] " Gary Guo
2026-05-18 10:19       ` [PATCH v5 3/4] coresight: pass THIS_MODULE implicitly through a macro Shashank Balaji
2026-05-18 10:20       ` [PATCH v5 4/4] driver core: platform: set mod_name in driver registration Shashank Balaji
2026-05-18 10:27         ` Greg Kroah-Hartman
2026-05-18 10:32           ` Shashank Balaji
2026-05-18 10:49             ` Greg Kroah-Hartman
2026-05-28 21:19       ` [PATCH v5 0/4] Enable sysfs module symlink for more built-in drivers Danilo Krummrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260518-acpi_mod_name-v5-1-705ccc430885@sony.com \
    --to=shashank.mahadasyam@sony$(echo .)com \
    --cc=a.hindborg@kernel$(echo .)org \
    --cc=alexander.shishkin@linux$(echo .)intel.com \
    --cc=aliceryhl@google$(echo .)com \
    --cc=atomlin@atomlin$(echo .)com \
    --cc=bjorn3_gh@protonmail$(echo .)com \
    --cc=boqun@kernel$(echo .)org \
    --cc=corbet@lwn$(echo .)net \
    --cc=coresight@lists$(echo .)linaro.org \
    --cc=da.gomez@kernel$(echo .)org \
    --cc=dakr@kernel$(echo .)org \
    --cc=daniel.palmer@sony$(echo .)com \
    --cc=driver-core@lists$(echo .)linux.dev \
    --cc=gary@garyguo$(echo .)net \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=james.clark@linaro$(echo .)org \
    --cc=jonathanh@nvidia$(echo .)com \
    --cc=leo.yan@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-doc@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-modules@vger$(echo .)kernel.org \
    --cc=linux-tegra@vger$(echo .)kernel.org \
    --cc=lossin@kernel$(echo .)org \
    --cc=mcgrof@kernel$(echo .)org \
    --cc=mike.leach@arm$(echo .)com \
    --cc=ojeda@kernel$(echo .)org \
    --cc=petr.pavlu@suse$(echo .)com \
    --cc=rafael@kernel$(echo .)org \
    --cc=rahul.bukte@sony$(echo .)com \
    --cc=rust-for-linux@vger$(echo .)kernel.org \
    --cc=samitolvanen@google$(echo .)com \
    --cc=skhan@linuxfoundation$(echo .)org \
    --cc=sumitg@nvidia$(echo .)com \
    --cc=suzuki.poulose@arm$(echo .)com \
    --cc=thierry.reding@kernel$(echo .)org \
    --cc=tim.bird@sony$(echo .)com \
    --cc=tmgross@umich$(echo .)edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox