xtensa: mmu: dup_table does not need parameter
The only page table duplicated is the kernel page table. This function does not need a parameter. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
0012725d85
commit
d6d3c1098d
1 changed files with 4 additions and 4 deletions
|
@ -715,7 +715,7 @@ static inline uint32_t *alloc_l1_table(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static uint32_t *dup_table(uint32_t *source_table)
|
||||
static uint32_t *dup_table(void)
|
||||
{
|
||||
uint16_t i, j;
|
||||
uint32_t *dst_table = alloc_l1_table();
|
||||
|
@ -727,13 +727,13 @@ static uint32_t *dup_table(uint32_t *source_table)
|
|||
for (i = 0; i < XTENSA_L1_PAGE_TABLE_ENTRIES; i++) {
|
||||
uint32_t *l2_table, *src_l2_table;
|
||||
|
||||
if (is_pte_illegal(source_table[i]) ||
|
||||
if (is_pte_illegal(xtensa_kernel_ptables[i]) ||
|
||||
(i == XTENSA_MMU_L1_POS(XTENSA_MMU_PTEVADDR))) {
|
||||
dst_table[i] = XTENSA_MMU_PTE_ILLEGAL;
|
||||
continue;
|
||||
}
|
||||
|
||||
src_l2_table = (uint32_t *)(source_table[i] & XTENSA_MMU_PTE_PPN_MASK);
|
||||
src_l2_table = (uint32_t *)(xtensa_kernel_ptables[i] & XTENSA_MMU_PTE_PPN_MASK);
|
||||
l2_table = alloc_l2_table();
|
||||
if (l2_table == NULL) {
|
||||
goto err;
|
||||
|
@ -797,7 +797,7 @@ int arch_mem_domain_init(struct k_mem_domain *domain)
|
|||
}
|
||||
|
||||
|
||||
ptables = dup_table(xtensa_kernel_ptables);
|
||||
ptables = dup_table();
|
||||
|
||||
if (ptables == NULL) {
|
||||
ret = -ENOMEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue