[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1dcf5fe0-6ae0-2df6-9d2a-bda6a4f885ac@huawei.com>
Date: Wed, 11 Aug 2021 12:15:14 +0100
From: John Garry <john.garry@...wei.com>
To: Will Deacon <will@...nel.org>
CC: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>,
Robin Murphy <robin.murphy@....com>,
iommu <iommu@...ts.linux-foundation.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper
function arm_smmu_cmdq_issue_cmd_with_sync()
>>>>>>
>>>>>> Therefore, function arm_smmu_cmdq_issue_cmd_with_sync() is added to insert
>>>>>> the 'cmd+sync' commands at a time.
>>>>>>
>>>>>> Signed-off-by: Zhen Lei<thunder.leizhen@...wei.com>
>>>>>> ---
>>>>>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 +++++++++++++--------
>>>>>> 1 file changed, 21 insertions(+), 12 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>>>>>> index 2433d3c29b49ff2..a5361153ca1d6a4 100644
>>>>>> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>>>>>> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>>>>>> @@ -858,11 +858,25 @@ static int arm_smmu_cmdq_issue_cmd(struct arm_smmu_device *smmu,
>>>>>> return arm_smmu_cmdq_issue_cmdlist(smmu, cmd, 1, false);
>>>>>> }
>>>>>> -static int arm_smmu_cmdq_issue_sync(struct arm_smmu_device *smmu)
>>>>>> +static int __maybe_unused arm_smmu_cmdq_issue_sync(struct arm_smmu_device *smmu)
>>>>>> {
>>>>>> return arm_smmu_cmdq_issue_cmdlist(smmu, NULL, 0, true);
>>>>>> }
>>>>>> +static int arm_smmu_cmdq_issue_cmd_with_sync(struct arm_smmu_device *smmu,
>>>>>> + struct arm_smmu_cmdq_ent *ent)
>>>>>> +{
>>>>>> + u64 cmd[CMDQ_ENT_DWORDS];
>>>>>> +
>>>>>> + if (arm_smmu_cmdq_build_cmd(cmd, ent)) {
>>>>>> + dev_warn(smmu->dev, "ignoring unknown CMDQ opcode 0x%x\n",
>>>>>> + ent->opcode);
>>>>>> + return -EINVAL;
>> Are any of the errors returned from the "issue command" functions actually
>> consumed? I couldn't see it on mainline code from a brief browse.
> I don't think so.
I don't think so either.
> Can we actually propagate them?
There does appear to be some places, here's one I found:
arm_smmu_page_response() -> arm_smmu_cmdq_issue_cmd(), and
arm_smmu_page_response is set to arm_smmu_ops.page_response, which
returns an int
Thanks,
John
Powered by blists - more mailing lists