None of them can fail, so a return code is pointless.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
}
/* save the current system wide pmu states */
- ret = on_each_cpu(pfm_alt_save_pmu_state, NULL, 1);
- if (ret) {
- DPRINT(("on_each_cpu() failed: %d\n", ret));
- goto cleanup_reserve;
- }
+ on_each_cpu(pfm_alt_save_pmu_state, NULL, 1);
/* officially change to the alternate interrupt handler */
pfm_alt_intr_handler = hdl;
pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
{
int i;
- int ret;
if (hdl == NULL) return -EINVAL;
pfm_alt_intr_handler = NULL;
- ret = on_each_cpu(pfm_alt_restore_pmu_state, NULL, 1);
- if (ret) {
- DPRINT(("on_each_cpu() failed: %d\n", ret));
- }
+ on_each_cpu(pfm_alt_restore_pmu_state, NULL, 1);
for_each_online_cpu(i) {
pfm_unreserve_session(NULL, 1, i);
* You must not call this function with disabled interrupts or from a
* hardware interrupt handler or from a bottom half handler.
*/
-int
+void
smp_call_function (void (*func) (void *info), void *info, int wait)
{
struct call_data_struct data;
int cpus = num_online_cpus()-1;
if (!cpus)
- return 0;
+ return;
/* Can deadlock when called with interrupts disabled */
#ifdef XEN
#if 0 //def XEN
printk("smp_call_function: DONE WITH spin_unlock, returning \n");
#endif
- return 0;
}
EXPORT_SYMBOL(smp_call_function);
#ifdef XEN
-int
+void
on_selected_cpus(const cpumask_t *selected, void (*func) (void *info),
void *info, int wait)
{
ASSERT(local_irq_is_enabled());
if (!nr_cpus)
- return 0;
+ return;
data.func = func;
data.info = info;
cpu_relax();
spin_unlock(&call_lock);
-
- return 0;
}
#endif
log_cpus = xmalloc_array(xen_mc_logical_cpu_t, nlcpu);
if (log_cpus == NULL)
return x86_mcerr("do_mca cpuinfo", -ENOMEM);
-
- if (on_each_cpu(do_mc_get_cpu_info, log_cpus, 1)) {
- xfree(log_cpus);
- return x86_mcerr("do_mca cpuinfo", -EIO);
- }
+ on_each_cpu(do_mc_get_cpu_info, log_cpus, 1);
if (!is_pv_32on64_vcpu(v)
? copy_to_guest(mc_physcpuinfo.nat->info,
log_cpus, nlcpu)
cpumask_t selected;
} call_data;
-int smp_call_function(
+void smp_call_function(
void (*func) (void *info),
void *info,
int wait)
{
cpumask_t allbutself = cpu_online_map;
cpu_clear(smp_processor_id(), allbutself);
- return on_selected_cpus(&allbutself, func, info, wait);
+ on_selected_cpus(&allbutself, func, info, wait);
}
-int on_selected_cpus(
+void on_selected_cpus(
const cpumask_t *selected,
void (*func) (void *info),
void *info,
out:
spin_unlock(&call_lock);
- return 0;
}
static void __stop_this_cpu(void)
case CALLBACKTYPE_sysenter_deprecated:
if ( !cpu_has_sep )
ret = -EINVAL;
- else if ( on_each_cpu(do_update_sysenter, ®->address, 1) != 0 )
- ret = -EIO;
+ else
+ on_each_cpu(do_update_sysenter, ®->address, 1);
break;
case CALLBACKTYPE_sysenter:
/*
* Call a function on all other processors
*/
-extern int smp_call_function(
+extern void smp_call_function(
void (*func) (void *info),
void *info,
int wait);
/*
* Call a function on a selection of processors
*/
-extern int on_selected_cpus(
+extern void on_selected_cpus(
const cpumask_t *selected,
void (*func) (void *info),
void *info,
/*
* Call a function on all processors
*/
-static inline int on_each_cpu(
+static inline void on_each_cpu(
void (*func) (void *info),
void *info,
int wait)
{
- return on_selected_cpus(&cpu_online_map, func, info, wait);
+ on_selected_cpus(&cpu_online_map, func, info, wait);
}
#define smp_processor_id() raw_smp_processor_id()