Skip to content

Commit 0a135ba

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: add __percpu sparse annotations to what's left percpu: add __percpu sparse annotations to fs percpu: add __percpu sparse annotations to core kernel subsystems local_t: Remove leftover local.h this_cpu: Remove pageset_notifier this_cpu: Page allocator conversion percpu, x86: Generic inc / dec percpu instructions local_t: Move local.h include to ringbuffer.c and ring_buffer_benchmark.c module: Use this_cpu_xx to dynamically allocate counters local_t: Remove cpu_local_xx macros percpu: refactor the code in pcpu_[de]populate_chunk() percpu: remove compile warnings caused by __verify_pcpu_ptr() percpu: make accessors check for percpu pointer in sparse percpu: add __percpu for sparse. percpu: make access macros universal percpu: remove per_cpu__ prefix.
2 parents 4850f52 + a29d8b8 commit 0a135ba

60 files changed

Lines changed: 354 additions & 499 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/include/asm/local.h‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,4 @@ static __inline__ long local_sub_return(long i, local_t * l)
9898
#define __local_add(i,l) ((l)->a.counter+=(i))
9999
#define __local_sub(i,l) ((l)->a.counter-=(i))
100100

101-
/* Use these for per-cpu local_t variables: on some archs they are
102-
* much more efficient than these naive implementations. Note they take
103-
* a variable, not an address.
104-
*/
105-
#define cpu_local_read(l) local_read(&__get_cpu_var(l))
106-
#define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i))
107-
108-
#define cpu_local_inc(l) local_inc(&__get_cpu_var(l))
109-
#define cpu_local_dec(l) local_dec(&__get_cpu_var(l))
110-
#define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l))
111-
#define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l))
112-
113-
#define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l))
114-
#define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l))
115-
#define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l))
116-
#define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l))
117-
118101
#endif /* _ALPHA_LOCAL_H */

‎arch/blackfin/mach-common/entry.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,8 @@ ENDPROC(_resume)
816816

817817
ENTRY(_ret_from_exception)
818818
#ifdef CONFIG_IPIPE
819-
p2.l = _per_cpu__ipipe_percpu_domain;
820-
p2.h = _per_cpu__ipipe_percpu_domain;
819+
p2.l = _ipipe_percpu_domain;
820+
p2.h = _ipipe_percpu_domain;
821821
r0.l = _ipipe_root;
822822
r0.h = _ipipe_root;
823823
r2 = [p2];

‎arch/cris/arch-v10/kernel/entry.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ mmu_bus_fault:
358358
1: btstq 12, $r1 ; Refill?
359359
bpl 2f
360360
lsrq 24, $r1 ; Get PGD index (bit 24-31)
361-
move.d [per_cpu__current_pgd], $r0 ; PGD for the current process
361+
move.d [current_pgd], $r0 ; PGD for the current process
362362
move.d [$r0+$r1.d], $r0 ; Get PMD
363363
beq 2f
364364
nop

‎arch/cris/arch-v32/mm/mmu.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
#ifdef CONFIG_SMP
116116
move $s7, $acr ; PGD
117117
#else
118-
move.d per_cpu__current_pgd, $acr ; PGD
118+
move.d current_pgd, $acr ; PGD
119119
#endif
120120
; Look up PMD in PGD
121121
lsrq 24, $r0 ; Get PMD index into PGD (bit 24-31)

‎arch/ia64/include/asm/percpu.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE
1010

1111
#ifdef __ASSEMBLY__
12-
# define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */
12+
# define THIS_CPU(var) (var) /* use this to mark accesses to per-CPU variables... */
1313
#else /* !__ASSEMBLY__ */
1414

1515

@@ -39,7 +39,7 @@ extern void *per_cpu_init(void);
3939
* On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
4040
* more efficient.
4141
*/
42-
#define __ia64_per_cpu_var(var) per_cpu__##var
42+
#define __ia64_per_cpu_var(var) var
4343

4444
#include <asm-generic/percpu.h>
4545

‎arch/ia64/kernel/ia64_ksyms.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
3030
#endif
3131

3232
#include <asm/processor.h>
33-
EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
33+
EXPORT_SYMBOL(ia64_cpu_info);
3434
#ifdef CONFIG_SMP
35-
EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
35+
EXPORT_SYMBOL(local_per_cpu_offset);
3636
#endif
3737

3838
#include <asm/uaccess.h>

‎arch/ia64/mm/discontig.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static void __init initialize_pernode_data(void)
459459
cpu = 0;
460460
node = node_cpuid[cpu].nid;
461461
cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start +
462-
((char *)&per_cpu__ia64_cpu_info - __per_cpu_start));
462+
((char *)&ia64_cpu_info - __per_cpu_start));
463463
cpu0_cpu_info->node_data = mem_data[node].node_data;
464464
}
465465
#endif /* CONFIG_SMP */

‎arch/m32r/include/asm/local.h‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -338,29 +338,4 @@ static inline void local_set_mask(unsigned long mask, local_t *addr)
338338
* a variable, not an address.
339339
*/
340340

341-
/* Need to disable preemption for the cpu local counters otherwise we could
342-
still access a variable of a previous CPU in a non local way. */
343-
#define cpu_local_wrap_v(l) \
344-
({ local_t res__; \
345-
preempt_disable(); \
346-
res__ = (l); \
347-
preempt_enable(); \
348-
res__; })
349-
#define cpu_local_wrap(l) \
350-
({ preempt_disable(); \
351-
l; \
352-
preempt_enable(); }) \
353-
354-
#define cpu_local_read(l) cpu_local_wrap_v(local_read(&__get_cpu_var(l)))
355-
#define cpu_local_set(l, i) cpu_local_wrap(local_set(&__get_cpu_var(l), (i)))
356-
#define cpu_local_inc(l) cpu_local_wrap(local_inc(&__get_cpu_var(l)))
357-
#define cpu_local_dec(l) cpu_local_wrap(local_dec(&__get_cpu_var(l)))
358-
#define cpu_local_add(i, l) cpu_local_wrap(local_add((i), &__get_cpu_var(l)))
359-
#define cpu_local_sub(i, l) cpu_local_wrap(local_sub((i), &__get_cpu_var(l)))
360-
361-
#define __cpu_local_inc(l) cpu_local_inc(l)
362-
#define __cpu_local_dec(l) cpu_local_dec(l)
363-
#define __cpu_local_add(i, l) cpu_local_add((i), (l))
364-
#define __cpu_local_sub(i, l) cpu_local_sub((i), (l))
365-
366341
#endif /* __M32R_LOCAL_H */

‎arch/microblaze/include/asm/entry.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* places
2222
*/
2323

24-
#define PER_CPU(var) per_cpu__##var
24+
#define PER_CPU(var) var
2525

2626
# ifndef __ASSEMBLY__
2727
DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */

‎arch/mips/include/asm/local.h‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -193,29 +193,4 @@ static __inline__ long local_sub_return(long i, local_t * l)
193193
#define __local_add(i, l) ((l)->a.counter+=(i))
194194
#define __local_sub(i, l) ((l)->a.counter-=(i))
195195

196-
/* Need to disable preemption for the cpu local counters otherwise we could
197-
still access a variable of a previous CPU in a non atomic way. */
198-
#define cpu_local_wrap_v(l) \
199-
({ local_t res__; \
200-
preempt_disable(); \
201-
res__ = (l); \
202-
preempt_enable(); \
203-
res__; })
204-
#define cpu_local_wrap(l) \
205-
({ preempt_disable(); \
206-
l; \
207-
preempt_enable(); }) \
208-
209-
#define cpu_local_read(l) cpu_local_wrap_v(local_read(&__get_cpu_var(l)))
210-
#define cpu_local_set(l, i) cpu_local_wrap(local_set(&__get_cpu_var(l), (i)))
211-
#define cpu_local_inc(l) cpu_local_wrap(local_inc(&__get_cpu_var(l)))
212-
#define cpu_local_dec(l) cpu_local_wrap(local_dec(&__get_cpu_var(l)))
213-
#define cpu_local_add(i, l) cpu_local_wrap(local_add((i), &__get_cpu_var(l)))
214-
#define cpu_local_sub(i, l) cpu_local_wrap(local_sub((i), &__get_cpu_var(l)))
215-
216-
#define __cpu_local_inc(l) cpu_local_inc(l)
217-
#define __cpu_local_dec(l) cpu_local_dec(l)
218-
#define __cpu_local_add(i, l) cpu_local_add((i), (l))
219-
#define __cpu_local_sub(i, l) cpu_local_sub((i), (l))
220-
221196
#endif /* _ARCH_MIPS_LOCAL_H */

0 commit comments

Comments
 (0)