x86/Sandy Bridge: reserve pages when integrated graphics is present
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 14 Nov 2012 20:43:31 +0000 (20:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jan 2013 19:44:58 +0000 (11:44 -0800)
commita6d8f58e7c32624663e6f41ecd2c94c487fffcb0
tree4a18c4523e153eee0ffbbf07a6ae59fbf496fec6
parent228f49c2da2a6729ecd3af45f882296f9007287e
x86/Sandy Bridge: reserve pages when integrated graphics is present

commit a9acc5365dbda29f7be2884efb63771dc24bd815 upstream.

SNB graphics devices have a bug that prevent them from accessing certain
memory ranges, namely anything below 1M and in the pages listed in the
table.  So reserve those at boot if set detect a SNB gfx device on the
CPU to avoid GPU hangs.

Stephane Marchesin had a similar patch to the page allocator awhile
back, but rather than reserving pages up front, it leaked them at
allocation time.

[ hpa: made a number of stylistic changes, marked arrays as static
  const, and made less verbose; use "memblock=debug" for full
  verbosity. ]

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/setup.c