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-devel

Re: [Xen-devel] Latest xen-unstable on IBM x440

To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Latest xen-unstable on IBM x440
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Thu, 05 May 2005 13:19:50 -0700
Delivery-date: Thu, 05 May 2005 20:19:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <427976C6.7060502@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <mailman.1115240819.4732@xxxxxxxxxxxxxxxxxxxx> <427976C6.7060502@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)
Arun Sharma wrote:

Parsing the MPS table is working now on my machine, but interrupts are still not getting routed. I'm probably a couple of bug fixes away from getting acpi=off/ht to work.


People having trouble with the PCI/IOAPIC patch, could you give this patch a try?

It works with acpi=off and acpi=ht on my machine.

        -Arun

PS: PCI initialization is sensitive to the order of object files within the Makefile. I think that's a bit fragile...
===== arch/xen/i386/Kconfig 1.21 vs edited =====
--- 1.21/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig  2005-05-03 07:27:52 
-07:00
+++ edited/arch/xen/i386/Kconfig        2005-05-04 14:11:59 -07:00
@@ -961,7 +961,7 @@
 config X86_FIND_SMP_CONFIG
        bool
        depends on X86_LOCAL_APIC || X86_VOYAGER
-       default n
+       default y
 
 config X86_MPPARSE
        bool
===== arch/xen/i386/kernel/apic.c 1.1 vs edited =====
--- 1.1/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/apic.c     2005-05-03 
07:27:53 -07:00
+++ edited/arch/xen/i386/kernel/apic.c  2005-05-04 18:14:58 -07:00
@@ -49,5 +49,11 @@
  */
 int __init APIC_init_uniprocessor (void)
 {
+#ifdef CONFIG_X86_IO_APIC
+        extern int smp_found_config;
+       if (smp_found_config)
+                /* Xen assumes IO_APIC */
+               setup_IO_APIC();
+#endif
        return 0;
 }
===== arch/xen/i386/kernel/io_apic.c 1.1 vs edited =====
--- 1.1/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/io_apic.c  2005-05-03 
07:27:53 -07:00
+++ edited/arch/xen/i386/kernel/io_apic.c       2005-05-04 15:29:07 -07:00
@@ -108,6 +108,23 @@
 }
 
 /*
+ *
+ * IRQ's that are handled by the PIC in the MPS IOAPIC case.
+ * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ.
+ *   Linux doesn't really care, as it's not actually used
+ *   for any interrupt handling anyway.
+ */
+#define PIC_IRQS       (1 << PIC_CASCADE_IR)
+
+void __init setup_IO_APIC(void)
+{
+       if (acpi_ioapic)
+               io_apic_irqs = ~0;      /* all IRQs go through IOAPIC */
+       else
+               io_apic_irqs = ~PIC_IRQS;
+} 
+
+/*
  * The common case is 1:1 IRQ<->pin mappings. Sometimes there are
  * shared ISA-space IRQs, so we have to support them. We are super
  * fast in the common case, and fast for shared ISA-space IRQs.
===== arch/xen/i386/kernel/mpparse.c 1.2 vs edited =====
--- 1.2/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c  2005-05-03 
10:44:11 -07:00
+++ edited/arch/xen/i386/kernel/mpparse.c       2005-05-05 13:06:16 -07:00
@@ -429,9 +429,7 @@
                        {
                                struct mpc_config_processor *m=
                                        (struct mpc_config_processor *)mpt;
-                               /* ACPI may have already provided this data */
-                               if (!acpi_lapic)
-                                       MP_processor_info(m);
+                               /* We ignore the processors in the MP table */
                                mpt += sizeof(*m);
                                count += sizeof(*m);
                                break;
@@ -482,9 +480,8 @@
                ++mpc_record;
        }
        clustered_apic_check();
-       if (!num_processors)
-               printk(KERN_ERR "SMP mptable: no processors registered!\n");
-       return num_processors;
+        num_processors = 1; /* Doesn't really matter */
+       return 1;
 }
 
 static int __init ELCR_trigger(unsigned int irq)
@@ -690,7 +687,7 @@
                 * Read the physical hardware table.  Anything here will
                 * override the defaults.
                 */
-               if (!smp_read_mpc((void *)mpf->mpf_physptr)) {
+               if (!smp_read_mpc((void *)isa_bus_to_virt(mpf->mpf_physptr))) {
                        smp_found_config = 0;
                        printk(KERN_ERR "BIOS bug, MP table errors 
detected!...\n");
                        printk(KERN_ERR "... disabling SMP support. (tell your 
hw vendor)\n");
@@ -726,6 +723,7 @@
 static int __init smp_scan_config (unsigned long base, unsigned long length)
 {
        unsigned long *bp = isa_bus_to_virt(base);
+        unsigned long isa_bus_off = ((unsigned long) bp) - base;
        struct intel_mp_floating *mpf;
 
        Dprintk("Scan SMP from %p for %ld bytes.\n", bp,length);
@@ -742,8 +740,7 @@
 
                        smp_found_config = 1;
                        printk(KERN_INFO "found SMP MP-table at %08lx\n",
-                                               virt_to_phys(mpf));
-                       reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE);
+                                               mpf - isa_bus_off);
                        if (mpf->mpf_physptr) {
                                /*
                                 * We cannot access to MPC table to compute
@@ -758,7 +755,6 @@
                                unsigned long end = max_low_pfn * PAGE_SIZE;
                                if (mpf->mpf_physptr + size > end)
                                        size = end - mpf->mpf_physptr;
-                               reserve_bootmem(mpf->mpf_physptr, size);
                        }
 
                        mpf_found = mpf;
===== arch/xen/i386/kernel/setup.c 1.45 vs edited =====
--- 1.45/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c   2005-05-03 
10:44:11 -07:00
+++ edited/arch/xen/i386/kernel/setup.c 2005-05-04 14:12:33 -07:00
@@ -1133,13 +1133,6 @@
         */
        acpi_reserve_bootmem();
 #endif
-#ifdef CONFIG_X86_FIND_SMP_CONFIG
-       /*
-        * Find and reserve possible boot-time SMP configuration:
-        */
-       find_smp_config();
-#endif
-
 #ifdef CONFIG_BLK_DEV_INITRD
        if (xen_start_info.mod_start) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -1566,6 +1559,12 @@
        if (efi_enabled)
                efi_map_memmap();
 
+#ifdef CONFIG_X86_FIND_SMP_CONFIG
+       /*
+        * Find and reserve possible boot-time SMP configuration:
+        */
+       find_smp_config();
+#endif
        /*
         * Parse the ACPI tables for possible boot-time SMP configuration.
         */
===== arch/xen/i386/pci/Makefile 1.9 vs edited =====
--- 1.9/linux-2.6.11-xen-sparse/arch/xen/i386/pci/Makefile      2005-05-03 
10:24:40 -07:00
+++ edited/arch/xen/i386/pci/Makefile   2005-05-05 13:01:01 -07:00
@@ -10,8 +10,7 @@
 
 c-pci-y                                := fixup.o
 c-pci-$(CONFIG_ACPI_PCI)       += acpi.o
-c-pci-y                                += legacy.o
-pci-y                          += irq.o
+c-pci-y                                += legacy.o irq.o
 
 c-pci-$(CONFIG_X86_VISWS)      := visws.o fixup.o
 pci-$(CONFIG_X86_VISWS)                :=
===== arch/xen/i386/pci/irq.c 1.15 vs edited =====
--- 1.15/linux-2.6.11-xen-sparse/arch/xen/i386/pci/irq.c        2005-05-03 
07:27:52 -07:00
+++ edited/arch/xen/i386/pci/irq.c      2005-05-05 13:07:25 -07:00
@@ -21,8 +21,6 @@
 
 #include "pci.h"
 
-#define DBG printk
-
 #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
 #define PIRQ_VERSION 0x0100
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel