Skip to content

Commit 9f19010

Browse files
Jacob ShinIngo Molnar
authored andcommitted
perf/x86/amd: Use proper naming scheme for AMD bit field definitions
Update these AMD bit field names to be consistent with naming convention followed by the rest of the file. Signed-off-by: Jacob Shin <[email protected]> Acked-by: Stephane Eranian <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 4dd4c2a commit 9f19010

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

arch/x86/include/asm/perf_event.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#define ARCH_PERFMON_EVENTSEL_INV (1ULL << 23)
3030
#define ARCH_PERFMON_EVENTSEL_CMASK 0xFF000000ULL
3131

32-
#define AMD_PERFMON_EVENTSEL_GUESTONLY (1ULL << 40)
33-
#define AMD_PERFMON_EVENTSEL_HOSTONLY (1ULL << 41)
32+
#define AMD64_EVENTSEL_GUESTONLY (1ULL << 40)
33+
#define AMD64_EVENTSEL_HOSTONLY (1ULL << 41)
3434

3535
#define AMD64_EVENTSEL_EVENT \
3636
(ARCH_PERFMON_EVENTSEL_EVENT | (0x0FULL << 32))

arch/x86/kernel/cpu/perf_event_amd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ static int amd_pmu_hw_config(struct perf_event *event)
156156
event->hw.config &= ~(ARCH_PERFMON_EVENTSEL_USR |
157157
ARCH_PERFMON_EVENTSEL_OS);
158158
else if (event->attr.exclude_host)
159-
event->hw.config |= AMD_PERFMON_EVENTSEL_GUESTONLY;
159+
event->hw.config |= AMD64_EVENTSEL_GUESTONLY;
160160
else if (event->attr.exclude_guest)
161-
event->hw.config |= AMD_PERFMON_EVENTSEL_HOSTONLY;
161+
event->hw.config |= AMD64_EVENTSEL_HOSTONLY;
162162

163163
if (event->attr.type != PERF_TYPE_RAW)
164164
return 0;
@@ -336,7 +336,7 @@ static void amd_pmu_cpu_starting(int cpu)
336336
struct amd_nb *nb;
337337
int i, nb_id;
338338

339-
cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY;
339+
cpuc->perf_ctr_virt_mask = AMD64_EVENTSEL_HOSTONLY;
340340

341341
if (boot_cpu_data.x86_max_cores < 2)
342342
return;
@@ -669,7 +669,7 @@ void amd_pmu_disable_virt(void)
669669
* SVM is disabled the Guest-only bits still gets set and the counter
670670
* will not count anything.
671671
*/
672-
cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY;
672+
cpuc->perf_ctr_virt_mask = AMD64_EVENTSEL_HOSTONLY;
673673

674674
/* Reload all events */
675675
x86_pmu_disable_all();

0 commit comments

Comments
 (0)