@@ -35,6 +35,7 @@ ssize_t hisi_format_sysfs_show(struct device *dev,
35
35
36
36
return sprintf (buf , "%s\n" , (char * )eattr -> var );
37
37
}
38
+ EXPORT_SYMBOL_GPL (hisi_format_sysfs_show );
38
39
39
40
/*
40
41
* PMU event attributes
@@ -48,6 +49,7 @@ ssize_t hisi_event_sysfs_show(struct device *dev,
48
49
49
50
return sprintf (page , "config=0x%lx\n" , (unsigned long )eattr -> var );
50
51
}
52
+ EXPORT_SYMBOL_GPL (hisi_event_sysfs_show );
51
53
52
54
/*
53
55
* sysfs cpumask attributes. For uncore PMU, we only have a single CPU to show
@@ -59,6 +61,7 @@ ssize_t hisi_cpumask_sysfs_show(struct device *dev,
59
61
60
62
return sprintf (buf , "%d\n" , hisi_pmu -> on_cpu );
61
63
}
64
+ EXPORT_SYMBOL_GPL (hisi_cpumask_sysfs_show );
62
65
63
66
static bool hisi_validate_event_group (struct perf_event * event )
64
67
{
@@ -97,6 +100,7 @@ int hisi_uncore_pmu_counter_valid(struct hisi_pmu *hisi_pmu, int idx)
97
100
{
98
101
return idx >= 0 && idx < hisi_pmu -> num_counters ;
99
102
}
103
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_counter_valid );
100
104
101
105
int hisi_uncore_pmu_get_event_idx (struct perf_event * event )
102
106
{
@@ -113,6 +117,7 @@ int hisi_uncore_pmu_get_event_idx(struct perf_event *event)
113
117
114
118
return idx ;
115
119
}
120
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_get_event_idx );
116
121
117
122
static void hisi_uncore_pmu_clear_event_idx (struct hisi_pmu * hisi_pmu , int idx )
118
123
{
@@ -173,6 +178,7 @@ int hisi_uncore_pmu_event_init(struct perf_event *event)
173
178
174
179
return 0 ;
175
180
}
181
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_event_init );
176
182
177
183
/*
178
184
* Set the counter to count the event that we're interested in,
@@ -220,6 +226,7 @@ void hisi_uncore_pmu_set_event_period(struct perf_event *event)
220
226
/* Write start value to the hardware event counter */
221
227
hisi_pmu -> ops -> write_counter (hisi_pmu , hwc , val );
222
228
}
229
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_set_event_period );
223
230
224
231
void hisi_uncore_pmu_event_update (struct perf_event * event )
225
232
{
@@ -240,6 +247,7 @@ void hisi_uncore_pmu_event_update(struct perf_event *event)
240
247
HISI_MAX_PERIOD (hisi_pmu -> counter_bits );
241
248
local64_add (delta , & event -> count );
242
249
}
250
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_event_update );
243
251
244
252
void hisi_uncore_pmu_start (struct perf_event * event , int flags )
245
253
{
@@ -262,6 +270,7 @@ void hisi_uncore_pmu_start(struct perf_event *event, int flags)
262
270
hisi_uncore_pmu_enable_event (event );
263
271
perf_event_update_userpage (event );
264
272
}
273
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_start );
265
274
266
275
void hisi_uncore_pmu_stop (struct perf_event * event , int flags )
267
276
{
@@ -278,6 +287,7 @@ void hisi_uncore_pmu_stop(struct perf_event *event, int flags)
278
287
hisi_uncore_pmu_event_update (event );
279
288
hwc -> state |= PERF_HES_UPTODATE ;
280
289
}
290
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_stop );
281
291
282
292
int hisi_uncore_pmu_add (struct perf_event * event , int flags )
283
293
{
@@ -300,6 +310,7 @@ int hisi_uncore_pmu_add(struct perf_event *event, int flags)
300
310
301
311
return 0 ;
302
312
}
313
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_add );
303
314
304
315
void hisi_uncore_pmu_del (struct perf_event * event , int flags )
305
316
{
@@ -311,12 +322,14 @@ void hisi_uncore_pmu_del(struct perf_event *event, int flags)
311
322
perf_event_update_userpage (event );
312
323
hisi_pmu -> pmu_events .hw_events [hwc -> idx ] = NULL ;
313
324
}
325
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_del );
314
326
315
327
void hisi_uncore_pmu_read (struct perf_event * event )
316
328
{
317
329
/* Read hardware counter and update the perf counter statistics */
318
330
hisi_uncore_pmu_event_update (event );
319
331
}
332
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_read );
320
333
321
334
void hisi_uncore_pmu_enable (struct pmu * pmu )
322
335
{
@@ -329,13 +342,15 @@ void hisi_uncore_pmu_enable(struct pmu *pmu)
329
342
330
343
hisi_pmu -> ops -> start_counters (hisi_pmu );
331
344
}
345
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_enable );
332
346
333
347
void hisi_uncore_pmu_disable (struct pmu * pmu )
334
348
{
335
349
struct hisi_pmu * hisi_pmu = to_hisi_pmu (pmu );
336
350
337
351
hisi_pmu -> ops -> stop_counters (hisi_pmu );
338
352
}
353
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_disable );
339
354
340
355
341
356
/*
@@ -414,10 +429,11 @@ int hisi_uncore_pmu_online_cpu(unsigned int cpu, struct hlist_node *node)
414
429
hisi_pmu -> on_cpu = cpu ;
415
430
416
431
/* Overflow interrupt also should use the same CPU */
417
- WARN_ON (irq_set_affinity (hisi_pmu -> irq , cpumask_of (cpu )));
432
+ WARN_ON (irq_set_affinity_hint (hisi_pmu -> irq , cpumask_of (cpu )));
418
433
419
434
return 0 ;
420
435
}
436
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_online_cpu );
421
437
422
438
int hisi_uncore_pmu_offline_cpu (unsigned int cpu , struct hlist_node * node )
423
439
{
@@ -446,7 +462,10 @@ int hisi_uncore_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
446
462
perf_pmu_migrate_context (& hisi_pmu -> pmu , cpu , target );
447
463
/* Use this CPU for event counting */
448
464
hisi_pmu -> on_cpu = target ;
449
- WARN_ON (irq_set_affinity (hisi_pmu -> irq , cpumask_of (target )));
465
+ WARN_ON (irq_set_affinity_hint (hisi_pmu -> irq , cpumask_of (target )));
450
466
451
467
return 0 ;
452
468
}
469
+ EXPORT_SYMBOL_GPL (hisi_uncore_pmu_offline_cpu );
470
+
471
+ MODULE_LICENSE ("GPL v2" );
0 commit comments