Commit f1912257 authored by Tadeusz Struk's avatar Tadeusz Struk Committed by Doug Ledford

IB/hfi1: Add a new VL sysfs attribute for sdma engines

This patch adds a read-only "VL" attribute for the sysfs entry of each
sdma engine. It will allow the user to check VL to sdma engine mappings.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: default avatarSebastian Sanchez <sebastian.sanchez@intel.com>
Reviewed-by: default avatarJianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 0cb2aa69
......@@ -826,12 +826,25 @@ static ssize_t sde_store_cpu_to_sde_map(struct sdma_engine *sde,
return sdma_set_cpu_to_sde_map(sde, buf, count);
}
static ssize_t sde_show_vl(struct sdma_engine *sde, char *buf)
{
int vl;
vl = sdma_engine_get_vl(sde);
if (vl < 0)
return vl;
return snprintf(buf, PAGE_SIZE, "%d\n", vl);
}
static SDE_ATTR(cpu_list, S_IWUSR | S_IRUGO,
sde_show_cpu_to_sde_map,
sde_store_cpu_to_sde_map);
static SDE_ATTR(vl, S_IRUGO, sde_show_vl, NULL);
static struct sde_attribute *sde_attribs[] = {
&sde_attr_cpu_list
&sde_attr_cpu_list,
&sde_attr_vl
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment