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] Various cleanups.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Various cleanups.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 10 May 2005 10:53:32 +0000
Delivery-date: Tue, 10 May 2005 11:04:55 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1468, 2005/05/10 11:53:32+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Various cleanups.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 arch/x86/io_apic.c            |   37 +------------------------------------
 arch/x86/mtrr/main.c          |    1 +
 arch/x86/traps.c              |    5 +++--
 arch/x86/x86_32/asm-offsets.c |    2 +-
 arch/x86/x86_32/mm.c          |    2 +-
 arch/x86/x86_64/mm.c          |    2 +-
 include/asm-x86/fixmap.h      |   23 +----------------------
 7 files changed, 9 insertions(+), 63 deletions(-)


diff -Nru a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/io_apic.c    2005-05-10 07:05:27 -04:00
@@ -1233,7 +1233,6 @@
 
 void __init print_IO_APIC(void)
 {
-#ifndef NDEBUG
        int apic, i;
        union IO_APIC_reg_00 reg_00;
        union IO_APIC_reg_01 reg_01;
@@ -1377,7 +1376,7 @@
        }
 
        printk(KERN_INFO ".................................... done.\n");
-#endif /* !NDEBUG */
+
        return;
 }
 
@@ -1830,26 +1829,6 @@
        .end            = end_lapic_irq
 };
 
-#if 0
-static void setup_nmi (void)
-{
-       /*
-        * Dirty trick to enable the NMI watchdog ...
-        * We put the 8259A master into AEOI mode and
-        * unmask on all local APICs LVT0 as NMI.
-        *
-        * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire')
-        * is from Maciej W. Rozycki - so we do not have to EOI from
-        * the NMI handler or the timer interrupt.
-        */ 
-       apic_printk(APIC_VERBOSE, KERN_INFO "activating NMI Watchdog ...");
-
-       on_each_cpu(enable_NMI_through_LVT0, NULL, 1, 1);
-
-       apic_printk(APIC_VERBOSE, " done.\n");
-}
-#endif
-
 /*
  * This looks a bit hackish but it's about the only one way of sending
  * a few INTA cycles to 8259As and any associated glue logic.  ICR does
@@ -1953,14 +1932,6 @@
                 */
                unmask_IO_APIC_irq(0);
                if (timer_irq_works()) {
-#if 0
-                       if (nmi_watchdog == NMI_IO_APIC) {
-                               disable_8259A_irq(0);
-                               setup_nmi();
-                               enable_8259A_irq(0);
-                               check_nmi_watchdog();
-                       }
-#endif
                        return;
                }
                clear_IO_APIC_pin(0, pin1);
@@ -1980,12 +1951,6 @@
                                replace_pin_at_irq(0, 0, pin1, 0, pin2);
                        else
                                add_pin_to_irq(0, 0, pin2);
-#if 0
-                       if (nmi_watchdog == NMI_IO_APIC) {
-                               setup_nmi();
-                               check_nmi_watchdog();
-                       }
-#endif
                        return;
                }
                /*
diff -Nru a/xen/arch/x86/mtrr/main.c b/xen/arch/x86/mtrr/main.c
--- a/xen/arch/x86/mtrr/main.c  2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/mtrr/main.c  2005-05-10 07:05:27 -04:00
@@ -34,6 +34,7 @@
 #include <xen/config.h>
 #include <xen/init.h>
 #include <xen/pci.h>
+#include <xen/slab.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
 #include <asm/mtrr.h>
diff -Nru a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/traps.c      2005-05-10 07:05:27 -04:00
@@ -115,7 +115,8 @@
     if ( trapnr == TRAP_page_fault )
     {
         __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (cr2) : );
-        printk("Faulting linear address might be %p\n", _p(cr2));
+        printk("Faulting linear address: %p\n", _p(cr2));
+        show_page_walk(cr2);
     }
 
     printk("************************************\n");
@@ -349,7 +350,7 @@
     show_page_walk(addr);
     panic("CPU%d FATAL PAGE FAULT\n"
           "[error_code=%04x]\n"
-          "Faulting linear address might be %p\n",
+          "Faulting linear address: %p\n",
           smp_processor_id(), regs->error_code, addr);
     return 0;
 }
diff -Nru a/xen/arch/x86/x86_32/asm-offsets.c 
b/xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c 2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/x86_32/asm-offsets.c 2005-05-10 07:05:27 -04:00
@@ -90,7 +90,7 @@
     OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
     BLANK();
 
-    DEFINE(FIXMAP_apic_base, __fix_to_virt(FIX_APIC_BASE));
+    DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
     BLANK();
 
     DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
diff -Nru a/xen/arch/x86/x86_32/mm.c b/xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/x86_32/mm.c  2005-05-10 07:05:27 -04:00
@@ -83,7 +83,7 @@
 {
     if ( unlikely(idx >= __end_of_fixed_addresses) )
         BUG();
-    map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
+    map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
 }
 
 
diff -Nru a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  2005-05-10 07:05:27 -04:00
+++ b/xen/arch/x86/x86_64/mm.c  2005-05-10 07:05:27 -04:00
@@ -125,7 +125,7 @@
 {
     if ( unlikely(idx >= __end_of_fixed_addresses) )
         BUG();
-    map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
+    map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
 }
 
 
diff -Nru a/xen/include/asm-x86/fixmap.h b/xen/include/asm-x86/fixmap.h
--- a/xen/include/asm-x86/fixmap.h      2005-05-10 07:05:27 -04:00
+++ b/xen/include/asm-x86/fixmap.h      2005-05-10 07:05:27 -04:00
@@ -56,28 +56,7 @@
 #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
 #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
 
-extern void __this_fixmap_does_not_exist(void);
-
-/*
- * 'index to address' translation. If anyone tries to use the idx
- * directly without translation, we catch the bug with a NULL-deference
- * kernel oops. Illegal ranges of incoming indices are caught too.
- */
-static always_inline unsigned long fix_to_virt(const unsigned int idx)
-{
-    /*
-     * This branch gets completely eliminated after inlining, except when 
-     * someone tries to use fixaddr indices in an illegal way (such as mixing 
-     * up address types or using out-of-range indices).
-     *
-     * If it doesn't get removed, the linker will complain loudly with a 
-     * reasonably clear error message.
-     */
-    if (idx >= __end_of_fixed_addresses)
-        __this_fixmap_does_not_exist();
-
-    return __fix_to_virt(idx);
-}
+#define fix_to_virt(x)   (__fix_to_virt(x))
 
 static inline unsigned long virt_to_fix(const unsigned long vaddr)
 {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Various cleanups., BitKeeper Bot <=