IB/hfi1: Add new debugfs sdma_cpu_list file
Add a debugfs sdma_cpu_list file that can be used to examine the CPU to sdma engine assignments for the whole device. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Reviewed-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
此提交包含在:
@@ -1093,6 +1093,49 @@ static void sdma_rht_free(void *ptr, void *arg)
|
||||
kfree(rht_node);
|
||||
}
|
||||
|
||||
/**
|
||||
* sdma_seqfile_dump_cpu_list() - debugfs dump the cpu to sdma mappings
|
||||
* @s: seq file
|
||||
* @dd: hfi1_devdata
|
||||
* @cpuid: cpu id
|
||||
*
|
||||
* This routine dumps the process to sde mappings per cpu
|
||||
*/
|
||||
void sdma_seqfile_dump_cpu_list(struct seq_file *s,
|
||||
struct hfi1_devdata *dd,
|
||||
unsigned long cpuid)
|
||||
{
|
||||
struct sdma_rht_node *rht_node;
|
||||
int i, j;
|
||||
|
||||
rht_node = rhashtable_lookup_fast(&dd->sdma_rht, &cpuid,
|
||||
sdma_rht_params);
|
||||
if (!rht_node)
|
||||
return;
|
||||
|
||||
seq_printf(s, "cpu%3lu: ", cpuid);
|
||||
for (i = 0; i < HFI1_MAX_VLS_SUPPORTED; i++) {
|
||||
if (!rht_node->map[i] || !rht_node->map[i]->ctr)
|
||||
continue;
|
||||
|
||||
seq_printf(s, " vl%d: [", i);
|
||||
|
||||
for (j = 0; j < rht_node->map[i]->ctr; j++) {
|
||||
if (!rht_node->map[i]->sde[j])
|
||||
continue;
|
||||
|
||||
if (j > 0)
|
||||
seq_puts(s, ",");
|
||||
|
||||
seq_printf(s, " sdma%2d",
|
||||
rht_node->map[i]->sde[j]->this_idx);
|
||||
}
|
||||
seq_puts(s, " ]");
|
||||
}
|
||||
|
||||
seq_puts(s, "\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the indicated map struct
|
||||
*/
|
||||
|
新增問題並參考
封鎖使用者