linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
@ 2017-05-24 18:04 Jan Kiszka
  2017-05-25  1:38 ` Lu Baolu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Kiszka @ 2017-05-24 18:04 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
  Cc: Linux Kernel Mailing List, Lu Baolu

This ensures that adjustments to x86_platform done by the hypervisor
setup is already respected by this simple calibration.

The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk:
Add support for earlyprintk via USB3 debug port"), comes much later
into play.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/x86/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0b4d3c686b1e..f81823695014 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -980,8 +980,6 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	x86_configure_nx();
 
-	simple_udelay_calibration();
-
 	parse_early_param();
 
 #ifdef CONFIG_MEMORY_HOTPLUG
@@ -1041,6 +1039,8 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	init_hypervisor_platform();
 
+	simple_udelay_calibration();
+
 	x86_init.resources.probe_roms();
 
 	/* after parse_early_param, so could debug it */

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

* Re: [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  2017-05-24 18:04 [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform Jan Kiszka
@ 2017-05-25  1:38 ` Lu Baolu
  2017-05-26 11:06 ` [tip:x86/urgent] " tip-bot for Jan Kiszka
  2017-05-26 23:04 ` [PATCH] " Andy Shevchenko
  2 siblings, 0 replies; 5+ messages in thread
From: Lu Baolu @ 2017-05-25  1:38 UTC (permalink / raw)
  To: Jan Kiszka, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
  Cc: Linux Kernel Mailing List



On 05/25/2017 02:04 AM, Jan Kiszka wrote:
> This ensures that adjustments to x86_platform done by the hypervisor
> setup is already respected by this simple calibration.
>
> The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk:
> Add support for earlyprintk via USB3 debug port"), comes much later
> into play.

Acked-by: Lu Baolu <baolu.lu@linux.intel.com>

>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  arch/x86/kernel/setup.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0b4d3c686b1e..f81823695014 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -980,8 +980,6 @@ void __init setup_arch(char **cmdline_p)
>  	 */
>  	x86_configure_nx();
>  
> -	simple_udelay_calibration();
> -
>  	parse_early_param();
>  
>  #ifdef CONFIG_MEMORY_HOTPLUG
> @@ -1041,6 +1039,8 @@ void __init setup_arch(char **cmdline_p)
>  	 */
>  	init_hypervisor_platform();
>  
> +	simple_udelay_calibration();
> +
>  	x86_init.resources.probe_roms();
>  
>  	/* after parse_early_param, so could debug it */
>

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

* [tip:x86/urgent] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  2017-05-24 18:04 [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform Jan Kiszka
  2017-05-25  1:38 ` Lu Baolu
@ 2017-05-26 11:06 ` tip-bot for Jan Kiszka
  2017-05-26 23:04 ` [PATCH] " Andy Shevchenko
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Jan Kiszka @ 2017-05-26 11:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: baolu.lu, hpa, jan.kiszka, tglx, mingo, linux-kernel

Commit-ID:  702644ec1cab10ffefcebb4060d4da46d4ef2c7f
Gitweb:     http://git.kernel.org/tip/702644ec1cab10ffefcebb4060d4da46d4ef2c7f
Author:     Jan Kiszka <jan.kiszka@siemens.com>
AuthorDate: Wed, 24 May 2017 20:04:41 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 26 May 2017 13:04:09 +0200

x86/timers: Move simple_udelay_calibration past init_hypervisor_platform

This ensures that adjustments to x86_platform done by the hypervisor
setup is already respected by this simple calibration.

The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk:
Add support for earlyprintk via USB3 debug port"), comes much later
into play.

Fixes: dd759d93f4dd ("x86/timers: Add simple udelay calibration")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: http://lkml.kernel.org/r/5e89fe60-aab3-2c1c-aba8-32f8ad376189@siemens.com

---
 arch/x86/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0b4d3c6..f818236 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -980,8 +980,6 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	x86_configure_nx();
 
-	simple_udelay_calibration();
-
 	parse_early_param();
 
 #ifdef CONFIG_MEMORY_HOTPLUG
@@ -1041,6 +1039,8 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	init_hypervisor_platform();
 
+	simple_udelay_calibration();
+
 	x86_init.resources.probe_roms();
 
 	/* after parse_early_param, so could debug it */

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

* Re: [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  2017-05-24 18:04 [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform Jan Kiszka
  2017-05-25  1:38 ` Lu Baolu
  2017-05-26 11:06 ` [tip:x86/urgent] " tip-bot for Jan Kiszka
@ 2017-05-26 23:04 ` Andy Shevchenko
  2017-05-28 16:41   ` Jan Kiszka
  2 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2017-05-26 23:04 UTC (permalink / raw)
  To: Jan Kiszka, Mathias Nyman
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Linux Kernel Mailing List, Lu Baolu

+Cc Mathias

On Wed, May 24, 2017 at 9:04 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> This ensures that adjustments to x86_platform done by the hypervisor
> setup is already respected by this simple calibration.
>
> The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk:
> Add support for earlyprintk via USB3 debug port"), comes much later
> into play.
>

Can you elaborate a bit what is the issue you are experience?

> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  arch/x86/kernel/setup.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0b4d3c686b1e..f81823695014 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -980,8 +980,6 @@ void __init setup_arch(char **cmdline_p)
>          */
>         x86_configure_nx();
>
> -       simple_udelay_calibration();
> -
>         parse_early_param();
>
>  #ifdef CONFIG_MEMORY_HOTPLUG
> @@ -1041,6 +1039,8 @@ void __init setup_arch(char **cmdline_p)
>          */
>         init_hypervisor_platform();
>
> +       simple_udelay_calibration();
> +
>         x86_init.resources.probe_roms();
>
>         /* after parse_early_param, so could debug it */



-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  2017-05-26 23:04 ` [PATCH] " Andy Shevchenko
@ 2017-05-28 16:41   ` Jan Kiszka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2017-05-28 16:41 UTC (permalink / raw)
  To: Andy Shevchenko, Mathias Nyman
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Linux Kernel Mailing List, Lu Baolu

On 2017-05-27 01:04, Andy Shevchenko wrote:
> +Cc Mathias
> 
> On Wed, May 24, 2017 at 9:04 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> This ensures that adjustments to x86_platform done by the hypervisor
>> setup is already respected by this simple calibration.
>>
>> The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk:
>> Add support for earlyprintk via USB3 debug port"), comes much later
>> into play.
>>
> 
> Can you elaborate a bit what is the issue you are experience?

I stumbled over this while rebasing the patches to boot Linux over the
Jailhouse hypervisor (as non-root cell). Those come with hypervisor
setup code that changes relevant callbacks because Jailhouse does not
virtualize most of the platform devices and simply denies access.

While these patches are still out-of-tree (will propose later this
year), the issue seen here is conceptual: e.g., calibration is pointless
if the hypervisor has a PV channel to report the required parameters -
like vmware.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

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

end of thread, other threads:[~2017-05-28 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 18:04 [PATCH] x86/timers: Move simple_udelay_calibration past init_hypervisor_platform Jan Kiszka
2017-05-25  1:38 ` Lu Baolu
2017-05-26 11:06 ` [tip:x86/urgent] " tip-bot for Jan Kiszka
2017-05-26 23:04 ` [PATCH] " Andy Shevchenko
2017-05-28 16:41   ` Jan Kiszka

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