From 08f1c192c3c32797068bfe97738babb3295bbf42 Mon Sep 17 00:00:00 2001 From: Muli Ben-Yehuda Date: Sun, 22 Jul 2007 00:23:39 +0300 Subject: x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata This patch introduces struct pci_sysdata to x86 and x86-64, and converts the existing two users (NUMA, Calgary) to use it. This lays the groundwork for having other users of sysdata, such as the PCI domains work. The Calgary bits are tested, the NUMA bits just look ok. Signed-off-by: Jeff Garzik Signed-off-by: Muli Ben-Yehuda Signed-off-by: Linus Torvalds --- include/asm-i386/pci.h | 5 +++++ include/asm-i386/topology.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include/asm-i386') diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index 392d3fe5d45..d790343e998 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h @@ -3,6 +3,11 @@ #ifdef __KERNEL__ + +struct pci_sysdata { + int node; /* NUMA node */ +}; + #include /* for struct page */ /* Can be used to override the logic in pci_scan_bus for skipping diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index 7fc512d90ea..19b2dafd0c8 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h @@ -67,7 +67,7 @@ static inline int node_to_first_cpu(int node) return first_cpu(mask); } -#define pcibus_to_node(bus) ((long) (bus)->sysdata) +#define pcibus_to_node(bus) ((struct pci_sysdata *)((bus)->sysdata))->node #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) /* sched_domains SD_NODE_INIT for NUMAQ machines */ -- cgit v1.2.3