linux/arch/x86/kernel/cpu
Torsten Kaiser 8c6b79bb12 x86, microcode, AMD: Make cpu_has_amd_erratum() use the correct struct cpuinfo_x86
cpu_has_amd_erratum() is buggy, because it uses the per-cpu cpu_info
before it is filled by smp_store_boot_cpu_info() / smp_store_cpu_info().

If early microcode loading is enabled its collect_cpu_info_amd_early()
will fill ->x86 and so the fallback to boot_cpu_data is not used. But
->x86_vendor was not filled and is still X86_VENDOR_INTEL resulting in
no errata fixes getting applied and my system hangs on boot.

Using cpu_info in cpu_has_amd_erratum() is wrong anyway: its only
caller init_amd() will have a struct cpuinfo_x86 as parameter and the
set_cpu_bug() that is controlled by cpu_has_amd_erratum() also only uses
that struct.

So pass the struct cpuinfo_x86 from init_amd() to cpu_has_amd_erratum()
and the broken fallback can be dropped.

[ Boris: Drop WARN_ON() since we're called only from init_amd() ]

Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
2013-08-12 18:25:00 +02:00
..
mcheck x86/mce: Fix mce regression from recent cleanup 2013-07-29 11:23:27 -07:00
mtrr Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-07-09 16:04:31 -07:00
.gitignore
amd.c x86, microcode, AMD: Make cpu_has_amd_erratum() use the correct struct cpuinfo_x86 2013-08-12 18:25:00 +02:00
bugs_64.c
bugs.c x86: Get rid of ->hard_math and all the FPU asm fu 2013-06-06 14:32:04 -07:00
centaur.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
common.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
cpu.h
cyrix.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
hypervisor.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
intel_cacheinfo.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
intel.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
Makefile perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation 2013-06-19 13:04:53 +02:00
match.c
mkcapflags.sh
mshyperv.c
perf_event_amd_ibs.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
perf_event_amd_iommu.c perf/x86/amd: Do not print an error when the device is not present 2013-07-05 08:27:15 +02:00
perf_event_amd_iommu.h perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation 2013-06-19 13:04:53 +02:00
perf_event_amd_uncore.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
perf_event_amd.c perf/x86/amd: Rework AMD PMU init code 2013-05-28 09:13:55 +02:00
perf_event_intel_ds.c perf/x86: Disable PEBS-LL in intel_pmu_pebs_disable() 2013-06-26 21:58:51 +02:00
perf_event_intel_lbr.c perf/x86/intel: Support Haswell/v4 LBR format 2013-06-19 14:43:35 +02:00
perf_event_intel_uncore.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
perf_event_intel_uncore.h perf/x86/intel: Prevent some shift wrapping bugs in the Intel uncore driver 2013-05-28 09:13:52 +02:00
perf_event_intel.c perf/x86: Fix shared register mutual exclusion enforcement 2013-06-26 21:58:49 +02:00
perf_event_knc.c
perf_event_p4.c
perf_event_p6.c
perf_event.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
perf_event.h perf/x86: Fix shared register mutual exclusion enforcement 2013-06-26 21:58:49 +02:00
perfctr-watchdog.c
powerflags.c update AMD powerflags comments 2013-05-28 12:02:10 +02:00
proc.c x86: Get rid of ->hard_math and all the FPU asm fu 2013-06-06 14:32:04 -07:00
rdrand.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
scattered.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
topology.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
transmeta.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
umc.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
vmware.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00