sgi-xp/sgi-gru: allow modules to load on non-uv systems

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>

authored by Robin Holt and committed by Linus Torvalds e873cff0 2d7197f4

+7 -7
+1 -1
drivers/misc/sgi-gru/grufile.c
··· 375 void *gru_start_vaddr; 376 377 if (!is_uv_system()) 378 - return -ENODEV; 379 380 #if defined CONFIG_IA64 381 gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
··· 375 void *gru_start_vaddr; 376 377 if (!is_uv_system()) 378 + return 0; 379 380 #if defined CONFIG_IA64 381 gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
+6 -6
drivers/misc/sgi-xp/xp_main.c
··· 248 enum xp_retval ret; 249 int ch_number; 250 251 if (is_shub()) 252 ret = xp_init_sn2(); 253 else if (is_uv()) 254 ret = xp_init_uv(); 255 else 256 - ret = xpUnsupported; 257 258 if (ret != xpSuccess) 259 - return -ENODEV; 260 - 261 - /* initialize the connection registration mutex */ 262 - for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++) 263 - mutex_init(&xpc_registrations[ch_number].mutex); 264 265 return 0; 266 }
··· 248 enum xp_retval ret; 249 int ch_number; 250 251 + /* initialize the connection registration mutex */ 252 + for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++) 253 + mutex_init(&xpc_registrations[ch_number].mutex); 254 + 255 if (is_shub()) 256 ret = xp_init_sn2(); 257 else if (is_uv()) 258 ret = xp_init_uv(); 259 else 260 + ret = 0; 261 262 if (ret != xpSuccess) 263 + return ret; 264 265 return 0; 266 }