diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/elevator.h | 12 | ||||
-rw-r--r-- | include/linux/kernel_stat.h | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4fd978e7eb83..4d857973d2c9 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -195,15 +195,9 @@ enum { | |||
195 | /* | 195 | /* |
196 | * io context count accounting | 196 | * io context count accounting |
197 | */ | 197 | */ |
198 | #define elv_ioc_count_mod(name, __val) \ | 198 | #define elv_ioc_count_mod(name, __val) this_cpu_add(name, __val) |
199 | do { \ | 199 | #define elv_ioc_count_inc(name) this_cpu_inc(name) |
200 | preempt_disable(); \ | 200 | #define elv_ioc_count_dec(name) this_cpu_dec(name) |
201 | __get_cpu_var(name) += (__val); \ | ||
202 | preempt_enable(); \ | ||
203 | } while (0) | ||
204 | |||
205 | #define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1) | ||
206 | #define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1) | ||
207 | 201 | ||
208 | #define elv_ioc_count_read(name) \ | 202 | #define elv_ioc_count_read(name) \ |
209 | ({ \ | 203 | ({ \ |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ad54c846911b..44e83ba12b5b 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -47,7 +47,7 @@ extern unsigned long long nr_context_switches(void); | |||
47 | 47 | ||
48 | #ifndef CONFIG_GENERIC_HARDIRQS | 48 | #ifndef CONFIG_GENERIC_HARDIRQS |
49 | #define kstat_irqs_this_cpu(irq) \ | 49 | #define kstat_irqs_this_cpu(irq) \ |
50 | (kstat_this_cpu.irqs[irq]) | 50 | (this_cpu_read(kstat.irqs[irq]) |
51 | 51 | ||
52 | struct irq_desc; | 52 | struct irq_desc; |
53 | 53 | ||