lkml.org 
[lkml]   [2018]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 15/24] mm: Introduce __vm_normal_page()
From
Date
On 03/04/2018 01:18, David Rientjes wrote:
> On Tue, 13 Mar 2018, Laurent Dufour wrote:
>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index a84ddc218bbd..73b8b99f482b 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -1263,8 +1263,11 @@ struct zap_details {
>> pgoff_t last_index; /* Highest page->index to unmap */
>> };
>>
>> -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> - pte_t pte, bool with_public_device);
>> +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> + pte_t pte, bool with_public_device,
>> + unsigned long vma_flags);
>> +#define _vm_normal_page(vma, addr, pte, with_public_device) \
>> + __vm_normal_page(vma, addr, pte, with_public_device, (vma)->vm_flags)
>> #define vm_normal_page(vma, addr, pte) _vm_normal_page(vma, addr, pte, false)
>>
>> struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
>
> If _vm_normal_page() is a static inline function does it break somehow?
> It's nice to avoid the #define's.

No problem, I'll create it as a static inline function.

>
>> diff --git a/mm/memory.c b/mm/memory.c
>> index af0338fbc34d..184a0d663a76 100644
>> --- a/mm/memory.c
>> +++ b/mm/memory.c
>> @@ -826,8 +826,9 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
>> #else
>> # define HAVE_PTE_SPECIAL 0
>> #endif
>> -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> - pte_t pte, bool with_public_device)
>> +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> + pte_t pte, bool with_public_device,
>> + unsigned long vma_flags)
>> {
>> unsigned long pfn = pte_pfn(pte);
>>
>
> Would it be possible to update the comment since the function itself is no
> longer named vm_normal_page?

Sure.

\
 
 \ /
  Last update: 2018-04-04 18:04    [W:0.106 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site