aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-i386/smpboot.h
diff options
context:
space:
mode:
authorrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>2003-03-14 15:58:24 +0000
committerrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>2003-03-14 15:58:24 +0000
commit0ec37682a14624a0f5097be9ea1fec77453dc8c1 (patch)
treebab97e72ada703fd5a1d9c774d3d0451d6ceade7 /xen/include/asm-i386/smpboot.h
parentd9812e47d9c20b15dbb920cc451eff1c7b88e81c (diff)
parentf9e443afb85c3843c8abd0760ee4a77b0aceeeed (diff)
downloadxen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.tar.gz
xen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.tar.bz2
xen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.zip
bitkeeper revision 1.126 (3e71fc20anCOs2KFyD3-AMyHjdJQfg)
resolve merge conflicts manually
Diffstat (limited to 'xen/include/asm-i386/smpboot.h')
-rw-r--r--xen/include/asm-i386/smpboot.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/xen/include/asm-i386/smpboot.h b/xen/include/asm-i386/smpboot.h
index ece215fab0..3ca484d531 100644
--- a/xen/include/asm-i386/smpboot.h
+++ b/xen/include/asm-i386/smpboot.h
@@ -116,6 +116,15 @@ static inline int target_cpus(void)
return cpu_online_map;
}
#else
-#define target_cpus() (0x01)
+/* KAF Xen: Round-robin allocate IRQs to CPUs. */
+static inline int target_cpus(void)
+{
+ static unsigned int cpu_field = 1;
+ do {
+ cpu_field <<= 1;
+ if ( cpu_field == 0x100 ) cpu_field = 1; /* logical field == 8 bits */
+ } while ( (cpu_field & cpu_online_map) == 0 );
+ return cpu_field;
+}
#endif
#endif