]> git.baikalelectronics.ru Git - kernel.git/commit
x86: enable GART-IOMMU only after setting up protection methods
authorMark Langsdorf <mark.langsdorf@amd.com>
Sun, 5 Jul 2009 20:50:52 +0000 (15:50 -0500)
committerIngo Molnar <mingo@elte.hu>
Sat, 6 Jun 2009 07:42:09 +0000 (09:42 +0200)
commit35e8c4ab9cbe9f4906b4703f5d3c7caf54d4ad4e
tree96ad07e4da2ca4fd92188ecdf3d7ebf1e33e3c3d
parent8cfb24700aaf954093d9ab7355466ee4a1ea0636
x86: enable GART-IOMMU only after setting up protection methods

The current code to set up the GART as an IOMMU enables GART
translations before it removes the aperture from the kernel memory
map, sets the GART PTEs to UC, sets up the guard and scratch
pages, or does a wbinvd().  This leaves the possibility of cache
aliasing open and can cause system crashes.

Re-order the code so as to enable the GART translations only
after all safeguards are in place and the tlb has been flushed.

AMD has tested this patch on both Istanbul systems and 1st
generation Opteron systems with APG enabled and seen no adverse
effects.  Istanbul systems with HT Assist enabled sometimes
see MCE errors due to cache artifacts with the unmodified
code.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Cc: <stable@kernel.org>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: akpm@linux-foundation.org
Cc: jbarnes@virtuousgeek.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/pci-gart_64.c