# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275386648 -3600
# Node ID 50991fc8e80135d9a92b2bfc4aebd82a22dcb838
# Parent 96a7c74acd2b388819eb870e3eb4a9c65eead2a4
smp_call_function/on_selected_cpus/on_each_cpu all return void.
None of them can fail, so a return code is pointless.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/ia64/linux-xen/perfmon.c | 12 ++----------
xen/arch/ia64/linux-xen/smp.c | 11 ++++-------
xen/arch/x86/cpu/mcheck/mce.c | 6 +-----
xen/arch/x86/smp.c | 11 +++++------
xen/arch/x86/x86_32/traps.c | 4 ++--
xen/include/xen/smp.h | 8 ++++----
6 files changed, 18 insertions(+), 34 deletions(-)
diff -r 96a7c74acd2b -r 50991fc8e801 xen/arch/ia64/linux-xen/perfmon.c
--- a/xen/arch/ia64/linux-xen/perfmon.c Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/arch/ia64/linux-xen/perfmon.c Tue Jun 01 11:04:08 2010 +0100
@@ -6895,11 +6895,7 @@ pfm_install_alt_pmu_interrupt(pfm_intr_h
}
/* 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;
@@ -6926,7 +6922,6 @@ pfm_remove_alt_pmu_interrupt(pfm_intr_ha
pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
{
int i;
- int ret;
if (hdl == NULL) return -EINVAL;
@@ -6940,10 +6935,7 @@ pfm_remove_alt_pmu_interrupt(pfm_intr_ha
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);
diff -r 96a7c74acd2b -r 50991fc8e801 xen/arch/ia64/linux-xen/smp.c
--- a/xen/arch/ia64/linux-xen/smp.c Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/arch/ia64/linux-xen/smp.c Tue Jun 01 11:04:08 2010 +0100
@@ -386,14 +386,14 @@ EXPORT_SYMBOL(smp_call_function_single);
* 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
@@ -435,12 +435,11 @@ smp_call_function (void (*func) (void *i
#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)
{
@@ -450,7 +449,7 @@ on_selected_cpus(const cpumask_t *select
ASSERT(local_irq_is_enabled());
if (!nr_cpus)
- return 0;
+ return;
data.func = func;
data.info = info;
@@ -470,8 +469,6 @@ on_selected_cpus(const cpumask_t *select
cpu_relax();
spin_unlock(&call_lock);
-
- return 0;
}
#endif
diff -r 96a7c74acd2b -r 50991fc8e801 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c Tue Jun 01 11:04:08 2010 +0100
@@ -1356,11 +1356,7 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u
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)
diff -r 96a7c74acd2b -r 50991fc8e801 xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/arch/x86/smp.c Tue Jun 01 11:04:08 2010 +0100
@@ -274,17 +274,17 @@ static struct call_data_struct {
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);
-}
-
-int on_selected_cpus(
+ on_selected_cpus(&allbutself, func, info, wait);
+}
+
+void on_selected_cpus(
const cpumask_t *selected,
void (*func) (void *info),
void *info,
@@ -323,7 +323,6 @@ int on_selected_cpus(
out:
spin_unlock(&call_lock);
- return 0;
}
static void __stop_this_cpu(void)
diff -r 96a7c74acd2b -r 50991fc8e801 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/arch/x86/x86_32/traps.c Tue Jun 01 11:04:08 2010 +0100
@@ -437,8 +437,8 @@ static long register_guest_callback(stru
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:
diff -r 96a7c74acd2b -r 50991fc8e801 xen/include/xen/smp.h
--- a/xen/include/xen/smp.h Tue Jun 01 10:56:07 2010 +0100
+++ b/xen/include/xen/smp.h Tue Jun 01 11:04:08 2010 +0100
@@ -28,7 +28,7 @@ extern void smp_cpus_done(unsigned int m
/*
* 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);
@@ -36,7 +36,7 @@ extern int smp_call_function(
/*
* 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,
@@ -51,12 +51,12 @@ void smp_prepare_boot_cpu(void);
/*
* 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()
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|