diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-10-17 12:36:32 +0300 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-10-17 12:36:32 +0300 |
| commit | c29a017f9df34d190fbc7917d30dbefce7d9dc1f (patch) | |
| tree | 98919b99c7aba0404c4fdbbf953dc72084509c06 /include/linux/cache.h | |
| parent | d4a596eddb90114f5f5f32a440057a175517b090 (diff) | |
| parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
| download | linux-c29a017f9df34d190fbc7917d30dbefce7d9dc1f.tar.xz | |
Merge tag 'v6.1-rc1' into next
Merge with mainline to bring in the latest changes to twl4030 driver.
Diffstat (limited to 'include/linux/cache.h')
| -rw-r--r-- | include/linux/cache.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h index d742c57eaee5..5da1bbd96154 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -85,4 +85,17 @@ #define cache_line_size() L1_CACHE_BYTES #endif +/* + * Helper to add padding within a struct to ensure data fall into separate + * cachelines. + */ +#if defined(CONFIG_SMP) +struct cacheline_padding { + char x[0]; +} ____cacheline_internodealigned_in_smp; +#define CACHELINE_PADDING(name) struct cacheline_padding name +#else +#define CACHELINE_PADDING(name) +#endif + #endif /* __LINUX_CACHE_H */ |
