]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] workaround tiger ia64_sal_get_physical_id_info hang
authorAlex Chiang <achiang@hp.com>
Thu, 28 Feb 2008 01:41:38 +0000 (18:41 -0700)
committerTony Luck <tony.luck@intel.com>
Tue, 4 Mar 2008 22:26:50 +0000 (14:26 -0800)
This fixes regression introduced in 113134fcbca83619be4c68d0ca66db6093777b5d

Intel Tiger platforms hang when calling SAL_GET_PHYSICAL_ID_INFO
instead of properly returning -1 for unimplemented, so add a
version check.

SGI Altix platforms have an incorrect SAL version hard-coded into
their prom -- they encode 2.9, but actually implement 3.2 -- so
fix it up and allow ia64_sal_get_physical_id_info to keep
working.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/sal.c
include/asm-ia64/sal.h

index f44fe8412162c55b73b80663d8bb3e8d4d3d50a9..a3022dc48ef8432a437256948d5a25080b1cf24d 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
index 2251118894ae0005f193a2befa8c5a11b963f4e0..f4904db3b0573c486d7bfe303076245d8d76a8f1 100644 (file)
@@ -807,6 +807,10 @@ static inline s64
 ia64_sal_physical_id_info(u16 *splid)
 {
        struct ia64_sal_retval isrv;
+
+       if (sal_revision < SAL_VERSION_CODE(3,2))
+               return -1;
+
        SAL_CALL(isrv, SAL_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0);
        if (splid)
                *splid = isrv.v0;