From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: Hans de Goede <johannes.goede@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
Frank.Li@kernel.org, arm-scmi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/2] module: add SCMI device table alias support
Date: Sun, 20 Sep 2026 12:18:47 +0200 [thread overview]
Message-ID: <aq-xJE196Skvk2pX@monoceros> (raw)
In-Reply-To: <20260920-hippo-of-immense-assurance-50a5fd@sudeepholla>
[-- Attachment #1: Type: text/plain, Size: 3960 bytes --]
On Sun, Sep 20, 2026 at 08:36:10AM +0100, Sudeep Holla wrote:
> On Fri, Sep 18, 2026 at 10:39:46PM +0200, Uwe Kleine-König wrote:
> > On Fri, Sep 18, 2026 at 04:09:36PM +0200, Hans de Goede wrote:
> > > Hi Sudeep,
> > >
> > > On 18-Sep-26 15:32, Sudeep Holla wrote:
> > >
> > > [...]
> > >
> > > >> diff --git a/include/linux/device-id/scmi.h b/include/linux/device-id/scmi.h
> > > >> new file mode 100644
> > > >> index 000000000000..1b4ccfa9dcc5
> > > >> --- /dev/null
> > > >> +++ b/include/linux/device-id/scmi.h
> > > >> @@ -0,0 +1,17 @@
> > > >> +/* SPDX-License-Identifier: GPL-2.0-only */
> > > >> +#ifndef LINUX_DEVICE_ID_SCMI_H
> > > >> +#define LINUX_DEVICE_ID_SCMI_H
> > > >> +
> > > >> +#ifdef __KERNEL__
> > > >> +#include <linux/types.h>
> > > >> +#endif
> > > >> +
> > > >> +#define SCMI_NAME_SIZE 32
> > > >> +#define SCMI_MODULE_PREFIX "scmi:"
> > > >> +
> > > >> +struct scmi_device_id {
> > > >> + __u8 protocol_id;
> > > >> + char name[SCMI_NAME_SIZE];
> > > >> +};
> > > >> +
> > > >> +#endif /* ifndef LINUX_DEVICE_ID_SCMI_H */
> > > >
> > > > You need to include this above file in include/linux/mod_devicetable.h
> > > > to avoid duplication of its inclusion elsewhere. That's the pattern followed
> > > > I see.
> > >
> > > That is what I did for v3, but Uwe, who is leading the splitting
> > > of mod_devicetable.h from one large monster include to smaller
> > > per subsystem/bus includes explicitly requested me to follow this
> > > pattern, see:
> > >
> > > https://lore.kernel.org/arm-scmi/aow2GFAfy84k-N2B@monoceros/
> > >
> > > [...]
> > >
> > > >> diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
> > > >> index b4178c42d08f..91ec3704ee2b 100644
> > > >> --- a/scripts/mod/devicetable-offsets.c
> > > >> +++ b/scripts/mod/devicetable-offsets.c
> > > >> @@ -1,5 +1,6 @@
> > > >> // SPDX-License-Identifier: GPL-2.0
> > > >> #define COMPILE_OFFSETS
> > > >> +#include <linux/device-id/scmi.h>
> > > >
> > > > Drop this for above mentioned reason.
> > >
> > > This was explictly added at request of Uwe because the goal is to
> > > get rid of mod_devicetable.h including all the device-id headers
> > > in a big single catch-all include. This is done because currently
> > > many files include mod_devicetable.h and then if any of the device-id
> > > headers changes everything needs to be rebuild, making incremental
> > > kernel builds much slower.
> > >
> > > (and the same for the second include you point out)
> >
> > FTR: That all sounds right.
> >
> > Let's not add the the dependency mess that is mod_devicetable.h.
> >
>
> I am confused. I am asking to align with what's done in
> Commit ad428f5811bd ("mod_devicetable.h: Split into per subsystem headers")
> and you are disagreeing with that ?
>
> I am not comfortable taking this patch unless there are other similar
> examples that are agreed upon to break the pattern followed in the above
> mentioned commit.
>
> Uwe, please suggest.
I didn't start removing stuff from mod_devicetable.h yet, as changes
there are expensive (regarding build dependencies). So the plan is to
stop drivers consuming mod_devicetable.h and then drop it. (Not sure
this is sensible as new users come in faster than I can fight them, but
I didn't give up yet.)
So while adding new device_id structures to mod_devicetable.h is
consistent with the existing practise, it still makes the situation
worse, as every consumer of mod_devicetable.h then also depends on the
new header for the new structure. That's why I think it's a good idea to
deviate here, even if you're the first one doing so, to not worsen the
already bad situation.
If it helps you, I can propose a patch changing modpost to not use that
catch-(nearly)-all header and use the needed linux/device-id/*.h
instead. I put this on my list for tomorrow.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-09-20 10:18 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 9:29 [PATCH v7 0/2] firmware: arm_scmi: fix module auto-loading Hans de Goede
2026-09-18 9:29 ` [PATCH v7 1/2] module: add SCMI device table alias support Hans de Goede
2026-09-18 9:53 ` Daniel Lezcano
2026-09-18 10:02 ` Hans de Goede
2026-09-18 10:13 ` Daniel Lezcano
2026-09-18 13:38 ` Sudeep Holla
2026-09-18 14:43 ` Rob Clark
2026-09-18 14:48 ` Daniel Lezcano
2026-09-18 20:15 ` Daniel Lezcano
2026-09-18 13:32 ` Sudeep Holla
2026-09-18 14:09 ` Hans de Goede
2026-09-18 20:39 ` Uwe Kleine-König
2026-09-20 7:36 ` Sudeep Holla
2026-09-20 10:18 ` Uwe Kleine-König [this message]
2026-09-21 8:28 ` Sudeep Holla
2026-09-21 15:19 ` Uwe Kleine-König
2026-09-23 9:07 ` Sudeep Holla
2026-09-23 10:23 ` Hans de Goede
2026-09-23 10:49 ` Sudeep Holla
2026-09-23 11:26 ` Hans de Goede
2026-09-23 12:01 ` Sudeep Holla
2026-09-23 12:55 ` Uwe Kleine-König
2026-09-23 14:25 ` Sudeep Holla
2026-09-23 14:51 ` Hans de Goede
2026-09-23 15:42 ` Hans de Goede
2026-09-18 9:29 ` [PATCH v7 2/2] firmware: arm_scmi: Always create devices for standard protocols Hans de Goede
2026-09-25 9:37 ` [PATCH v7 0/2] firmware: arm_scmi: fix module auto-loading Sudeep Holla
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=aq-xJE196Skvk2pX@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=Frank.Li@kernel.org \
--cc=andersson@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=cristian.marussi@arm.com \
--cc=daniel.lezcano@oss.qualcomm.com \
--cc=imx@lists.linux.dev \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.