Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd17c8f7 authored by Rusty Russell's avatar Rusty Russell Committed by Tejun Heo
Browse files

percpu: remove per_cpu__ prefix.



Now that the return from alloc_percpu is compatible with the address
of per-cpu vars, it makes sense to hand around the address of per-cpu
variables.  To make this sane, we remove the per_cpu__ prefix we used
created to stop people accidentally using these vars directly.

Now we have sparse, we can use that (next patch).

tj: * Updated to convert stuff which were missed by or added after the
      original patch.

    * Kill per_cpu_var() macro.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
parent 390dfd95
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -835,8 +835,8 @@ ENDPROC(_resume)


ENTRY(_ret_from_exception)
ENTRY(_ret_from_exception)
#ifdef CONFIG_IPIPE
#ifdef CONFIG_IPIPE
	p2.l = _per_cpu__ipipe_percpu_domain;
	p2.l = _ipipe_percpu_domain;
	p2.h = _per_cpu__ipipe_percpu_domain;
	p2.h = _ipipe_percpu_domain;
	r0.l = _ipipe_root;
	r0.l = _ipipe_root;
	r0.h = _ipipe_root;
	r0.h = _ipipe_root;
	r2 = [p2];
	r2 = [p2];
+1 −1
Original line number Original line Diff line number Diff line
@@ -358,7 +358,7 @@ mmu_bus_fault:
1:	btstq	12, $r1		   ; Refill?
1:	btstq	12, $r1		   ; Refill?
	bpl	2f
	bpl	2f
	lsrq	24, $r1     ; Get PGD index (bit 24-31)
	lsrq	24, $r1     ; Get PGD index (bit 24-31)
	move.d  [per_cpu__current_pgd], $r0 ; PGD for the current process
	move.d  [current_pgd], $r0 ; PGD for the current process
	move.d	[$r0+$r1.d], $r0   ; Get PMD
	move.d	[$r0+$r1.d], $r0   ; Get PMD
	beq	2f
	beq	2f
	nop
	nop
+1 −1
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
	move    $s7, $acr	; PGD
	move    $s7, $acr	; PGD
#else
#else
	move.d  per_cpu__current_pgd, $acr ; PGD
	move.d  current_pgd, $acr ; PGD
#endif
#endif
	; Look up PMD in PGD
	; Look up PMD in PGD
	lsrq	24, $r0	; Get PMD index into PGD (bit 24-31)
	lsrq	24, $r0	; Get PMD index into PGD (bit 24-31)
+2 −2
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@
#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE
#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE


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




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


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


+2 −2
Original line number Original line Diff line number Diff line
@@ -30,9 +30,9 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
#endif
#endif


#include <asm/processor.h>
#include <asm/processor.h>
EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
EXPORT_SYMBOL(ia64_cpu_info);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
EXPORT_SYMBOL(local_per_cpu_offset);
#endif
#endif


#include <asm/uaccess.h>
#include <asm/uaccess.h>
Loading