lkml.org 
[lkml]   [2018]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] x86/tsc: Fix UV TSC initialization
On Mon, 1 Oct 2018, Mike Travis wrote:

> Fix regression introduced by
>
> commit cf7a63ef4e02 ("x86/tsc: Calibrate tsc only once")
>
> as it changed setup_arch() so that it now calls tsc_early_init() before
> acpi_boot_table_init() which is a necessary step, in the case of UV
> systems, to inform tsc_sanitize_first_cpu() that we're on a platform
> with async TSC resets as documented in
>
> commit 341102c3ef29 ("x86/tsc: Add option that TSC on Socket 0 being non-zero is valid")
>
> Fix by skipping tsc_early_init() on UV systems and let TSC initialization
> take place later in tsc_init().
>
> Fixes: cf7a63ef4e02 ("x86/tsc: Calibrate tsc only once")
> Signed-off-by: Mike Travis <mike.travis@hpe.com>
> Signed-off-by: Hedi Berriche <hedi.berriche@hpe.com>

See previous mail.

> Reviewed-by: Russ Anderson <rja@hpe.com>
> Reviewed-by: Dimitri Sivanich <sivanich@hpe.com>
> ---
> arch/x86/kernel/setup.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> --- linux.orig/arch/x86/kernel/setup.c
> +++ linux/arch/x86/kernel/setup.c
> @@ -117,6 +117,7 @@
> #include <asm/microcode.h>
> #include <asm/kaslr.h>
> #include <asm/unwind.h>
> +#include <asm/uv/uv.h>
>
> /*
> * max_low_pfn_mapped: highest direct mapped pfn under 4GB
> @@ -1015,7 +1016,10 @@ void __init setup_arch(char **cmdline_p)
> */
> init_hypervisor_platform();
>
> - tsc_early_init();
> + /* UV TSC multi-chassis synchronization already set, don't change it */
> + if (!is_early_uv_system())
> + tsc_early_init();

tsc_early_init() has already a check which makes it not invoke the
calibration code, so please put your uv check into that.

Thanks,

tglx

\
 
 \ /
  Last update: 2018-10-02 08:28    [W:0.167 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site