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

Commit fb1ae635 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-fixes-for-linus' of...

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

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards
  x86: Increase CONFIG_NODES_SHIFT max to 10
  ibft, x86: Change reserve_ibft_region() to find_ibft_region()
  x86, hpet: Fix bug in RTC emulation
  x86, hpet: Erratum workaround for read after write of HPET comparator
  bootmem, x86: Fix 32bit numa system without RAM on node 0
  nobootmem, x86: Fix 32bit numa system without RAM on node 0
  x86: Handle overlapping mptables
  x86: Make e820_remove_range to handle all covered case
  x86-32, resume: do a global tlb flush in S4 resume
parents addb2d6c 472a474c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1216,8 +1216,8 @@ config NUMA_EMU

config NODES_SHIFT
	int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
	range 1 9
	default "9" if MAXSMP
	range 1 10
	default "10" if MAXSMP
	default "6" if X86_64
	default "4" if X86_NUMAQ
	default "3"
+2 −0
Original line number Diff line number Diff line
@@ -1640,8 +1640,10 @@ int __init APIC_init_uniprocessor(void)
	}
#endif

#ifndef CONFIG_SMP
	enable_IR_x2apic();
	default_setup_apic_routing();
#endif

	verify_local_APIC();
	connect_bsp_APIC();
+20 −4
Original line number Diff line number Diff line
@@ -519,29 +519,45 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type,
	printk(KERN_DEBUG "e820 remove range: %016Lx - %016Lx ",
		       (unsigned long long) start,
		       (unsigned long long) end);
	if (checktype)
		e820_print_type(old_type);
	printk(KERN_CONT "\n");

	for (i = 0; i < e820.nr_map; i++) {
		struct e820entry *ei = &e820.map[i];
		u64 final_start, final_end;
		u64 ei_end;

		if (checktype && ei->type != old_type)
			continue;

		ei_end = ei->addr + ei->size;
		/* totally covered? */
		if (ei->addr >= start &&
		    (ei->addr + ei->size) <= (start + size)) {
		if (ei->addr >= start && ei_end <= end) {
			real_removed_size += ei->size;
			memset(ei, 0, sizeof(struct e820entry));
			continue;
		}

		/* new range is totally covered? */
		if (ei->addr < start && ei_end > end) {
			e820_add_region(end, ei_end - end, ei->type);
			ei->size = start - ei->addr;
			real_removed_size += size;
			continue;
		}

		/* partially covered */
		final_start = max(start, ei->addr);
		final_end = min(start + size, ei->addr + ei->size);
		final_end = min(end, ei_end);
		if (final_start >= final_end)
			continue;
		real_removed_size += final_end - final_start;

		/*
		 * left range could be head or tail, so need to update
		 * size at first.
		 */
		ei->size -= final_end - final_start;
		if (ei->addr < final_start)
			continue;
+8 −1
Original line number Diff line number Diff line
@@ -400,9 +400,15 @@ static int hpet_next_event(unsigned long delta,
	 * then we might have a real hardware problem. We can not do
	 * much about it here, but at least alert the user/admin with
	 * a prominent warning.
	 * An erratum on some chipsets (ICH9,..), results in comparator read
	 * immediately following a write returning old value. Workaround
	 * for this is to read this value second time, when first
	 * read returns old value.
	 */
	if (unlikely((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt)) {
		WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt,
		  KERN_WARNING "hpet: compare register read back failed.\n");
	}

	return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
}
@@ -1144,6 +1150,7 @@ int hpet_set_periodic_freq(unsigned long freq)
		do_div(clc, freq);
		clc >>= hpet_clockevent.shift;
		hpet_pie_delta = clc;
		hpet_pie_limit = 0;
	}
	return 1;
}
+2 −2
Original line number Diff line number Diff line
@@ -664,7 +664,7 @@ static void __init smp_reserve_memory(struct mpf_intel *mpf)
{
	unsigned long size = get_mpc_size(mpf->physptr);

	reserve_early(mpf->physptr, mpf->physptr+size, "MP-table mpc");
	reserve_early_overlap_ok(mpf->physptr, mpf->physptr+size, "MP-table mpc");
}

static int __init smp_scan_config(unsigned long base, unsigned long length)
@@ -693,7 +693,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length)
			       mpf, (u64)virt_to_phys(mpf));

			mem = virt_to_phys(mpf);
			reserve_early(mem, mem + sizeof(*mpf), "MP-table mpf");
			reserve_early_overlap_ok(mem, mem + sizeof(*mpf), "MP-table mpf");
			if (mpf->physptr)
				smp_reserve_memory(mpf);

Loading