linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* x86: Make Atom PMC driver configurable.
@ 2014-10-15 14:46 Dave Jones
  2014-10-15 14:52 ` Felipe Balbi
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Jones @ 2014-10-15 14:46 UTC (permalink / raw)
  To: Linux Kernel; +Cc: x86, aubrey.li

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>

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f2327e88e07c..04280177c1e2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2485,7 +2485,7 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config PMC_ATOM
-	def_bool y
+	tristate "Intel Atom SOC power management controller driver"
         depends on PCI
 
 source "net/Kconfig"

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: x86: Make Atom PMC driver configurable.
  2014-10-15 14:46 x86: Make Atom PMC driver configurable Dave Jones
@ 2014-10-15 14:52 ` Felipe Balbi
  2014-10-15 14:59   ` Dave Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Felipe Balbi @ 2014-10-15 14:52 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, x86, aubrey.li

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

Hi,

On Wed, Oct 15, 2014 at 10:46:03AM -0400, Dave Jones 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>
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index f2327e88e07c..04280177c1e2 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2485,7 +2485,7 @@ config X86_DMA_REMAP
>  	depends on STA2X11
>  
>  config PMC_ATOM
> -	def_bool y
> +	tristate "Intel Atom SOC power management controller driver"

looks like you should still have this as default y just to make sure you
a simple defconfig still enables this as it did before.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: x86: Make Atom PMC driver configurable.
  2014-10-15 14:52 ` Felipe Balbi
@ 2014-10-15 14:59   ` Dave Jones
  2014-10-15 15:04     ` Felipe Balbi
  2014-10-15 16:20     ` One Thousand Gnomes
  0 siblings, 2 replies; 11+ messages in thread
From: Dave Jones @ 2014-10-15 14:59 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux Kernel, x86, aubrey.li

On Wed, Oct 15, 2014 at 09:52:45AM -0500, Felipe Balbi wrote:
 > Hi,
 > 
 > On Wed, Oct 15, 2014 at 10:46:03AM -0400, Dave Jones 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>
 > > 
 > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
 > > index f2327e88e07c..04280177c1e2 100644
 > > --- a/arch/x86/Kconfig
 > > +++ b/arch/x86/Kconfig
 > > @@ -2485,7 +2485,7 @@ config X86_DMA_REMAP
 > >  	depends on STA2X11
 > >  
 > >  config PMC_ATOM
 > > -	def_bool y
 > > +	tristate "Intel Atom SOC power management controller driver"
 > 
 > looks like you should still have this as default y just to make sure you
 > a simple defconfig still enables this as it did before.
 
I could, but why should this be default y ? There's no real
justification to inflict this on everyone, given atom is at best
a niche area of x86.

	Dave


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: x86: Make Atom PMC driver configurable.
  2014-10-15 14:59   ` Dave Jones
@ 2014-10-15 15:04     ` Felipe Balbi
  2014-10-15 16:20     ` One Thousand Gnomes
  1 sibling, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-10-15 15:04 UTC (permalink / raw)
  To: Dave Jones, Felipe Balbi, Linux Kernel, x86, aubrey.li

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

On Wed, Oct 15, 2014 at 10:59:24AM -0400, Dave Jones wrote:
> On Wed, Oct 15, 2014 at 09:52:45AM -0500, Felipe Balbi wrote:
>  > Hi,
>  > 
>  > On Wed, Oct 15, 2014 at 10:46:03AM -0400, Dave Jones 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>
>  > > 
>  > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>  > > index f2327e88e07c..04280177c1e2 100644
>  > > --- a/arch/x86/Kconfig
>  > > +++ b/arch/x86/Kconfig
>  > > @@ -2485,7 +2485,7 @@ config X86_DMA_REMAP
>  > >  	depends on STA2X11
>  > >  
>  > >  config PMC_ATOM
>  > > -	def_bool y
>  > > +	tristate "Intel Atom SOC power management controller driver"
>  > 
>  > looks like you should still have this as default y just to make sure you
>  > a simple defconfig still enables this as it did before.
>  
> I could, but why should this be default y ? There's no real
> justification to inflict this on everyone, given atom is at best
> a niche area of x86.

well, because it already was a bool ? There might be distros out there
who would mysteriously loose PMC support after upgrade the kernel
without realizing that PMC_ATOM isn't a default y anymore.

Frankly though, no strong feelings. I won't be the one having to tell
users to change their .config ;-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: x86: Make Atom PMC driver configurable.
  2014-10-15 14:59   ` Dave Jones
  2014-10-15 15:04     ` Felipe Balbi
@ 2014-10-15 16:20     ` One Thousand Gnomes
  2014-10-16  2:18       ` [Patch v2] " Dave Jones
  1 sibling, 1 reply; 11+ messages in thread
From: One Thousand Gnomes @ 2014-10-15 16:20 UTC (permalink / raw)
  To: Dave Jones; +Cc: Felipe Balbi, Linux Kernel, x86, aubrey.li

On Wed, 15 Oct 2014 10:59:24 -0400
Dave Jones <davej@redhat.com> wrote:

> On Wed, Oct 15, 2014 at 09:52:45AM -0500, Felipe Balbi wrote:
>  > Hi,
>  > 
>  > On Wed, Oct 15, 2014 at 10:46:03AM -0400, Dave Jones 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>
>  > > 
>  > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>  > > index f2327e88e07c..04280177c1e2 100644
>  > > --- a/arch/x86/Kconfig
>  > > +++ b/arch/x86/Kconfig
>  > > @@ -2485,7 +2485,7 @@ config X86_DMA_REMAP
>  > >  	depends on STA2X11
>  > >  
>  > >  config PMC_ATOM
>  > > -	def_bool y
>  > > +	tristate "Intel Atom SOC power management controller driver"
>  > 
>  > looks like you should still have this as default y just to make sure you
>  > a simple defconfig still enables this as it did before.
>  
> I could, but why should this be default y ? There's no real
> justification to inflict this on everyone, given atom is at best
> a niche area of x86.

Possibly because you work for an enterprise vendor. Atom is not remotely
niche to everyone else.

This really does want to be a default Y for X86 at least, although I can
see that for the enterprise market you probably don't care quite so much
right now. Without that you are going to break a lot of users
configurations in a deeply surprising way.

Alan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-15 16:20     ` One Thousand Gnomes
@ 2014-10-16  2:18       ` Dave Jones
  2014-10-16  3:00         ` Li, Aubrey
  2014-10-16  5:24         ` Ingo Molnar
  0 siblings, 2 replies; 11+ messages in thread
From: Dave Jones @ 2014-10-16  2:18 UTC (permalink / raw)
  To: Linux Kernel
  Cc: One Thousand Gnomes, Felipe Balbi, Linux Kernel, x86, aubrey.li

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
 
 source "net/Kconfig"

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-16  2:18       ` [Patch v2] " Dave Jones
@ 2014-10-16  3:00         ` Li, Aubrey
  2014-10-16  3:04           ` Dave Jones
  2014-10-16  5:24         ` Ingo Molnar
  1 sibling, 1 reply; 11+ messages in thread
From: Li, Aubrey @ 2014-10-16  3:00 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, One Thousand Gnomes, Felipe Balbi, x86

On 2014/10/16 10:18, Dave Jones 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"

PMC driver provides core function like reboot, better to change to
bool, or did you see a scenario it can be as a module?

Thanks,
-Aubrey

> +	default y
>          depends on PCI
>  
>  source "net/Kconfig"
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-16  3:00         ` Li, Aubrey
@ 2014-10-16  3:04           ` Dave Jones
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Jones @ 2014-10-16  3:04 UTC (permalink / raw)
  To: Li, Aubrey; +Cc: Linux Kernel, One Thousand Gnomes, Felipe Balbi, x86

On Thu, Oct 16, 2014 at 11:00:35AM +0800, Li, Aubrey wrote:
 > On 2014/10/16 10:18, Dave Jones 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"
 > 
 > PMC driver provides core function like reboot, better to change to
 > bool, or did you see a scenario it can be as a module?

All the MODULE_* stuff in arch/x86/kernel/pmc_atom.c threw me off.
It could also use a help text.  I suspect you might be in a better
position than me to write one though.

	Dave


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-16  2:18       ` [Patch v2] " Dave Jones
  2014-10-16  3:00         ` Li, Aubrey
@ 2014-10-16  5:24         ` Ingo Molnar
  2014-10-16  5:35           ` Li, Aubrey
  2014-10-16 21:54           ` Guenter Roeck
  1 sibling, 2 replies; 11+ messages in thread
From: Ingo Molnar @ 2014-10-16  5:24 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, One Thousand Gnomes, Felipe Balbi, x86,
	aubrey.li


* 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.

That way we don't break anyone and remove the unnecessary code as 
well. It's also a nice clean up.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-16  5:24         ` Ingo Molnar
@ 2014-10-16  5:35           ` Li, Aubrey
  2014-10-16 21:54           ` Guenter Roeck
  1 sibling, 0 replies; 11+ messages in thread
From: Li, Aubrey @ 2014-10-16  5:35 UTC (permalink / raw)
  To: Ingo Molnar, Dave Jones, Linux Kernel, One Thousand Gnomes,
	Felipe Balbi, x86

On 2014/10/16 13:24, 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.
> 
> That way we don't break anyone and remove the unnecessary code as 
> well. It's also a nice clean up.

Thanks for the suggestion, I'll take a look if I can refine it after
I clean up my plate. Please expect a delay here.

-Aubrey

> 
> Thanks,
> 
> 	Ingo
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Patch v2] x86: Make Atom PMC driver configurable.
  2014-10-16  5:24         ` Ingo Molnar
  2014-10-16  5:35           ` Li, Aubrey
@ 2014-10-16 21:54           ` Guenter Roeck
  1 sibling, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2014-10-16 21:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Dave Jones, Linux Kernel, One Thousand Gnomes, Felipe Balbi, x86,
	aubrey.li

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-16 21:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15 14:46 x86: Make Atom PMC driver configurable Dave Jones
2014-10-15 14:52 ` Felipe Balbi
2014-10-15 14:59   ` Dave Jones
2014-10-15 15:04     ` Felipe Balbi
2014-10-15 16:20     ` One Thousand Gnomes
2014-10-16  2:18       ` [Patch v2] " Dave Jones
2014-10-16  3:00         ` Li, Aubrey
2014-10-16  3:04           ` Dave Jones
2014-10-16  5:24         ` Ingo Molnar
2014-10-16  5:35           ` Li, Aubrey
2014-10-16 21:54           ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).