Commit 8a073da0 authored by Will Deacon's avatar Will Deacon

iommu/arm-smmu-v3: Drop unused 'q' argument from Q_OVF macro

The Q_OVF macro doesn't need to access the arm_smmu_queue structure, so
drop the unused macro argument.

No functional change.
Tested-by: default avatarGanapatrao Kulkarni  <gkulkarni@marvell.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 2a8868f1
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
#define Q_IDX(q, p) ((p) & ((1 << (q)->max_n_shift) - 1)) #define Q_IDX(q, p) ((p) & ((1 << (q)->max_n_shift) - 1))
#define Q_WRP(q, p) ((p) & (1 << (q)->max_n_shift)) #define Q_WRP(q, p) ((p) & (1 << (q)->max_n_shift))
#define Q_OVERFLOW_FLAG (1 << 31) #define Q_OVERFLOW_FLAG (1 << 31)
#define Q_OVF(q, p) ((p) & Q_OVERFLOW_FLAG) #define Q_OVF(p) ((p) & Q_OVERFLOW_FLAG)
#define Q_ENT(q, p) ((q)->base + \ #define Q_ENT(q, p) ((q)->base + \
Q_IDX(q, p) * (q)->ent_dwords) Q_IDX(q, p) * (q)->ent_dwords)
...@@ -715,7 +715,7 @@ static void queue_sync_cons_out(struct arm_smmu_queue *q) ...@@ -715,7 +715,7 @@ static void queue_sync_cons_out(struct arm_smmu_queue *q)
static void queue_inc_cons(struct arm_smmu_queue *q) static void queue_inc_cons(struct arm_smmu_queue *q)
{ {
u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1; u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1;
q->cons = Q_OVF(q, q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons); q->cons = Q_OVF(q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons);
} }
static int queue_sync_prod_in(struct arm_smmu_queue *q) static int queue_sync_prod_in(struct arm_smmu_queue *q)
...@@ -723,7 +723,7 @@ static int queue_sync_prod_in(struct arm_smmu_queue *q) ...@@ -723,7 +723,7 @@ static int queue_sync_prod_in(struct arm_smmu_queue *q)
int ret = 0; int ret = 0;
u32 prod = readl_relaxed(q->prod_reg); u32 prod = readl_relaxed(q->prod_reg);
if (Q_OVF(q, prod) != Q_OVF(q, q->prod)) if (Q_OVF(prod) != Q_OVF(q->prod))
ret = -EOVERFLOW; ret = -EOVERFLOW;
q->prod = prod; q->prod = prod;
...@@ -738,7 +738,7 @@ static void queue_sync_prod_out(struct arm_smmu_queue *q) ...@@ -738,7 +738,7 @@ static void queue_sync_prod_out(struct arm_smmu_queue *q)
static void queue_inc_prod(struct arm_smmu_queue *q) static void queue_inc_prod(struct arm_smmu_queue *q)
{ {
u32 prod = (Q_WRP(q, q->prod) | Q_IDX(q, q->prod)) + 1; u32 prod = (Q_WRP(q, q->prod) | Q_IDX(q, q->prod)) + 1;
q->prod = Q_OVF(q, q->prod) | Q_WRP(q, prod) | Q_IDX(q, prod); q->prod = Q_OVF(q->prod) | Q_WRP(q, prod) | Q_IDX(q, prod);
} }
/* /*
...@@ -1334,7 +1334,7 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev) ...@@ -1334,7 +1334,7 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev)
} while (!queue_empty(q)); } while (!queue_empty(q));
/* Sync our overflow flag, as we believe we're up to speed */ /* Sync our overflow flag, as we believe we're up to speed */
q->cons = Q_OVF(q, q->prod) | Q_WRP(q, q->cons) | Q_IDX(q, q->cons); q->cons = Q_OVF(q->prod) | Q_WRP(q, q->cons) | Q_IDX(q, q->cons);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -1391,7 +1391,7 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev) ...@@ -1391,7 +1391,7 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev)
} while (!queue_empty(q)); } while (!queue_empty(q));
/* Sync our overflow flag, as we believe we're up to speed */ /* Sync our overflow flag, as we believe we're up to speed */
q->cons = Q_OVF(q, q->prod) | Q_WRP(q, q->cons) | Q_IDX(q, q->cons); q->cons = Q_OVF(q->prod) | Q_WRP(q, q->cons) | Q_IDX(q, q->cons);
writel(q->cons, q->cons_reg); writel(q->cons, q->cons_reg);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
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