xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] x86/init: extend quirk use
@ 2016-04-09  0:22 Luis R. Rodriguez
  2016-04-09  0:22 ` [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID Luis R. Rodriguez
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-09  0:22 UTC (permalink / raw)
  To: bp, hpa, tglx, mingo, rusty
  Cc: x86, linux-kernel, luto, boris.ostrovsky, david.vrabel,
	konrad.wilk, xen-devel, lguest, andriy.shevchenko, jlee, glin,
	matt, andrew.cooper3, rjw, lenb, robert.moore, lv.zheng,
	toshi.kani, linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, bigeasy,
	ffainelli, Luis R. Rodriguez

This extends use of the quirks to other platorms as hinted as possible
and confirmed by hpa [0]. This small series depends on the work that added
this functionality [1] [2] to replace the paravirt_enabled() hacks
which is currently under review, sending this series separately. Its worth
reviewing already.

What seems a bit odd is CE4100 leaves RTC enabled, can someone
confirm if indeed it really needs it, or can it also disable it
as with Xen, lguest, and Intel MID ?

[0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com
[1] http://lkml.kernel.org/r/1460158825-13117-1-git-send-email-mcgrof@kernel.org
[2] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux-next.git/log/?h=20160408-pv-disabled-v5

Luis R. Rodriguez (2):
  x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID
  x86/init: disable pnpbios for X86_SUBARCH_CE4100

 arch/x86/kernel/platform-quirks.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.7.2

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

* [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID
  2016-04-09  0:22 [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
@ 2016-04-09  0:22 ` Luis R. Rodriguez
  2016-04-13 23:33   ` Luis R. Rodriguez
  2016-04-09  0:22 ` [PATCH v1 2/2] x86/init: disable pnpbios for X86_SUBARCH_CE4100 Luis R. Rodriguez
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-09  0:22 UTC (permalink / raw)
  To: bp, hpa, tglx, mingo, rusty
  Cc: x86, linux-kernel, luto, boris.ostrovsky, david.vrabel,
	konrad.wilk, xen-devel, lguest, andriy.shevchenko, jlee, glin,
	matt, andrew.cooper3, rjw, lenb, robert.moore, lv.zheng,
	toshi.kani, linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, bigeasy,
	ffainelli, Luis R. Rodriguez

As per hpa Intel MID platforms can also disable pnpbios [0].

[0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 arch/x86/kernel/platform-quirks.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/platform-quirks.c b/arch/x86/kernel/platform-quirks.c
index ab643825a7aa..853919484340 100644
--- a/arch/x86/kernel/platform-quirks.c
+++ b/arch/x86/kernel/platform-quirks.c
@@ -16,10 +16,8 @@ void __init x86_early_init_platform_quirks(void)
 		break;
 	case X86_SUBARCH_XEN:
 	case X86_SUBARCH_LGUEST:
-		x86_platform.legacy.devices.pnpbios = 0;
-		x86_platform.legacy.rtc = 0;
-		break;
 	case X86_SUBARCH_INTEL_MID:
+		x86_platform.legacy.devices.pnpbios = 0;
 		x86_platform.legacy.rtc = 0;
 		break;
 	}
-- 
2.7.2


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

* [PATCH v1 2/2] x86/init: disable pnpbios for X86_SUBARCH_CE4100
  2016-04-09  0:22 [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
  2016-04-09  0:22 ` [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID Luis R. Rodriguez
@ 2016-04-09  0:22 ` Luis R. Rodriguez
  2016-04-11  7:31 ` [PATCH v1 0/2] x86/init: extend quirk use Sebastian Andrzej Siewior
  2016-04-13 23:36 ` [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
  3 siblings, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-09  0:22 UTC (permalink / raw)
  To: bp, hpa, tglx, mingo, rusty
  Cc: x86, linux-kernel, luto, boris.ostrovsky, david.vrabel,
	konrad.wilk, xen-devel, lguest, andriy.shevchenko, jlee, glin,
	matt, andrew.cooper3, rjw, lenb, robert.moore, lv.zheng,
	toshi.kani, linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, bigeasy,
	ffainelli, Luis R. Rodriguez

As per hpa CE4100 platforms can also disable pnpbios [0].

[0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 arch/x86/kernel/platform-quirks.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/platform-quirks.c b/arch/x86/kernel/platform-quirks.c
index 853919484340..1b63daf0dd06 100644
--- a/arch/x86/kernel/platform-quirks.c
+++ b/arch/x86/kernel/platform-quirks.c
@@ -20,6 +20,9 @@ void __init x86_early_init_platform_quirks(void)
 		x86_platform.legacy.devices.pnpbios = 0;
 		x86_platform.legacy.rtc = 0;
 		break;
+	case X86_SUBARCH_CE4100:
+		x86_platform.legacy.devices.pnpbios = 0;
+		break;
 	}
 
 	if (x86_platform.set_legacy_features)
-- 
2.7.2


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

* Re: [PATCH v1 0/2] x86/init: extend quirk use
  2016-04-09  0:22 [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
  2016-04-09  0:22 ` [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID Luis R. Rodriguez
  2016-04-09  0:22 ` [PATCH v1 2/2] x86/init: disable pnpbios for X86_SUBARCH_CE4100 Luis R. Rodriguez
@ 2016-04-11  7:31 ` Sebastian Andrzej Siewior
  2016-04-12 22:30   ` Luis R. Rodriguez
  2016-04-13 23:36 ` [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
  3 siblings, 1 reply; 8+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-04-11  7:31 UTC (permalink / raw)
  To: Luis R. Rodriguez, bp, hpa, tglx, mingo, rusty
  Cc: x86, linux-kernel, luto, boris.ostrovsky, david.vrabel,
	konrad.wilk, xen-devel, lguest, andriy.shevchenko, jlee, glin,
	matt, andrew.cooper3, rjw, lenb, robert.moore, lv.zheng,
	toshi.kani, linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, ffainelli

On 04/09/2016 02:22 AM, Luis R. Rodriguez wrote:
> What seems a bit odd is CE4100 leaves RTC enabled, can someone
> confirm if indeed it really needs it, or can it also disable it
> as with Xen, lguest, and Intel MID ?

So what you do with "x86_platform.legacy.rtc" is to skip
add_rtc_cmos(). For ce4100 I added of_have_populated_dt() to skip the
probe.
If you plan to add this to CE4100 you could remove the
"of_have_populated_dt()". It was meant to skip the RTC probe on all OF
platforms but as of now, CE4100 is the only.

Sebastian

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

* Re: [PATCH v1 0/2] x86/init: extend quirk use
  2016-04-11  7:31 ` [PATCH v1 0/2] x86/init: extend quirk use Sebastian Andrzej Siewior
@ 2016-04-12 22:30   ` Luis R. Rodriguez
  2016-04-12 22:44     ` [PATCH v2] x86/init: disable pnpbios and rtc for X86_SUBARCH_CE4100 Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-12 22:30 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, George Dunlap, Julien Grall
  Cc: Luis R. Rodriguez, bp, hpa, tglx, mingo, rusty, x86,
	linux-kernel, luto, boris.ostrovsky, david.vrabel, konrad.wilk,
	xen-devel, lguest, andriy.shevchenko, jlee, glin, matt,
	andrew.cooper3, rjw, lenb, robert.moore, lv.zheng, toshi.kani,
	linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, ffainelli

On Mon, Apr 11, 2016 at 09:31:54AM +0200, Sebastian Andrzej Siewior wrote:
> On 04/09/2016 02:22 AM, Luis R. Rodriguez wrote:
> > What seems a bit odd is CE4100 leaves RTC enabled, can someone
> > confirm if indeed it really needs it, or can it also disable it
> > as with Xen, lguest, and Intel MID ?
> 
> So what you do with "x86_platform.legacy.rtc" is to skip
> add_rtc_cmos().

Yeap.

> For ce4100 I added of_have_populated_dt() to skip the probe.

Ah look at that.. x86 using device tree. Wasn't aware.

> If you plan to add this to CE4100 you could remove the
> "of_have_populated_dt()". It was meant to skip the RTC probe on all OF
> platforms but as of now, CE4100 is the only.

Indeed, this would clean up the add_rtc_cmos() path more and make
the semantics required for this a platform specific quirk which can
instead more easily be set by the platform on the generic:

	x86_early_init_platform_quirks()

Will go a head and remove this hack as part of the CE4100 patch, and
also add CE4100 to the list of subarchs that need the RTC quirk.

  Luis

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

* [PATCH v2] x86/init: disable pnpbios and rtc for X86_SUBARCH_CE4100
  2016-04-12 22:30   ` Luis R. Rodriguez
@ 2016-04-12 22:44     ` Luis R. Rodriguez
  0 siblings, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-12 22:44 UTC (permalink / raw)
  To: bp, hpa, tglx, mingo, rusty
  Cc: x86, linux-kernel, luto, boris.ostrovsky, david.vrabel,
	konrad.wilk, xen-devel, lguest, andriy.shevchenko, jlee, glin,
	matt, andrew.cooper3, rjw, lenb, robert.moore, lv.zheng,
	toshi.kani, linux-acpi, kozerkov, josh, joro, tiwai,
	sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon, bigeasy,
	ffainelli, george.dunlap, julien.grall, Luis R. Rodriguez

As per hpa CE4100 platforms can also disable pnpbios [0].
Then Sebastian also recently noted that CE4100 also disables
RTC probe, to do that Sebastian had long ago added the RTC
of_have_populated_dt() check, he noted that it was meant to
skip the RTC probe on all OF platforms but as of now, CE4100
was the only x86 DT using this.

We can just fold this requirement into the platform quirk
then. This now means that all of these  match platform quirks
for pnpbios and RTC preferences:

  * X86_SUBARCH_XEN
  * X86_SUBARCH_LGUEST
  * X86_SUBARCH_INTEL_MID
  * X86_SUBARCH_CE4100

[0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com
[1] http://lkml.kernel.org/r/570B52EA.60300@linutronix.de

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---

This series on the other paravirt_enabled() series, I'll be testing
one more change to update one patch to reduce more space on __init,
the 0-day testing should be done by tomorrow and then I can adjust
the size computation on impact size.

 arch/x86/kernel/platform-quirks.c | 1 +
 arch/x86/kernel/rtc.c             | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/platform-quirks.c b/arch/x86/kernel/platform-quirks.c
index 853919484340..b2f8a33b36ff 100644
--- a/arch/x86/kernel/platform-quirks.c
+++ b/arch/x86/kernel/platform-quirks.c
@@ -17,6 +17,7 @@ void __init x86_early_init_platform_quirks(void)
 	case X86_SUBARCH_XEN:
 	case X86_SUBARCH_LGUEST:
 	case X86_SUBARCH_INTEL_MID:
+	case X86_SUBARCH_CE4100:
 		x86_platform.legacy.devices.pnpbios = 0;
 		x86_platform.legacy.rtc = 0;
 		break;
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index ff4f4180fefd..eceaa082ec3f 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -186,9 +186,6 @@ static __init int add_rtc_cmos(void)
 		}
 	}
 #endif
-	if (of_have_populated_dt())
-		return 0;
-
 	if (!x86_platform.legacy.rtc)
 		return -ENODEV;
 
-- 
2.7.2


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

* Re: [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID
  2016-04-09  0:22 ` [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID Luis R. Rodriguez
@ 2016-04-13 23:33   ` Luis R. Rodriguez
  0 siblings, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-13 23:33 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: bp, hpa, tglx, mingo, rusty, x86, linux-kernel, luto,
	boris.ostrovsky, david.vrabel, konrad.wilk, xen-devel, lguest,
	andriy.shevchenko, jlee, glin, matt, andrew.cooper3, rjw, lenb,
	robert.moore, lv.zheng, toshi.kani, linux-acpi, kozerkov, josh,
	joro, tiwai, sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon,
	bigeasy, ffainelli

On Fri, Apr 08, 2016 at 05:22:40PM -0700, Luis R. Rodriguez wrote:
> As per hpa Intel MID platforms can also disable pnpbios [0].
> 
> [0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com
> 
> Suggested-by: H. Peter Anvin <hpa@zytor.com>
> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>

As per 0-day this saves us 8 bytes on tinyconfig. Will amend
and resubmit with updated commit log.

  Luis

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

* Re: [PATCH v1 0/2] x86/init: extend quirk use
  2016-04-09  0:22 [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
                   ` (2 preceding siblings ...)
  2016-04-11  7:31 ` [PATCH v1 0/2] x86/init: extend quirk use Sebastian Andrzej Siewior
@ 2016-04-13 23:36 ` Luis R. Rodriguez
  3 siblings, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2016-04-13 23:36 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: bp, hpa, tglx, mingo, rusty, x86, linux-kernel, luto,
	boris.ostrovsky, david.vrabel, konrad.wilk, xen-devel, lguest,
	andriy.shevchenko, jlee, glin, matt, andrew.cooper3, rjw, lenb,
	robert.moore, lv.zheng, toshi.kani, linux-acpi, kozerkov, josh,
	joro, tiwai, sathyanarayanan.kuppuswamy, alan, rui.zhang, mbizon,
	bigeasy, ffainelli

On Fri, Apr 08, 2016 at 05:22:39PM -0700, Luis R. Rodriguez wrote:
> This extends use of the quirks to other platorms as hinted as possible
> and confirmed by hpa [0]. This small series depends on the work that added
> this functionality [1] [2] to replace the paravirt_enabled() hacks
> which is currently under review, sending this series separately. Its worth
> reviewing already.
> 
> What seems a bit odd is CE4100 leaves RTC enabled, can someone
> confirm if indeed it really needs it, or can it also disable it
> as with Xen, lguest, and Intel MID ?
> 
> [0] http://lkml.kernel.org/r/5702B5C2.7070101@zytor.com
> [1] http://lkml.kernel.org/r/1460158825-13117-1-git-send-email-mcgrof@kernel.org
> [2] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux-next.git/log/?h=20160408-pv-disabled-v5
> 
> Luis R. Rodriguez (2):
>   x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID
>   x86/init: disable pnpbios for X86_SUBARCH_CE4100

Since this depends on the removal of the paravirt_enabled() series
I'll just go ahead and submit this as part of that v6 series.

  Luis

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

end of thread, other threads:[~2016-04-13 23:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-09  0:22 [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez
2016-04-09  0:22 ` [PATCH v1 1/2] x86/init: disable pnpbios for X86_SUBARCH_INTEL_MID Luis R. Rodriguez
2016-04-13 23:33   ` Luis R. Rodriguez
2016-04-09  0:22 ` [PATCH v1 2/2] x86/init: disable pnpbios for X86_SUBARCH_CE4100 Luis R. Rodriguez
2016-04-11  7:31 ` [PATCH v1 0/2] x86/init: extend quirk use Sebastian Andrzej Siewior
2016-04-12 22:30   ` Luis R. Rodriguez
2016-04-12 22:44     ` [PATCH v2] x86/init: disable pnpbios and rtc for X86_SUBARCH_CE4100 Luis R. Rodriguez
2016-04-13 23:36 ` [PATCH v1 0/2] x86/init: extend quirk use Luis R. Rodriguez

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