WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] introduce iosapci ID.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] introduce iosapci ID.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Oct 2008 20:00:52 -0700
Delivery-date: Fri, 10 Oct 2008 20:03:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1223607483 -32400
# Node ID af8eaa3cf78200568bdfd7e7d87a546c53e6bd7b
# Parent  1a77bb358d7b1416a1f453f8ebd0039d3db44e6f
[IA64] introduce iosapci ID.

introduce iosapci ID, which is used to index DMA engine covering this iosapic.

Signed-off-by; Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/linux-xen/acpi.c               |    5 ++++
 xen/arch/ia64/linux-xen/iosapic.c            |   11 +++++++++
 xen/include/asm-ia64/linux-xen/asm/iosapic.h |   33 +++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff -r 1a77bb358d7b -r af8eaa3cf782 xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c    Fri Oct 10 11:57:23 2008 +0900
+++ b/xen/arch/ia64/linux-xen/acpi.c    Fri Oct 10 11:58:03 2008 +0900
@@ -294,7 +294,12 @@ acpi_parse_iosapic(struct acpi_subtable_
        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 1a77bb358d7b -r af8eaa3cf782 xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Fri Oct 10 11:57:23 2008 +0900
+++ b/xen/arch/ia64/linux-xen/iosapic.c Fri Oct 10 11:58:03 2008 +0900
@@ -128,6 +128,7 @@ static struct iosapic_intr_info {
        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 @@ static struct iosapic {
        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 @@ iosapic_check_gsi_range (unsigned int gs
 }
 
 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_init (unsigned long phys_addr, u
                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 1a77bb358d7b -r af8eaa3cf782 
xen/include/asm-ia64/linux-xen/asm/iosapic.h
--- a/xen/include/asm-ia64/linux-xen/asm/iosapic.h      Fri Oct 10 11:57:23 
2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/iosapic.h      Fri Oct 10 11:58:03 
2008 +0900
@@ -53,6 +53,34 @@
 
 #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 +99,13 @@ static inline void iosapic_eoi(char __io
 }
 
 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] introduce iosapci ID., Xen patchbot-unstable <=