diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-12-06 00:42:35 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-12-06 00:43:49 -0500 |
| commit | d6c1c49de577fa292af2449817364b7d89b574d8 (patch) | |
| tree | e97cf88a318f50eb23c18d790e8b0bcf7bb47169 /arch/x86/kernel/cpu/perf_event_amd_ibs.c | |
| parent | 9dde9dc0a81c7aeb863b35121d09011f09b4897c (diff) | |
| parent | ddf6e0e50723b62ac76ed18eb53e9417c6eefba7 (diff) | |
Merge branch 'perf/urgent' into perf/core
Merge reason: Add these cherry-picked commits so that future changes
on perf/core don't conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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) | |||
| 199 | goto out; | 199 | goto out; |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | pr_err(FW_BUG "using offset %d for IBS interrupts\n", offset); | 202 | pr_info("IBS: LVT offset %d assigned\n", offset); |
| 203 | pr_err(FW_BUG "workaround enabled for IBS LVT offset\n"); | ||
| 204 | 203 | ||
| 205 | return 0; | 204 | return 0; |
| 206 | out: | 205 | out: |
| @@ -265,19 +264,23 @@ perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *h | |||
| 265 | static __init int amd_ibs_init(void) | 264 | static __init int amd_ibs_init(void) |
| 266 | { | 265 | { |
| 267 | u32 caps; | 266 | u32 caps; |
| 268 | int ret; | 267 | int ret = -EINVAL; |
| 269 | 268 | ||
| 270 | caps = __get_ibs_caps(); | 269 | caps = __get_ibs_caps(); |
| 271 | if (!caps) | 270 | if (!caps) |
| 272 | return -ENODEV; /* ibs not supported by the cpu */ | 271 | return -ENODEV; /* ibs not supported by the cpu */ |
| 273 | 272 | ||
| 274 | if (!ibs_eilvt_valid()) { | 273 | /* |
| 275 | ret = force_ibs_eilvt_setup(); | 274 | * Force LVT offset assignment for family 10h: The offsets are |
| 276 | if (ret) { | 275 | * not assigned by the BIOS for this family, so the OS is |
| 277 | pr_err("Failed to setup IBS, %d\n", ret); | 276 | * responsible for doing it. If the OS assignment fails, fall |
| 278 | return ret; | 277 | * back to BIOS settings and try to setup this. |
| 279 | } | 278 | */ |
| 280 | } | 279 | if (boot_cpu_data.x86 == 0x10) |
| 280 | force_ibs_eilvt_setup(); | ||
| 281 | |||
| 282 | if (!ibs_eilvt_valid()) | ||
| 283 | goto out; | ||
| 281 | 284 | ||
| 282 | get_online_cpus(); | 285 | get_online_cpus(); |
| 283 | ibs_caps = caps; | 286 | ibs_caps = caps; |
| @@ -287,7 +290,11 @@ static __init int amd_ibs_init(void) | |||
| 287 | smp_call_function(setup_APIC_ibs, NULL, 1); | 290 | smp_call_function(setup_APIC_ibs, NULL, 1); |
| 288 | put_online_cpus(); | 291 | put_online_cpus(); |
| 289 | 292 | ||
| 290 | return perf_event_ibs_init(); | 293 | ret = perf_event_ibs_init(); |
| 294 | out: | ||
| 295 | if (ret) | ||
| 296 | pr_err("Failed to setup IBS, %d\n", ret); | ||
| 297 | return ret; | ||
| 291 | } | 298 | } |
| 292 | 299 | ||
| 293 | /* Since we need the pci subsystem to init ibs we can't do this earlier: */ | 300 | /* Since we need the pci subsystem to init ibs we can't do this earlier: */ |
