1 // SPDX-License-Identifier: GPL-2.0 1 2 /* 3 * fixmaps for parisc 4 * 5 * Copyright (c) 2019 Sven Schnelle <svens@sta 6 */ 7 8 #include <linux/kprobes.h> 9 #include <linux/mm.h> 10 #include <asm/cacheflush.h> 11 #include <asm/fixmap.h> 12 13 void notrace set_fixmap(enum fixed_addresses i 14 { 15 unsigned long vaddr = __fix_to_virt(id 16 pgd_t *pgd = pgd_offset_k(vaddr); 17 p4d_t *p4d = p4d_offset(pgd, vaddr); 18 pud_t *pud = pud_offset(p4d, vaddr); 19 pmd_t *pmd = pmd_offset(pud, vaddr); 20 pte_t *pte; 21 22 pte = pte_offset_kernel(pmd, vaddr); 23 set_pte_at(&init_mm, vaddr, pte, __mk_ 24 flush_tlb_kernel_range(vaddr, vaddr + 25 } 26 27 void notrace clear_fixmap(enum fixed_addresses 28 { 29 unsigned long vaddr = __fix_to_virt(id 30 pte_t *pte = virt_to_kpte(vaddr); 31 32 if (WARN_ON(pte_none(*pte))) 33 return; 34 35 pte_clear(&init_mm, vaddr, pte); 36 37 flush_tlb_kernel_range(vaddr, vaddr + 38 } 39
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.