/openbmc/linux/arch/m68k/include/asm/ |
H A D | bitops.h | 31 static inline void bset_reg_set_bit(int nr, volatile unsigned long *vaddr) in bset_reg_set_bit() argument 33 char *p = (char *)vaddr + (nr ^ 31) / 8; in bset_reg_set_bit() 41 static inline void bset_mem_set_bit(int nr, volatile unsigned long *vaddr) in bset_mem_set_bit() argument 43 char *p = (char *)vaddr + (nr ^ 31) / 8; in bset_mem_set_bit() 50 static inline void bfset_mem_set_bit(int nr, volatile unsigned long *vaddr) in bfset_mem_set_bit() argument 54 : "d" (nr ^ 31), "o" (*vaddr) in bfset_mem_set_bit() 59 #define set_bit(nr, vaddr) bset_reg_set_bit(nr, vaddr) argument 61 #define set_bit(nr, vaddr) bset_mem_set_bit(nr, vaddr) argument 63 #define set_bit(nr, vaddr) (__builtin_constant_p(nr) ? \ argument 64 bset_mem_set_bit(nr, vaddr) : \ [all …]
|
/openbmc/linux/arch/riscv/mm/ |
H A D | kasan_init.c | 29 static void __init kasan_populate_pte(pmd_t *pmd, unsigned long vaddr, unsigned long end) in kasan_populate_pte() argument 39 ptep = pte_offset_kernel(pmd, vaddr); in kasan_populate_pte() 47 } while (ptep++, vaddr += PAGE_SIZE, vaddr != end); in kasan_populate_pte() 50 static void __init kasan_populate_pmd(pud_t *pud, unsigned long vaddr, unsigned long end) in kasan_populate_pmd() argument 61 pmdp = pmd_offset(pud, vaddr); in kasan_populate_pmd() 64 next = pmd_addr_end(vaddr, end); in kasan_populate_pmd() 66 if (pmd_none(pmdp_get(pmdp)) && IS_ALIGNED(vaddr, PMD_SIZE) && in kasan_populate_pmd() 67 (next - vaddr) >= PMD_SIZE) { in kasan_populate_pmd() 76 kasan_populate_pte(pmdp, vaddr, next); in kasan_populate_pmd() 77 } while (pmdp++, vaddr = next, vaddr != end); in kasan_populate_pmd() [all …]
|
H A D | pageattr.c | 97 unsigned long vaddr, unsigned long end) in __split_linear_mapping_pmd() argument 102 pmdp = pmd_offset(pudp, vaddr); in __split_linear_mapping_pmd() 105 next = pmd_addr_end(vaddr, end); in __split_linear_mapping_pmd() 107 if (next - vaddr >= PMD_SIZE && in __split_linear_mapping_pmd() 108 vaddr <= (vaddr & PMD_MASK) && end >= next) in __split_linear_mapping_pmd() 130 } while (pmdp++, vaddr = next, vaddr != end); in __split_linear_mapping_pmd() 136 unsigned long vaddr, unsigned long end) in __split_linear_mapping_pud() argument 142 pudp = pud_offset(p4dp, vaddr); in __split_linear_mapping_pud() 145 next = pud_addr_end(vaddr, end); in __split_linear_mapping_pud() 147 if (next - vaddr >= PUD_SIZE && in __split_linear_mapping_pud() [all …]
|
/openbmc/linux/arch/parisc/kernel/ |
H A D | pci-dma.c | 77 unsigned long vaddr, in map_pte_uncached() argument 81 unsigned long orig_vaddr = vaddr; in map_pte_uncached() 83 vaddr &= ~PMD_MASK; in map_pte_uncached() 84 end = vaddr + size; in map_pte_uncached() 96 vaddr += PAGE_SIZE; in map_pte_uncached() 100 } while (vaddr < end); in map_pte_uncached() 104 static inline int map_pmd_uncached(pmd_t * pmd, unsigned long vaddr, in map_pmd_uncached() argument 108 unsigned long orig_vaddr = vaddr; in map_pmd_uncached() 110 vaddr &= ~PGDIR_MASK; in map_pmd_uncached() 111 end = vaddr + size; in map_pmd_uncached() [all …]
|
/openbmc/linux/arch/arm/mm/ |
H A D | cache-xsc3l2.c | 88 unsigned long vaddr; in xsc3_l2_inv_range() local 95 vaddr = -1; /* to force the first mapping */ in xsc3_l2_inv_range() 101 vaddr = l2_map_va(start & ~(CACHE_LINE_SIZE - 1), vaddr); in xsc3_l2_inv_range() 102 xsc3_l2_clean_mva(vaddr); in xsc3_l2_inv_range() 103 xsc3_l2_inv_mva(vaddr); in xsc3_l2_inv_range() 111 vaddr = l2_map_va(start, vaddr); in xsc3_l2_inv_range() 112 xsc3_l2_inv_mva(vaddr); in xsc3_l2_inv_range() 120 vaddr = l2_map_va(start, vaddr); in xsc3_l2_inv_range() 121 xsc3_l2_clean_mva(vaddr); in xsc3_l2_inv_range() 122 xsc3_l2_inv_mva(vaddr); in xsc3_l2_inv_range() [all …]
|
/openbmc/linux/arch/arm/include/asm/ |
H A D | page.h | 111 void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); 113 unsigned long vaddr, struct vm_area_struct *vma); 117 unsigned long vaddr, struct vm_area_struct *vma); 118 void fa_clear_user_highpage(struct page *page, unsigned long vaddr); 120 unsigned long vaddr, struct vm_area_struct *vma); 121 void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr); 123 unsigned long vaddr, struct vm_area_struct *vma); 124 void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr); 126 unsigned long vaddr, struct vm_area_struct *vma); 127 void v4wb_clear_user_highpage(struct page *page, unsigned long vaddr); [all …]
|
/openbmc/linux/arch/parisc/mm/ |
H A D | fixmap.c | 15 unsigned long vaddr = __fix_to_virt(idx); in set_fixmap() local 16 pgd_t *pgd = pgd_offset_k(vaddr); in set_fixmap() 17 p4d_t *p4d = p4d_offset(pgd, vaddr); in set_fixmap() 18 pud_t *pud = pud_offset(p4d, vaddr); in set_fixmap() 19 pmd_t *pmd = pmd_offset(pud, vaddr); in set_fixmap() 22 pte = pte_offset_kernel(pmd, vaddr); in set_fixmap() 23 set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX)); in set_fixmap() 24 flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE); in set_fixmap() 29 unsigned long vaddr = __fix_to_virt(idx); in clear_fixmap() local 30 pte_t *pte = virt_to_kpte(vaddr); in clear_fixmap() [all …]
|
/openbmc/linux/arch/x86/mm/ |
H A D | mem_encrypt_amd.c | 158 static void __init __sme_early_map_unmap_mem(void *vaddr, unsigned long size, in __sme_early_map_unmap_mem() argument 161 unsigned long paddr = (unsigned long)vaddr - __PAGE_OFFSET; in __sme_early_map_unmap_mem() 169 __early_make_pgtable((unsigned long)vaddr, pmd); in __sme_early_map_unmap_mem() 171 vaddr += PMD_SIZE; in __sme_early_map_unmap_mem() 292 static void enc_dec_hypercall(unsigned long vaddr, unsigned long size, bool enc) in enc_dec_hypercall() argument 295 unsigned long vaddr_end = vaddr + size; in enc_dec_hypercall() 297 while (vaddr < vaddr_end) { in enc_dec_hypercall() 302 kpte = lookup_address(vaddr, &level); in enc_dec_hypercall() 317 vaddr = (vaddr & pmask) + psize; in enc_dec_hypercall() 322 static bool amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool enc) in amd_enc_status_change_prepare() argument [all …]
|
H A D | init_32.c | 107 pmd_t * __init populate_extra_pmd(unsigned long vaddr) in populate_extra_pmd() argument 109 int pgd_idx = pgd_index(vaddr); in populate_extra_pmd() 110 int pmd_idx = pmd_index(vaddr); in populate_extra_pmd() 115 pte_t * __init populate_extra_pte(unsigned long vaddr) in populate_extra_pte() argument 117 int pte_idx = pte_index(vaddr); in populate_extra_pte() 120 pmd = populate_extra_pmd(vaddr); in populate_extra_pte() 132 unsigned long vaddr; in page_table_range_init_count() local 137 vaddr = start; in page_table_range_init_count() 138 pgd_idx = pgd_index(vaddr); in page_table_range_init_count() 139 pmd_idx = pmd_index(vaddr); in page_table_range_init_count() [all …]
|
/openbmc/qemu/include/exec/ |
H A D | exec-all.h | 69 void tlb_flush_page(CPUState *cpu, vaddr addr); 81 void tlb_flush_page_all_cpus_synced(CPUState *src, vaddr addr); 111 void tlb_flush_page_by_mmuidx(CPUState *cpu, vaddr addr, 125 void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, 159 void tlb_flush_page_bits_by_mmuidx(CPUState *cpu, vaddr addr, 164 (CPUState *cpu, vaddr addr, uint16_t idxmap, unsigned bits); 177 void tlb_flush_range_by_mmuidx(CPUState *cpu, vaddr addr, 178 vaddr len, uint16_t idxmap, 183 vaddr addr, 184 vaddr len, [all …]
|
H A D | translator.h | 36 vaddr pc, void *host_pc); 83 vaddr pc_first; 84 vaddr pc_next; 162 vaddr pc, void *host_pc, const TranslatorOps *ops, 173 bool translator_use_goto_tb(DisasContextBase *db, vaddr dest); 196 uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc); 197 uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc); 198 uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc); 199 uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc); 203 vaddr pc, bool do_swap) in translator_lduw_swap() [all …]
|
/openbmc/qemu/target/i386/tcg/ |
H A D | access.h | 9 target_ulong vaddr; member 25 vaddr vaddr, unsigned size, 27 void access_prepare(X86Access *ret, CPUX86State *env, vaddr vaddr, 30 uint8_t access_ldb(X86Access *ac, vaddr addr); 31 uint16_t access_ldw(X86Access *ac, vaddr addr); 32 uint32_t access_ldl(X86Access *ac, vaddr addr); 33 uint64_t access_ldq(X86Access *ac, vaddr addr); 35 void access_stb(X86Access *ac, vaddr addr, uint8_t val); 36 void access_stw(X86Access *ac, vaddr addr, uint16_t val); 37 void access_stl(X86Access *ac, vaddr addr, uint32_t val); [all …]
|
H A D | access.c | 12 vaddr vaddr, unsigned size, in access_prepare_mmu() argument 20 size1 = MIN(size, -(vaddr | TARGET_PAGE_MASK)), in access_prepare_mmu() 24 ret->vaddr = vaddr; in access_prepare_mmu() 31 haddr1 = probe_access(env, vaddr, size1, type, mmu_idx, ra); in access_prepare_mmu() 35 haddr2 = probe_access(env, vaddr + size1, size2, type, mmu_idx, ra); in access_prepare_mmu() 48 void access_prepare(X86Access *ret, CPUX86State *env, vaddr vaddr, in access_prepare() argument 52 access_prepare_mmu(ret, env, vaddr, size, type, mmu_idx, ra); in access_prepare() 55 static void *access_ptr(X86Access *ac, vaddr addr, unsigned len) in access_ptr() 57 vaddr offset = addr - ac->vaddr; in access_ptr() 59 assert(addr >= ac->vaddr); in access_ptr() [all …]
|
/openbmc/linux/arch/m68k/sun3x/ |
H A D | dvma.c | 79 unsigned long vaddr, int len) in dvma_map_cpu() argument 88 vaddr &= PAGE_MASK; in dvma_map_cpu() 90 end = PAGE_ALIGN(vaddr + len); in dvma_map_cpu() 92 pr_debug("dvma: mapping kern %08lx to virt %08lx\n", kaddr, vaddr); in dvma_map_cpu() 93 pgd = pgd_offset_k(vaddr); in dvma_map_cpu() 94 p4d = p4d_offset(pgd, vaddr); in dvma_map_cpu() 95 pud = pud_offset(p4d, vaddr); in dvma_map_cpu() 101 if((pmd = pmd_alloc(&init_mm, pud, vaddr)) == NULL) { in dvma_map_cpu() 106 if((end & PGDIR_MASK) > (vaddr & PGDIR_MASK)) in dvma_map_cpu() 107 end2 = (vaddr + (PGDIR_SIZE-1)) & PGDIR_MASK; in dvma_map_cpu() [all …]
|
/openbmc/linux/mm/ |
H A D | highmem.c | 154 struct page *__kmap_to_page(void *vaddr) in __kmap_to_page() argument 156 unsigned long base = (unsigned long) vaddr & PAGE_MASK; in __kmap_to_page() 158 unsigned long addr = (unsigned long)vaddr; in __kmap_to_page() 181 return virt_to_page(vaddr); in __kmap_to_page() 236 unsigned long vaddr; in map_new_virtual() local 278 vaddr = PKMAP_ADDR(last_pkmap_nr); in map_new_virtual() 279 set_pte_at(&init_mm, vaddr, in map_new_virtual() 283 set_page_address(page, (void *)vaddr); in map_new_virtual() 285 return vaddr; in map_new_virtual() 298 unsigned long vaddr; in kmap_high() local [all …]
|
/openbmc/qemu/include/hw/core/ |
H A D | tcg-cpu-ops.h | 88 void (*record_sigsegv)(CPUState *cpu, vaddr addr, 112 void (*record_sigbus)(CPUState *cpu, vaddr addr, 157 bool (*tlb_fill_align)(CPUState *cpu, CPUTLBEntryFull *out, vaddr addr, 167 bool (*tlb_fill)(CPUState *cpu, vaddr address, int size, 174 void (*do_transaction_failed)(CPUState *cpu, hwaddr physaddr, vaddr addr, 182 G_NORETURN void (*do_unaligned_access)(CPUState *cpu, vaddr addr, 189 vaddr (*adjust_watchpoint_address)(CPUState *cpu, vaddr addr, int len); 224 static inline void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, in cpu_check_watchpoint() 230 vaddr addr, vaddr len) in cpu_watchpoint_address_matches() 249 void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/fman/ |
H A D | fman_muram.c | 20 unsigned long vaddr) in fman_muram_vbase_to_offset() argument 22 return vaddr - (unsigned long)muram->vbase; in fman_muram_vbase_to_offset() 41 void __iomem *vaddr; in fman_muram_init() local 54 vaddr = ioremap(base, size); in fman_muram_init() 55 if (!vaddr) { in fman_muram_init() 60 ret = gen_pool_add_virt(muram->pool, (unsigned long)vaddr, in fman_muram_init() 64 iounmap(vaddr); in fman_muram_init() 68 memset_io(vaddr, 0, (int)size); in fman_muram_init() 70 muram->vbase = vaddr; in fman_muram_init() 107 unsigned long vaddr; in fman_muram_alloc() local [all …]
|
/openbmc/qemu/target/s390x/ |
H A D | mmu_helper.c | 126 static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, in mmu_translate_asce() argument 142 *raddr = vaddr; in mmu_translate_asce() 148 if (VADDR_REGION1_TL(vaddr) > asce_tl) { in mmu_translate_asce() 151 gaddr += VADDR_REGION1_TX(vaddr) * 8; in mmu_translate_asce() 154 if (VADDR_REGION1_TX(vaddr)) { in mmu_translate_asce() 157 if (VADDR_REGION2_TL(vaddr) > asce_tl) { in mmu_translate_asce() 160 gaddr += VADDR_REGION2_TX(vaddr) * 8; in mmu_translate_asce() 163 if (VADDR_REGION1_TX(vaddr) || VADDR_REGION2_TX(vaddr)) { in mmu_translate_asce() 166 if (VADDR_REGION3_TL(vaddr) > asce_tl) { in mmu_translate_asce() 169 gaddr += VADDR_REGION3_TX(vaddr) * 8; in mmu_translate_asce() [all …]
|
/openbmc/linux/drivers/media/common/videobuf2/ |
H A D | videobuf2-vmalloc.c | 26 void *vaddr; member 47 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc() 48 if (!buf->vaddr) { in vb2_vmalloc_alloc() 68 vfree(buf->vaddr); in vb2_vmalloc_put() 74 unsigned long vaddr, unsigned long size) in vb2_vmalloc_get_userptr() argument 86 offset = vaddr & ~PAGE_MASK; in vb2_vmalloc_get_userptr() 88 vec = vb2_create_framevec(vaddr, size, in vb2_vmalloc_get_userptr() 107 buf->vaddr = (__force void *) in vb2_vmalloc_get_userptr() 110 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1); in vb2_vmalloc_get_userptr() 113 if (!buf->vaddr) in vb2_vmalloc_get_userptr() [all …]
|
/openbmc/linux/arch/sparc/mm/ |
H A D | io-unit.c | 97 static unsigned long iounit_get_area(struct iounit_struct *iounit, unsigned long vaddr, int size) in iounit_get_area() argument 103 npages = ((vaddr & ~PAGE_MASK) + size + (PAGE_SIZE-1)) >> PAGE_SHIFT; in iounit_get_area() 112 IOD(("iounit_get_area(%08lx,%d[%d])=", vaddr, size, npages)); in iounit_get_area() 127 panic("iounit_get_area: Couldn't find free iopte slots for (%08lx,%d)\n", vaddr, size); in iounit_get_area() 135 iopte = MKIOPTE(__pa(vaddr & PAGE_MASK)); in iounit_get_area() 136 vaddr = IOUNIT_DMA_BASE + (scan << PAGE_SHIFT) + (vaddr & ~PAGE_MASK); in iounit_get_area() 141 IOD(("%08lx\n", vaddr)); in iounit_get_area() 142 return vaddr; in iounit_get_area() 149 void *vaddr = page_address(page) + offset; in iounit_map_page() local 158 ret = iounit_get_area(iounit, (unsigned long)vaddr, len); in iounit_map_page() [all …]
|
/openbmc/linux/arch/m68k/sun3/ |
H A D | dvma.c | 23 static unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr) in dvma_page() argument 35 if(ptelist[(vaddr & 0xff000) >> PAGE_SHIFT] != pte) { in dvma_page() 36 sun3_put_pte(vaddr, pte); in dvma_page() 37 ptelist[(vaddr & 0xff000) >> PAGE_SHIFT] = pte; in dvma_page() 40 return (vaddr + (kaddr & ~PAGE_MASK)); in dvma_page() 49 unsigned long vaddr; in dvma_map_iommu() local 51 vaddr = dvma_btov(baddr); in dvma_map_iommu() 53 end = vaddr + len; in dvma_map_iommu() 55 while(vaddr < end) { in dvma_map_iommu() 56 dvma_page(kaddr, vaddr); in dvma_map_iommu() [all …]
|
/openbmc/linux/arch/sh/mm/ |
H A D | kmap.c | 21 unsigned long vaddr; in kmap_coherent_init() local 24 vaddr = __fix_to_virt(FIX_CMAP_BEGIN); in kmap_coherent_init() 25 kmap_coherent_pte = virt_to_kpte(vaddr); in kmap_coherent_init() 32 unsigned long vaddr; in kmap_coherent() local 43 vaddr = __fix_to_virt(idx); in kmap_coherent() 48 return (void *)vaddr; in kmap_coherent() 54 unsigned long vaddr = (unsigned long)kvaddr & PAGE_MASK; in kunmap_coherent() local 55 enum fixed_addresses idx = __virt_to_fix(vaddr); in kunmap_coherent() 58 __flush_purge_region((void *)vaddr, PAGE_SIZE); in kunmap_coherent() 60 pte_clear(&init_mm, vaddr, kmap_coherent_pte - idx); in kunmap_coherent() [all …]
|
/openbmc/linux/arch/mips/mm/ |
H A D | pgtable-32.c | 53 unsigned long vaddr; in pagetable_init() local 72 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1); in pagetable_init() 73 fixrange_init(vaddr & PMD_MASK, vaddr + FIXADDR_SIZE, pgd_base); in pagetable_init() 79 vaddr = PKMAP_BASE; in pagetable_init() 80 fixrange_init(vaddr & PMD_MASK, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base); in pagetable_init() 82 pgd = swapper_pg_dir + pgd_index(vaddr); in pagetable_init() 83 p4d = p4d_offset(pgd, vaddr); in pagetable_init() 84 pud = pud_offset(p4d, vaddr); in pagetable_init() 85 pmd = pmd_offset(pud, vaddr); in pagetable_init() 86 pte = pte_offset_kernel(pmd, vaddr); in pagetable_init()
|
/openbmc/linux/arch/sparc/include/asm/ |
H A D | viking.h | 214 static inline unsigned long viking_hwprobe(unsigned long vaddr) in viking_hwprobe() argument 218 vaddr &= PAGE_MASK; in viking_hwprobe() 222 : "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE)); in viking_hwprobe() 229 : "r" (vaddr | 0x200), "i" (ASI_M_FLUSH_PROBE)); in viking_hwprobe() 231 vaddr &= ~PGDIR_MASK; in viking_hwprobe() 232 vaddr >>= PAGE_SHIFT; in viking_hwprobe() 233 return val | (vaddr << 8); in viking_hwprobe() 239 : "r" (vaddr | 0x100), "i" (ASI_M_FLUSH_PROBE)); in viking_hwprobe() 241 vaddr &= ~PMD_MASK; in viking_hwprobe() 242 vaddr >>= PAGE_SHIFT; in viking_hwprobe() [all …]
|
/openbmc/linux/drivers/misc/sgi-gru/ |
H A D | grufault.c | 48 struct vm_area_struct *gru_find_vma(unsigned long vaddr) in gru_find_vma() argument 52 vma = vma_lookup(current->mm, vaddr); in gru_find_vma() 66 static struct gru_thread_state *gru_find_lock_gts(unsigned long vaddr) in gru_find_lock_gts() argument 73 vma = gru_find_vma(vaddr); in gru_find_lock_gts() 75 gts = gru_find_thread_state(vma, TSID(vaddr, vma)); in gru_find_lock_gts() 83 static struct gru_thread_state *gru_alloc_locked_gts(unsigned long vaddr) in gru_alloc_locked_gts() argument 90 vma = gru_find_vma(vaddr); in gru_alloc_locked_gts() 94 gts = gru_alloc_thread_state(vma, TSID(vaddr, vma)); in gru_alloc_locked_gts() 178 unsigned long vaddr, int write, in non_atomic_pte_lookup() argument 188 if (get_user_pages(vaddr, 1, write ? FOLL_WRITE : 0, &page) <= 0) in non_atomic_pte_lookup() [all …]
|