Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139743
b: refs/heads/master
c: 27ca8a7
h: refs/heads/master
i:
  139741: c641941
  139739: 28c5592
  139735: 377d022
  139727: 250af09
  139711: bfbdd06
v: v3
  • Loading branch information
Jack Steiner authored and Linus Torvalds committed Apr 3, 2009
1 parent 440ad35 commit ab5938b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1c3219d06447dab8a87b96df1211d158e21071e
refs/heads/master: 27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48
5 changes: 4 additions & 1 deletion trunk/drivers/misc/sgi-gru/grufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static int __init gru_init(void)

static void __exit gru_exit(void)
{
int i, bid;
int i, bid, gid;
int order = get_order(sizeof(struct gru_state) *
GRU_CHIPLETS_PER_BLADE);

Expand All @@ -450,6 +450,9 @@ static void __exit gru_exit(void)
for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++)
free_irq(IRQ_GRU + i, NULL);

foreach_gid(gid)
gru_kservices_exit(GID_TO_GRU(gid));

for (bid = 0; bid < GRU_MAX_BLADES; bid++)
free_pages((unsigned long)gru_base[bid], order);

Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/misc/sgi-gru/grukservices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

1 change: 1 addition & 0 deletions trunk/drivers/misc/sgi-gru/grutables.h
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ extern void gru_unload_context(struct gru_thread_state *gts, int savestate);
extern void gts_drop(struct gru_thread_state *gts);
extern void gru_tgh_flush_init(struct gru_state *gru);
extern int gru_kservices_init(struct gru_state *gru);
extern void gru_kservices_exit(struct gru_state *gru);
extern irqreturn_t gru_intr(int irq, void *dev_id);
extern int gru_handle_user_call_os(unsigned long address);
extern int gru_user_flush_tlb(unsigned long arg);
Expand Down

0 comments on commit ab5938b

Please sign in to comment.