perf/x86/intel/cqm: Use proper data types
authorThomas Gleixner <[email protected]>
Tue, 19 May 2015 00:00:51 +0000 (00:00 +0000)
committerIngo Molnar <[email protected]>
Wed, 27 May 2015 07:17:39 +0000 (09:17 +0200)
'int' is really not a proper data type for an MSR. Use u32 to make it
clear that we are dealing with a 32-bit unsigned hardware value.

Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Matt Fleming <[email protected]>
Cc: Kanaka Juvva <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Vikas Shivappa <[email protected]>
Cc: Will Auld <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/perf_event_intel_cqm.c
include/linux/perf_event.h

index 572582e2143eecab5d67bfb273b3b4e722534ff7..3e9a7fbfce582db36d4694ce317abc3fff718e6e 100644 (file)
@@ -18,7 +18,7 @@ static unsigned int cqm_l3_scale; /* supposedly cacheline size */
 
 struct intel_cqm_state {
        raw_spinlock_t          lock;
-       int                     rmid;
+       u32                     rmid;
        int                     cnt;
 };
 
@@ -962,7 +962,7 @@ out:
 static void intel_cqm_event_start(struct perf_event *event, int mode)
 {
        struct intel_cqm_state *state = this_cpu_ptr(&cqm_state);
-       unsigned int rmid = event->hw.cqm_rmid;
+       u32 rmid = event->hw.cqm_rmid;
        unsigned long flags;
 
        if (!(event->hw.cqm_state & PERF_HES_STOPPED))
index 248f7829ce415c72b9d565101c4183ba9b86e7de..06580028cee634afbacd5bc0e8f73a6ebecad894 100644 (file)
@@ -120,7 +120,7 @@ struct hw_perf_event {
                };
                struct { /* intel_cqm */
                        int                     cqm_state;
-                       int                     cqm_rmid;
+                       u32                     cqm_rmid;
                        struct list_head        cqm_events_entry;
                        struct list_head        cqm_groups_entry;
                        struct list_head        cqm_group_entry;