Revision 5c3a121d52b30a1e53cdaa802fa1965fcd243164 authored by Vaidyanathan Srinivasan on 05 May 2008, 13:52:15 UTC, committed by Thomas Gleixner on 10 May 2008, 17:31:45 UTC
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.

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
1 parent eb2b4e6
Raw File
checkkconfigsymbols.sh
#!/bin/sh
# Find Kconfig variables used in source code but never defined in Kconfig
# Copyright (C) 2007, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

# Tested with dash.
paths="$@"
[ -z "$paths" ] && paths=.

# Doing this once at the beginning saves a lot of time, on a cache-hot tree.
Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"

echo -e "File list \tundefined symbol used"
find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
do
	# Output the bare Kconfig variable and the filename; the _MODULE part at
	# the end is not removed here (would need perl an not-hungry regexp for that).
	sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i
done | \
# Smart "sort|uniq" implemented in awk and tuned to collect the names of all
# files which use a given symbol
awk '{map[$1, count[$1]++] = $2; }
END {
	for (combIdx in map) {
		split(combIdx, separate, SUBSEP);
		# The value may have been removed.
		if (! ( (separate[1], separate[2]) in map ) )
			continue;
		symb=separate[1];
		printf "%s ", symb;
		#Use gawk extension to delete the names vector
		delete names;
		#Portably delete the names vector
		#split("", names);
		for (i=0; i < count[symb]; i++) {
			names[map[symb, i]] = 1;
			# Unfortunately, we may still encounter symb, i in the
			# outside iteration.
			delete map[symb, i];
		}
		i=0;
		for (name in names) {
			if (i > 0)
				printf ", %s", name;
			else
				printf "%s", name;
			i++;
		}
		printf "\n";
	}
}' |
while read symb files; do
	# Remove the _MODULE suffix when checking the variable name. This should
	# be done only on tristate symbols, actually, but Kconfig parsing is
	# beyond the purpose of this script.
	symb_bare=`echo $symb | sed -e 's/_MODULE//'`
	if ! grep -q "\<$symb_bare\>" $Kconfigs; then
		echo -e "$files: \t$symb"
	fi
done|sort
back to top