@@ -189,20 +189,20 @@ static struct attribute *attrs_empty[] = {
189
189
* "events" group (with empty attrs) before updating
190
190
* it with detected events.
191
191
*/
192
- static struct attribute_group core_events_attr_group = {
192
+ static struct attribute_group cstate_events_attr_group = {
193
193
.name = "events" ,
194
194
.attrs = attrs_empty ,
195
195
};
196
196
197
- DEFINE_CSTATE_FORMAT_ATTR (core_event , event , "config:0-63" );
198
- static struct attribute * core_format_attrs [] = {
199
- & format_attr_core_event .attr ,
197
+ DEFINE_CSTATE_FORMAT_ATTR (cstate_event , event , "config:0-63" );
198
+ static struct attribute * cstate_format_attrs [] = {
199
+ & format_attr_cstate_event .attr ,
200
200
NULL ,
201
201
};
202
202
203
- static struct attribute_group core_format_attr_group = {
203
+ static struct attribute_group cstate_format_attr_group = {
204
204
.name = "format" ,
205
- .attrs = core_format_attrs ,
205
+ .attrs = cstate_format_attrs ,
206
206
};
207
207
208
208
static cpumask_t cstate_core_cpu_mask ;
@@ -217,9 +217,9 @@ static struct attribute_group cpumask_attr_group = {
217
217
.attrs = cstate_cpumask_attrs ,
218
218
};
219
219
220
- static const struct attribute_group * core_attr_groups [] = {
221
- & core_events_attr_group ,
222
- & core_format_attr_group ,
220
+ static const struct attribute_group * cstate_attr_groups [] = {
221
+ & cstate_events_attr_group ,
222
+ & cstate_format_attr_group ,
223
223
& cpumask_attr_group ,
224
224
NULL ,
225
225
};
@@ -268,30 +268,8 @@ static struct perf_msr pkg_msr[] = {
268
268
[PERF_CSTATE_PKG_C10_RES ] = { MSR_PKG_C10_RESIDENCY , & group_cstate_pkg_c10 , test_msr },
269
269
};
270
270
271
- static struct attribute_group pkg_events_attr_group = {
272
- .name = "events" ,
273
- .attrs = attrs_empty ,
274
- };
275
-
276
- DEFINE_CSTATE_FORMAT_ATTR (pkg_event , event , "config:0-63" );
277
- static struct attribute * pkg_format_attrs [] = {
278
- & format_attr_pkg_event .attr ,
279
- NULL ,
280
- };
281
- static struct attribute_group pkg_format_attr_group = {
282
- .name = "format" ,
283
- .attrs = pkg_format_attrs ,
284
- };
285
-
286
271
static cpumask_t cstate_pkg_cpu_mask ;
287
272
288
- static const struct attribute_group * pkg_attr_groups [] = {
289
- & pkg_events_attr_group ,
290
- & pkg_format_attr_group ,
291
- & cpumask_attr_group ,
292
- NULL ,
293
- };
294
-
295
273
static ssize_t cstate_get_attr_cpumask (struct device * dev ,
296
274
struct device_attribute * attr ,
297
275
char * buf )
@@ -478,7 +456,7 @@ static const struct attribute_group *pkg_attr_update[] = {
478
456
};
479
457
480
458
static struct pmu cstate_core_pmu = {
481
- .attr_groups = core_attr_groups ,
459
+ .attr_groups = cstate_attr_groups ,
482
460
.attr_update = core_attr_update ,
483
461
.name = "cstate_core" ,
484
462
.task_ctx_nr = perf_invalid_context ,
@@ -493,7 +471,7 @@ static struct pmu cstate_core_pmu = {
493
471
};
494
472
495
473
static struct pmu cstate_pkg_pmu = {
496
- .attr_groups = pkg_attr_groups ,
474
+ .attr_groups = cstate_attr_groups ,
497
475
.attr_update = pkg_attr_update ,
498
476
.name = "cstate_pkg" ,
499
477
.task_ctx_nr = perf_invalid_context ,
0 commit comments