diff options
author | Jan Glauber <jan.glauber@de.ibm.com> | 2007-04-27 10:01:55 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-04-27 10:01:46 -0400 |
commit | db77aa5f3d01fe6a6cc629dbd37936b1fdd129ba (patch) | |
tree | 49186d1428510ae6aa658099d36133a2a0406068 /arch | |
parent | 131a395c18af43d824841642038e5cc0d48f0bd2 (diff) |
[S390] vtime: cleanup per_cpu usage.
Replace per_cpu(... , smp_processor_id()) with __get_cpu_var()
Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/vtime.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 9d5b02801b46..1e1a6ee2cac1 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -128,7 +128,7 @@ static inline void set_vtimer(__u64 expires) | |||
128 | S390_lowcore.last_update_timer = expires; | 128 | S390_lowcore.last_update_timer = expires; |
129 | 129 | ||
130 | /* store expire time for this CPU timer */ | 130 | /* store expire time for this CPU timer */ |
131 | per_cpu(virt_cpu_timer, smp_processor_id()).to_expire = expires; | 131 | __get_cpu_var(virt_cpu_timer).to_expire = expires; |
132 | } | 132 | } |
133 | #else | 133 | #else |
134 | static inline void set_vtimer(__u64 expires) | 134 | static inline void set_vtimer(__u64 expires) |
@@ -137,7 +137,7 @@ static inline void set_vtimer(__u64 expires) | |||
137 | asm volatile ("SPT %0" : : "m" (S390_lowcore.last_update_timer)); | 137 | asm volatile ("SPT %0" : : "m" (S390_lowcore.last_update_timer)); |
138 | 138 | ||
139 | /* store expire time for this CPU timer */ | 139 | /* store expire time for this CPU timer */ |
140 | per_cpu(virt_cpu_timer, smp_processor_id()).to_expire = expires; | 140 | __get_cpu_var(virt_cpu_timer).to_expire = expires; |
141 | } | 141 | } |
142 | #endif | 142 | #endif |
143 | 143 | ||
@@ -145,7 +145,7 @@ static void start_cpu_timer(void) | |||
145 | { | 145 | { |
146 | struct vtimer_queue *vt_list; | 146 | struct vtimer_queue *vt_list; |
147 | 147 | ||
148 | vt_list = &per_cpu(virt_cpu_timer, smp_processor_id()); | 148 | vt_list = &__get_cpu_var(virt_cpu_timer); |
149 | 149 | ||
150 | /* CPU timer interrupt is pending, don't reprogramm it */ | 150 | /* CPU timer interrupt is pending, don't reprogramm it */ |
151 | if (vt_list->idle & 1LL<<63) | 151 | if (vt_list->idle & 1LL<<63) |
@@ -159,7 +159,7 @@ static void stop_cpu_timer(void) | |||
159 | { | 159 | { |
160 | struct vtimer_queue *vt_list; | 160 | struct vtimer_queue *vt_list; |
161 | 161 | ||
162 | vt_list = &per_cpu(virt_cpu_timer, smp_processor_id()); | 162 | vt_list = &__get_cpu_var(virt_cpu_timer); |
163 | 163 | ||
164 | /* nothing to do */ | 164 | /* nothing to do */ |
165 | if (list_empty(&vt_list->list)) { | 165 | if (list_empty(&vt_list->list)) { |
@@ -219,7 +219,7 @@ static void do_callbacks(struct list_head *cb_list) | |||
219 | if (list_empty(cb_list)) | 219 | if (list_empty(cb_list)) |
220 | return; | 220 | return; |
221 | 221 | ||
222 | vt_list = &per_cpu(virt_cpu_timer, smp_processor_id()); | 222 | vt_list = &__get_cpu_var(virt_cpu_timer); |
223 | 223 | ||
224 | list_for_each_entry_safe(event, tmp, cb_list, entry) { | 224 | list_for_each_entry_safe(event, tmp, cb_list, entry) { |
225 | fn = event->function; | 225 | fn = event->function; |
@@ -244,7 +244,6 @@ static void do_callbacks(struct list_head *cb_list) | |||
244 | */ | 244 | */ |
245 | static void do_cpu_timer_interrupt(__u16 error_code) | 245 | static void do_cpu_timer_interrupt(__u16 error_code) |
246 | { | 246 | { |
247 | int cpu; | ||
248 | __u64 next, delta; | 247 | __u64 next, delta; |
249 | struct vtimer_queue *vt_list; | 248 | struct vtimer_queue *vt_list; |
250 | struct vtimer_list *event, *tmp; | 249 | struct vtimer_list *event, *tmp; |
@@ -253,8 +252,7 @@ static void do_cpu_timer_interrupt(__u16 error_code) | |||
253 | struct list_head cb_list; | 252 | struct list_head cb_list; |
254 | 253 | ||
255 | INIT_LIST_HEAD(&cb_list); | 254 | INIT_LIST_HEAD(&cb_list); |
256 | cpu = smp_processor_id(); | 255 | vt_list = &__get_cpu_var(virt_cpu_timer); |
257 | vt_list = &per_cpu(virt_cpu_timer, cpu); | ||
258 | 256 | ||
259 | /* walk timer list, fire all expired events */ | 257 | /* walk timer list, fire all expired events */ |
260 | spin_lock(&vt_list->lock); | 258 | spin_lock(&vt_list->lock); |
@@ -534,7 +532,7 @@ void init_cpu_vtimer(void) | |||
534 | /* enable cpu timer interrupts */ | 532 | /* enable cpu timer interrupts */ |
535 | __ctl_set_bit(0,10); | 533 | __ctl_set_bit(0,10); |
536 | 534 | ||
537 | vt_list = &per_cpu(virt_cpu_timer, smp_processor_id()); | 535 | vt_list = &__get_cpu_var(virt_cpu_timer); |
538 | INIT_LIST_HEAD(&vt_list->list); | 536 | INIT_LIST_HEAD(&vt_list->list); |
539 | spin_lock_init(&vt_list->lock); | 537 | spin_lock_init(&vt_list->lock); |
540 | vt_list->to_expire = 0; | 538 | vt_list->to_expire = 0; |