lkml.org 
[lkml]   [2014]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch v2] x86: Make Atom PMC driver configurable.
On Thu, Oct 16, 2014 at 07:24:48AM +0200, Ingo Molnar wrote:
>
> * Dave Jones <davej@redhat.com> wrote:
>
> > The Atom PMC driver is always built-in, regardless of whether
> > the kernel being built is going to be run on an Atom (or even Intel) CPU.
> >
> > Signed-off-by: Dave Jones <davej@redhat.com>
> > Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
> > Cc: aubrey.li@linux.intel.com
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index f2327e88e07c..b4dfd96aeea8 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -2485,7 +2485,8 @@ config X86_DMA_REMAP
> > depends on STA2X11
> >
> > config PMC_ATOM
> > - def_bool y
> > + tristate "Intel Atom SOC power management controller driver"
> > + default y
> > depends on PCI
> >
>
> So what I think should happen is to decouple of the 'must work'
> features from the optional debug features in this 'driver': the
> Atom SoC power-off quirk should be made unconditional, as long as
> the .config is Atom-supported (CPU_SUP_INTEL I guess).
>
> All the other bits, such as the debugfs interface, should be in a
> separately and appropriately named config option,
> CONFIG_X86_INTEL_ATOM_PMC_DEBUG=y or so, with 'default n'.
>
> The file should probably be split up, the quirk moved into one of
> the generic quirk files, while pmc_atom.c should have the debugfs
> interface.
>
The quirk isn't really a quirk, though. Maybe a separate poweroff driver
would make sense, similar to the other poweroff drivers in drivers/power/reset/.

It might also make sense to rework it as mfd client driver and tie it to
the lpc_ich driver, to be loaded when the lpc_ich driver is loaded.

I don't personally see a problem with making it tristate, as long as a remove
function is defined (which is not the case today). This way it would not have
to be loaded for non-Atom systems.

Guenter


\
 
 \ /
  Last update: 2014-10-17 00:21    [W:0.058 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site