WIP FPC-III support
[linux/fpc-iii.git] / tools / perf / util / cacheline.h
blobdec8c0fb1f4a930f406b0412c893acabd9a0c018
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PERF_CACHELINE_H
3 #define PERF_CACHELINE_H
5 #include <linux/compiler.h>
7 int __pure cacheline_size(void);
9 static inline u64 cl_address(u64 address)
11 /* return the cacheline of the address */
12 return (address & ~(cacheline_size() - 1));
15 static inline u64 cl_offset(u64 address)
17 /* return the cacheline of the address */
18 return (address & (cacheline_size() - 1));
21 #endif // PERF_CACHELINE_H