Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a69f9c6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 mm updates from Ingo Molnar:
 "The main changes in this cycle were:

   - Continued work to add support for 5-level paging provided by future
     Intel CPUs. In particular we switch the x86 GUP code to the generic
     implementation. (Kirill A. Shutemov)

   - Continued work to add PCID CPU support to native kernels as well.
     In this round most of the focus is on reworking/refreshing the TLB
     flush infrastructure for the upcoming PCID changes. (Andy
     Lutomirski)"

* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits)
  x86/mm: Delete a big outdated comment about TLB flushing
  x86/mm: Don't reenter flush_tlb_func_common()
  x86/KASLR: Fix detection 32/64 bit bootloaders for 5-level paging
  x86/ftrace: Exclude functions in head64.c from function-tracing
  x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap
  x86/mm: Remove reset_lazy_tlbstate()
  x86/ldt: Simplify the LDT switching logic
  x86/boot/64: Put __startup_64() into .head.text
  x86/mm: Add support for 5-level paging for KASLR
  x86/mm: Make kernel_physical_mapping_init() support 5-level paging
  x86/mm: Add sync_global_pgds() for configuration with 5-level paging
  x86/boot/64: Add support of additional page table level during early boot
  x86/boot/64: Rename init_level4_pgt and early_level4_pgt
  x86/boot/64: Rewrite startup_64() in C
  x86/boot/compressed: Enable 5-level paging during decompression stage
  x86/boot/efi: Define __KERNEL32_CS GDT on 64-bit configurations
  x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configurations
  x86/boot/efi: Cleanup initialization of GDT entries
  x86/asm: Fix comment in return_from_SYSCALL_64()
  x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation
  ...
parents 9bc088ab 8781fb7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1638,7 +1638,7 @@ config ARCH_SELECT_MEMORY_MODEL
config HAVE_ARCH_PFN_VALID
	def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM

config HAVE_GENERIC_RCU_GUP
config HAVE_GENERIC_GUP
	def_bool y
	depends on ARM_LPAE

+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ config GENERIC_CALIBRATE_DELAY
config ZONE_DMA
	def_bool y

config HAVE_GENERIC_RCU_GUP
config HAVE_GENERIC_GUP
	def_bool y

config ARCH_DMA_ADDR_T_64BIT
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ config PPC
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_GCC_PLUGINS
	select HAVE_GENERIC_RCU_GUP
	select HAVE_GENERIC_GUP
	select HAVE_HW_BREAKPOINT		if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
	select HAVE_IDE
	select HAVE_IOREMAP_PROT
+4 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ config X86
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_QUEUED_RWLOCKS
	select ARCH_USE_QUEUED_SPINLOCKS
	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if SMP
	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
	select ARCH_WANT_FRAME_POINTERS
	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
	select BUILDTIME_EXTABLE_SORT
@@ -2793,6 +2793,9 @@ config X86_DMA_REMAP
	bool
	depends on STA2X11

config HAVE_GENERIC_GUP
	def_bool y

source "net/Kconfig"

source "drivers/Kconfig"
+51 −22
Original line number Diff line number Diff line
@@ -1046,9 +1046,11 @@ struct boot_params *efi_main(struct efi_config *c,
	memset((char *)gdt->address, 0x0, gdt->size);
	desc = (struct desc_struct *)gdt->address;

	/* The first GDT is a dummy and the second is unused. */
	desc += 2;
	/* The first GDT is a dummy. */
	desc++;

	if (IS_ENABLED(CONFIG_X86_64)) {
		/* __KERNEL32_CS */
		desc->limit0 = 0xffff;
		desc->base0 = 0x0000;
		desc->base1 = 0x0000;
@@ -1062,8 +1064,34 @@ struct boot_params *efi_main(struct efi_config *c,
		desc->d = SEG_OP_SIZE_32BIT;
		desc->g = SEG_GRANULARITY_4KB;
		desc->base2 = 0x00;
		desc++;
	} else {
		/* Second entry is unused on 32-bit */
		desc++;
	}

	/* __KERNEL_CS */
	desc->limit0 = 0xffff;
	desc->base0 = 0x0000;
	desc->base1 = 0x0000;
	desc->type = SEG_TYPE_CODE | SEG_TYPE_EXEC_READ;
	desc->s = DESC_TYPE_CODE_DATA;
	desc->dpl = 0;
	desc->p = 1;
	desc->limit = 0xf;
	desc->avl = 0;
	if (IS_ENABLED(CONFIG_X86_64)) {
		desc->l = 1;
		desc->d = 0;
	} else {
		desc->l = 0;
		desc->d = SEG_OP_SIZE_32BIT;
	}
	desc->g = SEG_GRANULARITY_4KB;
	desc->base2 = 0x00;
	desc++;

	/* __KERNEL_DS */
	desc->limit0 = 0xffff;
	desc->base0 = 0x0000;
	desc->base1 = 0x0000;
@@ -1077,10 +1105,10 @@ struct boot_params *efi_main(struct efi_config *c,
	desc->d = SEG_OP_SIZE_32BIT;
	desc->g = SEG_GRANULARITY_4KB;
	desc->base2 = 0x00;
	desc++;

#ifdef CONFIG_X86_64
	if (IS_ENABLED(CONFIG_X86_64)) {
		/* Task segment value */
	desc++;
		desc->limit0 = 0x0000;
		desc->base0 = 0x0000;
		desc->base1 = 0x0000;
@@ -1094,7 +1122,8 @@ struct boot_params *efi_main(struct efi_config *c,
		desc->d = 0;
		desc->g = SEG_GRANULARITY_4KB;
		desc->base2 = 0x00;
#endif /* CONFIG_X86_64 */
		desc++;
	}

	asm volatile("cli");
	asm volatile ("lgdt %0" : : "m" (*gdt));
Loading