Skip to content

Commit

Permalink
x86, k8: Fix build error when K8_NB is disabled
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100503183036.GJ26107@aftab>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@kernel.org>
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed May 14, 2010
1 parent f014871 commit ade029e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/x86/include/asm/k8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ade029e

Please sign in to comment.