[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68913df77d45fc70f7cf475bfd0f558a@codeaurora.org>
Date: Thu, 19 Sep 2019 08:43:13 +0530
From: Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Andy Gross <agross@...nel.org>, Joerg Roedel <joro@...tes.org>,
Robin Murphy <robin.murphy@....com>,
Vivek Gautam <vivek.gautam@...eaurora.org>,
Will Deacon <will@...nel.org>, bjorn.andersson@...aro.org,
iommu@...ts.linux-foundation.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Rajendra Nayak <rnayak@...eaurora.org>,
linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation
hook
On 2019-09-19 06:27, Stephen Boyd wrote:
> Quoting Sai Prakash Ranjan (2019-09-17 02:45:04)
>> diff --git a/drivers/iommu/arm-smmu-impl.c
>> b/drivers/iommu/arm-smmu-impl.c
>> index 3f88cd078dd5..d62da270f430 100644
>> --- a/drivers/iommu/arm-smmu-impl.c
>> +++ b/drivers/iommu/arm-smmu-impl.c
>> @@ -9,7 +9,6 @@
>>
>> #include "arm-smmu.h"
>>
>> -
>> static int arm_smmu_gr0_ns(int offset)
>> {
>> switch(offset) {
>
> Why is this hunk still around?
I remember correcting this in previous version but somehow slipped in
this version. Will correct it.
>
>> diff --git a/drivers/iommu/arm-smmu-qcom.c
>> b/drivers/iommu/arm-smmu-qcom.c
>> new file mode 100644
>> index 000000000000..24c071c1d8b0
>> --- /dev/null
>> +++ b/drivers/iommu/arm-smmu-qcom.c
>> @@ -0,0 +1,51 @@
> [...]
>> +struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device
>> *smmu)
>> +{
>> + struct qcom_smmu *qsmmu;
>> +
>> + qsmmu = devm_kzalloc(smmu->dev, sizeof(*qsmmu), GFP_KERNEL);
>> + if (!qsmmu)
>> + return ERR_PTR(-ENOMEM);
>> +
>> + qsmmu->smmu = *smmu;
>> +
>> + qsmmu->smmu.impl = &qcom_smmu_impl;
>> + devm_kfree(smmu->dev, smmu);
>
> This copy is interesting but OK I guess cavium does it.
>
This is from nvidia impl since Robin pointed me at its implementation.
>> +
>> + return &qsmmu->smmu;
>> +}
Thanks,
Sai
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member
of Code Aurora Forum, hosted by The Linux Foundation
Powered by blists - more mailing lists