aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'xen/include/asm-i386')
-rw-r--r--xen/include/asm-i386/irq.h1
-rw-r--r--xen/include/asm-i386/pci.h12
-rw-r--r--xen/include/asm-i386/smpboot.h11
3 files changed, 17 insertions, 7 deletions
diff --git a/xen/include/asm-i386/irq.h b/xen/include/asm-i386/irq.h
index 41049e71b2..21c24f4483 100644
--- a/xen/include/asm-i386/irq.h
+++ b/xen/include/asm-i386/irq.h
@@ -8,6 +8,7 @@
#define SA_INTERRUPT 0x20000000
#define SA_SHIRQ 0x04000000
+#define SA_NOPROFILE 0x02000000
#define SA_SAMPLE_RANDOM 0 /* Linux driver compatibility */
diff --git a/xen/include/asm-i386/pci.h b/xen/include/asm-i386/pci.h
index 1ffade8914..a38bef4986 100644
--- a/xen/include/asm-i386/pci.h
+++ b/xen/include/asm-i386/pci.h
@@ -151,17 +151,17 @@ static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
for (i = 0; i < nents; i++ ) {
if (sg[i].address && sg[i].page)
out_of_line_bug();
-
- /* not worth checking since NULL is ok says SMH */
#if 0
- else if (!sg[i].address && !sg[i].page)
+ /* Invalid check, since address==0 is valid. */
+ else if (!sg[i].address && !sg[i].page)
out_of_line_bug();
#endif
- if (sg[i].address)
- sg[i].dma_address = virt_to_bus(sg[i].address);
- else
+ /* XXX Switched round, since address==0 is valid. */
+ if (sg[i].page)
sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
+ else
+ sg[i].dma_address = virt_to_bus(sg[i].address);
}
flush_write_buffers();
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