From 1b73789c51dd7c750e2ca7beefc8074cb1672045 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Fri, 12 Mar 2010 15:43:03 +0100 Subject: [PATCH] --- yaml --- r: 187897 b: refs/heads/master c: 0e152cd7c16832bd5cadee0c2e41d9959bc9b6f9 h: refs/heads/master i: 187895: e52e6173a64fe6141b02f3af820662d0d81ab4f2 v: v3 --- [refs] | 2 +- trunk/arch/x86/Kconfig | 4 ++-- trunk/arch/x86/kernel/k8.c | 14 ++++++++++++++ trunk/arch/x86/kernel/pci-gart_64.c | 2 +- trunk/drivers/char/agp/Kconfig | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 122ef7b51558..cd723cd783a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8447b360a3897bdfb0677107564d1dd9ab6e63be +refs/heads/master: 0e152cd7c16832bd5cadee0c2e41d9959bc9b6f9 diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index eb4092568f9e..ddb52b8d38a7 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -627,7 +627,7 @@ config GART_IOMMU bool "GART IOMMU support" if EMBEDDED default y select SWIOTLB - depends on X86_64 && PCI + depends on X86_64 && PCI && K8_NB ---help--- Support for full DMA access of devices with 32bit memory access only on systems with more than 3GB. This is usually needed for USB, @@ -2026,7 +2026,7 @@ endif # X86_32 config K8_NB def_bool y - depends on AGP_AMD64 || (X86_64 && (GART_IOMMU || (PCI && NUMA))) + depends on CPU_SUP_AMD && PCI source "drivers/pcmcia/Kconfig" diff --git a/trunk/arch/x86/kernel/k8.c b/trunk/arch/x86/kernel/k8.c index cbc4332a77b2..9b895464dd03 100644 --- a/trunk/arch/x86/kernel/k8.c +++ b/trunk/arch/x86/kernel/k8.c @@ -121,3 +121,17 @@ void k8_flush_garts(void) } EXPORT_SYMBOL_GPL(k8_flush_garts); +static __init int init_k8_nbs(void) +{ + int err = 0; + + err = cache_k8_northbridges(); + + if (err < 0) + printk(KERN_NOTICE "K8 NB: Cannot enumerate AMD northbridges.\n"); + + return err; +} + +/* This has to go after the PCI subsystem */ +fs_initcall(init_k8_nbs); diff --git a/trunk/arch/x86/kernel/pci-gart_64.c b/trunk/arch/x86/kernel/pci-gart_64.c index 34de53b46f87..f3af115a573a 100644 --- a/trunk/arch/x86/kernel/pci-gart_64.c +++ b/trunk/arch/x86/kernel/pci-gart_64.c @@ -735,7 +735,7 @@ int __init gart_iommu_init(void) unsigned long scratch; long i; - if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) + if (num_k8_northbridges == 0) return 0; #ifndef CONFIG_AGP_AMD64 diff --git a/trunk/drivers/char/agp/Kconfig b/trunk/drivers/char/agp/Kconfig index 2fb3a480f6b0..4b66c69eaf57 100644 --- a/trunk/drivers/char/agp/Kconfig +++ b/trunk/drivers/char/agp/Kconfig @@ -57,7 +57,7 @@ config AGP_AMD config AGP_AMD64 tristate "AMD Opteron/Athlon64 on-CPU GART support" - depends on AGP && X86 + depends on AGP && X86 && K8_NB help This option gives you AGP support for the GLX component of X using the on-CPU northbridge of the AMD Athlon64/Opteron CPUs.