mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-13 01:39:06 +08:00
iommu/arm-smmu: Refactor qcom_smmu structure to include single pointer
qcom_smmu_match_data is static and constant so refactor qcom_smmu to store single pointer to qcom_smmu_match_data instead of replicating multiple child members of the same and handle the further dereferences in the places that want them. Suggested-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-3-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
ef4144b1b4
commit
445d7a8ed9
@@ -73,7 +73,7 @@ void qcom_smmu_tlb_sync_debug(struct arm_smmu_device *smmu)
|
||||
if (__ratelimit(&rs)) {
|
||||
dev_err(smmu->dev, "TLB sync timed out -- SMMU may be deadlocked\n");
|
||||
|
||||
cfg = qsmmu->cfg;
|
||||
cfg = qsmmu->data->cfg;
|
||||
if (!cfg)
|
||||
return;
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
qsmmu->smmu.impl = impl;
|
||||
qsmmu->cfg = data->cfg;
|
||||
qsmmu->data = data;
|
||||
|
||||
return &qsmmu->smmu;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
struct qcom_smmu {
|
||||
struct arm_smmu_device smmu;
|
||||
const struct qcom_smmu_config *cfg;
|
||||
const struct qcom_smmu_match_data *data;
|
||||
bool bypass_quirk;
|
||||
u8 bypass_cbndx;
|
||||
u32 stall_enabled;
|
||||
|
||||
Reference in New Issue
Block a user