Skip to content

Commit 8e19843

Browse files
joergroedeltorvalds
authored andcommitted
x86/mm/64: implement arch_sync_kernel_mappings()
Implement the function to sync changes in vmalloc and ioremap ranges to all page-tables. Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H . Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Michal Hocko <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Steven Rostedt (VMware) <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vlastimil Babka <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6c0c7d2 commit 8e19843

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/x86/include/asm/pgtable_64_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,6 @@ extern unsigned int ptrs_per_p4d;
159159

160160
#define PGD_KERNEL_START ((PAGE_SIZE / 2) / sizeof(pgd_t))
161161

162+
#define ARCH_PAGE_TABLE_SYNC_MASK (pgtable_l5_enabled() ? PGTBL_PGD_MODIFIED : PGTBL_P4D_MODIFIED)
163+
162164
#endif /* _ASM_X86_PGTABLE_64_DEFS_H */

arch/x86/mm/init_64.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ void sync_global_pgds(unsigned long start, unsigned long end)
218218
sync_global_pgds_l4(start, end);
219219
}
220220

221+
void arch_sync_kernel_mappings(unsigned long start, unsigned long end)
222+
{
223+
sync_global_pgds(start, end);
224+
}
225+
221226
/*
222227
* NOTE: This function is marked __ref because it calls __init function
223228
* (alloc_bootmem_pages). It's safe to do it ONLY when after_bootmem == 0.

0 commit comments

Comments
 (0)