linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / ia64 / kernel / sal.c
index 642fdc7..056f7a6 100644 (file)
@@ -6,6 +6,7 @@
  * Copyright (C) 1999 VA Linux Systems
  * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
  */
+#include <linux/config.h>
 
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -226,7 +227,7 @@ static int sal_cache_flush_drops_interrupts;
 static void __init
 check_sal_cache_flush (void)
 {
-       unsigned long flags;
+       unsigned long flags, itv;
        int cpu;
        u64 vector;
 
@@ -237,6 +238,9 @@ check_sal_cache_flush (void)
         * Schedule a timer interrupt, wait until it's reported, and see if
         * SAL_CACHE_FLUSH drops it.
         */
+       itv = ia64_get_itv();
+       BUG_ON((itv & (1 << 16)) == 0);
+
        ia64_set_itv(IA64_TIMER_VECTOR);
        ia64_set_itm(ia64_get_itc() + 1000);
 
@@ -256,6 +260,7 @@ check_sal_cache_flush (void)
                ia64_eoi();
        }
 
+       ia64_set_itv(itv);
        local_irq_restore(flags);
        put_cpu();
 }