Files
linux/drivers/char
Borislav Petkov 4515b172cd x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems
commit 0e152cd7c1 upstream.

de957628ce changed setting of the
x86_init.iommu.iommu_init function ptr only when GART IOMMU is
found.

One side effect of it is that num_k8_northbridges
is not initialized anymore if not explicitly
called. This resulted in uninitialized pointers in
<arch/x86/kernel/cpu/intel_cacheinfo.c:amd_calc_l3_indices()>,
for example, which uses the num_k8_northbridges thing through
node_to_k8_nb_misc().

Fix that through an initcall that runs right after the PCI
subsystem and does all the scanning. Then, remove initialization
in gart_iommu_init() which is a rootfs_initcall and we're
running before that.

What is more, since num_k8_northbridges is being used in other
places beside GART IOMMU, include it whenever we add AMD CPU
support. The previous dependency chain in kconfig contained

K8_NB depends on AGP_AMD64|GART_IOMMU

which was clearly incorrect. The more natural way in terms of
hardware dependency should be

AGP_AMD64|GART_IOMMU depends on K8_NB depends on CPU_SUP_AMD &&
PCI. Make it so Number One!

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Joerg Roedel <joerg.roedel@amd.com>
LKML-Reference: <20100312144303.GA29262@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-12 14:57:06 -07:00
..
2009-06-11 08:51:01 -07:00
2009-10-04 15:05:10 -07:00
2009-09-24 07:21:03 -07:00
2009-09-22 07:17:42 -07:00
2009-07-12 12:22:34 -07:00
2009-10-01 16:11:16 -07:00
2009-10-04 15:05:10 -07:00
2009-06-18 11:16:55 +10:00
2009-09-15 08:42:00 -07:00
2009-09-23 07:39:29 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2009-06-18 13:03:54 -07:00
2009-10-11 11:20:58 -07:00
2010-02-09 04:50:58 -08:00
2010-04-26 07:41:19 -07:00
2009-09-19 13:13:37 -07:00
2009-07-12 12:22:34 -07:00
2009-06-11 08:51:01 -07:00
2009-07-12 12:22:34 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-07-03 15:45:29 +01:00
2009-06-11 08:51:02 -07:00
2009-09-19 13:13:35 -07:00
2010-03-15 08:49:54 -07:00
2009-09-19 13:13:35 -07:00