RE: [PATCH v5 09/14] platform/x86: dell-smbios: Introduce dispatcher for SMM calls

From: Mario.Limonciello
Date: Sun Oct 08 2017 - 17:45:16 EST


> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
> Sent: Sunday, October 8, 2017 1:13 PM
> To: Limonciello, Mario <Mario_Limonciello@xxxxxxxx>
> Cc: dvhart@xxxxxxxxxxxxx; LKML <linux-kernel@xxxxxxxxxxxxxxx>; Platform Driver
> <platform-driver-x86@xxxxxxxxxxxxxxx>; Andy Lutomirski <luto@xxxxxxxxxx>;
> quasisec@xxxxxxxxxx; Pali RohÃr <pali.rohar@xxxxxxxxx>; Rafael J. Wysocki
> <rjw@xxxxxxxxxxxxx>; mjg59@xxxxxxxxxx; Christoph Hellwig <hch@xxxxxx>;
> Greg KH <greg@xxxxxxxxx>
> Subject: Re: [PATCH v5 09/14] platform/x86: dell-smbios: Introduce dispatcher for
> SMM calls
>
> On Sun, Oct 8, 2017 at 6:48 PM, Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Sat, Oct 7, 2017 at 7:59 AM, Mario Limonciello
> > <mario.limonciello@xxxxxxxx> wrote:
> >> This splits up the dell-smbios driver into two drivers:
> >> * dell-smbios
> >> * dell-smbios-smm
> >>
> >> dell-smbios can operate with multiple different dispatcher drivers to
> >> perform SMBIOS operations.
> >>
> >> Also modify the interface that dell-laptop and dell-wmi use align to this
> >> model more closely. Rather than a single global buffer being allocated
> >> for all drivers, each driver will allocate and be responsible for it's own
> >> buffer. The pointer will be passed to the calling function and each
> >> dispatcher driver will then internally copy it to the proper location to
> >> perform it's call.
> >
> >> config DELL_SMBIOS
> >> tristate
> >
> >> + depends on DELL_SMBIOS_SMM
> >> +
> >
> > If the above dependency is true (which I'm quite sure not) this split
> > should never happen.
>
> Hmm... One more thought here.
>
> Which is library and which is not? IOW the question is "can
> DELL_SMBIOS be a standalone working module"?
>

It can technically be compiled as a standalone module, but it won't do
anything as a standalone module as of this patch.

After the sysfs tokens patch it could be used to provide token information
without the SMM or WMI drivers.
(although this interface will have to change based upon Greg's most recent
feedback).

In terms of transitioning people moving from older kernels to new, it makes
most sense to me that it's automatically selecting DELL_SMBIOS_SMM if you
had it selected previously, but I'll defer to you judgement if the dependency
should be dropped since it can be a standalone module that just doesn't do
anything.

> >
> >> +config DELL_SMBIOS_SMM
> >> + tristate "Dell SMBIOS calling interface (SMM implementation)"
> >> + depends on DCDBAS
> >> + default DCDBAS
> >> + select DELL_SMBIOS
> >> ---help---
> >> + This provides an implementation for the Dell SMBIOS calling interface
> >> + communicated over SMI/SMM.
> >>
> >> + If you have a Dell computer from <=2017 you should say Y or M here.
> >> + If you aren't sure and this module doesn't work for your computer
> >> + it just won't load.
>
>
> --
> With Best Regards,
> Andy Shevchenko