sgi-xp/sgi-gru: allow modules to load on non-uv systems
authorRobin Holt <holt@sgi.com>
Tue, 21 Apr 2009 19:24:53 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2009 20:41:50 +0000 (13:41 -0700)
For an upcoming distro release, we need to have the xp kernel module
loadable even when not on UV equipment.  The xpc module will not load.
This will allow one set of modules dependent upon xp to work on either UV
or non-UV equipment.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/sgi-gru/grufile.c
drivers/misc/sgi-xp/xp_main.c

index 3e6e42d..bbefe77 100644 (file)
@@ -375,7 +375,7 @@ static int __init gru_init(void)
        void *gru_start_vaddr;
 
        if (!is_uv_system())
        void *gru_start_vaddr;
 
        if (!is_uv_system())
-               return -ENODEV;
+               return 0;
 
 #if defined CONFIG_IA64
        gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
 
 #if defined CONFIG_IA64
        gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
index 16f8dca..7896849 100644 (file)
@@ -248,19 +248,19 @@ xp_init(void)
        enum xp_retval ret;
        int ch_number;
 
        enum xp_retval ret;
        int ch_number;
 
+       /* initialize the connection registration mutex */
+       for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
+               mutex_init(&xpc_registrations[ch_number].mutex);
+
        if (is_shub())
                ret = xp_init_sn2();
        else if (is_uv())
                ret = xp_init_uv();
        else
        if (is_shub())
                ret = xp_init_sn2();
        else if (is_uv())
                ret = xp_init_uv();
        else
-               ret = xpUnsupported;
+               ret = 0;
 
        if (ret != xpSuccess)
 
        if (ret != xpSuccess)
-               return -ENODEV;
-
-       /* initialize the connection registration mutex */
-       for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
-               mutex_init(&xpc_registrations[ch_number].mutex);
+               return ret;
 
        return 0;
 }
 
        return 0;
 }