linux-stable-rt/arch/ia64/kernel
Zhang, Yanmin 69dcc99199 [PATCH] Export cpu topology in sysfs
The patch implements cpu topology exportation by sysfs.

Items (attributes) are similar to /proc/cpuinfo.

1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
	represent the physical package id of  cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
	represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
	represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
	represent the thread siblings to cpu X in the same physical package;

To implement it in an architecture-neutral way, a new source file,
driver/base/topology.c, is to export the 5 attributes.

If one architecture wants to support this feature, it just needs to
implement 4 defines, typically in file include/asm-XXX/topology.h.
The 4 defines are:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)

The type of **_id is int.
The type of siblings is cpumask_t.

To be consistent on all architectures, the 4 attributes should have
deafult values if their values are unavailable. Below is the rule.

1) physical_package_id: If cpu has no physical package id, -1 is the
default value.

2) core_id: If cpu doesn't support multi-core, its core id is 0.

3) thread_siblings: Just include itself, if the cpu doesn't support
HT/multi-thread.

4) core_siblings: Just include itself, if the cpu doesn't support
multi-core and HT/Multi-thread.

So be careful when declaring the 4 defines in include/asm-XXX/topology.h.

If an attribute isn't defined on an architecture, it won't be exported.

Thank Nathan, Greg, Andi, Paul and Venki.

The patch provides defines for i386/x86_64/ia64.

Signed-off-by: Zhang, Yanmin <yanmin.zhang@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:09 -08:00
..
cpufreq
Makefile
acpi-ext.c
acpi-processor.c
acpi.c
asm-offsets.c
brl_emu.c
cyclone.c
efi.c
efi_stub.S
entry.S
entry.h
fsys.S [IA64] Add stub entry to fsys.S for sys_migrate_pages 2006-01-13 10:03:58 -08:00
gate-data.S
gate.S
gate.lds.S
head.S
ia64_ksyms.c
init_task.c
iosapic.c
irq.c
irq_ia64.c
irq_lsapic.c
ivt.S
jprobes.S [IA64] prevent accidental modification of args in jprobe handler 2006-01-13 14:45:21 -08:00
kprobes.c [IA64] prevent accidental modification of args in jprobe handler 2006-01-13 14:45:21 -08:00
machvec.c
mca.c [PATCH] ia64: task_thread_info() 2006-01-12 09:08:58 -08:00
mca_asm.S [IA64] Set the correct default OS status in the MCA handler 2006-01-24 11:50:07 -08:00
mca_drv.c
mca_drv.h
mca_drv_asm.S
minstate.h
module.c
numa.c
pal.S
palinfo.c
patch.c
perfmon.c [IA64] sem2mutex: arch/ia64/kernel/perfmon.c 2006-01-19 11:17:56 -08:00
perfmon_default_smpl.c
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h [IA64] Perfmon for Montecito 2006-01-16 10:31:44 -08:00
process.c [PATCH] ia64: task_pt_regs() 2006-01-12 09:08:58 -08:00
ptrace.c [PATCH] ia64: task_pt_regs() 2006-01-12 09:08:58 -08:00
sal.c
salinfo.c [IA64] Add hotplug cpu to salinfo.c, replace semaphore with mutex 2006-01-13 14:22:35 -08:00
semaphore.c
setup.c [PATCH] ia64: task_pt_regs() 2006-01-12 09:08:58 -08:00
sigframe.h
signal.c [PATCH] ia64: task_thread_info() 2006-01-12 09:08:58 -08:00
smp.c
smpboot.c
sys_ia64.c [PATCH] ia64: task_pt_regs() 2006-01-12 09:08:58 -08:00
time.c
topology.c [PATCH] Export cpu topology in sysfs 2006-02-03 08:32:09 -08:00
traps.c [IA64] Handle debug traps in fsys mode 2006-01-13 14:16:08 -08:00
unaligned.c [IA64] Scaling fix for simultaneous unaligned accesses 2006-01-24 14:39:50 -08:00
uncached.c [IA64] eliminate softlockup warning 2006-01-19 11:18:25 -08:00
unwind.c
unwind_decoder.c
unwind_i.h
vmlinux.lds.S