diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/percpu.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index fded453fd25c..04f91c2d3f7b 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -42,8 +42,10 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
42 | */ | 42 | */ |
43 | #ifndef SHIFT_PERCPU_PTR | 43 | #ifndef SHIFT_PERCPU_PTR |
44 | /* Weird cast keeps both GCC and sparse happy. */ | 44 | /* Weird cast keeps both GCC and sparse happy. */ |
45 | #define SHIFT_PERCPU_PTR(__p, __offset) \ | 45 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ |
46 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)) | 46 | __verify_pcpu_ptr((__p)); \ |
47 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ | ||
48 | }) | ||
47 | #endif | 49 | #endif |
48 | 50 | ||
49 | /* | 51 | /* |