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

Commit 622f202a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull x86 fixes from Ingo Molnar:
 "This fixes a couple of nasty page table initialization bugs which were
  causing kdump regressions.  A clean rearchitecturing of the code is in
  the works - meanwhile these are reverts that restore the
  best-known-working state of the kernel.

  There's also EFI fixes and other small fixes."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, mm: Undo incorrect revert in arch/x86/mm/init.c
  x86: efi: Turn off efi_enabled after setup on mixed fw/kernel
  x86, mm: Find_early_table_space based on ranges that are actually being mapped
  x86, mm: Use memblock memory loop instead of e820_RAM
  x86, mm: Trim memory in memblock to be page aligned
  x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt
  x86/efi: Fix oops caused by incorrect set_memory_uc() usage
  x86-64: Fix page table accounting
  Revert "x86/mm: Fix the size calculation of mapping tables"
  MAINTAINERS: Add EFI git repository location
parents 6a2e52f8 8b724e2a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2802,6 +2802,7 @@ F: sound/usb/misc/ua101.c
EXTENSIBLE FIRMWARE INTERFACE (EFI)
EXTENSIBLE FIRMWARE INTERFACE (EFI)
M:	Matt Fleming <matt.fleming@intel.com>
M:	Matt Fleming <matt.fleming@intel.com>
L:	linux-efi@vger.kernel.org
L:	linux-efi@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
S:	Maintained
S:	Maintained
F:	Documentation/x86/efi-stub.txt
F:	Documentation/x86/efi-stub.txt
F:	arch/ia64/kernel/efi.c
F:	arch/ia64/kernel/efi.c
+4 −2
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6)	\
#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6)	\
	efi_call_virt(f, a1, a2, a3, a4, a5, a6)
	efi_call_virt(f, a1, a2, a3, a4, a5, a6)


#define efi_ioremap(addr, size, type)		ioremap_cache(addr, size)
#define efi_ioremap(addr, size, type, attr)	ioremap_cache(addr, size)


#else /* !CONFIG_X86_32 */
#else /* !CONFIG_X86_32 */


@@ -89,7 +89,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
		  (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
		  (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))


extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
				 u32 type);
				 u32 type, u64 attribute);


#endif /* CONFIG_X86_32 */
#endif /* CONFIG_X86_32 */


@@ -98,6 +98,8 @@ extern void efi_set_executable(efi_memory_desc_t *md, bool executable);
extern int efi_memblock_x86_reserve_range(void);
extern int efi_memblock_x86_reserve_range(void);
extern void efi_call_phys_prelog(void);
extern void efi_call_phys_prelog(void);
extern void efi_call_phys_epilog(void);
extern void efi_call_phys_epilog(void);
extern void efi_unmap_memmap(void);
extern void efi_memory_uc(u64 addr, unsigned long size);


#ifndef CONFIG_EFI
#ifndef CONFIG_EFI
/*
/*
+3 −0
Original line number Original line Diff line number Diff line
@@ -2257,6 +2257,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
			continue;
			continue;


		cfg = irq_cfg(irq);
		cfg = irq_cfg(irq);
		if (!cfg)
			continue;

		raw_spin_lock(&desc->lock);
		raw_spin_lock(&desc->lock);


		/*
		/*
+3 −0
Original line number Original line Diff line number Diff line
@@ -1077,6 +1077,9 @@ void __init memblock_x86_fill(void)
		memblock_add(ei->addr, ei->size);
		memblock_add(ei->addr, ei->size);
	}
	}


	/* throw away partial pages */
	memblock_trim_memory(PAGE_SIZE);

	memblock_dump_all();
	memblock_dump_all();
}
}


+20 −7
Original line number Original line Diff line number Diff line
@@ -921,18 +921,19 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_64
	if (max_pfn > max_low_pfn) {
	if (max_pfn > max_low_pfn) {
		int i;
		int i;
		for (i = 0; i < e820.nr_map; i++) {
		unsigned long start, end;
			struct e820entry *ei = &e820.map[i];
		unsigned long start_pfn, end_pfn;


			if (ei->addr + ei->size <= 1UL << 32)
		for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn,
				continue;
							 NULL) {


			if (ei->type == E820_RESERVED)
			end = PFN_PHYS(end_pfn);
			if (end <= (1UL<<32))
				continue;
				continue;


			start = PFN_PHYS(start_pfn);
			max_pfn_mapped = init_memory_mapping(
			max_pfn_mapped = init_memory_mapping(
				ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr,
						max((1UL<<32), start), end);
				ei->addr + ei->size);
		}
		}


		/* can we preseve max_low_pfn ?*/
		/* can we preseve max_low_pfn ?*/
@@ -1048,6 +1049,18 @@ void __init setup_arch(char **cmdline_p)
	arch_init_ideal_nops();
	arch_init_ideal_nops();


	register_refined_jiffies(CLOCK_TICK_RATE);
	register_refined_jiffies(CLOCK_TICK_RATE);

#ifdef CONFIG_EFI
	/* Once setup is done above, disable efi_enabled on mismatched
	 * firmware/kernel archtectures since there is no support for
	 * runtime services.
	 */
	if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) {
		pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
		efi_unmap_memmap();
		efi_enabled = 0;
	}
#endif
}
}


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
Loading