lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5 2/3] powerpc/mm: Use generic version of pmdp_clear_flush
On Fri, 15 May 2015 21:12:29 +0530 "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:

> Also move the pmd_trans_huge check to generic code.
>
> ...
>
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -196,7 +196,12 @@ static inline pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
> unsigned long address,
> pmd_t *pmdp)
> {
> - return pmdp_clear_flush(vma, address, pmdp);
> + pmd_t pmd;
> + VM_BUG_ON(address & ~HPAGE_PMD_MASK);
> + VM_BUG_ON(pmd_trans_huge(*pmdp));
> + pmd = pmdp_get_and_clear(vma->vm_mm, address, pmdp);
> + flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
> + return pmd;
> }

x86_64 allmodconfig:

In file included from ./arch/x86/include/asm/pgtable.h:878,
from include/linux/mm.h:53,
from include/linux/suspend.h:8,
from arch/x86/kernel/asm-offsets.c:12:
include/asm-generic/pgtable.h: In function 'pmdp_collapse_flush':
include/asm-generic/pgtable.h:199: error: 'HPAGE_PMD_MASK' undeclared (first use in this function)
include/asm-generic/pgtable.h:199: error: (Each undeclared identifier is reported only once
include/asm-generic/pgtable.h:199: error: for each function it appears in.)
include/asm-generic/pgtable.h:202: error: implicit declaration of function 'flush_tlb_range'
include/asm-generic/pgtable.h:202: error: 'HPAGE_PMD_SIZE' undeclared (first use in this function)


Including linux/huge_mm.h doesn't work. A suitable fix would be to
move this into a .c file.



\
 
 \ /
  Last update: 2015-05-20 22:21    [W:0.087 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site