Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / arch / ia64 / kernel / sal.c
index f44fe84..0464173 100644 (file)
@@ -109,6 +109,13 @@ check_versions (struct ia64_sal_systab *systab)
                sal_revision = SAL_VERSION_CODE(2, 8);
                sal_version = SAL_VERSION_CODE(0, 0);
        }
+
+       if (ia64_platform_is("sn2") && (sal_revision == SAL_VERSION_CODE(2, 9)))
+               /*
+                * SGI Altix has hard-coded version 2.9 in their prom
+                * but they actually implement 3.2, so let's fix it here.
+                */
+               sal_revision = SAL_VERSION_CODE(3, 2);
 }
 
 static void __init
@@ -222,6 +229,14 @@ static void __init sal_desc_ap_wakeup(void *p) { }
  */
 static int sal_cache_flush_drops_interrupts;
 
+static int __init
+force_pal_cache_flush(char *str)
+{
+       sal_cache_flush_drops_interrupts = 1;
+       return 0;
+}
+early_param("force_pal_cache_flush", force_pal_cache_flush);
+
 void __init
 check_sal_cache_flush (void)
 {
@@ -230,15 +245,17 @@ check_sal_cache_flush (void)
        u64 vector, cache_type = 3;
        struct ia64_sal_retval isrv;
 
+       if (sal_cache_flush_drops_interrupts)
+               return;
+
        cpu = get_cpu();
        local_irq_save(flags);
 
        /*
-        * Schedule a timer interrupt, wait until it's reported, and see if
-        * SAL_CACHE_FLUSH drops it.
+        * Send ourselves a timer interrupt, wait until it's reported, and see
+        * if SAL_CACHE_FLUSH drops it.
         */
-       ia64_set_itv(IA64_TIMER_VECTOR);
-       ia64_set_itm(ia64_get_itc() + 1000);
+       platform_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
 
        while (!ia64_get_irr(IA64_TIMER_VECTOR))
                cpu_relax();