linux/arch
Yinghai Lu d8d386c106 x86, mtrr: Fix original mtrr range get for mtrr_cleanup
Joshua reported: Commit cd7b304dfaf1 (x86, range: fix missing merge
during add range) broke mtrr cleanup on his setup in 3.9.5.
corresponding commit in upstream is fbe06b7bae.

  *BAD*gran_size: 64K chunk_size: 16M num_reg: 6 lose cover RAM: -0G

https://bugzilla.kernel.org/show_bug.cgi?id=59491

So it rejects new var mtrr layout.

It turns out we have some problem with initial mtrr range retrieval.
The current sequence is:
	x86_get_mtrr_mem_range
		==> bunchs of add_range_with_merge
		==> bunchs of subract_range
		==> clean_sort_range
	add_range_with_merge for [0,1M)
	sort_range()

add_range_with_merge could have blank slots, so we can not just
sort only, that will have final result have extra blank slot in head.

So move that calling add_range_with_merge for [0,1M), with that we
could avoid extra clean_sort_range calling.

Reported-by: Joshua Covington <joshuacov@googlemail.com>
Tested-by: Joshua Covington <joshuacov@googlemail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1371154622-8929-2-git-send-email-yinghai@kernel.org
Cc: <stable@vger.kernel.org> v3.9
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-06-18 11:32:02 -05:00
..
alpha Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
arc ARC: lazy dcache flush broke gdb in non-aliasing configs 2013-05-25 14:15:55 +05:30
arm ARM: SoC fixes for 3.10-rc 2013-06-15 11:49:48 -10:00
arm64 arm64: don't kill the kernel on a bad esr from el0 2013-05-31 16:04:51 +01:00
avr32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 2013-05-22 18:06:57 -07:00
blackfin blackfin updates for Linux 3.10 2013-05-10 07:21:16 -07:00
c6x dump_stack: unify debug information printed by show_regs() 2013-04-30 17:04:02 -07:00
cris - Lots of cleanups from Artem, including deletion of some obsolete drivers 2013-05-09 10:15:46 -07:00
frv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
h8300 We get rid of the general module prefix confusion with a binary config option, 2013-05-05 10:58:06 -07:00
hexagon Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
ia64 arch, mm: Remove tlb_fast_mode() 2013-06-06 10:07:26 +09:00
m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2013-06-08 11:50:17 -07:00
metag Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
microblaze microblaze: Use static inline functions in cacheflush.h 2013-06-03 11:33:23 +02:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-06-12 11:48:14 -07:00
mn10300 MN10300: Need pci_iomap() and __pci_ioport_map() defining 2013-05-30 13:38:48 +09:00
openrisc Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
parisc parisc: kernel: using strlcpy() instead of strcpy() 2013-06-01 14:29:01 +02:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-06-14 19:25:04 -10:00
s390 s390/pci: Implement IRQ functions if !PCI 2013-06-10 16:06:04 +02:00
score score: remove redundant kcore_list entries 2013-05-25 10:27:27 -07:00
sh Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
sparc of: Fix locking vs. interrupts 2013-06-13 22:12:14 +01:00
tile Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2013-05-09 14:34:58 -07:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-07 15:14:53 -07:00
unicore32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-05-10 09:21:05 -07:00
x86 x86, mtrr: Fix original mtrr range get for mtrr_cleanup 2013-06-18 11:32:02 -05:00
xtensa Xtensa patchset for v3.10-rc1 2013-05-09 14:38:16 -07:00
.gitignore
Kconfig Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-05-15 14:04:00 -07:00