Commit 103d2ea1 authored by Karol Wachowski's avatar Karol Wachowski Committed by Stanislaw Gruszka

accel/ivpu: Rename and cleanup MMU600 page tables

Simplify and unify naming convention in MMU600 page tables
configuration.

All DMA addresses in page tables directly accessed by VPU are called
with _dma sufix and all CPU pointers to those page tables have _ptr
sufix.

Base pointers used to do a page walk on the CPU have corresponding
names:

 pud_ptrs (pointers used to get access to PUD DMA)
 pmd_ptrs (pointers used to get access to PMD DMA)
 pte_ptrs (pointers used to get access to PTE DMA)

with the following convention:

 u64 *pud_dma_ptr = pud_ptrs[pgd_idx];
 *pud_dma_ptr = pud_dma;

 u64 *pmd_dma_ptr = pmd_ptrs[pgd_idx][pud_idx];
 *pmd_dma_ptr = pmd_dma;

 u64 *pte_dma_ptr = pte_ptrs[pgd_idx][pud_idx][pmd_idx];
 *pte_dma_ptr = pte_dma;

On the way change to coherent dma allocation, _wc is only valid on ARM
and was used by mistake.
Signed-off-by: default avatarKarol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230518131605.650622-5-stanislaw.gruszka@linux.intel.com
parent a4172d6c
This diff is collapsed.
...@@ -15,10 +15,10 @@ struct ivpu_addr_range; ...@@ -15,10 +15,10 @@ struct ivpu_addr_range;
#define IVPU_MMU_PGTABLE_ENTRIES 512ull #define IVPU_MMU_PGTABLE_ENTRIES 512ull
struct ivpu_mmu_pgtable { struct ivpu_mmu_pgtable {
u64 ***pgd_far_entries[IVPU_MMU_PGTABLE_ENTRIES]; u64 ***pte_ptrs[IVPU_MMU_PGTABLE_ENTRIES];
u64 **pgd_cpu_entries[IVPU_MMU_PGTABLE_ENTRIES]; u64 **pmd_ptrs[IVPU_MMU_PGTABLE_ENTRIES];
u64 *pgd_entries[IVPU_MMU_PGTABLE_ENTRIES]; u64 *pud_ptrs[IVPU_MMU_PGTABLE_ENTRIES];
u64 *pgd; u64 *pgd_dma_ptr;
dma_addr_t pgd_dma; dma_addr_t pgd_dma;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment