aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/gruprocfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sgi-gru/gruprocfs.c')
-rw-r--r--drivers/misc/sgi-gru/gruprocfs.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/misc/sgi-gru/gruprocfs.c b/drivers/misc/sgi-gru/gruprocfs.c
index 4f6fc11a2637..0a57ab29cd30 100644
--- a/drivers/misc/sgi-gru/gruprocfs.c
+++ b/drivers/misc/sgi-gru/gruprocfs.c
@@ -36,8 +36,7 @@ static void printstat_val(struct seq_file *s, atomic_long_t *v, char *id)
36{ 36{
37 unsigned long val = atomic_long_read(v); 37 unsigned long val = atomic_long_read(v);
38 38
39 if (val) 39 seq_printf(s, "%16lu %s\n", val, id);
40 seq_printf(s, "%16lu %s\n", val, id);
41} 40}
42 41
43static int statistics_show(struct seq_file *s, void *p) 42static int statistics_show(struct seq_file *s, void *p)
@@ -46,7 +45,8 @@ static int statistics_show(struct seq_file *s, void *p)
46 printstat(s, vdata_free); 45 printstat(s, vdata_free);
47 printstat(s, gts_alloc); 46 printstat(s, gts_alloc);
48 printstat(s, gts_free); 47 printstat(s, gts_free);
49 printstat(s, vdata_double_alloc); 48 printstat(s, gms_alloc);
49 printstat(s, gms_free);
50 printstat(s, gts_double_allocate); 50 printstat(s, gts_double_allocate);
51 printstat(s, assign_context); 51 printstat(s, assign_context);
52 printstat(s, assign_context_failed); 52 printstat(s, assign_context_failed);
@@ -59,15 +59,15 @@ static int statistics_show(struct seq_file *s, void *p)
59 printstat(s, steal_kernel_context); 59 printstat(s, steal_kernel_context);
60 printstat(s, steal_context_failed); 60 printstat(s, steal_context_failed);
61 printstat(s, nopfn); 61 printstat(s, nopfn);
62 printstat(s, break_cow);
63 printstat(s, asid_new); 62 printstat(s, asid_new);
64 printstat(s, asid_next); 63 printstat(s, asid_next);
65 printstat(s, asid_wrap); 64 printstat(s, asid_wrap);
66 printstat(s, asid_reuse); 65 printstat(s, asid_reuse);
67 printstat(s, intr); 66 printstat(s, intr);
67 printstat(s, intr_cbr);
68 printstat(s, intr_tfh);
68 printstat(s, intr_mm_lock_failed); 69 printstat(s, intr_mm_lock_failed);
69 printstat(s, call_os); 70 printstat(s, call_os);
70 printstat(s, call_os_check_for_bug);
71 printstat(s, call_os_wait_queue); 71 printstat(s, call_os_wait_queue);
72 printstat(s, user_flush_tlb); 72 printstat(s, user_flush_tlb);
73 printstat(s, user_unload_context); 73 printstat(s, user_unload_context);
@@ -83,11 +83,9 @@ static int statistics_show(struct seq_file *s, void *p)
83 printstat(s, tlb_dropin_fail_idle); 83 printstat(s, tlb_dropin_fail_idle);
84 printstat(s, tlb_dropin_fail_fmm); 84 printstat(s, tlb_dropin_fail_fmm);
85 printstat(s, tlb_dropin_fail_no_exception); 85 printstat(s, tlb_dropin_fail_no_exception);
86 printstat(s, tlb_dropin_fail_no_exception_war);
87 printstat(s, tfh_stale_on_fault); 86 printstat(s, tfh_stale_on_fault);
88 printstat(s, mmu_invalidate_range); 87 printstat(s, mmu_invalidate_range);
89 printstat(s, mmu_invalidate_page); 88 printstat(s, mmu_invalidate_page);
90 printstat(s, mmu_clear_flush_young);
91 printstat(s, flush_tlb); 89 printstat(s, flush_tlb);
92 printstat(s, flush_tlb_gru); 90 printstat(s, flush_tlb_gru);
93 printstat(s, flush_tlb_gru_tgh); 91 printstat(s, flush_tlb_gru_tgh);
@@ -104,7 +102,6 @@ static int statistics_show(struct seq_file *s, void *p)
104 printstat(s, mesq_send_qlimit_reached); 102 printstat(s, mesq_send_qlimit_reached);
105 printstat(s, mesq_send_amo_nacked); 103 printstat(s, mesq_send_amo_nacked);
106 printstat(s, mesq_send_put_nacked); 104 printstat(s, mesq_send_put_nacked);
107 printstat(s, mesq_qf_not_full);
108 printstat(s, mesq_qf_locked); 105 printstat(s, mesq_qf_locked);
109 printstat(s, mesq_qf_noop_not_full); 106 printstat(s, mesq_qf_noop_not_full);
110 printstat(s, mesq_qf_switch_head_failed); 107 printstat(s, mesq_qf_switch_head_failed);
@@ -114,6 +111,7 @@ static int statistics_show(struct seq_file *s, void *p)
114 printstat(s, mesq_noop_qlimit_reached); 111 printstat(s, mesq_noop_qlimit_reached);
115 printstat(s, mesq_noop_amo_nacked); 112 printstat(s, mesq_noop_amo_nacked);
116 printstat(s, mesq_noop_put_nacked); 113 printstat(s, mesq_noop_put_nacked);
114 printstat(s, mesq_noop_page_overflow);
117 return 0; 115 return 0;
118} 116}
119 117
@@ -131,6 +129,7 @@ static int mcs_statistics_show(struct seq_file *s, void *p)
131 static char *id[] = {"cch_allocate", "cch_start", "cch_interrupt", 129 static char *id[] = {"cch_allocate", "cch_start", "cch_interrupt",
132 "cch_interrupt_sync", "cch_deallocate", "tgh_invalidate"}; 130 "cch_interrupt_sync", "cch_deallocate", "tgh_invalidate"};
133 131
132 seq_printf(s, "%-20s%12s%12s%12s\n", "#id", "count", "aver-clks", "max-clks");
134 for (op = 0; op < mcsop_last; op++) { 133 for (op = 0; op < mcsop_last; op++) {
135 count = atomic_long_read(&mcs_op_statistics[op].count); 134 count = atomic_long_read(&mcs_op_statistics[op].count);
136 total = atomic_long_read(&mcs_op_statistics[op].total); 135 total = atomic_long_read(&mcs_op_statistics[op].total);
@@ -150,6 +149,7 @@ static ssize_t mcs_statistics_write(struct file *file,
150 149
151static int options_show(struct seq_file *s, void *p) 150static int options_show(struct seq_file *s, void *p)
152{ 151{
152 seq_printf(s, "#bitmask: 1=trace, 2=statistics\n");
153 seq_printf(s, "0x%lx\n", gru_options); 153 seq_printf(s, "0x%lx\n", gru_options);
154 return 0; 154 return 0;
155} 155}
@@ -179,16 +179,17 @@ static int cch_seq_show(struct seq_file *file, void *data)
179 const char *mode[] = { "??", "UPM", "INTR", "OS_POLL" }; 179 const char *mode[] = { "??", "UPM", "INTR", "OS_POLL" };
180 180
181 if (gid == 0) 181 if (gid == 0)
182 seq_printf(file, "#%5s%5s%6s%9s%6s%8s%8s\n", "gid", "bid", 182 seq_printf(file, "#%5s%5s%6s%7s%9s%6s%8s%8s\n", "gid", "bid",
183 "ctx#", "pid", "cbrs", "dsbytes", "mode"); 183 "ctx#", "asid", "pid", "cbrs", "dsbytes", "mode");
184 if (gru) 184 if (gru)
185 for (i = 0; i < GRU_NUM_CCH; i++) { 185 for (i = 0; i < GRU_NUM_CCH; i++) {
186 ts = gru->gs_gts[i]; 186 ts = gru->gs_gts[i];
187 if (!ts) 187 if (!ts)
188 continue; 188 continue;
189 seq_printf(file, " %5d%5d%6d%9d%6d%8d%8s\n", 189 seq_printf(file, " %5d%5d%6d%7d%9d%6d%8d%8s\n",
190 gru->gs_gid, gru->gs_blade_id, i, 190 gru->gs_gid, gru->gs_blade_id, i,
191 ts->ts_tgid_owner, 191 is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid,
192 is_kernel_context(ts) ? 0 : ts->ts_tgid_owner,
192 ts->ts_cbr_au_count * GRU_CBR_AU_SIZE, 193 ts->ts_cbr_au_count * GRU_CBR_AU_SIZE,
193 ts->ts_cbr_au_count * GRU_DSR_AU_BYTES, 194 ts->ts_cbr_au_count * GRU_DSR_AU_BYTES,
194 mode[ts->ts_user_options & 195 mode[ts->ts_user_options &