All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <mike.travis@hpe.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Hedi Berriche <hedi@sgi.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Borislav Petkov <bp@alien8.de>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Ram Pai <linuxram@us.ibm.com>, Juergen Gross <jgross@suse.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>, Petr Tesarik <ptesarik@suse.cz>,
	Sinan Kaya <okaya@codeaurora.org>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Hedi Berriche <hedi.berriche@hpe.com>
Subject: Re: [PATCH 2/2] x86/tsc: Fix UV TSC initialization
Date: Tue, 2 Oct 2018 07:21:53 -0700	[thread overview]
Message-ID: <5caf531c-cc73-57d9-931d-c433ec1baddc@hpe.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1810020820430.32062@nanos.tec.linutronix.de>



On 10/1/2018 11:22 PM, Thomas Gleixner wrote:
> 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.

Will do, thanks.

> 
> Thanks,
> 
> 	tglx
> 

  reply	other threads:[~2018-10-02 14:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  1:22 [PATCH 0/2] Fix community TSC ADJUST breakage causing TSC failure Mike Travis
2018-10-02  1:22 ` [PATCH 1/2] x86/platform/uv: Add is_early_uv_system check Mike Travis
2018-10-02  6:20   ` Thomas Gleixner
2018-10-02 14:20     ` Mike Travis
2018-10-02 14:23       ` Thomas Gleixner
2018-10-02  1:22 ` [PATCH 2/2] x86/tsc: Fix UV TSC initialization Mike Travis
2018-10-02  6:22   ` Thomas Gleixner
2018-10-02 14:21     ` Mike Travis [this message]
2018-10-02  6:24 ` [PATCH 0/2] Fix community TSC ADJUST breakage causing TSC failure Thomas Gleixner
2018-10-02 14:26   ` Travis, Mike
2018-10-02 14:28     ` Thomas Gleixner
2018-10-02 18:01 [PATCH 0/2] Fix " Mike Travis
2018-10-02 18:01 ` [PATCH 2/2] x86/tsc: Fix UV TSC initialization Mike Travis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5caf531c-cc73-57d9-931d-c433ec1baddc@hpe.com \
    --to=mike.travis@hpe.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hedi.berriche@hpe.com \
    --cc=hedi@sgi.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=mingo@redhat.com \
    --cc=okaya@codeaurora.org \
    --cc=pasha.tatashin@oracle.com \
    --cc=pombredanne@nexb.com \
    --cc=ptesarik@suse.cz \
    --cc=russ.anderson@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.