@@ -189,20 +189,20 @@ static struct attribute *attrs_empty[] = {
189189 * "events" group (with empty attrs) before updating
190190 * it with detected events.
191191 */
192- static struct attribute_group core_events_attr_group = {
192+ static struct attribute_group cstate_events_attr_group = {
193193 .name = "events" ,
194194 .attrs = attrs_empty ,
195195};
196196
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 ,
200200 NULL ,
201201};
202202
203- static struct attribute_group core_format_attr_group = {
203+ static struct attribute_group cstate_format_attr_group = {
204204 .name = "format" ,
205- .attrs = core_format_attrs ,
205+ .attrs = cstate_format_attrs ,
206206};
207207
208208static cpumask_t cstate_core_cpu_mask ;
@@ -217,9 +217,9 @@ static struct attribute_group cpumask_attr_group = {
217217 .attrs = cstate_cpumask_attrs ,
218218};
219219
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 ,
223223 & cpumask_attr_group ,
224224 NULL ,
225225};
@@ -268,30 +268,8 @@ static struct perf_msr pkg_msr[] = {
268268 [PERF_CSTATE_PKG_C10_RES ] = { MSR_PKG_C10_RESIDENCY , & group_cstate_pkg_c10 , test_msr },
269269};
270270
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-
286271static cpumask_t cstate_pkg_cpu_mask ;
287272
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-
295273static ssize_t cstate_get_attr_cpumask (struct device * dev ,
296274 struct device_attribute * attr ,
297275 char * buf )
@@ -478,7 +456,7 @@ static const struct attribute_group *pkg_attr_update[] = {
478456};
479457
480458static struct pmu cstate_core_pmu = {
481- .attr_groups = core_attr_groups ,
459+ .attr_groups = cstate_attr_groups ,
482460 .attr_update = core_attr_update ,
483461 .name = "cstate_core" ,
484462 .task_ctx_nr = perf_invalid_context ,
@@ -493,7 +471,7 @@ static struct pmu cstate_core_pmu = {
493471};
494472
495473static struct pmu cstate_pkg_pmu = {
496- .attr_groups = pkg_attr_groups ,
474+ .attr_groups = cstate_attr_groups ,
497475 .attr_update = pkg_attr_update ,
498476 .name = "cstate_pkg" ,
499477 .task_ctx_nr = perf_invalid_context ,
0 commit comments