summaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grukservices.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-04-02 16:59:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 19:05:07 -0700
commit27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48 (patch)
treec7fbe657ba4d31b1977b7247dd7626414246a1c3 /drivers/misc/sgi-gru/grukservices.c
parente1c3219d06447dab8a87b96df1211d158e21071e (diff)
downloadlinux-27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48.tar.bz2
sgi-gru: fix bugs related to module unload of the GRU driver
Fix bugs related to module unload of the GRU driver. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grukservices.c')
-rw-r--r--drivers/misc/sgi-gru/grukservices.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index a37128431155..6b1efe447274 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -690,3 +690,22 @@ int gru_kservices_init(struct gru_state *gru)
quicktest(gru);
return 0;
}
+
+void gru_kservices_exit(struct gru_state *gru)
+{
+ struct gru_context_configuration_handle *cch;
+ struct gru_blade_state *bs;
+
+ bs = gru->gs_blade;
+ if (gru != &bs->bs_grus[1])
+ return;
+
+ cch = get_cch(gru->gs_gru_base_vaddr, KERNEL_CTXNUM);
+ lock_cch_handle(cch);
+ if (cch_interrupt_sync(cch))
+ BUG();
+ if (cch_deallocate(cch))
+ BUG();
+ unlock_cch_handle(cch);
+}
+