diff options
author | sukadev@linux.vnet.ibm.com <sukadev@linux.vnet.ibm.com> | 2015-01-30 16:45:59 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-02-02 01:56:38 -0500 |
commit | e08e52824e41fb42e46593450d378ad1b33caedb (patch) | |
tree | f3c8b2f910cf9bafab01bc6dbde844b85a4c5d05 | |
parent | f0405b816149665393cc62b9e5082fc2d79714df (diff) |
perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
Define a lite version of the EVENT_DEFINE_RANGE_FORMAT() that avoids
defining helper functions for the bit-field ranges.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/perf/hv-common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/perf/hv-common.h b/arch/powerpc/perf/hv-common.h index 5d79cecbd73d..349aaba4d2d1 100644 --- a/arch/powerpc/perf/hv-common.h +++ b/arch/powerpc/perf/hv-common.h | |||
@@ -20,6 +20,16 @@ unsigned long hv_perf_caps_get(struct hv_perf_caps *caps); | |||
20 | PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); \ | 20 | PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); \ |
21 | EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) | 21 | EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) |
22 | 22 | ||
23 | /* | ||
24 | * The EVENT_DEFINE_RANGE_FORMAT() macro above includes helper functions | ||
25 | * for the fields (eg: event_get_starting_index()). For some fields we | ||
26 | * need the bit-range definition, but no the helper functions. Define a | ||
27 | * lite version of the above macro without the helpers and silence | ||
28 | * compiler warnings unused static functions. | ||
29 | */ | ||
30 | #define EVENT_DEFINE_RANGE_FORMAT_LITE(name, attr_var, bit_start, bit_end) \ | ||
31 | PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); | ||
32 | |||
23 | #define EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) \ | 33 | #define EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) \ |
24 | static u64 event_get_##name##_max(void) \ | 34 | static u64 event_get_##name##_max(void) \ |
25 | { \ | 35 | { \ |