Skip to content

Commit

Permalink
x86/UV: Fix conditional in gru_exit()
Browse files Browse the repository at this point in the history
Fix supported system conditional in gru_exit(), in preparation for UV3.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Link: http://lkml.kernel.org/r/20140331152320.GA31495@sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Dimitri Sivanich authored and Ingo Molnar committed Apr 1, 2014
1 parent 5f40f7d commit fe455b1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/misc/sgi-gru/grufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file supports the user system call for file open, close, mmap, etc.
* This also incudes the driver initialization code.
*
* Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2008-2014 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -58,6 +58,11 @@ static int max_user_cbrs, max_user_dsr_bytes;

static struct miscdevice gru_miscdev;

static int gru_supported(void)
{
return is_uv_system() &&
(uv_hub_info->hub_revision < UV3_HUB_REVISION_BASE);
}

/*
* gru_vma_close
Expand Down Expand Up @@ -518,7 +523,7 @@ static int __init gru_init(void)
{
int ret;

if (!is_uv_system() || (is_uvx_hub() && !is_uv2_hub()))
if (!gru_supported())
return 0;

#if defined CONFIG_IA64
Expand Down Expand Up @@ -573,7 +578,7 @@ static int __init gru_init(void)

static void __exit gru_exit(void)
{
if (!is_uv_system())
if (!gru_supported())
return;

gru_teardown_tlb_irqs();
Expand Down

0 comments on commit fe455b1

Please sign in to comment.