Skip to contentSkip to conversation

x86, k8: Fix build error when K8_NB is disabled

tip:x86/cpu tip-bot for Borislav Petkov 1 participant 2 messages May 3, 2010 – May 14, 2010 1 message not in the archive x86

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Commit-ID:  d88d95eb1c2a72b6126a550debe0883ff723a948
Gitweb:     http://git.kernel.org/tip/d88d95eb1c2a72b6126a550debe0883ff723a948
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sat, 24 Apr 2010 09:56:53 +0200
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Mon, 3 May 2010 14:34:24 -0700

x86, k8: Fix build error when K8_NB is disabled

K8_NB depends on PCI and when the last is disabled (allnoconfig) we fail at the final linking stage due to missing exported num_k8_northbridges. Add a header stub for that.

LKML-Reference: <20100503183036.GJ26107@aftab>

---
 arch/x86/include/asm/k8.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/x86/include/asm/k8.h +5 -0
index f70e600..af00bd1 100644
@@ -16,11 +16,16 @@ extern int k8_numa_init(unsigned long start_pfn, unsigned long end_pfn);
 extern int k8_scan_nodes(void);
 
 #ifdef CONFIG_K8_NB
+extern int num_k8_northbridges;
+
 static inline struct pci_dev *node_to_k8_nb_misc(int node)
 {
 	return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL;
 }
+
 #else
+#define num_k8_northbridges 0
+
 static inline struct pci_dev *node_to_k8_nb_misc(int node)
 {
 	return NULL;
#2 lore raw
In reply to a message not in the archive
Commit-ID:  ade029e2aaacc8965a548b0b0f80c5bee97ffc68
Gitweb:     http://git.kernel.org/tip/ade029e2aaacc8965a548b0b0f80c5bee97ffc68
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sat, 24 Apr 2010 09:56:53 +0200
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Fri, 14 May 2010 11:53:01 -0700

x86, k8: Fix build error when K8_NB is disabled

K8_NB depends on PCI and when the last is disabled (allnoconfig) we fail at the final linking stage due to missing exported num_k8_northbridges. Add a header stub for that.

LKML-Reference: <20100503183036.GJ26107@aftab>

---
 arch/x86/include/asm/k8.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/x86/include/asm/k8.h +5 -0
index f70e600..af00bd1 100644
@@ -16,11 +16,16 @@ extern int k8_numa_init(unsigned long start_pfn, unsigned long end_pfn);
 extern int k8_scan_nodes(void);
 
 #ifdef CONFIG_K8_NB
+extern int num_k8_northbridges;
+
 static inline struct pci_dev *node_to_k8_nb_misc(int node)
 {
 	return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL;
 }
+
 #else
+#define num_k8_northbridges 0
+
 static inline struct pci_dev *node_to_k8_nb_misc(int node)
 {
 	return NULL;