mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Muli Ben-Yehuda <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7557244ba2
commit
08f1c192c3
9 changed files with 89 additions and 31 deletions
|
|
@ -3,6 +3,11 @@
|
|||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct pci_sysdata {
|
||||
int node; /* NUMA node */
|
||||
};
|
||||
|
||||
#include <linux/mm.h> /* for struct page */
|
||||
|
||||
/* Can be used to override the logic in pci_scan_bus for skipping
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue