Hendrik Brueckner
9254e70c4e
s390/cpum_cf: use perf software context for hardware counters
On s390, there are two different hardware PMUs for counting and
sampling. Previously, both PMUs have shared the perf_hw_context
which is not correct and, recently, results in this warning:
------------[ cut here ]------------
WARNING: CPU: 5 PID: 1 at kernel/events/core.c:8485 perf_pmu_register+0x420/0x428
Modules linked in:
CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc1+ #2
task: 00000009c5240000 ti: 00000009c5234000 task.ti: 00000009c5234000
Krnl PSW : 0704c00180000000 0000000000220c50 (perf_pmu_register+0x420/0x428)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
Krnl GPRS: ffffffffffffffff 0000000000b15ac6 0000000000000000 00000009cb440000
000000000022087a 0000000000000000 0000000000b78fa0 0000000000000000
0000000000a9aa90 0000000000000084 0000000000000005 000000000088a97a
0000000000000004 0000000000749dd0 000000000022087a 00000009c5237cc0
Krnl Code: 0000000000220c44: a7f4ff54 brc 15,220aec
0000000000220c48: 92011000 mvi 0(%r1),1
#0000000000220c4c: a7f40001 brc 15,220c4e
>0000000000220c50: a7f4ff12 brc 15,220a74
0000000000220c54: 0707 bcr 0,%r7
0000000000220c56: 0707 bcr 0,%r7
0000000000220c58: ebdff0800024 stmg %r13,%r15,128(%r15)
0000000000220c5e: a7f13fe0 tmll %r15,16352
Call Trace:
([<000000000022087a>] perf_pmu_register+0x4a/0x428)
([<0000000000b2c25c>] init_cpum_sampling_pmu+0x14c/0x1f8)
([<0000000000100248>] do_one_initcall+0x48/0x140)
([<0000000000b25d26>] kernel_init_freeable+0x1e6/0x2a0)
([<000000000072bda4>] kernel_init+0x24/0x138)
([<000000000073495e>] kernel_thread_starter+0x6/0xc)
([<0000000000734958>] kernel_thread_starter+0x0/0xc)
Last Breaking-Event-Address:
[<0000000000220c4c>] perf_pmu_register+0x41c/0x428
---[ end trace 0c6ef9f5b771ad97 ]---
Using the perf_sw_context is an option because the cpum_cf PMU does
not use interrupts. To make this more clear, initialize the
capabilities in the PMU structure.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-06-16 12:08:49 +02:00
..
2016-01-11 13:01:24 +01:00
2016-01-11 13:01:24 +01:00
2012-05-16 14:42:41 +02:00
2016-03-08 15:00:15 +01:00
2007-10-12 16:13:06 +02:00
2007-10-12 16:13:06 +02:00
2015-06-25 09:39:26 +02:00
2016-05-10 13:24:49 +02:00
2007-10-12 16:13:06 +02:00
2014-12-05 17:19:27 -06:00
2014-10-09 09:14:13 +02:00
2011-01-05 12:47:31 +01:00
2016-02-22 09:29:35 +01:00
2016-01-19 12:14:02 +01:00
2016-03-07 13:12:04 +01:00
2016-05-10 13:24:50 +02:00
2016-03-07 13:12:04 +01:00
2015-11-09 09:10:47 +01:00
2016-03-02 06:44:25 -06:00
2016-05-04 16:29:45 +02:00
2016-02-09 12:03:25 +01:00
2012-07-20 11:15:04 +02:00
2016-05-10 13:24:51 +02:00
2016-03-10 14:35:42 +01:00
2016-01-19 12:14:03 +01:00
2016-03-08 10:38:06 +01:00
2015-03-25 11:49:33 +01:00
2015-12-18 14:59:21 +01:00
2014-12-08 09:42:32 +01:00
2016-01-19 12:14:02 +01:00
2016-02-23 08:56:18 +01:00
2015-09-03 15:46:07 -07:00
2016-01-19 12:14:03 +01:00
2012-09-26 15:45:12 +02:00
2016-05-23 17:04:14 -07:00
2015-12-30 10:34:57 +01:00
2015-01-29 09:19:25 +01:00
2016-04-01 15:00:11 +02:00
2015-10-27 09:33:57 +01:00
2015-11-27 09:24:12 +01:00
2013-12-16 14:37:50 +01:00
2016-06-16 12:08:49 +02:00
2016-05-03 09:25:46 +02:00
2016-05-16 23:11:50 -03:00
2015-03-25 11:49:33 +01:00
2016-05-20 17:58:30 -07:00
2016-05-10 13:24:52 +02:00
2016-01-19 12:14:03 +01:00
2015-11-27 09:24:14 +01:00
2015-03-25 11:49:34 +01:00
2015-11-03 14:40:51 +01:00
2015-10-16 09:41:12 +02:00
2015-11-27 09:24:17 +01:00
2016-04-21 09:51:15 +02:00
2016-01-19 12:14:02 +01:00
2016-05-06 14:58:22 +02:00
2016-02-23 08:56:20 +01:00
2015-06-08 07:55:03 -05:00
2015-09-17 13:43:41 +02:00
2015-03-25 11:49:33 +01:00
2016-04-01 08:42:38 +02:00
2016-01-11 12:27:00 +01:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-02-11 13:05:56 +01:00
2016-03-02 06:44:27 -06:00
2015-03-25 11:49:47 +01:00
2016-05-23 17:04:14 -07:00
2016-03-25 16:37:42 -07:00
2016-05-10 13:24:51 +02:00