Commit 91124ac6 authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

dmaengine: idxd: remove global token limit check

The global token_limit is not tied to group tokens_reserved and
tokens_allowed parameters. Remove the check in order to allow independent
configuration.

Fixes: c52ca478 ("dmaengine: idxd: add configuration component of driver")
Reported-by: default avatarYixin Zhang <yixin.zhang@intel.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/158386266911.11066.7545764533072221536.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent a1fcaf07
...@@ -509,9 +509,6 @@ static ssize_t group_tokens_reserved_store(struct device *dev, ...@@ -509,9 +509,6 @@ static ssize_t group_tokens_reserved_store(struct device *dev,
if (idxd->state == IDXD_DEV_ENABLED) if (idxd->state == IDXD_DEV_ENABLED)
return -EPERM; return -EPERM;
if (idxd->token_limit == 0)
return -EPERM;
if (val > idxd->max_tokens) if (val > idxd->max_tokens)
return -EINVAL; return -EINVAL;
...@@ -557,8 +554,6 @@ static ssize_t group_tokens_allowed_store(struct device *dev, ...@@ -557,8 +554,6 @@ static ssize_t group_tokens_allowed_store(struct device *dev,
if (idxd->state == IDXD_DEV_ENABLED) if (idxd->state == IDXD_DEV_ENABLED)
return -EPERM; return -EPERM;
if (idxd->token_limit == 0)
return -EPERM;
if (val < 4 * group->num_engines || if (val < 4 * group->num_engines ||
val > group->tokens_reserved + idxd->nr_tokens) val > group->tokens_reserved + idxd->nr_tokens)
return -EINVAL; return -EINVAL;
......
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