lkml.org 
[lkml]   [2017]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv6 06/10] x86/mm: Add sync_global_pgds() for configuration with 5-level paging
From
Date
On 05/24/2017 12:54 PM, Kirill A. Shutemov wrote:
> This basically restores slightly modified version of original
> sync_global_pgds() which we had before folded p4d was introduced.
>
> The only modification is protection against 'addr' overflow.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> arch/x86/mm/init_64.c | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 95651dc58e09..ce410c05d68d 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -92,6 +92,44 @@ __setup("noexec32=", nonx32_setup);
> * When memory was added make sure all the processes MM have
> * suitable PGD entries in the local PGD level page.
> */
> +#ifdef CONFIG_X86_5LEVEL
> +void sync_global_pgds(unsigned long start, unsigned long end)
> +{
> + unsigned long addr;
> +
> + for (addr = start; addr <= end; addr += ALIGN(addr + 1, PGDIR_SIZE)) {

addr = ALIGN(addr + 1, PGDIR_SIZE)

\
 
 \ /
  Last update: 2017-06-05 00:14    [W:0.133 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site