[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250730113827.000032b8@huawei.com>
Date: Wed, 30 Jul 2025 11:38:27 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Aneesh Kumar K.V <aneesh.kumar@...nel.org>
CC: Jason Gunthorpe <jgg@...pe.ca>, Dan Williams <dan.j.williams@...el.com>,
<linux-coco@...ts.linux.dev>, <kvmarm@...ts.linux.dev>,
<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <aik@....com>,
<lukas@...ner.de>, Samuel Ortiz <sameo@...osinc.com>, Xu Yilun
<yilun.xu@...ux.intel.com>, Suzuki K Poulose <Suzuki.Poulose@....com>, Steven
Price <steven.price@....com>, Catalin Marinas <catalin.marinas@....com>, Marc
Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>, Oliver Upton
<oliver.upton@...ux.dev>, <gregkh@...uxfounation.org>
Subject: Re: [RFC PATCH v1 11/38] KVM: arm64: CCA: register host tsm
platform device
On Wed, 30 Jul 2025 14:12:26 +0530
"Aneesh Kumar K.V" <aneesh.kumar@...nel.org> wrote:
> Jason Gunthorpe <jgg@...pe.ca> writes:
>
> > On Tue, Jul 29, 2025 at 06:10:45PM +0100, Jonathan Cameron wrote:
> >
> >> > +static struct platform_device cca_host_dev = {
> >> Hmm. Greg is getting increasingly (and correctly in my view) grumpy with
> >> platform devices being registered with no underlying resources etc as glue
> >> layers. Maybe some of that will come later.
> >
> > Is faux_device a better choice? I admit to not knowing entirely what
> > it is for..
I'll go with a cautious yes to faux_device. This case of a glue device
with no resources and no reason to be on a particular bus was definitely
the intent but I'm not 100% sure without trying it that we don't run
into any problems.
Not that many examples yet, but cpuidle-psci.c looks like a vaguely similar
case to this one.
All it really does is move the location of the device and
smash together the device registration with probe/remove.
That means the device disappears if probe() fails, which is cleaner
in many ways than leaving a pointless stub behind.
Maybe it isn't appropriate it if is actually useful to rmmod/modprobe the
driver.
+CC Greg on basis I may have wrong end of the stick ;)
> >
> > But alternatively, why do we need a dummy "hw" struct device at all?
> > Typically a subsystem like TSM should be structured to create its own
> > struct devices..
> >
> > I would expect this to just call 'register tsm' ?
> >
>
> The goal is to have tsm class device to be parented by the platform
> device.
>
> # ls -al
> total 0
> drwxr-xr-x 2 root root 0 Jan 13 06:07 .
> drwxr-xr-x 23 root root 0 Jan 1 00:00 ..
> lrwxrwxrwx 1 root root 0 Jan 13 06:07 tsm0 -> ../../devices/platform/arm-rmi-dev/tsm/tsm0
> # pwd
> /sys/class/tsm
>
> -aneesh
>
Powered by blists - more mailing lists