You need to sign in or sign up before continuing.
提交 9065958e 编写于 作者: D Dave Jiang 提交者: Vinod Koul

dmaengine: idxd: expose general capabilities register in sysfs

There are some capabilities for the device that are interesting to user
apps that are interacting directly with the device. Expose gencap register
in sysfs to allow that information.
Signed-off-by: NDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/158256729399.55526.10842505054968710547.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 b391554c
...@@ -1160,6 +1160,16 @@ static ssize_t op_cap_show(struct device *dev, ...@@ -1160,6 +1160,16 @@ static ssize_t op_cap_show(struct device *dev,
} }
static DEVICE_ATTR_RO(op_cap); static DEVICE_ATTR_RO(op_cap);
static ssize_t gen_cap_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct idxd_device *idxd =
container_of(dev, struct idxd_device, conf_dev);
return sprintf(buf, "%#llx\n", idxd->hw.gen_cap.bits);
}
static DEVICE_ATTR_RO(gen_cap);
static ssize_t configurable_show(struct device *dev, static ssize_t configurable_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
...@@ -1297,6 +1307,7 @@ static struct attribute *idxd_device_attributes[] = { ...@@ -1297,6 +1307,7 @@ static struct attribute *idxd_device_attributes[] = {
&dev_attr_max_batch_size.attr, &dev_attr_max_batch_size.attr,
&dev_attr_max_transfer_size.attr, &dev_attr_max_transfer_size.attr,
&dev_attr_op_cap.attr, &dev_attr_op_cap.attr,
&dev_attr_gen_cap.attr,
&dev_attr_configurable.attr, &dev_attr_configurable.attr,
&dev_attr_clients.attr, &dev_attr_clients.attr,
&dev_attr_state.attr, &dev_attr_state.attr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册