aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/appldata/appldata_base.c12
-rw-r--r--arch/s390/kernel/smp.c16
-rw-r--r--arch/s390/kernel/vtime.c2
-rw-r--r--include/asm-s390/smp.h11
-rw-r--r--net/iucv/iucv.c15
5 files changed, 23 insertions, 33 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 6ffbab77ae4..62391fb1f61 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -173,7 +173,7 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer,
173/* 173/*
174 * appldata_mod_vtimer_wrap() 174 * appldata_mod_vtimer_wrap()
175 * 175 *
176 * wrapper function for mod_virt_timer(), because smp_call_function_on() 176 * wrapper function for mod_virt_timer(), because smp_call_function_single()
177 * accepts only one parameter. 177 * accepts only one parameter.
178 */ 178 */
179static void __appldata_mod_vtimer_wrap(void *p) { 179static void __appldata_mod_vtimer_wrap(void *p) {
@@ -208,9 +208,9 @@ __appldata_vtimer_setup(int cmd)
208 num_online_cpus()) * TOD_MICRO; 208 num_online_cpus()) * TOD_MICRO;
209 for_each_online_cpu(i) { 209 for_each_online_cpu(i) {
210 per_cpu(appldata_timer, i).expires = per_cpu_interval; 210 per_cpu(appldata_timer, i).expires = per_cpu_interval;
211 smp_call_function_on(add_virt_timer_periodic, 211 smp_call_function_single(i, add_virt_timer_periodic,
212 &per_cpu(appldata_timer, i), 212 &per_cpu(appldata_timer, i),
213 0, 1, i); 213 0, 1);
214 } 214 }
215 appldata_timer_active = 1; 215 appldata_timer_active = 1;
216 P_INFO("Monitoring timer started.\n"); 216 P_INFO("Monitoring timer started.\n");
@@ -236,8 +236,8 @@ __appldata_vtimer_setup(int cmd)
236 } args; 236 } args;
237 args.timer = &per_cpu(appldata_timer, i); 237 args.timer = &per_cpu(appldata_timer, i);
238 args.expires = per_cpu_interval; 238 args.expires = per_cpu_interval;
239 smp_call_function_on(__appldata_mod_vtimer_wrap, 239 smp_call_function_single(i, __appldata_mod_vtimer_wrap,
240 &args, 0, 1, i); 240 &args, 0, 1);
241 } 241 }
242 } 242 }
243} 243}
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 182c085ae4d..aff9f853fc3 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -170,30 +170,28 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
170EXPORT_SYMBOL(smp_call_function); 170EXPORT_SYMBOL(smp_call_function);
171 171
172/* 172/*
173 * smp_call_function_on: 173 * smp_call_function_single:
174 * @cpu: the CPU where func should run
174 * @func: the function to run; this must be fast and non-blocking 175 * @func: the function to run; this must be fast and non-blocking
175 * @info: an arbitrary pointer to pass to the function 176 * @info: an arbitrary pointer to pass to the function
176 * @nonatomic: unused 177 * @nonatomic: unused
177 * @wait: if true, wait (atomically) until function has completed on other CPUs 178 * @wait: if true, wait (atomically) until function has completed on other CPUs
178 * @cpu: the CPU where func should run
179 * 179 *
180 * Run a function on one processor. 180 * Run a function on one processor.
181 * 181 *
182 * You must not call this function with disabled interrupts, from a 182 * You must not call this function with disabled interrupts, from a
183 * hardware interrupt handler or from a bottom half. 183 * hardware interrupt handler or from a bottom half.
184 */ 184 */
185int smp_call_function_on(void (*func) (void *info), void *info, int nonatomic, 185int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
186 int wait, int cpu) 186 int nonatomic, int wait)
187{ 187{
188 cpumask_t map = CPU_MASK_NONE;
189
190 preempt_disable(); 188 preempt_disable();
191 cpu_set(cpu, map); 189 __smp_call_function_map(func, info, nonatomic, wait,
192 __smp_call_function_map(func, info, nonatomic, wait, map); 190 cpumask_of_cpu(cpu));
193 preempt_enable(); 191 preempt_enable();
194 return 0; 192 return 0;
195} 193}
196EXPORT_SYMBOL(smp_call_function_on); 194EXPORT_SYMBOL(smp_call_function_single);
197 195
198static void do_send_stop(void) 196static void do_send_stop(void)
199{ 197{
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index b6ed143e859..84ff78de6ba 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -415,7 +415,7 @@ EXPORT_SYMBOL(add_virt_timer_periodic);
415 415
416/* 416/*
417 * If we change a pending timer the function must be called on the CPU 417 * If we change a pending timer the function must be called on the CPU
418 * where the timer is running on, e.g. by smp_call_function_on() 418 * where the timer is running on, e.g. by smp_call_function_single()
419 * 419 *
420 * The original mod_timer adds the timer if it is not pending. For compatibility 420 * The original mod_timer adds the timer if it is not pending. For compatibility
421 * we do the same. The timer will be added on the current CPU as a oneshot timer. 421 * we do the same. The timer will be added on the current CPU as a oneshot timer.
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index 76e424f718c..07708c07701 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -36,8 +36,7 @@ extern void machine_halt_smp(void);
36extern void machine_power_off_smp(void); 36extern void machine_power_off_smp(void);
37 37
38extern void smp_setup_cpu_possible_map(void); 38extern void smp_setup_cpu_possible_map(void);
39extern int smp_call_function_on(void (*func) (void *info), void *info, 39
40 int nonatomic, int wait, int cpu);
41#define NO_PROC_ID 0xFF /* No processor magic marker */ 40#define NO_PROC_ID 0xFF /* No processor magic marker */
42 41
43/* 42/*
@@ -96,14 +95,6 @@ extern int __cpu_up (unsigned int cpu);
96#endif 95#endif
97 96
98#ifndef CONFIG_SMP 97#ifndef CONFIG_SMP
99static inline int
100smp_call_function_on(void (*func) (void *info), void *info,
101 int nonatomic, int wait, int cpu)
102{
103 func(info);
104 return 0;
105}
106
107static inline void smp_send_stop(void) 98static inline void smp_send_stop(void)
108{ 99{
109 /* Disable all interrupts/machine checks */ 100 /* Disable all interrupts/machine checks */
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index ad5150b8dfa..983058d432d 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -479,7 +479,8 @@ static void iucv_setmask_mp(void)
479 /* Enable all cpus with a declared buffer. */ 479 /* Enable all cpus with a declared buffer. */
480 if (cpu_isset(cpu, iucv_buffer_cpumask) && 480 if (cpu_isset(cpu, iucv_buffer_cpumask) &&
481 !cpu_isset(cpu, iucv_irq_cpumask)) 481 !cpu_isset(cpu, iucv_irq_cpumask))
482 smp_call_function_on(iucv_allow_cpu, NULL, 0, 1, cpu); 482 smp_call_function_single(cpu, iucv_allow_cpu,
483 NULL, 0, 1);
483 preempt_enable(); 484 preempt_enable();
484} 485}
485 486
@@ -497,7 +498,7 @@ static void iucv_setmask_up(void)
497 cpumask = iucv_irq_cpumask; 498 cpumask = iucv_irq_cpumask;
498 cpu_clear(first_cpu(iucv_irq_cpumask), cpumask); 499 cpu_clear(first_cpu(iucv_irq_cpumask), cpumask);
499 for_each_cpu_mask(cpu, cpumask) 500 for_each_cpu_mask(cpu, cpumask)
500 smp_call_function_on(iucv_block_cpu, NULL, 0, 1, cpu); 501 smp_call_function_single(cpu, iucv_block_cpu, NULL, 0, 1);
501} 502}
502 503
503/** 504/**
@@ -522,7 +523,7 @@ static int iucv_enable(void)
522 rc = -EIO; 523 rc = -EIO;
523 preempt_disable(); 524 preempt_disable();
524 for_each_online_cpu(cpu) 525 for_each_online_cpu(cpu)
525 smp_call_function_on(iucv_declare_cpu, NULL, 0, 1, cpu); 526 smp_call_function_single(cpu, iucv_declare_cpu, NULL, 0, 1);
526 preempt_enable(); 527 preempt_enable();
527 if (cpus_empty(iucv_buffer_cpumask)) 528 if (cpus_empty(iucv_buffer_cpumask))
528 /* No cpu could declare an iucv buffer. */ 529 /* No cpu could declare an iucv buffer. */
@@ -578,7 +579,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
578 case CPU_ONLINE_FROZEN: 579 case CPU_ONLINE_FROZEN:
579 case CPU_DOWN_FAILED: 580 case CPU_DOWN_FAILED:
580 case CPU_DOWN_FAILED_FROZEN: 581 case CPU_DOWN_FAILED_FROZEN:
581 smp_call_function_on(iucv_declare_cpu, NULL, 0, 1, cpu); 582 smp_call_function_single(cpu, iucv_declare_cpu, NULL, 0, 1);
582 break; 583 break;
583 case CPU_DOWN_PREPARE: 584 case CPU_DOWN_PREPARE:
584 case CPU_DOWN_PREPARE_FROZEN: 585 case CPU_DOWN_PREPARE_FROZEN:
@@ -587,10 +588,10 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
587 if (cpus_empty(cpumask)) 588 if (cpus_empty(cpumask))
588 /* Can't offline last IUCV enabled cpu. */ 589 /* Can't offline last IUCV enabled cpu. */
589 return NOTIFY_BAD; 590 return NOTIFY_BAD;
590 smp_call_function_on(iucv_retrieve_cpu, NULL, 0, 1, cpu); 591 smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 0, 1);
591 if (cpus_empty(iucv_irq_cpumask)) 592 if (cpus_empty(iucv_irq_cpumask))
592 smp_call_function_on(iucv_allow_cpu, NULL, 0, 1, 593 smp_call_function_single(first_cpu(iucv_buffer_cpumask),
593 first_cpu(iucv_buffer_cpumask)); 594 iucv_allow_cpu, NULL, 0, 1);
594 break; 595 break;
595 } 596 }
596 return NOTIFY_OK; 597 return NOTIFY_OK;