Skip to content

Commit e873cff

Browse files
Robin Holttorvalds
authored andcommitted
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 <[email protected]> Signed-off-by: Jack Steiner <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2d7197f commit e873cff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/misc/sgi-gru/grufile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static int __init gru_init(void)
375375
void *gru_start_vaddr;
376376

377377
if (!is_uv_system())
378-
return -ENODEV;
378+
return 0;
379379

380380
#if defined CONFIG_IA64
381381
gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */

drivers/misc/sgi-xp/xp_main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,19 @@ xp_init(void)
248248
enum xp_retval ret;
249249
int ch_number;
250250

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+
251255
if (is_shub())
252256
ret = xp_init_sn2();
253257
else if (is_uv())
254258
ret = xp_init_uv();
255259
else
256-
ret = xpUnsupported;
260+
ret = 0;
257261

258262
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);
263+
return ret;
264264

265265
return 0;
266266
}

0 commit comments

Comments
 (0)