diff options
author | Christoph Lameter <cl@linux.com> | 2011-12-22 12:58:51 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-12-22 13:40:20 -0500 |
commit | 933393f58fef9963eac61db8093689544e29a600 (patch) | |
tree | 719f8b231499aa4ea023bc1a06db4582df5f0965 /include/net/snmp.h | |
parent | ecefc36b41ac0fe92d76273a23faf27b2da13411 (diff) |
percpu: Remove irqsafe_cpu_xxx variants
We simply say that regular this_cpu use must be safe regardless of
preemption and interrupt state. That has no material change for x86
and s390 implementations of this_cpu operations. However, arches that
do not provide their own implementation for this_cpu operations will
now get code generated that disables interrupts instead of preemption.
-tj: This is part of on-going percpu API cleanup. For detailed
discussion of the subject, please refer to the following thread.
http://thread.gmane.org/gmane.linux.kernel/1222078
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <alpine.DEB.2.00.1112221154380.11787@router.home>
Diffstat (limited to 'include/net/snmp.h')
-rw-r--r-- | include/net/snmp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/net/snmp.h b/include/net/snmp.h index 8f0f9ac0307f..e067aed7e378 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -129,33 +129,33 @@ struct linux_xfrm_mib { | |||
129 | __this_cpu_inc(mib[0]->mibs[field]) | 129 | __this_cpu_inc(mib[0]->mibs[field]) |
130 | 130 | ||
131 | #define SNMP_INC_STATS_USER(mib, field) \ | 131 | #define SNMP_INC_STATS_USER(mib, field) \ |
132 | irqsafe_cpu_inc(mib[0]->mibs[field]) | 132 | this_cpu_inc(mib[0]->mibs[field]) |
133 | 133 | ||
134 | #define SNMP_INC_STATS_ATOMIC_LONG(mib, field) \ | 134 | #define SNMP_INC_STATS_ATOMIC_LONG(mib, field) \ |
135 | atomic_long_inc(&mib->mibs[field]) | 135 | atomic_long_inc(&mib->mibs[field]) |
136 | 136 | ||
137 | #define SNMP_INC_STATS(mib, field) \ | 137 | #define SNMP_INC_STATS(mib, field) \ |
138 | irqsafe_cpu_inc(mib[0]->mibs[field]) | 138 | this_cpu_inc(mib[0]->mibs[field]) |
139 | 139 | ||
140 | #define SNMP_DEC_STATS(mib, field) \ | 140 | #define SNMP_DEC_STATS(mib, field) \ |
141 | irqsafe_cpu_dec(mib[0]->mibs[field]) | 141 | this_cpu_dec(mib[0]->mibs[field]) |
142 | 142 | ||
143 | #define SNMP_ADD_STATS_BH(mib, field, addend) \ | 143 | #define SNMP_ADD_STATS_BH(mib, field, addend) \ |
144 | __this_cpu_add(mib[0]->mibs[field], addend) | 144 | __this_cpu_add(mib[0]->mibs[field], addend) |
145 | 145 | ||
146 | #define SNMP_ADD_STATS_USER(mib, field, addend) \ | 146 | #define SNMP_ADD_STATS_USER(mib, field, addend) \ |
147 | irqsafe_cpu_add(mib[0]->mibs[field], addend) | 147 | this_cpu_add(mib[0]->mibs[field], addend) |
148 | 148 | ||
149 | #define SNMP_ADD_STATS(mib, field, addend) \ | 149 | #define SNMP_ADD_STATS(mib, field, addend) \ |
150 | irqsafe_cpu_add(mib[0]->mibs[field], addend) | 150 | this_cpu_add(mib[0]->mibs[field], addend) |
151 | /* | 151 | /* |
152 | * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" | 152 | * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" |
153 | * to make @ptr a non-percpu pointer. | 153 | * to make @ptr a non-percpu pointer. |
154 | */ | 154 | */ |
155 | #define SNMP_UPD_PO_STATS(mib, basefield, addend) \ | 155 | #define SNMP_UPD_PO_STATS(mib, basefield, addend) \ |
156 | do { \ | 156 | do { \ |
157 | irqsafe_cpu_inc(mib[0]->mibs[basefield##PKTS]); \ | 157 | this_cpu_inc(mib[0]->mibs[basefield##PKTS]); \ |
158 | irqsafe_cpu_add(mib[0]->mibs[basefield##OCTETS], addend); \ | 158 | this_cpu_add(mib[0]->mibs[basefield##OCTETS], addend); \ |
159 | } while (0) | 159 | } while (0) |
160 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ | 160 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ |
161 | do { \ | 161 | do { \ |