android_kernel_google_msm/arch
Robert Richter 7e99f21684 perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h
commit bee09ed91c upstream.

On AMD family 10h we see following error messages while waking up from
S3 for all non-boot CPUs leading to a failed IBS initialization:

 Enabling non-boot CPUs ...
 smpboot: Booting Node 0 Processor 1 APIC 0x1
 [Firmware Bug]: cpu 1, try to use APIC500 (LVT offset 0) for vector 0x400, but the register is already in use for vector 0xf9 on another cpu
 perf: IBS APIC setup failed on cpu #1
 process: Switch to broadcast mode on CPU1
 CPU1 is up
 ...
 ACPI: Waking up from system sleep state S3

Reason for this is that during suspend the LVT offset for the IBS
vector gets lost and needs to be reinialized while resuming.

The offset is read from the IBSCTL msr. On family 10h the offset needs
to be 1 as offset 0 is used for the MCE threshold interrupt, but
firmware assings it for IBS to 0 too. The kernel needs to reprogram
the vector. The msr is a readonly node msr, but a new value can be
written via pci config space access. The reinitialization is
implemented for family 10h in setup_ibs_ctl() which is forced during
IBS setup.

This patch fixes IBS setup after waking up from S3 by adding
resume/supend hooks for the boot cpu which does the offset
reinitialization.

Marking it as stable to let distros pick up this fix.

Signed-off-by: Robert Richter <rric@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1389797849-5565-1-git-send-email-rric.net@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-29 05:10:42 -08:00
..
alpha alpha: makefile: don't enforce small data model for kernel builds 2013-08-20 08:26:28 -07:00
arm ARM: shmobile: mackerel: Fix coherent DMA mask 2014-01-15 15:27:11 -08:00
avr32 avr32: fix out-of-range jump in large kernels 2013-12-04 10:50:32 -08:00
blackfin blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c 2012-04-26 14:46:51 -04:00
c6x irq: Kill pointless irqd_to_hw export 2012-04-10 22:39:17 -06:00
cris cris: media platform drivers: fix build 2013-11-29 10:50:37 -08:00
frv frv: Use core allocator for task_struct 2013-08-20 08:26:28 -07:00
h8300 signal: Define __ARCH_HAS_SA_RESTORER so we know whether to clear sa_restorer 2013-04-05 10:04:14 -07:00
hexagon hexagon: add missing cpu.h include 2012-04-23 12:57:24 -05:00
ia64 exec/ptrace: fix get_dumpable() incorrect tests 2013-11-29 10:50:34 -08:00
m32r m32r: make memset() global for CONFIG_KERNEL_BZIP2=y 2013-09-14 06:02:11 -07:00
m68k m68k/atari: ARAnyM - Fix NatFeat module support 2013-08-20 08:26:29 -07:00
microblaze microblaze: Update microblaze defconfigs 2013-08-20 08:26:27 -07:00
mips MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000 2013-12-20 07:34:19 -08:00
mn10300 signal: Define __ARCH_HAS_SA_RESTORER so we know whether to clear sa_restorer 2013-04-05 10:04:14 -07:00
openrisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parisc parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM 2013-11-13 12:01:49 +09:00
powerpc powerpc: Align p_end 2014-01-08 09:42:11 -08:00
s390 s390: move dummy io_remap_pfn_range() to asm/pgtable.h 2013-08-04 16:26:03 +08:00
score score: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:55 +09:00
sh sh: always link in helper functions extracted from libgcc 2014-01-08 09:42:12 -08:00
sparc sparc32: Fix exit flag passed from traced sys_sigreturn 2013-10-13 15:42:49 -07:00
tile tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT 2013-10-13 15:42:50 -07:00
um um: add missing declaration of 'getrlimit()' and friends 2013-12-11 22:34:11 -08:00
unicore32 mm, show_mem: suppress page counts in non-blockable contexts 2013-10-13 15:42:49 -07:00
x86 perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h 2014-01-29 05:10:42 -08:00
xtensa xtensa: don't use alternate signal stack on threads 2013-11-13 12:01:49 +09:00
.gitignore
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-03-29 14:49:45 -07:00