[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-ia64-devel
Subject: [Xen-ia64-devel][PATCH] introduce iosapic ID, which is used to
From: "Xu, Anthony" <anthony.xu () intel ! com>
Date: 2008-09-27 7:11:47
Message-ID: F7C8A4D3A9905B45A80E4C194793FA6501ABAC1355 () PDSMSX501 ! ccr ! corp ! intel ! com
[Download RAW message or body]
introduce iosapci ID, which is used to index DMA engine covering this iosap=
ic
Signed-off-by; Anthony Xu < anthony.xu@intel.com >
["iosapic_id0927.patch" (application/octet-stream)]
introduce iosapci ID, which is used to index DMA engine covering this iosapic
Signed-off-by; Anthony Xu < anthony.xu@intel.com >
diff -r c88be82a020d xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c Sat Sep 27 14:30:29 2008 +0800
+++ b/xen/arch/ia64/linux-xen/acpi.c Sat Sep 27 14:47:13 2008 +0800
@@ -264,7 +264,11 @@
if (BAD_MADT_ENTRY(iosapic, end))
return -EINVAL;
+#ifndef XEN
return iosapic_init(iosapic->address, iosapic->global_irq_base);
+#else
+ return iosapic_init(iosapic->address, iosapic->global_irq_base, iosapic->id);
+#endif
}
static unsigned int __initdata acpi_madt_rev;
diff -r c88be82a020d xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Sat Sep 27 14:30:29 2008 +0800
+++ b/xen/arch/ia64/linux-xen/iosapic.c Sat Sep 27 14:47:13 2008 +0800
@@ -128,6 +128,7 @@
unsigned char trigger : 1; /* trigger mode (see iosapic.h) */
} iosapic_intr_info[IA64_NUM_VECTORS];
+#ifndef XEN
static struct iosapic {
char __iomem *addr; /* base address of IOSAPIC */
unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */
@@ -137,6 +138,9 @@
unsigned short node; /* numa node association via pxm */
#endif
} iosapic_lists[NR_IOSAPICS];
+#else
+struct iosapic iosapic_lists[NR_IOSAPICS];
+#endif
static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */
@@ -1035,7 +1039,11 @@
}
int __devinit
+#ifndef XEN
iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
+#else
+iosapic_init (unsigned long phys_addr, unsigned int gsi_base, unsigned int id)
+#endif
{
int num_rte, err, index;
unsigned int isa_irq, ver;
@@ -1064,6 +1072,9 @@
iosapic_lists[index].addr = addr;
iosapic_lists[index].gsi_base = gsi_base;
iosapic_lists[index].num_rte = num_rte;
+#ifdef XEN
+ iosapic_lists[index].id = id;
+#endif
#ifdef CONFIG_NUMA
iosapic_lists[index].node = MAX_NUMNODES;
#endif
diff -r c88be82a020d xen/include/asm-ia64/linux-xen/asm/iosapic.h
--- a/xen/include/asm-ia64/linux-xen/asm/iosapic.h Sat Sep 27 14:30:29 2008 +0800
+++ b/xen/include/asm-ia64/linux-xen/asm/iosapic.h Sat Sep 27 14:47:13 2008 +0800
@@ -53,6 +53,35 @@
#define NR_IOSAPICS 256
+#ifdef XEN
+struct iosapic {
+ char __iomem *addr; /* base address of IOSAPIC */
+ unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */
+ unsigned short num_rte; /* number of RTE in this IOSAPIC */
+ int rtes_inuse; /* # of RTEs in use on this IOSAPIC */
+ unsigned int id; /* APIC ID */
+#ifdef CONFIG_NUMA
+ unsigned short node; /* numa node association via pxm */
+#endif
+};
+
+extern struct iosapic iosapic_lists[NR_IOSAPICS];
+
+static inline int find_iosapic_by_addr(unsigned long addr)
+{
+ int i;
+
+ for (i = 0; i < NR_IOSAPICS; i++) {
+ if ((unsigned long)iosapic_lists[i].addr == addr)
+ return i;
+ }
+
+ return -1;
+}
+
+#endif
+
+
static inline unsigned int iosapic_read(char __iomem *iosapic, unsigned int reg)
{
writel(reg, iosapic + IOSAPIC_REG_SELECT);
@@ -71,8 +100,13 @@
}
extern void __init iosapic_system_init (int pcat_compat);
+#ifndef XEN
extern int __devinit iosapic_init (unsigned long address,
unsigned int gsi_base);
+#else
+extern int __devinit iosapic_init (unsigned long address,
+ unsigned int gsi_base, unsigned int id);
+#endif
#ifdef CONFIG_HOTPLUG
extern int iosapic_remove (unsigned int gsi_base);
#else
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic