diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grumain.c')
-rw-r--r-- | drivers/misc/sgi-gru/grumain.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index 6358244f392d..0c7bd384f0cf 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c | |||
@@ -537,13 +537,12 @@ void gru_load_context(struct gru_thread_state *gts) | |||
537 | { | 537 | { |
538 | struct gru_state *gru = gts->ts_gru; | 538 | struct gru_state *gru = gts->ts_gru; |
539 | struct gru_context_configuration_handle *cch; | 539 | struct gru_context_configuration_handle *cch; |
540 | int err, asid, ctxnum = gts->ts_ctxnum; | 540 | int i, err, asid, ctxnum = gts->ts_ctxnum; |
541 | 541 | ||
542 | gru_dbg(grudev, "gts %p\n", gts); | 542 | gru_dbg(grudev, "gts %p\n", gts); |
543 | cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); | 543 | cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); |
544 | 544 | ||
545 | lock_cch_handle(cch); | 545 | lock_cch_handle(cch); |
546 | asid = gru_load_mm_tracker(gru, gts); | ||
547 | cch->tfm_fault_bit_enable = | 546 | cch->tfm_fault_bit_enable = |
548 | (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL | 547 | (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL |
549 | || gts->ts_user_options == GRU_OPT_MISS_FMM_INTR); | 548 | || gts->ts_user_options == GRU_OPT_MISS_FMM_INTR); |
@@ -553,8 +552,16 @@ void gru_load_context(struct gru_thread_state *gts) | |||
553 | cch->tlb_int_select = gts->ts_tlb_int_select; | 552 | cch->tlb_int_select = gts->ts_tlb_int_select; |
554 | } | 553 | } |
555 | cch->tfm_done_bit_enable = 0; | 554 | cch->tfm_done_bit_enable = 0; |
556 | err = cch_allocate(cch, asid, gts->ts_sizeavail, gts->ts_cbr_map, | 555 | cch->dsr_allocation_map = gts->ts_dsr_map; |
557 | gts->ts_dsr_map); | 556 | cch->cbr_allocation_map = gts->ts_cbr_map; |
557 | asid = gru_load_mm_tracker(gru, gts); | ||
558 | cch->unmap_enable = 0; | ||
559 | for (i = 0; i < 8; i++) { | ||
560 | cch->asid[i] = asid + i; | ||
561 | cch->sizeavail[i] = gts->ts_sizeavail; | ||
562 | } | ||
563 | |||
564 | err = cch_allocate(cch); | ||
558 | if (err) { | 565 | if (err) { |
559 | gru_dbg(grudev, | 566 | gru_dbg(grudev, |
560 | "err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n", | 567 | "err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n", |