Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched: Move STDL_INIT() functions out-of-line

Since all these functions are address-taken in SDTL_INIT() and called
indirectly, it doesn't really make sense for them to be inline.

Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

+52 -42
+7 -42
include/linux/sched/topology.h
··· 33 33 struct sched_domain_topology_level; 34 34 35 35 #ifdef CONFIG_SCHED_SMT 36 - static inline int cpu_smt_flags(void) 37 - { 38 - return SD_SHARE_CPUCAPACITY | SD_SHARE_LLC; 39 - } 40 - 41 - static inline const 42 - struct cpumask *tl_smt_mask(struct sched_domain_topology_level *tl, int cpu) 43 - { 44 - return cpu_smt_mask(cpu); 45 - } 36 + extern int cpu_smt_flags(void); 37 + extern const struct cpumask *tl_smt_mask(struct sched_domain_topology_level *tl, int cpu); 46 38 #endif 47 39 48 40 #ifdef CONFIG_SCHED_CLUSTER 49 - static inline int cpu_cluster_flags(void) 50 - { 51 - return SD_CLUSTER | SD_SHARE_LLC; 52 - } 53 - 54 - static inline const 55 - struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu) 56 - { 57 - return cpu_clustergroup_mask(cpu); 58 - } 41 + extern int cpu_cluster_flags(void); 42 + extern const struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu); 59 43 #endif 60 44 61 45 #ifdef CONFIG_SCHED_MC 62 - static inline int cpu_core_flags(void) 63 - { 64 - return SD_SHARE_LLC; 65 - } 66 - 67 - static inline const 68 - struct cpumask *tl_mc_mask(struct sched_domain_topology_level *tl, int cpu) 69 - { 70 - return cpu_coregroup_mask(cpu); 71 - } 46 + extern int cpu_core_flags(void); 47 + extern const struct cpumask *tl_mc_mask(struct sched_domain_topology_level *tl, int cpu); 72 48 #endif 73 49 74 - static inline const 75 - struct cpumask *tl_pkg_mask(struct sched_domain_topology_level *tl, int cpu) 76 - { 77 - return cpu_node_mask(cpu); 78 - } 79 - 80 - #ifdef CONFIG_NUMA 81 - static inline int cpu_numa_flags(void) 82 - { 83 - return SD_NUMA; 84 - } 85 - #endif 50 + extern const struct cpumask *tl_pkg_mask(struct sched_domain_topology_level *tl, int cpu); 86 51 87 52 extern int arch_asym_cpu_priority(int cpu); 88 53
+45
kernel/sched/topology.c
··· 1724 1724 return sd; 1725 1725 } 1726 1726 1727 + #ifdef CONFIG_SCHED_SMT 1728 + int cpu_smt_flags(void) 1729 + { 1730 + return SD_SHARE_CPUCAPACITY | SD_SHARE_LLC; 1731 + } 1732 + 1733 + const struct cpumask *tl_smt_mask(struct sched_domain_topology_level *tl, int cpu) 1734 + { 1735 + return cpu_smt_mask(cpu); 1736 + } 1737 + #endif 1738 + 1739 + #ifdef CONFIG_SCHED_CLUSTER 1740 + int cpu_cluster_flags(void) 1741 + { 1742 + return SD_CLUSTER | SD_SHARE_LLC; 1743 + } 1744 + 1745 + const struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu) 1746 + { 1747 + return cpu_clustergroup_mask(cpu); 1748 + } 1749 + #endif 1750 + 1751 + #ifdef CONFIG_SCHED_MC 1752 + int cpu_core_flags(void) 1753 + { 1754 + return SD_SHARE_LLC; 1755 + } 1756 + 1757 + const struct cpumask *tl_mc_mask(struct sched_domain_topology_level *tl, int cpu) 1758 + { 1759 + return cpu_coregroup_mask(cpu); 1760 + } 1761 + #endif 1762 + 1763 + const struct cpumask *tl_pkg_mask(struct sched_domain_topology_level *tl, int cpu) 1764 + { 1765 + return cpu_node_mask(cpu); 1766 + } 1767 + 1727 1768 /* 1728 1769 * Topology list, bottom-up. 1729 1770 */ ··· 1801 1760 } 1802 1761 1803 1762 #ifdef CONFIG_NUMA 1763 + static int cpu_numa_flags(void) 1764 + { 1765 + return SD_NUMA; 1766 + } 1804 1767 1805 1768 static const struct cpumask *sd_numa_mask(struct sched_domain_topology_level *tl, int cpu) 1806 1769 {