dmaengine: idxd: fix mapping of portal size
authorDave Jiang <dave.jiang@intel.com>
Wed, 11 Nov 2020 22:23:46 +0000 (15:23 -0700)
committerVinod Koul <vkoul@kernel.org>
Mon, 16 Nov 2020 17:08:20 +0000 (22:38 +0530)
commit8326be9f1c0bb498baf134878a8deb8a952e0135
treef3c50b5ee70d215ad2e77a537c2e78b5281b294d
parent29a25b9246f7f24203d30d59424cbe22bd905dfc
dmaengine: idxd: fix mapping of portal size

Portal size is 4k. Current code is mapping all 4 portals in a single chunk.
Restrict the mapped portal size to a single portal to ensure that submission
only goes to the intended portal address.

Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/160513342642.510187.16450549281618747065.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/registers.h
drivers/dma/idxd/submit.c