Re: [PATCH] x86, k8 nb: Enable k8_northbridges unconditionally onAMD

From: FUJITA Tomonori
Date: Mon Mar 08 2010 - 20:33:19 EST


On Mon, 8 Mar 2010 18:06:37 +0100
Borislav Petkov <bp@xxxxxxxxx> wrote:

> From: Borislav Petkov <borislav.petkov@xxxxxxx>
> 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@xxxxxxx>
> Tested-by: Joerg Roedel <joerg.roedel@xxxxxxx>
> ---
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/