Skip to content

Commit 50c5e6f

Browse files
zhangl6vinodkoul
authored andcommitted
dmaengine: idxd: Modify the dependence of attribute pasid_enabled
Kernel PASID and user PASID are separately enabled. User needs to know the user PASID enabling status to decide how to use IDXD device in user space. This is done via the attribute /sys/bus/dsa/devices/dsa0/pasid_enabled. It's unnecessary for user to know the kernel PASID enabling status because user won't use the kernel PASID. But instead of showing the user PASID enabling status, the attribute shows the kernel PASID enabling status. Fix the issue by showing the user PASID enabling status in the attribute. Fixes: 42a1b73 ("dmaengine: idxd: Separate user and kernel pasid enabling") Signed-off-by: Rex Zhang <rex.zhang@intel.com> Acked-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20230614062706.1743078-1-rex.zhang@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent ecc3cfc commit 50c5e6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma/idxd/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ static ssize_t pasid_enabled_show(struct device *dev,
14801480
{
14811481
struct idxd_device *idxd = confdev_to_idxd(dev);
14821482

1483-
return sysfs_emit(buf, "%u\n", device_pasid_enabled(idxd));
1483+
return sysfs_emit(buf, "%u\n", device_user_pasid_enabled(idxd));
14841484
}
14851485
static DEVICE_ATTR_RO(pasid_enabled);
14861486

0 commit comments

Comments
 (0)