mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
x86 PAT: change track_pfn_vma_new to take pgprot_t pointer param
Impact: cleanup Change the protection parameter for track_pfn_vma_new() into a pgprot_t pointer. Subsequent patch changes the x86 PAT handling to return a compatible memtype in pgprot_t, if what was requested cannot be allowed due to conflicts. No fuctionality change in this patch. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
afc7d20c84
commit
e4b866ed19
3 changed files with 9 additions and 8 deletions
|
|
@ -1511,6 +1511,7 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
|
|||
unsigned long pfn)
|
||||
{
|
||||
int ret;
|
||||
pgprot_t pgprot = vma->vm_page_prot;
|
||||
/*
|
||||
* Technically, architectures with pte_special can avoid all these
|
||||
* restrictions (same for remap_pfn_range). However we would like
|
||||
|
|
@ -1525,10 +1526,10 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
|
|||
|
||||
if (addr < vma->vm_start || addr >= vma->vm_end)
|
||||
return -EFAULT;
|
||||
if (track_pfn_vma_new(vma, vma->vm_page_prot, pfn, PAGE_SIZE))
|
||||
if (track_pfn_vma_new(vma, &pgprot, pfn, PAGE_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
ret = insert_pfn(vma, addr, pfn, vma->vm_page_prot);
|
||||
ret = insert_pfn(vma, addr, pfn, pgprot);
|
||||
|
||||
if (ret)
|
||||
untrack_pfn_vma(vma, pfn, PAGE_SIZE);
|
||||
|
|
@ -1671,7 +1672,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
|
|||
|
||||
vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
|
||||
|
||||
err = track_pfn_vma_new(vma, prot, pfn, PAGE_ALIGN(size));
|
||||
err = track_pfn_vma_new(vma, &prot, pfn, PAGE_ALIGN(size));
|
||||
if (err) {
|
||||
/*
|
||||
* To indicate that track_pfn related cleanup is not
|
||||
|
|
|
|||
Loading…
Reference in a new issue