aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grumain.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-12-15 19:48:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:16 -0500
commit563447d7eb04c9b382f90a132be126a21a635647 (patch)
tree66db9c281ed1b64fcdceab1beb34350339bf306c /drivers/misc/sgi-gru/grumain.c
parent4107e1d38a23028c2a3bc23dd948265dbe6becba (diff)
gru: add additional GRU statistics
Add additional GRU statistics & debug messages. 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/grumain.c')
-rw-r--r--drivers/misc/sgi-gru/grumain.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c
index 120c70c5a28a..ebabbdcbb97f 100644
--- a/drivers/misc/sgi-gru/grumain.c
+++ b/drivers/misc/sgi-gru/grumain.c
@@ -370,6 +370,7 @@ struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma, int tsid)
370 if (!vdata) 370 if (!vdata)
371 return NULL; 371 return NULL;
372 372
373 STAT(vdata_alloc);
373 INIT_LIST_HEAD(&vdata->vd_head); 374 INIT_LIST_HEAD(&vdata->vd_head);
374 spin_lock_init(&vdata->vd_lock); 375 spin_lock_init(&vdata->vd_lock);
375 gru_dbg(grudev, "alloc vdata %p\n", vdata); 376 gru_dbg(grudev, "alloc vdata %p\n", vdata);
@@ -552,7 +553,8 @@ void gru_unload_context(struct gru_thread_state *gts, int savestate)
552 zap_vma_ptes(gts->ts_vma, UGRUADDR(gts), GRU_GSEG_PAGESIZE); 553 zap_vma_ptes(gts->ts_vma, UGRUADDR(gts), GRU_GSEG_PAGESIZE);
553 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); 554 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum);
554 555
555 gru_dbg(grudev, "gts %p\n", gts); 556 gru_dbg(grudev, "gts %p, cbrmap 0x%lx, dsrmap 0x%lx\n",
557 gts, gts->ts_cbr_map, gts->ts_dsr_map);
556 lock_cch_handle(cch); 558 lock_cch_handle(cch);
557 if (cch_interrupt_sync(cch)) 559 if (cch_interrupt_sync(cch))
558 BUG(); 560 BUG();
@@ -583,9 +585,7 @@ void gru_load_context(struct gru_thread_state *gts)
583 struct gru_context_configuration_handle *cch; 585 struct gru_context_configuration_handle *cch;
584 int i, err, asid, ctxnum = gts->ts_ctxnum; 586 int i, err, asid, ctxnum = gts->ts_ctxnum;
585 587
586 gru_dbg(grudev, "gts %p\n", gts);
587 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); 588 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum);
588
589 lock_cch_handle(cch); 589 lock_cch_handle(cch);
590 cch->tfm_fault_bit_enable = 590 cch->tfm_fault_bit_enable =
591 (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL 591 (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL
@@ -635,6 +635,10 @@ void gru_load_context(struct gru_thread_state *gts)
635 if (cch_start(cch)) 635 if (cch_start(cch))
636 BUG(); 636 BUG();
637 unlock_cch_handle(cch); 637 unlock_cch_handle(cch);
638
639 gru_dbg(grudev, "gid %d, gts %p, cbrmap 0x%lx, dsrmap 0x%lx, tie %d, tis %d\n",
640 gts->ts_gru->gs_gid, gts, gts->ts_cbr_map, gts->ts_dsr_map,
641 (gts->ts_user_options == GRU_OPT_MISS_FMM_INTR), gts->ts_tlb_int_select);
638} 642}
639 643
640/* 644/*