dmaengine: idxd: don't load pasid config until needed
authorDave Jiang <dave.jiang@intel.com>
Thu, 7 Apr 2022 18:28:28 +0000 (11:28 -0700)
committerVinod Koul <vkoul@kernel.org>
Mon, 11 Apr 2022 11:58:58 +0000 (17:28 +0530)
commit3157dd0a366183adaea2f4d8721961637d562fee
tree3333d8948b32d3673f85081680ba34b37f1a3aef
parent80380f89d0f56e0efa43e24c11f989e89b4af952
dmaengine: idxd: don't load pasid config until needed

The driver currently programs the system pasid to the WQ preemptively when
system pasid is enabled. Given that a dwq will reprogram the pasid and
possibly a different pasid, the programming is not necessary. The pasid_en
bit can be set for swq as it does not need pasid programming but
needs the pasid_en bit. Remove system pasid programming on device config
write. Add pasid programming for kernel wq type on wq driver enable. The
char dev driver already reprograms the dwq on ->open() call so there's no
change.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/164935607115.1660372.6734518676950372366.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/registers.h