Skip to content

Commit fe455b1

Browse files
Dimitri SivanichIngo Molnar
authored andcommitted
x86/UV: Fix conditional in gru_exit()
Fix supported system conditional in gru_exit(), in preparation for UV3. Signed-off-by: Dimitri Sivanich <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 5f40f7d commit fe455b1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/misc/sgi-gru/grufile.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* This file supports the user system call for file open, close, mmap, etc.
77
* This also incudes the driver initialization code.
88
*
9-
* Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
9+
* Copyright (c) 2008-2014 Silicon Graphics, Inc. All Rights Reserved.
1010
*
1111
* This program is free software; you can redistribute it and/or modify
1212
* it under the terms of the GNU General Public License as published by
@@ -58,6 +58,11 @@ static int max_user_cbrs, max_user_dsr_bytes;
5858

5959
static struct miscdevice gru_miscdev;
6060

61+
static int gru_supported(void)
62+
{
63+
return is_uv_system() &&
64+
(uv_hub_info->hub_revision < UV3_HUB_REVISION_BASE);
65+
}
6166

6267
/*
6368
* gru_vma_close
@@ -518,7 +523,7 @@ static int __init gru_init(void)
518523
{
519524
int ret;
520525

521-
if (!is_uv_system() || (is_uvx_hub() && !is_uv2_hub()))
526+
if (!gru_supported())
522527
return 0;
523528

524529
#if defined CONFIG_IA64
@@ -573,7 +578,7 @@ static int __init gru_init(void)
573578

574579
static void __exit gru_exit(void)
575580
{
576-
if (!is_uv_system())
581+
if (!gru_supported())
577582
return;
578583

579584
gru_teardown_tlb_irqs();

0 commit comments

Comments
 (0)