X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-powerpc%2Ftopology.h;fp=include%2Fasm-powerpc%2Ftopology.h;h=bbc3844b086fcadd9f529c69f5b12b6556530667;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=87362a05542b6ba5036d8631b5f20aa481651980;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 87362a055..bbc3844b0 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h @@ -2,7 +2,6 @@ #define _ASM_POWERPC_TOPOLOGY_H #ifdef __KERNEL__ -#include struct sys_device; struct device_node; @@ -32,8 +31,13 @@ static inline int node_to_first_cpu(int node) int of_node_to_nid(struct device_node *device); -#define pcibus_to_node(node) (-1) -#define pcibus_to_cpumask(bus) (cpu_online_map) +struct pci_bus; +extern int pcibus_to_node(struct pci_bus *bus); + +#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ + CPU_MASK_ALL : \ + node_to_cpumask(pcibus_to_node(bus)) \ + ) /* sched_domains SD_NODE_INIT for PPC64 machines */ #define SD_NODE_INIT (struct sched_domain) { \ @@ -89,5 +93,10 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, #endif /* CONFIG_NUMA */ +#ifdef CONFIG_SMP +#include +#define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) +#endif + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_TOPOLOGY_H */