diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-05 05:00:31 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-05 05:00:31 -0500 |
commit | dd521d1eb4bc7f12a0d440134cb3a72852b6da9c (patch) | |
tree | f573c86df9bd60626ad9a8746b82e254b7cac977 /arch/powerpc/include | |
parent | 8418804ef27e5f7988480d86ecf9dfd56cebc53b (diff) | |
parent | 69111bac42f5ceacdd22e30947837ceb2c4493ed (diff) |
Merge branch 'topic/get-cpu-var' into next
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/hardirq.h | 7 | ||||
-rw-r--r-- | arch/powerpc/include/asm/tlbflush.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/xics.h | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h index 1bbb3013d6aa..8add8b861e8d 100644 --- a/arch/powerpc/include/asm/hardirq.h +++ b/arch/powerpc/include/asm/hardirq.h | |||
@@ -21,7 +21,12 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); | |||
21 | 21 | ||
22 | #define __ARCH_IRQ_STAT | 22 | #define __ARCH_IRQ_STAT |
23 | 23 | ||
24 | #define local_softirq_pending() __get_cpu_var(irq_stat).__softirq_pending | 24 | #define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending) |
25 | |||
26 | #define __ARCH_SET_SOFTIRQ_PENDING | ||
27 | |||
28 | #define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x)) | ||
29 | #define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x)) | ||
25 | 30 | ||
26 | static inline void ack_bad_irq(unsigned int irq) | 31 | static inline void ack_bad_irq(unsigned int irq) |
27 | { | 32 | { |
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h index 2def01ed0cb2..cd7c2719d3ef 100644 --- a/arch/powerpc/include/asm/tlbflush.h +++ b/arch/powerpc/include/asm/tlbflush.h | |||
@@ -107,14 +107,14 @@ extern void __flush_tlb_pending(struct ppc64_tlb_batch *batch); | |||
107 | 107 | ||
108 | static inline void arch_enter_lazy_mmu_mode(void) | 108 | static inline void arch_enter_lazy_mmu_mode(void) |
109 | { | 109 | { |
110 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); | 110 | struct ppc64_tlb_batch *batch = this_cpu_ptr(&ppc64_tlb_batch); |
111 | 111 | ||
112 | batch->active = 1; | 112 | batch->active = 1; |
113 | } | 113 | } |
114 | 114 | ||
115 | static inline void arch_leave_lazy_mmu_mode(void) | 115 | static inline void arch_leave_lazy_mmu_mode(void) |
116 | { | 116 | { |
117 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); | 117 | struct ppc64_tlb_batch *batch = this_cpu_ptr(&ppc64_tlb_batch); |
118 | 118 | ||
119 | if (batch->index) | 119 | if (batch->index) |
120 | __flush_tlb_pending(batch); | 120 | __flush_tlb_pending(batch); |
diff --git a/arch/powerpc/include/asm/xics.h b/arch/powerpc/include/asm/xics.h index 0d050ea37a04..6997f4a271df 100644 --- a/arch/powerpc/include/asm/xics.h +++ b/arch/powerpc/include/asm/xics.h | |||
@@ -98,7 +98,7 @@ DECLARE_PER_CPU(struct xics_cppr, xics_cppr); | |||
98 | 98 | ||
99 | static inline void xics_push_cppr(unsigned int vec) | 99 | static inline void xics_push_cppr(unsigned int vec) |
100 | { | 100 | { |
101 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | 101 | struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); |
102 | 102 | ||
103 | if (WARN_ON(os_cppr->index >= MAX_NUM_PRIORITIES - 1)) | 103 | if (WARN_ON(os_cppr->index >= MAX_NUM_PRIORITIES - 1)) |
104 | return; | 104 | return; |
@@ -111,7 +111,7 @@ static inline void xics_push_cppr(unsigned int vec) | |||
111 | 111 | ||
112 | static inline unsigned char xics_pop_cppr(void) | 112 | static inline unsigned char xics_pop_cppr(void) |
113 | { | 113 | { |
114 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | 114 | struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); |
115 | 115 | ||
116 | if (WARN_ON(os_cppr->index < 1)) | 116 | if (WARN_ON(os_cppr->index < 1)) |
117 | return LOWEST_PRIORITY; | 117 | return LOWEST_PRIORITY; |
@@ -121,7 +121,7 @@ static inline unsigned char xics_pop_cppr(void) | |||
121 | 121 | ||
122 | static inline void xics_set_base_cppr(unsigned char cppr) | 122 | static inline void xics_set_base_cppr(unsigned char cppr) |
123 | { | 123 | { |
124 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | 124 | struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); |
125 | 125 | ||
126 | /* we only really want to set the priority when there's | 126 | /* we only really want to set the priority when there's |
127 | * just one cppr value on the stack | 127 | * just one cppr value on the stack |
@@ -133,7 +133,7 @@ static inline void xics_set_base_cppr(unsigned char cppr) | |||
133 | 133 | ||
134 | static inline unsigned char xics_cppr_top(void) | 134 | static inline unsigned char xics_cppr_top(void) |
135 | { | 135 | { |
136 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | 136 | struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); |
137 | 137 | ||
138 | return os_cppr->stack[os_cppr->index]; | 138 | return os_cppr->stack[os_cppr->index]; |
139 | } | 139 | } |