public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: tchalamarla@caviumnetworks•com (Tirumalesh Chalamarla)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704
Date: Tue, 23 Feb 2016 15:54:47 -0800	[thread overview]
Message-ID: <56CCF147.7080308@caviumnetworks.com> (raw)
In-Reply-To: <20160223122616.GE4989@leverpostej>



On 02/23/2016 04:26 AM, Mark Rutland wrote:
> On Thu, Feb 18, 2016 at 10:29:18AM -0800, tchalamarla at caviumnetworks.com wrote:
>> From: Tirumalesh Chalamarla <tchalamarla@caviumnetworks•com>
>>
>> Due to Errata#27704 CN88xx SMMUv2,supports  only shared ASID and VMID
>> namespaces; specifically within a given node SMMU0 and SMMU1 share,
>> as does SMMU2 and SMMU3.
>>
>> This patch tries to address these issuee by supplying asid and vmid
>> base from devicetree.
>>
>> changes from V1:
>> 	- rebased on top of 16 bit VMID patch
>> 	- removed redundent options from DT
>> 	- insted of transform, DT now supplies starting ASID/VMID
>>
>> Signed-off-by: Akula Geethasowjanya <Geethasowjanya.Akula@caviumnetworks•com>
>> Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks•com>
>> ---
>>   .../devicetree/bindings/iommu/arm,smmu.txt         |  8 +++++
>>   drivers/iommu/arm-smmu.c                           | 37 +++++++++++++++-------
>>   2 files changed, 34 insertions(+), 11 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
>> index bb7e569..80b8484 100644
>> --- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
>> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
>> @@ -57,6 +57,14 @@ conditions.
>>
>>   - smmu-enable-vmid16 : Enable 16 bit VMID, if allowed.
>>
>> +- asid-base :	Buggy SMMUv2 implementations which doesn't satisfy the
>> +		ASID namespace needs, use this field to specify starting
>> +		ASID for the SMMU.
>> +
>> +- vmid-base :	Buggy SMMUv2 implementations which doesn't satisfy the VMID
>> +		namespace needs, use this field to specify starting VMID
>> +		for the SMMU.
>
> As has been pointed out, these are not strictly properties of the
> hardware, and are insufficient to aovid the issue in general (adding an
> arbitrary base does not enforce IDs fall within a particular range).
>

pardon my ignorance, are you saying what happens if DT don't know what 
values to send?
> So NAK for *-base properties alone.
>
>> +	if (of_property_read_u32(dev->of_node, "#asid-base",
>> +				 &smmu->asid_base)) {
>> +		smmu->asid_base = 0;
>> +	}
>> +
>> +	if (of_property_read_u32(dev->of_node, "#vmid-base",
>> +				 &smmu->vmid_base)) {
>> +		smmu->vmid_base = 1;
>> +	}
>
> These do not match the documentation above.
>
> Mark.
>

      parent reply	other threads:[~2016-02-23 23:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 18:29 [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704 tchalamarla at caviumnetworks.com
2016-02-23 11:49 ` Will Deacon
2016-02-23 12:19 ` Robin Murphy
2016-02-23 23:56   ` Tirumalesh Chalamarla
2016-02-24 13:38     ` Robin Murphy
2016-02-24 18:53       ` Tirumalesh Chalamarla
2016-02-23 12:26 ` Mark Rutland
2016-02-23 23:50   ` Tirumalesh Chalamarla
2016-02-24 11:32     ` Mark Rutland
2016-02-24 15:54       ` Chalamarla, Tirumalesh
2016-02-24 19:10         ` Mark Rutland
2016-02-24 19:15           ` Tirumalesh Chalamarla
2016-02-23 23:54   ` Tirumalesh Chalamarla [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CCF147.7080308@caviumnetworks.com \
    --to=tchalamarla@caviumnetworks$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox