diff options
author | Tejun Heo <tj@kernel.org> | 2014-06-17 19:12:33 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-06-17 19:12:33 -0400 |
commit | 6adc5cac538b5d9162d8bcdb6145319592afc0d6 (patch) | |
tree | a527bfaa21feab1417b31f135c406c92d776b56a | |
parent | ebe06187bf2aec10d537ce4595e416035367d703 (diff) |
percpu: disallow archs from overriding SHIFT_PERCPU_PTR()
It has been about half a decade since all archs started using the
dynamic percpu allocator and thus the same SHIFT_PERCPU_PTR()
implementation. There's no benefit in overriding SHIFT_PERCPU_PTR()
anymore.
Remove #ifndef around it to clarify that this is identical regardless
of the arch.
This patch doesn't cause any functional difference.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Christoph Lameter <cl@linux.com>
-rw-r--r-- | include/asm-generic/percpu.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 0703aa75b5e8..63d2b68c826e 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -36,17 +36,14 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Add a offset to a pointer but keep the pointer as is. | 39 | * Add an offset to a pointer but keep the pointer as-is. Use RELOC_HIDE() |
40 | * | 40 | * to prevent the compiler from making incorrect assumptions about the |
41 | * Only S390 provides its own means of moving the pointer. | 41 | * pointer value. The weird cast keeps both GCC and sparse happy. |
42 | */ | 42 | */ |
43 | #ifndef SHIFT_PERCPU_PTR | ||
44 | /* Weird cast keeps both GCC and sparse happy. */ | ||
45 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ | 43 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ |
46 | __verify_pcpu_ptr((__p)); \ | 44 | __verify_pcpu_ptr((__p)); \ |
47 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ | 45 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ |
48 | }) | 46 | }) |
49 | #endif | ||
50 | 47 | ||
51 | /* | 48 | /* |
52 | * A percpu variable may point to a discarded regions. The following are | 49 | * A percpu variable may point to a discarded regions. The following are |