[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v6 20/27] arm: shutdown, smp and smpboot
Dummy implementation of machine_* and smp_* Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx> --- xen/arch/arm/shutdown.c | 23 +++++++++++++++++++++ xen/arch/arm/smp.c | 29 +++++++++++++++++++++++++++ xen/arch/arm/smpboot.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 0 deletions(-) create mode 100644 xen/arch/arm/shutdown.c create mode 100644 xen/arch/arm/smp.c create mode 100644 xen/arch/arm/smpboot.c diff --git a/xen/arch/arm/shutdown.c b/xen/arch/arm/shutdown.c new file mode 100644 index 0000000..2e35d2d --- /dev/null +++ b/xen/arch/arm/shutdown.c @@ -0,0 +1,23 @@ +#include <xen/config.h> +#include <xen/lib.h> + +void machine_halt(void) +{ + /* TODO: halt */ + while(1) ; +} + +void machine_restart(unsigned int delay_millisecs) +{ + /* TODO: restart */ + printk("Cannot restart yet\n"); + while(1); +} +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c new file mode 100644 index 0000000..cad84f5 --- /dev/null +++ b/xen/arch/arm/smp.c @@ -0,0 +1,29 @@ +#include <xen/config.h> +#include <asm/smp.h> + +void smp_call_function( + void (*func) (void *info), + void *info, + int wait) +{ + /* TODO: No SMP just now, does not include self so nothing to do. + cpumask_t allbutself = cpu_online_map; + cpu_clear(smp_processor_id(), allbutself); + on_selected_cpus(&allbutself, func, info, wait); + */ +} +void smp_send_event_check_mask(const cpumask_t *mask) +{ + /* TODO: No SMP just now, does not include self so nothing to do. + send_IPI_mask(mask, EVENT_CHECK_VECTOR); + */ +} + +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c new file mode 100644 index 0000000..8287473 --- /dev/null +++ b/xen/arch/arm/smpboot.c @@ -0,0 +1,50 @@ +/* + * xen/arch/arm/smpboot.c + * + * Dummy smpboot support + * + * Copyright (c) 2011 Citrix Systems. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <xen/cpumask.h> +#include <xen/smp.h> +#include <xen/init.h> + +cpumask_t cpu_online_map; +EXPORT_SYMBOL(cpu_online_map); +cpumask_t cpu_present_map; +EXPORT_SYMBOL(cpu_online_map); +cpumask_t cpu_possible_map; +EXPORT_SYMBOL(cpu_possible_map); + +void __init +smp_prepare_cpus (unsigned int max_cpus) +{ + set_processor_id(0); /* needed early, for smp_processor_id() */ + + cpumask_clear(&cpu_online_map); + cpumask_clear(&cpu_present_map); + cpumask_clear(&cpu_possible_map); + cpumask_set_cpu(0, &cpu_online_map); + cpumask_set_cpu(0, &cpu_present_map); + cpumask_set_cpu(0, &cpu_possible_map); + return; +} +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |