if i revert the commit: commit e07518e9ce84547ef7a81478dbd3fed1539726da Author: Robert Richter <r...@kernel.org> Date: Wed Jan 15 15:57:29 2014 +0100
perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h suspend/resume works for me again $ git branch -v * linux-3.2.y f453538 Linux 3.2.58 $ git diff-tree -R -p e07518e9ce84547ef7a81478dbd3fed1539726da (patch attached)
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c index ea34253..3b8a2d3 100644 --- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c +++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c @@ -9,7 +9,6 @@ #include <linux/perf_event.h> #include <linux/module.h> #include <linux/pci.h> -#include <linux/syscore_ops.h> #include <asm/apic.h> @@ -210,18 +209,6 @@ out: return ret; } -static void ibs_eilvt_setup(void) -{ - /* - * Force LVT offset assignment for family 10h: The offsets are - * not assigned by the BIOS for this family, so the OS is - * responsible for doing it. If the OS assignment fails, fall - * back to BIOS settings and try to setup this. - */ - if (boot_cpu_data.x86 == 0x10) - force_ibs_eilvt_setup(); -} - static inline int get_ibs_lvt_offset(void) { u64 val; @@ -257,36 +244,6 @@ static void clear_APIC_ibs(void *dummy) setup_APIC_eilvt(offset, 0, APIC_EILVT_MSG_FIX, 1); } -#ifdef CONFIG_PM - -static int perf_ibs_suspend(void) -{ - clear_APIC_ibs(NULL); - return 0; -} - -static void perf_ibs_resume(void) -{ - ibs_eilvt_setup(); - setup_APIC_ibs(NULL); -} - -static struct syscore_ops perf_ibs_syscore_ops = { - .resume = perf_ibs_resume, - .suspend = perf_ibs_suspend, -}; - -static void perf_ibs_pm_init(void) -{ - register_syscore_ops(&perf_ibs_syscore_ops); -} - -#else - -static inline void perf_ibs_pm_init(void) { } - -#endif - static int __cpuinit perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) { @@ -313,12 +270,18 @@ static __init int amd_ibs_init(void) if (!caps) return -ENODEV; /* ibs not supported by the cpu */ - ibs_eilvt_setup(); + /* + * Force LVT offset assignment for family 10h: The offsets are + * not assigned by the BIOS for this family, so the OS is + * responsible for doing it. If the OS assignment fails, fall + * back to BIOS settings and try to setup this. + */ + if (boot_cpu_data.x86 == 0x10) + force_ibs_eilvt_setup(); if (!ibs_eilvt_valid()) goto out; - perf_ibs_pm_init(); get_online_cpus(); ibs_caps = caps; /* make ibs_caps visible to other cpus: */
pgpW03HeRGKNp.pgp
Description: PGP signature