History

x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)

System topology on intel based system needs to be exported for non-numa case as well. All parts of asm-i386/topology.h has come under #ifdef CONFIG_NUMA after the merge to asm-x86/topology.h /sys/devices/system/cpu/cpu?/topology/* is populated based on ENABLE_TOPO_DEFINES The sysfs cpu topology is not being populated on my dual socket dual core xeon 5160 processor based (x86 32 bit) system. CONFIG_NUMA is not set in my case yet the topology is relevant and useful. irqbalance daemon application depends on topology to build the cpus and package list and it fails on Fedora9 beta since the sysfs topology was not being populated in the 2.6.25 kernel. I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES for non-numa systems. This fix has been tested on the above mentioned dual core, dual socket system.

Vaidyanathan Srinivasan committed 18 years ago

Commit 5c3a1211 parent eb2b4e61 file · +10 −8Browse files

Unified · Split

include/asm-x86/topology.h+10−8
@@ -25,6 +25,16 @@ · 24 unmodified lines
2525 #ifndef _ASM_X86_TOPOLOGY_H
2626 #define _ASM_X86_TOPOLOGY_H
2727
28+#ifdef CONFIG_X86_32
29+# ifdef CONFIG_X86_HT
30+# define ENABLE_TOPO_DEFINES
31+# endif
32+#else
33+# ifdef CONFIG_SMP
34+# define ENABLE_TOPO_DEFINES
35+# endif
36+#endif
37+
2838 #ifdef CONFIG_NUMA
2939 #include <linux/cpumask.h>
3040 #include <asm/mpspec.h>
@@ -130,10 +140,6 @@ extern unsigned long node_end_pfn[]; · 99 unmodified lines
130140 extern unsigned long node_remap_size[];
131141 #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid])
132142
133−# ifdef CONFIG_X86_HT
134−# define ENABLE_TOPO_DEFINES
135−# endif
136−
137143 # define SD_CACHE_NICE_TRIES 1
138144 # define SD_IDLE_IDX 1
139145 # define SD_NEWIDLE_IDX 2
@@ -141,10 +147,6 @@ extern unsigned long node_remap_size[]; · 1 unmodified line
141147
142148 #else
143149
144−# ifdef CONFIG_SMP
145−# define ENABLE_TOPO_DEFINES
146−# endif
147−
148150 # define SD_CACHE_NICE_TRIES 2
149151 # define SD_IDLE_IDX 2
150152 # define SD_NEWIDLE_IDX 2