Skip to content

Commit 4774366

Browse files
Zhou Wangwilldeacon
authored andcommitted
Revert "iommu/arm-smmu-v3: Decrease the queue size of evtq and priq"
The commit f115f3c ("iommu/arm-smmu-v3: Decrease the queue size of evtq and priq") decreases evtq and priq, which may lead evtq/priq to be full with fault events, e.g HiSilicon ZIP/SEC/HPRE have maximum 1024 queues in one device, every queue could be binded with one process and trigger a fault event. So let's revert f115f3c. In fact, if an implementation of SMMU really does not need so long evtq and priq, value of IDR1_EVTQS and IDR1_PRIQS can be set to proper ones. Signed-off-by: Zhou Wang <[email protected]> Acked-by: Zhen Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent a556cfe commit 4774366

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
#else
185185
#define Q_MAX_SZ_SHIFT (PAGE_SHIFT + MAX_ORDER - 1)
186186
#endif
187-
#define Q_MIN_SZ_SHIFT (PAGE_SHIFT)
188187

189188
/*
190189
* Stream table.
@@ -374,7 +373,7 @@
374373
/* Event queue */
375374
#define EVTQ_ENT_SZ_SHIFT 5
376375
#define EVTQ_ENT_DWORDS ((1 << EVTQ_ENT_SZ_SHIFT) >> 3)
377-
#define EVTQ_MAX_SZ_SHIFT (Q_MIN_SZ_SHIFT - EVTQ_ENT_SZ_SHIFT)
376+
#define EVTQ_MAX_SZ_SHIFT (Q_MAX_SZ_SHIFT - EVTQ_ENT_SZ_SHIFT)
378377

379378
#define EVTQ_0_ID GENMASK_ULL(7, 0)
380379

@@ -400,7 +399,7 @@
400399
/* PRI queue */
401400
#define PRIQ_ENT_SZ_SHIFT 4
402401
#define PRIQ_ENT_DWORDS ((1 << PRIQ_ENT_SZ_SHIFT) >> 3)
403-
#define PRIQ_MAX_SZ_SHIFT (Q_MIN_SZ_SHIFT - PRIQ_ENT_SZ_SHIFT)
402+
#define PRIQ_MAX_SZ_SHIFT (Q_MAX_SZ_SHIFT - PRIQ_ENT_SZ_SHIFT)
404403

405404
#define PRIQ_0_SID GENMASK_ULL(31, 0)
406405
#define PRIQ_0_SSID GENMASK_ULL(51, 32)

0 commit comments

Comments
 (0)