From: Bin Meng Date: Wed, 26 Jul 2017 03:12:01 +0000 (-0700) Subject: x86: tsc: Identify Intel-specific code X-Git-Tag: v2017.09-rc2~135^2~32 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b992e4932303b0a379f590f67ec9759fc97275e;p=u-boot x86: tsc: Identify Intel-specific code try_msr_calibrate_tsc() is currently Intel-specific, and should not execute on any other vendor's parts. This keeps in sync with Linux kernel commit: ba82683: x86/tsc_msr: Identify Intel-specific code Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index ffbc7091fa..4d01c9bce7 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,9 @@ static unsigned long __maybe_unused try_msr_calibrate_tsc(void) unsigned long res; int cpu_index; + if (gd->arch.x86_vendor != X86_VENDOR_INTEL) + return 0; + cpu_index = match_cpu(gd->arch.x86, gd->arch.x86_model); if (cpu_index < 0) return 0;