All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: lee.jones@linaro.org, hdegoede@redhat.com,
	mgross@linux.intel.com, andriy.shevchenko@linux.intel.com,
	srinivas.pandruvada@intel.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86: Add Intel Software Defined Silicon driver
Date: Mon, 27 Sep 2021 19:36:41 +0200	[thread overview]
Message-ID: <YVIBKVB4IN35z/L6@kroah.com> (raw)
In-Reply-To: <7295cafaf6da34e31390fe621198205d18eac525.camel@linux.intel.com>

On Mon, Sep 27, 2021 at 10:27:28AM -0700, David E. Box wrote:
> On Mon, 2021-09-27 at 06:04 +0200, Greg KH wrote:
> > On Sun, Sep 26, 2021 at 06:15:16PM -0700, David E. Box wrote:
> > > > > +static struct platform_driver sdsi_driver = {
> > > > > +       .driver = {
> > > > > +               .name           = SDSI_DEV_NAME,
> > > > > +               .dev_groups     = sdsi_groups,
> > > > > +       },
> > > > > +       .probe  = sdsi_probe,
> > > > > +       .remove = sdsi_remove,
> > > > > +};
> > > > > +module_platform_driver(sdsi_driver);
> > > > 
> > > > What causes the platform to know to register, and enable, this platform
> > > > driver?  Shouldn't there be some hardware involved that is discoverable
> > > > to enable it to load dynamically?
> > > 
> > > Ah. The patch that adds the SDSi platform device string was added to a series for the intel_pmt
> > > MFD
> > > driver and it's still waiting review. I see that complicates things. I can combine the two series
> > > together.
> > 
> > Do you have a pointer to the lore.kernel.org location of that series?
> 
> https://lore.kernel.org/all/20210922213007.2738388-1-david.e.box@linux.intel.com/
> 
> > 
> > Your code right here will bind to any system that it is loaded on, a
> > very dangerous thing...
> 
> It won't. It uses module alias to load against the SDSi specific MFD cell.

module aliases do not prevent someone from building the driver into
their kernel, or doing a simple 'modprobe'.  You need to bind your
driver to a real hardware resource (and reject it if it is not present),
otherwise this driver will break systems quite easily.

And again, why is this a platform driver and not just a "real" device on
a bus?  Heck, why not just use the auxiliary bus for stuff like this,
why are you craming pci attributes into the MFD subsystem?

thanks,

greg k-h

  reply	other threads:[~2021-09-27 17:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 21:31 [PATCH 1/2] Documentation: Update ioctl-number.rst for Intel Software Defined Silicon interface David E. Box
2021-09-24 21:31 ` [PATCH 2/2] platform/x86: Add Intel Software Defined Silicon driver David E. Box
2021-09-25  6:27   ` Greg KH
2021-09-27  1:15     ` David E. Box
2021-09-27  4:03       ` Greg KH
2021-09-27 17:53         ` David E. Box
2021-09-28  4:48           ` Greg KH
2021-09-27  4:04       ` Greg KH
2021-09-27 17:27         ` David E. Box
2021-09-27 17:36           ` Greg KH [this message]
2021-09-25 14:46   ` Greg KH

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=YVIBKVB4IN35z/L6@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    /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.