Home
last modified time | relevance | path

Searched refs:PAGE_SHIFT (Results 1 – 25 of 1582) sorted by relevance

12345678910>>...64

/linux-5.19.10/arch/hexagon/include/asm/
Dpage.h16 #define PAGE_SHIFT 12 macro
21 #define PAGE_SHIFT 14 macro
26 #define PAGE_SHIFT 16 macro
31 #define PAGE_SHIFT 18 macro
36 #define PAGE_SHIFT 20 macro
49 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT)
53 #define PAGE_SIZE (1UL << PAGE_SHIFT)
54 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
99 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
127 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
[all …]
/linux-5.19.10/arch/sparc/mm/
Dinit_32.c65 unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT; in calc_highpages()
66 unsigned long end_pfn = (sp_banks[i].base_addr + sp_banks[i].num_bytes) >> PAGE_SHIFT; in calc_highpages()
83 unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); in calc_max_low_pfn()
86 last_pfn = (sp_banks[0].base_addr + sp_banks[0].num_bytes) >> PAGE_SHIFT; in calc_max_low_pfn()
88 curr_pfn = sp_banks[i].base_addr >> PAGE_SHIFT; in calc_max_low_pfn()
96 last_pfn = (sp_banks[i].base_addr + sp_banks[i].num_bytes) >> PAGE_SHIFT; in calc_max_low_pfn()
175 start_pfn >>= PAGE_SHIFT; in bootmem_init()
177 max_pfn = end_of_phys_memory >> PAGE_SHIFT; in bootmem_init()
182 if (max_low_pfn > pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT)) { in bootmem_init()
183 highstart_pfn = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); in bootmem_init()
[all …]
/linux-5.19.10/arch/xtensa/include/asm/
Dpage.h23 #define PAGE_SHIFT 12 macro
24 #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
67 # define DCACHE_ALIAS_ORDER (DCACHE_WAY_SHIFT - PAGE_SHIFT)
69 # define DCACHE_ALIAS(a) (((a) & DCACHE_ALIAS_MASK) >> PAGE_SHIFT)
78 # define ICACHE_ALIAS_ORDER (ICACHE_WAY_SHIFT - PAGE_SHIFT)
80 # define ICACHE_ALIAS(a) (((a) & ICACHE_ALIAS_MASK) >> PAGE_SHIFT)
120 asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT)); in get_order()
162 #define ARCH_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
195 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
196 #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
[all …]
/linux-5.19.10/arch/mips/include/asm/
Dpage.h21 #define PAGE_SHIFT 12 macro
24 #define PAGE_SHIFT 13 macro
27 #define PAGE_SHIFT 14 macro
30 #define PAGE_SHIFT 15 macro
33 #define PAGE_SHIFT 16 macro
35 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
36 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
54 return (PAGE_SHIFT - 10) / 2; in page_size_ftlb()
62 #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3)
65 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
[all …]
Dpgtable-64.h45 #define PGDIR_SHIFT (PAGE_SHIFT + PAGE_SHIFT + PTE_ORDER - 3)
49 #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 3))
54 # define PGDIR_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_ORDER - 3))
59 #define PUD_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_ORDER - 3))
62 #define PGDIR_SHIFT (PUD_SHIFT + (PAGE_SHIFT + PUD_ORDER - 3))
218 #define p4d_page(p4d) (pfn_to_page(p4d_phys(p4d) >> PAGE_SHIFT))
307 #define pte_pfn(x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
308 #define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
321 #define pud_page(pud) (pfn_to_page(pud_phys(pud) >> PAGE_SHIFT))
/linux-5.19.10/arch/x86/mm/
Dinit.c131 order = get_order((unsigned long)num << PAGE_SHIFT); in alloc_low_pages()
141 min_pfn_mapped << PAGE_SHIFT, in alloc_low_pages()
142 max_pfn_mapped << PAGE_SHIFT); in alloc_low_pages()
150 pfn = ret >> PAGE_SHIFT; in alloc_low_pages()
159 adr = __va((pfn + i) << PAGE_SHIFT); in alloc_low_pages()
163 return __va(pfn << PAGE_SHIFT); in alloc_low_pages()
195 pgt_buf_start = base >> PAGE_SHIFT; in early_alloc_pgt_buf()
197 pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT); in early_alloc_pgt_buf()
318 mr[nr_range].start = start_pfn<<PAGE_SHIFT; in save_mr()
319 mr[nr_range].end = end_pfn<<PAGE_SHIFT; in save_mr()
[all …]
Dinit_32.c77 paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT); in one_md_table_init()
102 paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT); in one_page_table_init()
184 paravirt_alloc_pte(&init_mm, __pa(newpte) >> PAGE_SHIFT); in page_table_kmap_check()
189 paravirt_release_pte(__pa(pte) >> PAGE_SHIFT); in page_table_kmap_check()
271 start_pfn = start >> PAGE_SHIFT; in kernel_physical_mapping_init()
272 end_pfn = end >> PAGE_SHIFT; in kernel_physical_mapping_init()
296 pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
304 pmd_idx = pmd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
328 pfn &= PMD_MASK >> PAGE_SHIFT; in kernel_physical_mapping_init()
347 pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
[all …]
/linux-5.19.10/arch/loongarch/include/asm/
Dpage.h15 #define PAGE_SHIFT 12 macro
18 #define PAGE_SHIFT 14 macro
21 #define PAGE_SHIFT 16 macro
23 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
26 #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3)
29 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
36 #define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT))
85 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
/linux-5.19.10/arch/ia64/include/asm/
Dpage.h31 # define PAGE_SHIFT 12 macro
33 # define PAGE_SHIFT 13 macro
35 # define PAGE_SHIFT 14 macro
37 # define PAGE_SHIFT 16 macro
42 #define PAGE_SIZE (__IA64_UL_CONST(1) << PAGE_SHIFT)
96 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
104 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
105 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
106 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
131 | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT)))
[all …]
/linux-5.19.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_res_cursor.h62 WARN_ON(res && start + size > res->num_pages << PAGE_SHIFT); in amdgpu_res_first()
66 BUG_ON(start + size > res->num_pages << PAGE_SHIFT); in amdgpu_res_first()
69 while (start >= node->size << PAGE_SHIFT) in amdgpu_res_first()
70 start -= node++->size << PAGE_SHIFT; in amdgpu_res_first()
72 cur->start = (node->start << PAGE_SHIFT) + start; in amdgpu_res_first()
73 cur->size = min((node->size << PAGE_SHIFT) - start, size); in amdgpu_res_first()
103 cur->start = node->start << PAGE_SHIFT; in amdgpu_res_next()
104 cur->size = min(node->size << PAGE_SHIFT, cur->remaining); in amdgpu_res_next()
/linux-5.19.10/arch/sh/include/asm/
Dpage.h13 # define PAGE_SHIFT 12 macro
15 # define PAGE_SHIFT 13 macro
17 # define PAGE_SHIFT 14 macro
19 # define PAGE_SHIFT 16 macro
24 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
43 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT)
160 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
161 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
169 #define PFN_START (__MEMORY_START >> PAGE_SHIFT)
171 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
[all …]
/linux-5.19.10/arch/alpha/include/asm/
Dpgtable.h32 #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3))
37 #define PGDIR_SHIFT (PAGE_SHIFT + 2*(PAGE_SHIFT-3))
45 #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3))
46 #define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
47 #define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
51 #define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
170 ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
193 #define KSEG_PFN (0xc0000000000UL >> PAGE_SHIFT)
195 ((((pfn) & KSEG_PFN) == (0x40000000000UL >> PAGE_SHIFT)) \
205 #define page_to_pa(page) (page_to_pfn(page) << PAGE_SHIFT)
[all …]
/linux-5.19.10/arch/arc/include/asm/
Dhighmem.h24 #define FIXADDR_TOP (FIXMAP_BASE + (FIX_KMAP_END << PAGE_SHIFT))
30 #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
31 #define __virt_to_fix(x) (((FIXADDR_TOP - ((x) & PAGE_MASK))) >> PAGE_SHIFT)
35 #define LAST_PKMAP (PKMAP_SIZE >> PAGE_SHIFT)
37 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
38 #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
/linux-5.19.10/arch/openrisc/include/asm/
Dpage.h21 #define PAGE_SHIFT 13 macro
23 #define PAGE_SIZE (1 << PAGE_SHIFT)
25 #define PAGE_SIZE (1UL << PAGE_SHIFT)
75 #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
76 #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
79 (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
81 #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
/linux-5.19.10/arch/arm/mm/
Dtlb-v7.S36 mov r0, r0, lsr #PAGE_SHIFT @ align address
37 mov r1, r1, lsr #PAGE_SHIFT
43 orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA
44 mov r1, r1, lsl #PAGE_SHIFT
70 mov r0, r0, lsr #PAGE_SHIFT @ align address
71 mov r1, r1, lsr #PAGE_SHIFT
72 mov r0, r0, lsl #PAGE_SHIFT
73 mov r1, r1, lsl #PAGE_SHIFT
Dtlb-v6.S38 mov r0, r0, lsr #PAGE_SHIFT @ align address
39 mov r1, r1, lsr #PAGE_SHIFT
41 orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA
42 mov r1, r1, lsl #PAGE_SHIFT
69 mov r0, r0, lsr #PAGE_SHIFT @ align address
70 mov r1, r1, lsr #PAGE_SHIFT
71 mov r0, r0, lsl #PAGE_SHIFT
72 mov r1, r1, lsl #PAGE_SHIFT
/linux-5.19.10/include/asm-generic/
Dpage.h16 #define PAGE_SHIFT 12 macro
18 #define PAGE_SIZE (1 << PAGE_SHIFT)
20 #define PAGE_SIZE (1UL << PAGE_SHIFT)
69 #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
77 #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
78 #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
84 #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
/linux-5.19.10/drivers/gpu/drm/i915/
Di915_ttm_buddy_manager.c66 size = bman_res->base.num_pages << PAGE_SHIFT; in i915_ttm_buddy_man_alloc()
70 min_page_size = bo->page_alignment << PAGE_SHIFT; in i915_ttm_buddy_man_alloc()
87 if (size > lpfn << PAGE_SHIFT) { in i915_ttm_buddy_man_alloc()
101 err = drm_buddy_alloc_blocks(mm, (u64)place->fpfn << PAGE_SHIFT, in i915_ttm_buddy_man_alloc()
102 (u64)lpfn << PAGE_SHIFT, in i915_ttm_buddy_man_alloc()
103 (u64)n_pages << PAGE_SHIFT, in i915_ttm_buddy_man_alloc()
112 u64 original_size = (u64)bman_res->base.num_pages << PAGE_SHIFT; in i915_ttm_buddy_man_alloc()
128 drm_buddy_block_offset(block) >> PAGE_SHIFT; in i915_ttm_buddy_man_alloc()
132 (drm_buddy_block_size(mm, block) >> PAGE_SHIFT); in i915_ttm_buddy_man_alloc()
191 (u64)bman->visible_avail << PAGE_SHIFT >> 20); in i915_ttm_buddy_man_debug()
[all …]
/linux-5.19.10/arch/powerpc/include/asm/
Dpage.h23 #define PAGE_SHIFT CONFIG_PPC_PAGE_SHIFT macro
24 #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
28 #define HPAGE_SHIFT PAGE_SHIFT
39 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
48 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
119 #define ARCH_PFN_OFFSET ((unsigned long)(MEMORY_START >> PAGE_SHIFT))
131 #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
133 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
/linux-5.19.10/arch/powerpc/mm/
Dmem.c133 update_end_of_memory_vars(start_pfn << PAGE_SHIFT, in add_pages()
134 nr_pages << PAGE_SHIFT); in add_pages()
142 unsigned long start_pfn = start >> PAGE_SHIFT; in arch_add_memory()
143 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_add_memory()
157 unsigned long start_pfn = start >> PAGE_SHIFT; in arch_remove_memory()
158 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_remove_memory()
168 max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; in mem_topology_setup()
169 min_low_pfn = MEMORY_START >> PAGE_SHIFT; in mem_topology_setup()
171 max_low_pfn = lowmem_end_addr >> PAGE_SHIFT; in mem_topology_setup()
256 1UL << (zone_dma_bits - PAGE_SHIFT)); in paging_init()
[all …]
/linux-5.19.10/arch/microblaze/include/asm/
Dpage.h23 #define PAGE_SHIFT 12 macro
24 #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
29 #define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */
110 # define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
111 # define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
112 # define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
114 # define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT)
/linux-5.19.10/arch/riscv/kvm/
Dmmu.c87 unsigned long page_order = PAGE_SHIFT; in gstage_level_to_page_size()
128 unsigned long order = PAGE_SHIFT; in gstage_remote_tlb_flush()
337 phys_addr_t start = memslot->base_gfn << PAGE_SHIFT; in gstage_wp_memory_region()
338 phys_addr_t end = (memslot->base_gfn + memslot->npages) << PAGE_SHIFT; in gstage_wp_memory_region()
391 phys_addr_t start = (base_gfn + __ffs(mask)) << PAGE_SHIFT; in kvm_arch_mmu_enable_log_dirty_pt_masked()
392 phys_addr_t end = (base_gfn + __fls(mask) + 1) << PAGE_SHIFT; in kvm_arch_mmu_enable_log_dirty_pt_masked()
423 gpa_t gpa = slot->base_gfn << PAGE_SHIFT; in kvm_arch_flush_shadow_memslot()
424 phys_addr_t size = slot->npages << PAGE_SHIFT; in kvm_arch_flush_shadow_memslot()
464 (gstage_gpa_size >> PAGE_SHIFT)) in kvm_arch_prepare_memory_region()
468 size = new->npages << PAGE_SHIFT; in kvm_arch_prepare_memory_region()
[all …]
/linux-5.19.10/arch/parisc/include/asm/
Dpage.h8 # define PAGE_SHIFT 12 macro
10 # define PAGE_SHIFT 14 macro
12 # define PAGE_SHIFT 16 macro
16 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
166 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
180 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
182 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
183 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
/linux-5.19.10/arch/powerpc/mm/book3s64/
Diommu_api.c80 mem->pageshift = __ffs(dev_hpa | (entries << PAGE_SHIFT)); in mm_iommu_do_alloc()
91 mem->pageshift = __ffs(ua | (entries << PAGE_SHIFT)); in mm_iommu_do_alloc()
100 chunk = (1UL << (PAGE_SHIFT + MAX_ORDER - 1)) / in mm_iommu_do_alloc()
106 ret = pin_user_pages(ua + (entry << PAGE_SHIFT), n, in mm_iommu_do_alloc()
135 if ((mem2->ua < (ua + (entries << PAGE_SHIFT))) && in mm_iommu_do_alloc()
137 (mem2->entries << PAGE_SHIFT)))) { in mm_iommu_do_alloc()
150 pageshift = PAGE_SHIFT; in mm_iommu_do_alloc()
154 if ((mem->pageshift > PAGE_SHIFT) && PageHuge(page)) in mm_iommu_do_alloc()
161 mem->hpas[i] = page_to_pfn(page) << PAGE_SHIFT; in mm_iommu_do_alloc()
214 page = pfn_to_page(mem->hpas[i] >> PAGE_SHIFT); in mm_iommu_unpin()
[all …]
/linux-5.19.10/lib/
Dtest_hmm.c170 for (pfn = (range->start >> PAGE_SHIFT); in dmirror_do_fault()
171 pfn < (range->end >> PAGE_SHIFT); in dmirror_do_fault()
210 xa_for_each_range(&dmirror->pt, pfn, entry, start >> PAGE_SHIFT, in dmirror_do_update()
211 end >> PAGE_SHIFT) in dmirror_do_update()
307 range.end = min(addr + (ARRAY_SIZE(pfns) << PAGE_SHIFT), end); in dmirror_fault()
326 for (pfn = start >> PAGE_SHIFT; pfn < (end >> PAGE_SHIFT); pfn++) { in dmirror_do_read()
351 unsigned long size = cmd->npages << PAGE_SHIFT; in dmirror_read()
370 start = cmd->addr + (bounce.cpages << PAGE_SHIFT); in dmirror_read()
395 for (pfn = start >> PAGE_SHIFT; pfn < (end >> PAGE_SHIFT); pfn++) { in dmirror_do_write()
420 unsigned long size = cmd->npages << PAGE_SHIFT; in dmirror_write()
[all …]

12345678910>>...64