diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 18:48:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 18:48:23 -0400 |
commit | 3de0ef8d0d3350964720cad2a0a72984f1bb81ba (patch) | |
tree | 86af0fe2a66c9975d9740e82a7ae1530280b8b38 /drivers/misc | |
parent | 06b77b97338e906e8af73a9b5f97b9162aac239d (diff) | |
parent | fe455b17de6c881eecf4f9784c3b0483a5e3d19e (diff) |
Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull x86/UV changes from Ingo Molnar:
"Continued updates for SGI UV 3 hardware support"
* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/UV: Fix conditional in gru_exit()
x86/UV: Set n_lshift based on GAM_GR_CONFIG MMR for UV3
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 0535d1e0bc78..104a05f6b738 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * This file supports the user system call for file open, close, mmap, etc. | 6 | * This file supports the user system call for file open, close, mmap, etc. |
7 | * This also incudes the driver initialization code. | 7 | * This also incudes the driver initialization code. |
8 | * | 8 | * |
9 | * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. | 9 | * Copyright (c) 2008-2014 Silicon Graphics, Inc. All Rights Reserved. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * 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; | |||
58 | 58 | ||
59 | static struct miscdevice gru_miscdev; | 59 | static struct miscdevice gru_miscdev; |
60 | 60 | ||
61 | static int gru_supported(void) | ||
62 | { | ||
63 | return is_uv_system() && | ||
64 | (uv_hub_info->hub_revision < UV3_HUB_REVISION_BASE); | ||
65 | } | ||
61 | 66 | ||
62 | /* | 67 | /* |
63 | * gru_vma_close | 68 | * gru_vma_close |
@@ -518,7 +523,7 @@ static int __init gru_init(void) | |||
518 | { | 523 | { |
519 | int ret; | 524 | int ret; |
520 | 525 | ||
521 | if (!is_uv_system() || (is_uvx_hub() && !is_uv2_hub())) | 526 | if (!gru_supported()) |
522 | return 0; | 527 | return 0; |
523 | 528 | ||
524 | #if defined CONFIG_IA64 | 529 | #if defined CONFIG_IA64 |
@@ -573,7 +578,7 @@ exit0: | |||
573 | 578 | ||
574 | static void __exit gru_exit(void) | 579 | static void __exit gru_exit(void) |
575 | { | 580 | { |
576 | if (!is_uv_system()) | 581 | if (!gru_supported()) |
577 | return; | 582 | return; |
578 | 583 | ||
579 | gru_teardown_tlb_irqs(); | 584 | gru_teardown_tlb_irqs(); |