Messages in this thread | | | Date | Tue, 9 Mar 2010 10:32:01 +0900 | Subject | Re: [PATCH] x86, k8 nb: Enable k8_northbridges unconditionally on AMD | From | FUJITA Tomonori <> |
| |
On Mon, 8 Mar 2010 18:06:37 +0100 Borislav Petkov <bp@amd64.org> wrote:
> From: Borislav Petkov <borislav.petkov@amd.com> > Date: Mon, 8 Mar 2010 14:27:01 +0100 > Subject: [PATCH] x86, k8 nb: Enable k8_northbridges unconditionally on AMD > > de957628ce7c84764ff41331111036b3ae5bad0f 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. > > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> > Tested-by: Joerg Roedel <joerg.roedel@amd.com> > --- > arch/x86/Kconfig | 2 +- > arch/x86/kernel/k8.c | 14 ++++++++++++++ > arch/x86/kernel/pci-gart_64.c | 2 +- > 3 files changed, 16 insertions(+), 2 deletions(-)
Thanks a lot!
Looks correct to me.
| |