linux/drivers/base
Mike Travis e057d7aea9 cpumask: add sysfs displays for configured and disabled cpu maps
Impact: add new sysfs files.

Add sysfs files "kernel_max" and "offline" to display the max CPU index
allowed (NR_CPUS-1), and the map of cpus that are offline.

Cpus can be offlined via HOTPLUG, disabled by the BIOS ACPI tables, or
if they exceed the number of cpus allowed by the NR_CPUS config option,
or the "maxcpus=NUM" kernel start parameter.

The "possible_cpus=NUM" parameter can also extend the number of possible
cpus allowed, in which case the cpus not present at startup will be
in the offline state.  (These cpus can be HOTPLUGGED ON after system
startup [pending a follow-on patch to provide the capability via the
/sys/devices/sys/cpu/cpuN/online mechanism to bring them online.])

By design, the "offlined cpus > possible cpus" display will always
use the following formats:

  * all possible cpus online:   "x$"    or "x-y$"
  * some possible cpus offline: ".*,x$" or ".*,x-y$"

where:
  x == number of possible cpus (nr_cpu_ids); and
  y == number of cpus >= NR_CPUS or maxcpus (if y > x).

One use of this feature is for distros to select (or configure) the
appropriate kernel to install for the resident system.

Notes:
  * cpus offlined <= possible cpus will be printed for all architectures.
  * cpus offlined >  possible cpus will only be printed for arches that
  	set 'total_cpus' [X86 only in this patch].

Based on tip/cpus4096 + .../rusty/linux-2.6-for-ingo.git/master +
	 x86-only-patches sent 12/15.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-12-19 17:47:04 +10:30
..
power Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2008-10-16 12:40:26 -07:00
attribute_container.c SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00
base.h driver-core: use klist for class device list and implement iterator 2008-10-09 08:56:04 +02:00
bus.c Driver core: add bus_sort_breadthfirst() function 2008-10-16 09:24:52 -07:00
class.c driver-core: use klist for class device list and implement iterator 2008-10-09 08:56:04 +02:00
core.c kobject: Fix kobject_rename and !CONFIG_SYSFS 2008-10-16 09:24:52 -07:00
cpu.c cpumask: add sysfs displays for configured and disabled cpu maps 2008-12-19 17:47:04 +10:30
dd.c device model: Do a quickcheck for driver binding before doing an expensive check 2008-10-16 09:24:50 -07:00
devres.c Driver core: fix devres_release_all() return value 2007-07-11 16:09:02 -07:00
dma-mapping.c devres: device resource management 2007-02-09 17:39:36 -05:00
driver.c drivers/base/driver.c: remove unused to_dev() macro 2008-08-21 10:15:35 -07:00
firmware.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
firmware_class.c firmware: use dev_printk when possible 2008-10-16 11:21:47 -07:00
hypervisor.c kobject: convert /sys/hypervisor to use kobject_create 2008-01-24 20:40:15 -08:00
init.c Driver core: coding style fixes 2008-01-24 22:50:12 -08:00
isa.c isa: set 24-bit dma_mask for ISA devices 2008-07-26 12:00:02 -07:00
Kconfig Fix typo in the FIRMWARE_IN_KERNEL help 2008-10-16 11:21:32 -07:00
Makefile Merge branch 'dmapool' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-05 19:05:48 -08:00
map.c [PATCH] kobj_map semaphore to mutex conversion 2006-03-20 13:42:58 -08:00
memory.c memory_probe: fix wrong sysfs file attribute 2008-10-20 08:52:32 -07:00
module.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
node.c cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers. 2008-12-13 21:20:25 +10:30
platform.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2008-10-16 12:40:26 -07:00
sys.c sysfs: Fix return values for sysdev_store_{ulong,int} 2008-10-29 15:03:49 -07:00
topology.c cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers. 2008-12-13 21:20:25 +10:30
transport_class.c SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00