diff options
Diffstat (limited to 'tools/perf/util/include/linux/kernel.h')
-rw-r--r-- | tools/perf/util/include/linux/kernel.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h index 1eb804fd3fbf..b6842c1d02a8 100644 --- a/tools/perf/util/include/linux/kernel.h +++ b/tools/perf/util/include/linux/kernel.h | |||
@@ -108,4 +108,14 @@ int eprintf(int level, | |||
108 | #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__) | 108 | #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__) |
109 | #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__) | 109 | #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__) |
110 | 110 | ||
111 | /* | ||
112 | * This looks more complex than it should be. But we need to | ||
113 | * get the type for the ~ right in round_down (it needs to be | ||
114 | * as wide as the result!), and we want to evaluate the macro | ||
115 | * arguments just once each. | ||
116 | */ | ||
117 | #define __round_mask(x, y) ((__typeof__(x))((y)-1)) | ||
118 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | ||
119 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | ||
120 | |||
111 | #endif | 121 | #endif |