search for: page_shift

Displaying 20 results from an estimated 1478 matches for "page_shift".

2019 Jul 30
0
[PATCH 07/13] mm: remove the page_shift member from struct hmm_range
...4 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -818,7 +818,6 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, struct page **pages) 0 : range->flags[HMM_PFN_WRITE]; range->pfn_flags_mask = 0; range->pfns = pfns; - range->page_shift = PAGE_SHIFT; range->start = start; range->end = start + ttm->num_pages * PAGE_SIZE; diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index 40e706234554..e7068ce46949 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/no...
2019 Aug 06
0
[PATCH 07/15] mm: remove the page_shift member from struct hmm_range
...4 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -818,7 +818,6 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, struct page **pages) 0 : range->flags[HMM_PFN_WRITE]; range->pfn_flags_mask = 0; range->pfns = pfns; - range->page_shift = PAGE_SHIFT; range->start = start; range->end = start + ttm->num_pages * PAGE_SIZE; diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index 41fad4719ac6..668d4bd0c118 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/no...
2019 Jul 30
29
hmm_range_fault related fixes and legacy API removal v3
Hi Jérôme, Ben, Felxi and Jason, below is a series against the hmm tree which cleans up various minor bits and allows HMM_MIRROR to be built on all architectures. Diffstat: 7 files changed, 81 insertions(+), 171 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git hmm-cleanups Gitweb:
2023 Jan 25
5
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 ++++++++--- drivers/gpu/drm/...
2013 Nov 29
2
Fixing nouveau for >4k PAGE_SIZE
...ruct nouveau_vmmgr *vmm = vm->vmm; - int big = vma->node->type != vmm->spg_shift; u32 offset = vma->node->offset + (delta >> 12); - u32 bits = vma->node->type - 12; - u32 num = length >> vma->node->type; + u32 shift = vma->node->type; + u32 order = PAGE_SHIFT - shift; + u32 num = length >> PAGE_SHIFT; u32 pde = (offset >> vmm->pgt_bits) - vm->fpde; - u32 pte = (offset & ((1 << vmm->pgt_bits) - 1)) >> bits; - u32 max = 1 << (vmm->pgt_bits - bits); - unsigned m, sglen; - u32 end, len; + u32 pte = offset...
2023 Jan 25
4
[PATCH v3 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. v1 -> v2: reorder patch sequence v2 -> v3: addressing review comment v2 Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_o...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...> > @@ -98,7 +99,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, > > > > for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { > > struct nouveau_gpuobj *pgt = vm->pgt[pde].obj[big]; > > - sglen = sg_dma_len(sg) >> PAGE_SHIFT; > > + sglen = sg_dma_len(sg) >> shift; > > > > end = pte + sglen; > > if (unlikely(end >= max)) > Please add a WARN_ON(big); in map_sg and map_sg_table if you do this. So that's debatable :-) The above code is map_sg. Arguably my patch *fixes* usi...
2019 Jul 30
0
[PATCH 06/13] mm: remove superflous arguments from hmm_range_register
The start, end and page_shift values are all saved in the range structure, so we might as well use that for argument passing. Signed-off-by: Christoph Hellwig <hch at lst.de> --- Documentation/vm/hmm.rst | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++++-- drivers/gpu/drm/nouveau/nouveau_svm.c...
2007 Feb 12
0
[PATCH] lift physical address restriction in svae/restore code
.../xc_linux_restore.c 2007-01-17 11:16:20.000000000 +0100 +++ 2007-02-07/tools/libxc/xc_linux_restore.c 2007-02-12 09:06:05.000000000 +0100 @@ -82,7 +82,7 @@ static int uncanonicalize_pagetable(int if(!(pte & _PAGE_PRESENT)) continue; - pfn = (pte >> PAGE_SHIFT) & 0xffffffff; + pfn = (pte >> PAGE_SHIFT) & MFN_MASK_X86; if(pfn >= max_pfn) { /* This "page table page" is probably not one; bail. */ @@ -120,12 +120,12 @@ static int uncanonicalize_pagetable(int if(!(pte & _PAGE_PRES...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...ouveau_mem is called "node" in various places (in > nouveau_ttm) which is confusing. What is the relationship between > nouveau_mem, nouveau_mm and nouveau_mm_node ? nouveau_mem seems to be > having things such as "offset" in multiple of PAGE_SIZE, but have a > "page_shift" member that appears to match the buffer object page_shift, > hence seem to indicate that it is a card page shift... > > Would it be possible, maybe, to add comments next to the fields in > those various data structure indicating in which units they are ? > > - Similar confu...
2005 Mar 14
4
[patch/unstable] page table cleanups
...l1e, *spl1e, gl2e, sl2e, gl1pfn, sl1mfn, sl1ss; + l1_pgentry_t *gpl1e, *spl1e; + l2_pgentry_t gl2e, sl2e; + unsigned long gl1pfn, sl1mfn, sl1ss; struct pfn_info *sl1mfn_info; int i; __guest_get_l2e(ed, va, &gl2e); - gl1pfn = gl2e >> PAGE_SHIFT; + gl1pfn = l2_pgentry_val(gl2e) >> PAGE_SHIFT; sl1ss = __shadow_status(d, gl1pfn); if ( !(sl1ss & PSH_shadowed) ) @@ -561,10 +563,10 @@ static void shadow_map_l1_into_current_l __guest_set_l2e(ed, va, gl2e); __shadow_set_l2e(ed, va, sl2e); - gpl1...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
On Sun, 2013-08-11 at 17:06 +1000, Benjamin Herrenschmidt wrote: > I think I found at least two cases where "12" was used where it should > have been PAGE_SHIFT (basically ttm_mem_reg->num_pages). This > is only the tip of the iceberg, so this isn't a formal patch submission, > but I would appreciate your thought as to whether the below is correct > (and thus I'm on the right track) : This patch (which needs cleanups, and probably be b...
2019 Aug 06
24
hmm cleanups, v2
Hi Jérôme, Ben, Felix and Jason, below is a series against the hmm tree which cleans up various minor bits and allows HMM_MIRROR to be built on all architectures. Diffstat: 11 files changed, 94 insertions(+), 210 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git hmm-cleanups.2 Gitweb:
2013 Dec 11
0
Fixing nouveau for >4k PAGE_SIZE
...gt;node->type != vmm->spg_shift; > u32 offset = vma->node->offset + (delta >> 12); > - u32 bits = vma->node->type - 12; > - u32 num = length >> vma->node->type; > + u32 shift = vma->node->type; > + u32 order = PAGE_SHIFT - shift; > + u32 num = length >> PAGE_SHIFT; > u32 pde = (offset >> vmm->pgt_bits) - vm->fpde; > - u32 pte = (offset & ((1 << vmm->pgt_bits) - 1)) >> bits; > - u32 max = 1 << (vmm->pgt_bits - bits); > -...
2019 Jul 26
0
[PATCH v2 5/7] mm/hmm: make full use of walk_page_range()
...-EBUSY; + + /* + * Skip vma ranges that don't have struct page backing them or + * map I/O devices directly. + * TODO: handle peer-to-peer device mappings. + */ + if (vma->vm_flags & (VM_IO | VM_PFNMAP | VM_MIXEDMAP)) + return -EFAULT; + + if (is_vm_hugetlb_page(vma)) { + if (huge_page_shift(hstate_vma(vma)) != range->page_shift && + range->page_shift != PAGE_SHIFT) + return -EINVAL; + } else { + if (range->page_shift != PAGE_SHIFT) + return -EINVAL; + } + + /* + * If vma does not allow read access, then assume that it does not + * allow write access, eithe...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...======================================================== --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -62,6 +62,7 @@ static pmd_t * __init one_md_table_init( #ifdef CONFIG_X86_PAE pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT); set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); pud = pud_offset(pgd, 0); if (pmd_table != pmd_offset(pud, 0)) @@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini { if (pmd_none(*pmd)) { pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...======================================================== --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -62,6 +62,7 @@ static pmd_t * __init one_md_table_init( #ifdef CONFIG_X86_PAE pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT); set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); pud = pud_offset(pgd, 0); if (pmd_table != pmd_offset(pud, 0)) @@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini { if (pmd_none(*pmd)) { pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_...
2005 Jun 13
2
[PATCH] fix x86_64 initrd support
...7,20 @@ void __init setup_arch(char **cmdline_p) acpi_reserve_bootmem(); #endif #ifdef CONFIG_BLK_DEV_INITRD - if (xen_start_info.mod_start) { - if (LOADER_TYPE && INITRD_START) { - if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { - /* reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */ - initrd_start = INITRD_START + PAGE_OFFSET; - initrd_end = initrd_start+INITRD_SIZE; - initrd_below_start_ok =...
2003 Aug 22
2
kernel: locore.s doesn't assemble (fillkpt, $PAGE_SHIFT, $PTESHIFT)
since august 8th, 2003 the kernel on my i386 pentiumIII won't compile. the problem arises in locore.s with the definition of the constants $PAGE_SHIFT and $PTESHIFT used in `shr' and `shl' instructions within the macros `fillkpt' and `fillkptphys'. i've tried to cvsup(1) RELENG_4 and RELENG_4_8 every day for over a week now, but kernel builds (as part of a buildworld) don't work anymore. i have set up an area different f...
2007 Apr 18
0
[PATCH 1/6] Page allocation hooks for VMI backend
...======================================================== --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -62,6 +62,7 @@ static pmd_t * __init one_md_table_init( #ifdef CONFIG_X86_PAE pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT); set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); pud = pud_offset(pgd, 0); if (pmd_table != pmd_offset(pud, 0)) @@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini { if (pmd_none(*pmd)) { pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); + paravirt_alloc_...