diff options
author | 2023-06-17 18:25:45 +0000 | |
---|---|---|
committer | 2023-07-14 16:18:04 +0200 | |
commit | 6df63b7ebdaf5fcd75dceedf6967d0761e56eca1 (patch) | |
tree | 4221f2902bcbbe325d2e432f0aadc97b38366a00 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Linux 6.5-rc1 (diff) | |
download | wireguard-linux-6df63b7ebdaf5fcd75dceedf6967d0761e56eca1.tar.xz wireguard-linux-6df63b7ebdaf5fcd75dceedf6967d0761e56eca1.zip |
iommu: rockchip: Fix directory table address encoding
The physical address to the directory table is currently encoded using
the following bit layout for IOMMU v2.
31:12 - Address bit 31:0
11: 4 - Address bit 39:32
This is also the bit layout used by the vendor kernel.
However, testing has shown that addresses to the directory/page tables
and memory pages are all encoded using the same bit layout.
IOMMU v1:
31:12 - Address bit 31:0
IOMMU v2:
31:12 - Address bit 31:0
11: 8 - Address bit 35:32
7: 4 - Address bit 39:36
Change to use the mk_dtentries ops to encode the directory table address
correctly. The value written to DTE_ADDR may include the valid bit set,
a bit that is ignored and DTE_ADDR reg read it back as 0.
This also update the bit layout comment for the page address and the
number of nybbles that are read back for DTE_ADDR comment.
These changes render the dte_addr_phys and dma_addr_dte ops unused and
is removed.
Fixes: 227014b33f62 ("iommu: rockchip: Add internal ops to handle variants")
Fixes: c55356c534aa ("iommu: rockchip: Add support for iommu v2")
Fixes: c987b65a574f ("iommu/rockchip: Fix physical address decoding")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20230617182540.3091374-2-jonas@kwiboo.se
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions