All of lore.kernel.org
 help / color / mirror / Atom feed
* iommu/arm-smmu-v2 ASID/VMID calculation
@ 2016-01-21 18:52 Chalamarla, Tirumalesh
       [not found] ` <198F501C-8D30-4EB5-BC40-4F40BB75D40B-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Chalamarla, Tirumalesh @ 2016-01-21 18:52 UTC (permalink / raw)
  To: Will Deacon
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 892 bytes --]

Hi Will,

Current ASID/VMID calculation logic makes lot of assumption about internal TLB implementation of SMMU,
Systems like ThunderX have more than one smmu in the system and it can use same TLBs with more than one of them and expects ASID to be unique

Current logic

#define ARM_SMMU_CB_ASID(cfg)           ((cfg)->cbndx)
#define ARM_SMMU_CB_VMID(cfg)           ((cfg)->cbndx + 1)


Can this be replaced by something like


#define ARM_SMMU_CB_ASID(cfg, smmu)             (((smmu)->idx << (smmu)->asid_shift) | (cfg)->cbndx)
#define ARM_SMMU_CB_VMID(cfg, smmu)             (((smmu)->idx << (smmu)->vmid_shift) | (cfg)->cbndx + 1)


Idx and shift can be passed from device-tree.


Please let me know if this is acceptable, I will prepare a proper patch and send to list.


If this is not acceptable through an alternative suggestion.



Thanks,

Tirumalesh.

[-- Attachment #1.2: Type: text/html, Size: 3732 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-01-27 19:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 18:52 iommu/arm-smmu-v2 ASID/VMID calculation Chalamarla, Tirumalesh
     [not found] ` <198F501C-8D30-4EB5-BC40-4F40BB75D40B-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-25 17:03   ` Will Deacon
2016-01-25 17:03     ` Will Deacon
     [not found]     ` <20160125170312.GJ22927-5wv7dgnIgG8@public.gmane.org>
2016-01-26  0:48       ` Chalamarla, Tirumalesh
2016-01-26  0:48         ` Chalamarla, Tirumalesh
     [not found]         ` <E978AB4F-5CB0-42D8-8152-04C77DB664A1-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-26  3:11           ` Chalamarla, Tirumalesh
2016-01-26  3:11             ` Chalamarla, Tirumalesh
     [not found]             ` <6F24A28A-6302-4C48-A933-B47A9735808C-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-26 11:48               ` Robin Murphy
2016-01-26 11:48                 ` Robin Murphy
     [not found]                 ` <56A75D0A.7000806-5wv7dgnIgG8@public.gmane.org>
2016-01-27 19:05                   ` Chalamarla, Tirumalesh
2016-01-27 19:05                     ` Chalamarla, Tirumalesh
2016-01-26 11:54               ` Will Deacon
2016-01-26 11:54                 ` Will Deacon
     [not found]                 ` <20160126115435.GB21553-5wv7dgnIgG8@public.gmane.org>
2016-01-27 19:06                   ` Chalamarla, Tirumalesh
2016-01-27 19:06                     ` Chalamarla, Tirumalesh
     [not found]                     ` <E0484253-BE37-476A-9F4A-ABE6B74EC174-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-27 19:08                       ` Will Deacon
2016-01-27 19:08                         ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.