blob: 208c9546e8f0252bba427b51f0a2745a69042238 [file] [log] [blame]
Mischa Jonker0dd450f2013-11-07 14:55:11 +01001/*
2 * Linux performance counter support for ARC700 series
3 *
Vineet Guptafb7c5722015-08-24 13:37:01 +03004 * Copyright (C) 2013-2015 Synopsys, Inc. (www.synopsys.com)
Mischa Jonker0dd450f2013-11-07 14:55:11 +01005 *
6 * This code is inspired by the perf support of various other architectures.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13#include <linux/errno.h>
Alexey Brodkin36481cf2015-08-24 13:48:06 +030014#include <linux/interrupt.h>
Mischa Jonker0dd450f2013-11-07 14:55:11 +010015#include <linux/module.h>
16#include <linux/of.h>
17#include <linux/perf_event.h>
18#include <linux/platform_device.h>
19#include <asm/arcregs.h>
Vineet Gupta389e3162013-11-12 11:00:03 +010020#include <asm/stacktrace.h>
Mischa Jonker0dd450f2013-11-07 14:55:11 +010021
22struct arc_pmu {
23 struct pmu pmu;
Mischa Jonker0dd450f2013-11-07 14:55:11 +010024 int n_counters;
Vineet Guptafb7c5722015-08-24 13:37:01 +030025 unsigned long used_mask[BITS_TO_LONGS(ARC_PERF_MAX_COUNTERS)];
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +030026 u64 max_period;
Mischa Jonker0dd450f2013-11-07 14:55:11 +010027 int ev_hw_idx[PERF_COUNT_ARC_HW_MAX];
Alexey Brodkin36481cf2015-08-24 13:48:06 +030028 struct perf_event *act_counter[ARC_PERF_MAX_COUNTERS];
Mischa Jonker0dd450f2013-11-07 14:55:11 +010029};
30
Vineet Gupta389e3162013-11-12 11:00:03 +010031struct arc_callchain_trace {
32 int depth;
33 void *perf_stuff;
34};
35
36static int callchain_trace(unsigned int addr, void *data)
37{
38 struct arc_callchain_trace *ctrl = data;
39 struct perf_callchain_entry *entry = ctrl->perf_stuff;
40 perf_callchain_store(entry, addr);
41
42 if (ctrl->depth++ < 3)
43 return 0;
44
45 return -1;
46}
47
48void
49perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs)
50{
51 struct arc_callchain_trace ctrl = {
52 .depth = 0,
53 .perf_stuff = entry,
54 };
55
56 arc_unwind_core(NULL, regs, callchain_trace, &ctrl);
57}
58
Vineet Gupta22f6b892013-07-12 15:55:54 +020059void
60perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
61{
62 /*
63 * User stack can't be unwound trivially with kernel dwarf unwinder
64 * So for now just record the user PC
65 */
66 perf_callchain_store(entry, instruction_pointer(regs));
67}
68
Vineet Gupta03c94fc2014-11-17 17:13:03 +053069static struct arc_pmu *arc_pmu;
70
Mischa Jonker0dd450f2013-11-07 14:55:11 +010071/* read counter #idx; note that counter# != event# on ARC! */
72static uint64_t arc_pmu_read_counter(int idx)
73{
74 uint32_t tmp;
75 uint64_t result;
76
77 /*
78 * ARC supports making 'snapshots' of the counters, so we don't
79 * need to care about counters wrapping to 0 underneath our feet
80 */
81 write_aux_reg(ARC_REG_PCT_INDEX, idx);
82 tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
83 write_aux_reg(ARC_REG_PCT_CONTROL, tmp | ARC_REG_PCT_CONTROL_SN);
84 result = (uint64_t) (read_aux_reg(ARC_REG_PCT_SNAPH)) << 32;
85 result |= read_aux_reg(ARC_REG_PCT_SNAPL);
86
87 return result;
88}
89
90static void arc_perf_event_update(struct perf_event *event,
91 struct hw_perf_event *hwc, int idx)
92{
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +030093 uint64_t prev_raw_count = local64_read(&hwc->prev_count);
94 uint64_t new_raw_count = arc_pmu_read_counter(idx);
95 int64_t delta = new_raw_count - prev_raw_count;
Mischa Jonker0dd450f2013-11-07 14:55:11 +010096
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +030097 /*
98 * We don't afaraid of hwc->prev_count changing beneath our feet
99 * because there's no way for us to re-enter this function anytime.
100 */
101 local64_set(&hwc->prev_count, new_raw_count);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100102 local64_add(delta, &event->count);
103 local64_sub(delta, &hwc->period_left);
104}
105
106static void arc_pmu_read(struct perf_event *event)
107{
108 arc_perf_event_update(event, &event->hw, event->hw.idx);
109}
110
111static int arc_pmu_cache_event(u64 config)
112{
113 unsigned int cache_type, cache_op, cache_result;
114 int ret;
115
116 cache_type = (config >> 0) & 0xff;
117 cache_op = (config >> 8) & 0xff;
118 cache_result = (config >> 16) & 0xff;
119 if (cache_type >= PERF_COUNT_HW_CACHE_MAX)
120 return -EINVAL;
Vineet Guptada990a42013-11-28 15:49:59 +0530121 if (cache_op >= PERF_COUNT_HW_CACHE_OP_MAX)
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100122 return -EINVAL;
Vineet Guptada990a42013-11-28 15:49:59 +0530123 if (cache_result >= PERF_COUNT_HW_CACHE_RESULT_MAX)
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100124 return -EINVAL;
125
126 ret = arc_pmu_cache_map[cache_type][cache_op][cache_result];
127
128 if (ret == CACHE_OP_UNSUPPORTED)
129 return -ENOENT;
130
Vineet Guptabde80c22015-04-15 19:44:07 +0530131 pr_debug("init cache event: type/op/result %d/%d/%d with h/w %d \'%s\'\n",
132 cache_type, cache_op, cache_result, ret,
133 arc_pmu_ev_hw_map[ret]);
134
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100135 return ret;
136}
137
138/* initializes hw_perf_event structure if event is supported */
139static int arc_pmu_event_init(struct perf_event *event)
140{
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100141 struct hw_perf_event *hwc = &event->hw;
142 int ret;
143
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300144 if (!is_sampling_event(event)) {
145 hwc->sample_period = arc_pmu->max_period;
146 hwc->last_period = hwc->sample_period;
147 local64_set(&hwc->period_left, hwc->sample_period);
148 }
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300149
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100150 switch (event->attr.type) {
151 case PERF_TYPE_HARDWARE:
152 if (event->attr.config >= PERF_COUNT_HW_MAX)
153 return -ENOENT;
154 if (arc_pmu->ev_hw_idx[event->attr.config] < 0)
155 return -ENOENT;
156 hwc->config = arc_pmu->ev_hw_idx[event->attr.config];
Vineet Guptabde80c22015-04-15 19:44:07 +0530157 pr_debug("init event %d with h/w %d \'%s\'\n",
158 (int) event->attr.config, (int) hwc->config,
159 arc_pmu_ev_hw_map[event->attr.config]);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100160 return 0;
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300161
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100162 case PERF_TYPE_HW_CACHE:
163 ret = arc_pmu_cache_event(event->attr.config);
164 if (ret < 0)
165 return ret;
166 hwc->config = arc_pmu->ev_hw_idx[ret];
167 return 0;
168 default:
169 return -ENOENT;
170 }
171}
172
173/* starts all counters */
174static void arc_pmu_enable(struct pmu *pmu)
175{
176 uint32_t tmp;
177 tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
178 write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x1);
179}
180
181/* stops all counters */
182static void arc_pmu_disable(struct pmu *pmu)
183{
184 uint32_t tmp;
185 tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
186 write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x0);
187}
188
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300189static int arc_pmu_event_set_period(struct perf_event *event)
190{
191 struct hw_perf_event *hwc = &event->hw;
192 s64 left = local64_read(&hwc->period_left);
193 s64 period = hwc->sample_period;
194 int idx = hwc->idx;
195 int overflow = 0;
196 u64 value;
197
198 if (unlikely(left <= -period)) {
199 /* left underflowed by more than period. */
200 left = period;
201 local64_set(&hwc->period_left, left);
202 hwc->last_period = period;
203 overflow = 1;
204 } else if (unlikely(left <= 0)) {
205 /* left underflowed by less than period. */
206 left += period;
207 local64_set(&hwc->period_left, left);
208 hwc->last_period = period;
209 overflow = 1;
210 }
211
212 if (left > arc_pmu->max_period)
213 left = arc_pmu->max_period;
214
215 value = arc_pmu->max_period - left;
216 local64_set(&hwc->prev_count, value);
217
218 /* Select counter */
219 write_aux_reg(ARC_REG_PCT_INDEX, idx);
220
221 /* Write value */
222 write_aux_reg(ARC_REG_PCT_COUNTL, (u32)value);
223 write_aux_reg(ARC_REG_PCT_COUNTH, (value >> 32));
224
225 perf_event_update_userpage(event);
226
227 return overflow;
228}
229
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100230/*
231 * Assigns hardware counter to hardware condition.
232 * Note that there is no separate start/stop mechanism;
233 * stopping is achieved by assigning the 'never' condition
234 */
235static void arc_pmu_start(struct perf_event *event, int flags)
236{
237 struct hw_perf_event *hwc = &event->hw;
238 int idx = hwc->idx;
239
240 if (WARN_ON_ONCE(idx == -1))
241 return;
242
243 if (flags & PERF_EF_RELOAD)
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300244 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE));
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100245
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300246 hwc->state = 0;
247
248 arc_pmu_event_set_period(event);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100249
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300250 /* Enable interrupt for this counter */
251 if (is_sampling_event(event))
252 write_aux_reg(ARC_REG_PCT_INT_CTRL,
253 read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
254
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100255 /* enable ARC pmu here */
Vineet Gupta09074952015-08-19 17:23:58 +0530256 write_aux_reg(ARC_REG_PCT_INDEX, idx); /* counter # */
257 write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); /* condition */
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100258}
259
260static void arc_pmu_stop(struct perf_event *event, int flags)
261{
262 struct hw_perf_event *hwc = &event->hw;
263 int idx = hwc->idx;
264
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300265 /* Disable interrupt for this counter */
266 if (is_sampling_event(event)) {
267 /*
268 * Reset interrupt flag by writing of 1. This is required
269 * to make sure pending interrupt was not left.
270 */
271 write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
272 write_aux_reg(ARC_REG_PCT_INT_CTRL,
273 read_aux_reg(ARC_REG_PCT_INT_CTRL) & ~(1 << idx));
274 }
275
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100276 if (!(event->hw.state & PERF_HES_STOPPED)) {
277 /* stop ARC pmu here */
278 write_aux_reg(ARC_REG_PCT_INDEX, idx);
279
280 /* condition code #0 is always "never" */
281 write_aux_reg(ARC_REG_PCT_CONFIG, 0);
282
283 event->hw.state |= PERF_HES_STOPPED;
284 }
285
286 if ((flags & PERF_EF_UPDATE) &&
287 !(event->hw.state & PERF_HES_UPTODATE)) {
288 arc_perf_event_update(event, &event->hw, idx);
289 event->hw.state |= PERF_HES_UPTODATE;
290 }
291}
292
293static void arc_pmu_del(struct perf_event *event, int flags)
294{
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100295 arc_pmu_stop(event, PERF_EF_UPDATE);
296 __clear_bit(event->hw.idx, arc_pmu->used_mask);
297
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300298 arc_pmu->act_counter[event->hw.idx] = 0;
299
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100300 perf_event_update_userpage(event);
301}
302
303/* allocate hardware counter and optionally start counting */
304static int arc_pmu_add(struct perf_event *event, int flags)
305{
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100306 struct hw_perf_event *hwc = &event->hw;
307 int idx = hwc->idx;
308
309 if (__test_and_set_bit(idx, arc_pmu->used_mask)) {
310 idx = find_first_zero_bit(arc_pmu->used_mask,
311 arc_pmu->n_counters);
312 if (idx == arc_pmu->n_counters)
313 return -EAGAIN;
314
315 __set_bit(idx, arc_pmu->used_mask);
316 hwc->idx = idx;
317 }
318
319 write_aux_reg(ARC_REG_PCT_INDEX, idx);
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300320
321 arc_pmu->act_counter[idx] = event;
322
323 if (is_sampling_event(event)) {
324 /* Mimic full counter overflow as other arches do */
325 write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
326 write_aux_reg(ARC_REG_PCT_INT_CNTH,
327 (arc_pmu->max_period >> 32));
328 }
329
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100330 write_aux_reg(ARC_REG_PCT_CONFIG, 0);
331 write_aux_reg(ARC_REG_PCT_COUNTL, 0);
332 write_aux_reg(ARC_REG_PCT_COUNTH, 0);
333 local64_set(&hwc->prev_count, 0);
334
335 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED;
336 if (flags & PERF_EF_START)
337 arc_pmu_start(event, PERF_EF_RELOAD);
338
339 perf_event_update_userpage(event);
340
341 return 0;
342}
343
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300344#ifdef CONFIG_ISA_ARCV2
345static irqreturn_t arc_pmu_intr(int irq, void *dev)
346{
347 struct perf_sample_data data;
348 struct arc_pmu *arc_pmu = (struct arc_pmu *)dev;
349 struct pt_regs *regs;
350 int active_ints;
351 int idx;
352
353 arc_pmu_disable(&arc_pmu->pmu);
354
355 active_ints = read_aux_reg(ARC_REG_PCT_INT_ACT);
356
357 regs = get_irq_regs();
358
359 for (idx = 0; idx < arc_pmu->n_counters; idx++) {
360 struct perf_event *event = arc_pmu->act_counter[idx];
361 struct hw_perf_event *hwc;
362
363 if (!(active_ints & (1 << idx)))
364 continue;
365
366 /* Reset interrupt flag by writing of 1 */
367 write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
368
369 /*
370 * On reset of "interrupt active" bit corresponding
371 * "interrupt enable" bit gets automatically reset as well.
372 * Now we need to re-enable interrupt for the counter.
373 */
374 write_aux_reg(ARC_REG_PCT_INT_CTRL,
375 read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
376
377 hwc = &event->hw;
378
379 WARN_ON_ONCE(hwc->idx != idx);
380
381 arc_perf_event_update(event, &event->hw, event->hw.idx);
382 perf_sample_data_init(&data, 0, hwc->last_period);
383 if (!arc_pmu_event_set_period(event))
384 continue;
385
386 if (perf_event_overflow(event, &data, regs))
387 arc_pmu_stop(event, 0);
388 }
389
390 arc_pmu_enable(&arc_pmu->pmu);
391
392 return IRQ_HANDLED;
393}
394#else
395
396static irqreturn_t arc_pmu_intr(int irq, void *dev)
397{
398 return IRQ_NONE;
399}
400
401#endif /* CONFIG_ISA_ARCV2 */
402
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100403static int arc_pmu_device_probe(struct platform_device *pdev)
404{
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100405 struct arc_reg_pct_build pct_bcr;
406 struct arc_reg_cc_build cc_bcr;
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300407 int i, j, has_interrupts;
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300408 int counter_size; /* in bits */
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100409
410 union cc_name {
411 struct {
412 uint32_t word0, word1;
413 char sentinel;
414 } indiv;
415 char str[9];
416 } cc_name;
417
418
419 READ_BCR(ARC_REG_PCT_BUILD, pct_bcr);
420 if (!pct_bcr.v) {
421 pr_err("This core does not have performance counters!\n");
422 return -ENODEV;
423 }
Vineet Guptafb7c5722015-08-24 13:37:01 +0300424 BUG_ON(pct_bcr.c > ARC_PERF_MAX_COUNTERS);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100425
Vineet Gupta56372082014-09-25 16:54:43 +0530426 READ_BCR(ARC_REG_CC_BUILD, cc_bcr);
Vineet Guptad8f6ad82015-04-20 16:49:30 +0530427 BUG_ON(!cc_bcr.v); /* Counters exist but No countable conditions ? */
Vineet Gupta56372082014-09-25 16:54:43 +0530428
429 arc_pmu = devm_kzalloc(&pdev->dev, sizeof(struct arc_pmu), GFP_KERNEL);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100430 if (!arc_pmu)
431 return -ENOMEM;
432
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300433 has_interrupts = is_isa_arcv2() ? pct_bcr.i : 0;
434
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100435 arc_pmu->n_counters = pct_bcr.c;
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300436 counter_size = 32 + (pct_bcr.s << 4);
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300437
Alexey Brodkin1fe8bfa2015-08-24 13:42:27 +0300438 arc_pmu->max_period = (1ULL << counter_size) / 2 - 1ULL;
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100439
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300440 pr_info("ARC perf\t: %d counters (%d bits), %d conditions%s\n",
441 arc_pmu->n_counters, counter_size, cc_bcr.c,
442 has_interrupts ? ", [overflow IRQ support]":"");
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100443
444 cc_name.str[8] = 0;
Vineet Guptabde80c22015-04-15 19:44:07 +0530445 for (i = 0; i < PERF_COUNT_ARC_HW_MAX; i++)
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100446 arc_pmu->ev_hw_idx[i] = -1;
447
Vineet Guptabde80c22015-04-15 19:44:07 +0530448 /* loop thru all available h/w condition indexes */
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100449 for (j = 0; j < cc_bcr.c; j++) {
450 write_aux_reg(ARC_REG_CC_INDEX, j);
451 cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0);
452 cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1);
Vineet Guptabde80c22015-04-15 19:44:07 +0530453
454 /* See if it has been mapped to a perf event_id */
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100455 for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
456 if (arc_pmu_ev_hw_map[i] &&
457 !strcmp(arc_pmu_ev_hw_map[i], cc_name.str) &&
458 strlen(arc_pmu_ev_hw_map[i])) {
Vineet Guptabde80c22015-04-15 19:44:07 +0530459 pr_debug("mapping perf event %2d to h/w event \'%8s\' (idx %d)\n",
460 i, cc_name.str, j);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100461 arc_pmu->ev_hw_idx[i] = j;
462 }
463 }
464 }
465
466 arc_pmu->pmu = (struct pmu) {
467 .pmu_enable = arc_pmu_enable,
468 .pmu_disable = arc_pmu_disable,
469 .event_init = arc_pmu_event_init,
470 .add = arc_pmu_add,
471 .del = arc_pmu_del,
472 .start = arc_pmu_start,
473 .stop = arc_pmu_stop,
474 .read = arc_pmu_read,
475 };
476
Alexey Brodkin36481cf2015-08-24 13:48:06 +0300477 if (has_interrupts) {
478 int irq = platform_get_irq(pdev, 0);
479
480 if (irq < 0) {
481 pr_err("Cannot get IRQ number for the platform\n");
482 return -ENODEV;
483 }
484
485 ret = devm_request_irq(&pdev->dev, irq, arc_pmu_intr, 0,
486 "arc-pmu", arc_pmu);
487 if (ret) {
488 pr_err("could not allocate PMU IRQ\n");
489 return ret;
490 }
491
492 /* Clean all pending interrupt flags */
493 write_aux_reg(ARC_REG_PCT_INT_ACT, 0xffffffff);
494 } else
495 arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
Vince Weaver2cc9e582014-06-15 02:00:18 -0400496
Tobias Klauser082ae1e2015-04-24 10:27:34 +0200497 return perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100498}
499
500#ifdef CONFIG_OF
501static const struct of_device_id arc_pmu_match[] = {
Vineet Gupta30fdd372015-04-15 16:35:38 +0530502 { .compatible = "snps,arc700-pct" },
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100503 {},
504};
505MODULE_DEVICE_TABLE(of, arc_pmu_match);
506#endif
507
508static struct platform_driver arc_pmu_driver = {
509 .driver = {
Vineet Gupta30fdd372015-04-15 16:35:38 +0530510 .name = "arc700-pct",
Mischa Jonker0dd450f2013-11-07 14:55:11 +0100511 .of_match_table = of_match_ptr(arc_pmu_match),
512 },
513 .probe = arc_pmu_device_probe,
514};
515
516module_platform_driver(arc_pmu_driver);
517
518MODULE_LICENSE("GPL");
519MODULE_AUTHOR("Mischa Jonker <mjonker@synopsys.com>");
520MODULE_DESCRIPTION("ARC PMU driver");