Thread (6 messages) flat view 6 messages, 4 authors, 2016-03-02
STALE3809d

[PATCH] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

From: Will Deacon <hidden>
Date: 2016-03-02 13:35:01
Also in: linux-iommu

On Wed, Mar 02, 2016 at 03:23:57AM +0000, Chalamarla, Tirumalesh wrote:
On 3/1/16, 7:07 PM, "Will Deacon" [off-list ref] wrote:
quoted
On Wed, Feb 24, 2016 at 01:13:53PM -0800, Tirumalesh Chalamarla wrote:
quoted
+		smmu->cavium_smmu_id = cavium_smmu_count;
+		cavium_smmu_count++;
+		smmu->cavium_id_base =
+			(smmu->cavium_smmu_id * ARM_SMMU_MAX_CBS);
Can you not use num_context_banks here, instead of the constant?
We need total context banks so far, so ARM_SMMU_MAX_CBS is best option.
For Thunder both are same anyway. 
Hmm, so couldn't you instead just update a running total as you go along?
That is, initialise it to zero, then atomic_add_return(num_context_banks)
when you probe?

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help