Skip to content

Commit

Permalink
parisc: Fix set_fixmap() on PA1.x CPUs
Browse files Browse the repository at this point in the history
Fix a kernel crash which happens on PA1.x CPUs while initializing the
FTRACE/KPROBE breakpoints.  The PTE table entries for the fixmap area
were not created correctly.

Signed-off-by: Helge Deller <[email protected]>
Fixes: ccfbc68 ("parisc: add set_fixmap()/clear_fixmap()")
Cc: [email protected] # v5.2+
  • Loading branch information
hdeller committed Nov 1, 2021
1 parent 1ae8e91 commit 6e866a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/parisc/mm/fixmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ void notrace set_fixmap(enum fixed_addresses idx, phys_addr_t phys)
pte_t *pte;

if (pmd_none(*pmd))
pmd = pmd_alloc(NULL, pud, vaddr);

pte = pte_offset_kernel(pmd, vaddr);
if (pte_none(*pte))
pte = pte_alloc_kernel(pmd, vaddr);

pte = pte_offset_kernel(pmd, vaddr);
set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX));
flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
}
Expand Down

0 comments on commit 6e866a4

Please sign in to comment.