diff options
author | Sven Peter <sven@svenpeter.dev> | 2023-11-26 16:17:00 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-11-27 11:15:27 +0100 |
commit | c58a17a99753749aabd979bc62babb2243266dcc (patch) | |
tree | ae9c6045aa1e92cfefa8ed42e23f3086b967eed8 /drivers/iommu/apple-dart.c | |
parent | a08bd8df97b7549fe0edc53d087322314a0c4dfe (diff) | |
download | lwn-c58a17a99753749aabd979bc62babb2243266dcc.tar.gz lwn-c58a17a99753749aabd979bc62babb2243266dcc.zip |
iommu/apple-dart: Write to all DART_T8020_STREAM_SELECT
We're about to add support for a DART variant that use more than 16
streams and requires writing to two separate stream select registers
when issuing TLB flushes.
Acked-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20231126151701.16534-3-sven@svenpeter.dev
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/apple-dart.c')
-rw-r--r-- | drivers/iommu/apple-dart.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index ee05f4824bfa..8b6b0cdba9b5 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -368,12 +368,14 @@ apple_dart_t8020_hw_stream_command(struct apple_dart_stream_map *stream_map, u32 command) { unsigned long flags; - int ret; + int ret, i; u32 command_reg; spin_lock_irqsave(&stream_map->dart->lock, flags); - writel(stream_map->sidmap[0], stream_map->dart->regs + DART_T8020_STREAM_SELECT); + for (i = 0; i < BITS_TO_U32(stream_map->dart->num_streams); i++) + writel(stream_map->sidmap[i], + stream_map->dart->regs + DART_T8020_STREAM_SELECT + 4 * i); writel(command, stream_map->dart->regs + DART_T8020_STREAM_COMMAND); ret = readl_poll_timeout_atomic( |