diff options
| author | Olof Johansson <olof@lixom.net> | 2011-12-15 22:02:34 -0800 | 
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2011-12-15 22:02:34 -0800 | 
| commit | 02735a29d8ce882ec698803f064e17888874780c (patch) | |
| tree | 6a4afa3bc8b6d4334df24910a56f77adf126b0c7 /arch/x86/kernel/cpu/perf_event_amd_ibs.c | |
| parent | 8d685b7f4d9c9882442bf1b492558d5f17b694fa (diff) | |
| parent | 3d911ad22e8405c1a333a6812e405cb1a5ae9829 (diff) | |
| download | olio-linux-3.10-02735a29d8ce882ec698803f064e17888874780c.tar.xz olio-linux-3.10-02735a29d8ce882ec698803f064e17888874780c.zip  | |
Merge branch 'at91/defconfig' into next/cleanup
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_amd_ibs.c')
| -rw-r--r-- | arch/x86/kernel/cpu/perf_event_amd_ibs.c | 29 | 
1 files changed, 18 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c index ab6343d2182..3b8a2d30d14 100644 --- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c +++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c @@ -199,8 +199,7 @@ static int force_ibs_eilvt_setup(void)  		goto out;  	} -	pr_err(FW_BUG "using offset %d for IBS interrupts\n", offset); -	pr_err(FW_BUG "workaround enabled for IBS LVT offset\n"); +	pr_info("IBS: LVT offset %d assigned\n", offset);  	return 0;  out: @@ -265,19 +264,23 @@ perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *h  static __init int amd_ibs_init(void)  {  	u32 caps; -	int ret; +	int ret = -EINVAL;  	caps = __get_ibs_caps();  	if (!caps)  		return -ENODEV;	/* ibs not supported by the cpu */ -	if (!ibs_eilvt_valid()) { -		ret = force_ibs_eilvt_setup(); -		if (ret) { -			pr_err("Failed to setup IBS, %d\n", ret); -			return ret; -		} -	} +	/* +	 * 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;  	get_online_cpus();  	ibs_caps = caps; @@ -287,7 +290,11 @@ static __init int amd_ibs_init(void)  	smp_call_function(setup_APIC_ibs, NULL, 1);  	put_online_cpus(); -	return perf_event_ibs_init(); +	ret = perf_event_ibs_init(); +out: +	if (ret) +		pr_err("Failed to setup IBS, %d\n", ret); +	return ret;  }  /* Since we need the pci subsystem to init ibs we can't do this earlier: */  |