direct-io.hg

view xen/arch/powerpc/smp.c @ 12941:067bf06057cc

[POWERPC][XEN] implement the UP side of __flush_tlb_mask()
The SMP side will need to be done soone enough
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Sat Oct 07 16:25:46 2006 -0400 (2006-10-07)
parents 2a10ce87327c
children f911e945d959
line source
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright (C) IBM Corp. 2005
17 *
18 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
19 */
21 #include <xen/cpumask.h>
22 #include <xen/smp.h>
23 #include <asm/flushtlb.h>
24 #include <asm/debugger.h>
26 int smp_num_siblings = 1;
27 int smp_num_cpus = 1;
28 int ht_per_core = 1;
30 void __flush_tlb_mask(cpumask_t mask, unsigned long addr)
31 {
32 if (cpu_isset(smp_processor_id(), mask)) {
33 cpu_clear(smp_processor_id(), mask);
34 if (cpus_empty(mask)) {
35 /* only local */
36 if (addr == FLUSH_ALL_ADDRS)
37 local_flush_tlb();
38 else
39 local_flush_tlb_one(addr);
40 return;
41 }
42 }
43 /* if we are still here and the mask is non-empty, then we need to
44 * flush other TLBs so we flush em all */
45 if (!cpus_empty(mask))
46 unimplemented();
47 }
49 void smp_send_event_check_mask(cpumask_t mask)
50 {
51 cpu_clear(smp_processor_id(), mask);
52 if (!cpus_empty(mask))
53 unimplemented();
54 }
57 int smp_call_function(void (*func) (void *info), void *info, int retry,
58 int wait)
59 {
60 cpumask_t allbutself = cpu_online_map;
61 cpu_clear(smp_processor_id(), allbutself);
63 return on_selected_cpus(allbutself, func, info, retry, wait);
64 }
66 void smp_send_stop(void)
67 {
68 unimplemented();
69 }
71 int on_selected_cpus(
72 cpumask_t selected,
73 void (*func) (void *info),
74 void *info,
75 int retry,
76 int wait)
77 {
78 unimplemented();
79 return 0;
80 }