linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PATCH] driver core fixes for 2.6.32-git
@ 2009-10-30 22:09 Greg KH
  2009-10-30 22:54 ` [PATCH 1/9] Driver core: fix driver_register() return value Greg Kroah-Hartman
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Greg KH @ 2009-10-30 22:09 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are 2 bugfixes for the driver core code for your .32 git tree, and
7 documentation updates.

They do:
	- prevent platform devices from being able to be unbound/bound
	  from userspace.  This solves an issue that some people were
	  having with keyboards.
	- pass the proper error value back to userspace when a driver is
	  already bound to a device.
	- cpu sysfs file documentation updates.


Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git/

All of these patches have been in the linux-next and mm trees for a
while.

The patches will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

------------

 .../ABI/testing/sysfs-devices-cache_disable        |   18 ---
 Documentation/ABI/testing/sysfs-devices-system-cpu |  156 ++++++++++++++++++++
 Documentation/cputopology.txt                      |   47 ++++--
 drivers/base/bus.c                                 |   17 ++-
 drivers/base/driver.c                              |    2 +-
 drivers/base/platform.c                            |    6 +-
 include/linux/device.h                             |    4 +-
 7 files changed, 206 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/ABI/testing/sysfs-devices-cache_disable
 create mode 100644 Documentation/ABI/testing/sysfs-devices-system-cpu

---------------

Alex Chiang (7):
      Documentation: ABI: rename sysfs-devices-cache_disable properly
      Documentation: ABI: document /sys/devices/system/cpu/
      Documentation: ABI: /sys/devices/system/cpu/ topology files
      Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
      Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
      Documentation: ABI: /sys/devices/system/cpu/cpuidle/
      Documentation: ABI: /sys/devices/system/cpu/cpu#/node

Dmitry Torokhov (1):
      Driver core: allow certain drivers prohibit bind/unbind via sysfs

Stas Sergeev (1):
      Driver core: fix driver_register() return value


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/9] Driver core: fix driver_register() return value
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 2/9] Driver core: allow certain drivers prohibit bind/unbind via sysfs Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Stas Sergeev, stable, Greg Kroah-Hartman

From: Stas Sergeev <stsp@aknet.ru>

In this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=16dc42e018c2868211b4928f20a957c0c216126c
the check was added for another driver to already claim the same device
on the same bus. But the returned error code was wrong: to modprobe, the
-EEXIST means that _this_ driver is already installed. It therefore
doesn't produce the needed error message when _another_ driver is trying
to register for the same device.  Returning -EBUSY fixes the problem.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index ed2ebd3..f367885 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -236,7 +236,7 @@ int driver_register(struct device_driver *drv)
 		put_driver(other);
 		printk(KERN_ERR "Error: Driver '%s' is already registered, "
 			"aborting...\n", drv->name);
-		return -EEXIST;
+		return -EBUSY;
 	}
 
 	ret = bus_add_driver(drv);
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/9] Driver core: allow certain drivers prohibit bind/unbind via sysfs
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
  2009-10-30 22:54 ` [PATCH 1/9] Driver core: fix driver_register() return value Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 3/9] Documentation: ABI: rename sysfs-devices-cache_disable properly Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dmitry Torokhov, Dmitry Torokhov, Éric Piel, Greg Kroah-Hartman

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Platform drivers registered via platform_driver_probe() can be bound
to devices only once, upon registration, because discard their probe()
routines to save memory. Unbinding the driver through sysfs 'unbind'
leaves the device stranded and confuses users so let's not create
bind and unbind attributes for such drivers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/bus.c      |   17 +++++++++++------
 drivers/base/platform.c |    6 +++++-
 include/linux/device.h  |    4 +++-
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 973bf2a..63c143e 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -689,15 +689,19 @@ int bus_add_driver(struct device_driver *drv)
 		printk(KERN_ERR "%s: driver_add_attrs(%s) failed\n",
 			__func__, drv->name);
 	}
-	error = add_bind_files(drv);
-	if (error) {
-		/* Ditto */
-		printk(KERN_ERR "%s: add_bind_files(%s) failed\n",
-			__func__, drv->name);
+
+	if (!drv->suppress_bind_attrs) {
+		error = add_bind_files(drv);
+		if (error) {
+			/* Ditto */
+			printk(KERN_ERR "%s: add_bind_files(%s) failed\n",
+				__func__, drv->name);
+		}
 	}
 
 	kobject_uevent(&priv->kobj, KOBJ_ADD);
 	return 0;
+
 out_unregister:
 	kfree(drv->p);
 	drv->p = NULL;
@@ -720,7 +724,8 @@ void bus_remove_driver(struct device_driver *drv)
 	if (!drv->bus)
 		return;
 
-	remove_bind_files(drv);
+	if (!drv->suppress_bind_attrs)
+		remove_bind_files(drv);
 	driver_remove_attrs(drv->bus, drv);
 	driver_remove_file(drv, &driver_attr_uevent);
 	klist_remove(&drv->p->knode_bus);
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ed156a1..4fa954b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -521,11 +521,15 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv,
 {
 	int retval, code;
 
+	/* make sure driver won't have bind/unbind attributes */
+	drv->driver.suppress_bind_attrs = true;
+
 	/* temporary section violation during probe() */
 	drv->probe = probe;
 	retval = code = platform_driver_register(drv);
 
-	/* Fixup that section violation, being paranoid about code scanning
+	/*
+	 * Fixup that section violation, being paranoid about code scanning
 	 * the list of drivers in order to probe new devices.  Check to see
 	 * if the probe was successful, and make sure any forced probes of
 	 * new devices fail.
diff --git a/include/linux/device.h b/include/linux/device.h
index aca31bf..2ea3e49 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -124,7 +124,9 @@ struct device_driver {
 	struct bus_type		*bus;
 
 	struct module		*owner;
-	const char 		*mod_name;	/* used for built-in modules */
+	const char		*mod_name;	/* used for built-in modules */
+
+	bool suppress_bind_attrs;	/* disables bind/unbind via sysfs */
 
 	int (*probe) (struct device *dev);
 	int (*remove) (struct device *dev);
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/9] Documentation: ABI: rename sysfs-devices-cache_disable properly
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
  2009-10-30 22:54 ` [PATCH 1/9] Driver core: fix driver_register() return value Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 2/9] Driver core: allow certain drivers prohibit bind/unbind via sysfs Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 4/9] Documentation: ABI: document /sys/devices/system/cpu/ Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Rename sysfs-devices-cache_disable to sysfs-devices-system-cpu, in
order to keep a stricter correlation between a sysfs directory and
its documentation.

Reported-by: David Rientjes <rientjes@google.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 ...ices-cache_disable => sysfs-devices-system-cpu} |    0
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename Documentation/ABI/testing/{sysfs-devices-cache_disable => sysfs-devices-system-cpu} (100%)

diff --git a/Documentation/ABI/testing/sysfs-devices-cache_disable b/Documentation/ABI/testing/sysfs-devices-system-cpu
similarity index 100%
rename from Documentation/ABI/testing/sysfs-devices-cache_disable
rename to Documentation/ABI/testing/sysfs-devices-system-cpu
-- 
1.6.4.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/9] Documentation: ABI: document /sys/devices/system/cpu/
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (2 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 3/9] Documentation: ABI: rename sysfs-devices-cache_disable properly Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 5/9] Documentation: ABI: /sys/devices/system/cpu/ topology files Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

This interface has been around for a long time, but hasn't been
officially documented.

Document the top level sysfs directory for CPU attributes.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 175bb4f..86126b1 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -1,3 +1,15 @@
+What:		/sys/devices/system/cpu/
+Date:		pre-git history
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:
+		A collection of both global and individual CPU attributes
+
+		Individual CPU attributes are contained in subdirectories
+		named by the kernel's logical CPU number, e.g.:
+
+		/sys/devices/system/cpu/cpu#/
+
+
 What:      /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
 Date:      August 2008
 KernelVersion:	2.6.27
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/9] Documentation: ABI: /sys/devices/system/cpu/ topology files
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (3 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 4/9] Documentation: ABI: document /sys/devices/system/cpu/ Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 6/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/ " Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Mike Travis, Rusty Russell, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Add brief descriptions for the following sysfs files:

	/sys/devices/system/cpu/kernel_max
	/sys/devices/system/cpu/offline
	/sys/devices/system/cpu/online
	/sys/devices/system/cpu/possible
	/sys/devices/system/cpu/present

Excerpted the relevant information from Documentation/cputopology.txt
and pointed back to cputopology.txt as the authoritative source of
information.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   28 ++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 86126b1..871acdb 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -10,6 +10,34 @@ Description:
 		/sys/devices/system/cpu/cpu#/
 
 
+What:		/sys/devices/system/cpu/kernel_max
+		/sys/devices/system/cpu/offline
+		/sys/devices/system/cpu/online
+		/sys/devices/system/cpu/possible
+		/sys/devices/system/cpu/present
+Date:		December 2008
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:	CPU topology files that describe kernel limits related to
+		hotplug. Briefly:
+
+		kernel_max: the maximum cpu index allowed by the kernel
+		configuration.
+
+		offline: cpus that are not online because they have been
+		HOTPLUGGED off or exceed the limit of cpus allowed by the
+		kernel configuration (kernel_max above).
+
+		online: cpus that are online and being scheduled.
+
+		possible: cpus that have been allocated resources and can be
+		brought online if they are present.
+
+		present: cpus that have been identified as being present in
+		the system.
+
+		See Documentation/cputopology.txt for more information.
+
+
 What:      /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
 Date:      August 2008
 KernelVersion:	2.6.27
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (4 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 5/9] Documentation: ABI: /sys/devices/system/cpu/ topology files Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 7/9] Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Mike Travis, Rusty Russell, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Add brief descriptions for the following sysfs files:

	/sys/devices/system/cpu/cpu#/topology/core_id
	/sys/devices/system/cpu/cpu#/topology/core_siblings
	/sys/devices/system/cpu/cpu#/topology/core_siblings_list
	/sys/devices/system/cpu/cpu#/topology/physical_package_id
	/sys/devices/system/cpu/cpu#/topology/thread_siblings
	/sys/devices/system/cpu/cpu#/topology/thread_siblings_list

The descriptions in Documentation/cputopology.txt weren't very
informative, so I attempted a better description based on code
reading and hopeful guessing.

Updated Documentation/cputopology.txt with the better descriptions and
fixed some style issues.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   39 ++++++++++++++++
 Documentation/cputopology.txt                      |   47 ++++++++++++-------
 2 files changed, 69 insertions(+), 17 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 871acdb..2ade5c0 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -38,6 +38,45 @@ Description:	CPU topology files that describe kernel limits related to
 		See Documentation/cputopology.txt for more information.
 
 
+What:		/sys/devices/system/cpu/cpu#/topology/core_id
+		/sys/devices/system/cpu/cpu#/topology/core_siblings
+		/sys/devices/system/cpu/cpu#/topology/core_siblings_list
+		/sys/devices/system/cpu/cpu#/topology/physical_package_id
+		/sys/devices/system/cpu/cpu#/topology/thread_siblings
+		/sys/devices/system/cpu/cpu#/topology/thread_siblings_list
+Date:		December 2008
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:	CPU topology files that describe a logical CPU's relationship
+		to other cores and threads in the same physical package.
+
+		One cpu# directory is created per logical CPU in the system,
+		e.g. /sys/devices/system/cpu/cpu42/.
+
+		Briefly, the files above are:
+
+		core_id: the CPU core ID of cpu#. Typically it is the
+		hardware platform's identifier (rather than the kernel's).
+		The actual value is architecture and platform dependent.
+
+		core_siblings: internal kernel map of cpu#'s hardware threads
+		within the same physical_package_id.
+
+		core_siblings_list: human-readable list of the logical CPU
+		numbers within the same physical_package_id as cpu#.
+
+		physical_package_id: physical package id of cpu#. Typically
+		corresponds to a physical socket number, but the actual value
+		is architecture and platform dependent.
+
+		thread_siblings: internel kernel map of cpu#'s hardware
+		threads within the same core as cpu#
+
+		thread_siblings_list: human-readable list of cpu#'s hardware
+		threads within the same core as cpu#
+
+		See Documentation/cputopology.txt for more information.
+
+
 What:      /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
 Date:      August 2008
 KernelVersion:	2.6.27
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index b41f3e5..f1c5c4b 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -1,15 +1,28 @@
 
-Export cpu topology info via sysfs. Items (attributes) are similar
+Export CPU topology info via 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;
+
+	physical package id of cpuX. Typically corresponds to a physical
+	socket number, but the actual value is architecture and platform
+	dependent.
+
 2) /sys/devices/system/cpu/cpuX/topology/core_id:
-represent the cpu core id to cpu X;
+
+	the CPU core ID of cpuX. Typically it is the hardware platform's
+	identifier (rather than the kernel's).  The actual value is
+	architecture and platform dependent.
+
 3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
-represent the thread siblings to cpu X in the same core;
+
+	internel kernel map of cpuX's hardware threads within the same
+	core as cpuX
+
 4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
-represent the thread siblings to cpu X in the same physical package;
+
+	internal kernel map of cpuX's hardware threads within the same
+	physical_package_id.
 
 To implement it in an architecture-neutral way, a new source file,
 drivers/base/topology.c, is to export the 4 attributes.
@@ -32,32 +45,32 @@ not defined by include/asm-XXX/topology.h:
 3) thread_siblings: just the given CPU
 4) core_siblings: just the given CPU
 
-Additionally, cpu topology information is provided under
+Additionally, CPU topology information is provided under
 /sys/devices/system/cpu and includes these files.  The internal
 source for the output is in brackets ("[]").
 
-    kernel_max: the maximum cpu index allowed by the kernel configuration.
+    kernel_max: the maximum CPU index allowed by the kernel configuration.
 		[NR_CPUS-1]
 
-    offline:	cpus that are not online because they have been
+    offline:	CPUs that are not online because they have been
 		HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit
-		of cpus allowed by the kernel configuration (kernel_max
+		of CPUs allowed by the kernel configuration (kernel_max
 		above). [~cpu_online_mask + cpus >= NR_CPUS]
 
-    online:	cpus that are online and being scheduled [cpu_online_mask]
+    online:	CPUs that are online and being scheduled [cpu_online_mask]
 
-    possible:	cpus that have been allocated resources and can be
+    possible:	CPUs that have been allocated resources and can be
 		brought online if they are present. [cpu_possible_mask]
 
-    present:	cpus that have been identified as being present in the
+    present:	CPUs that have been identified as being present in the
 		system. [cpu_present_mask]
 
 The format for the above output is compatible with cpulist_parse()
 [see <linux/cpumask.h>].  Some examples follow.
 
-In this example, there are 64 cpus in the system but cpus 32-63 exceed
+In this example, there are 64 CPUs in the system but cpus 32-63 exceed
 the kernel max which is limited to 0..31 by the NR_CPUS config option
-being 32.  Note also that cpus 2 and 4-31 are not online but could be
+being 32.  Note also that CPUs 2 and 4-31 are not online but could be
 brought online as they are both present and possible.
 
      kernel_max: 31
@@ -67,8 +80,8 @@ brought online as they are both present and possible.
         present: 0-31
 
 In this example, the NR_CPUS config option is 128, but the kernel was
-started with possible_cpus=144.  There are 4 cpus in the system and cpu2
-was manually taken offline (and is the only cpu that can be brought
+started with possible_cpus=144.  There are 4 CPUs in the system and cpu2
+was manually taken offline (and is the only CPU that can be brought
 online.)
 
      kernel_max: 127
@@ -78,4 +91,4 @@ online.)
         present: 0-3
 
 See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter
-as well as more information on the various cpumask's.
+as well as more information on the various cpumasks.
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/9] Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (5 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 6/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/ " Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 8/9] Documentation: ABI: /sys/devices/system/cpu/cpuidle/ Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 9/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/node Greg Kroah-Hartman
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Suresh Siddha, Ingo Molnar, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Document sched_[mc|smt]_power_savings by reading existing code and
git logs.

Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   24 ++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 2ade5c0..8cdda1c 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -9,6 +9,30 @@ Description:
 
 		/sys/devices/system/cpu/cpu#/
 
+What:		/sys/devices/system/cpu/sched_mc_power_savings
+		/sys/devices/system/cpu/sched_smt_power_savings
+Date:		June 2006
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:	Discover and adjust the kernel's multi-core scheduler support.
+
+		Possible values are:
+
+		0 - No power saving load balance (default value)
+		1 - Fill one thread/core/package first for long running threads
+		2 - Also bias task wakeups to semi-idle cpu package for power
+		    savings
+
+		sched_mc_power_savings is dependent upon SCHED_MC, which is
+		itself architecture dependent.
+
+		sched_smt_power_savings is dependent upon SCHED_SMT, which
+		is itself architecture dependent.
+
+		The two files are independent of each other. It is possible
+		that one file may be present without the other.
+
+		Introduced by git commit 5c45bf27.
+
 
 What:		/sys/devices/system/cpu/kernel_max
 		/sys/devices/system/cpu/offline
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/9] Documentation: ABI: /sys/devices/system/cpu/cpuidle/
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (6 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 7/9] Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  2009-10-30 22:54 ` [PATCH 9/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/node Greg Kroah-Hartman
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Venki Pallipadi, Len Brown, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Document cpuidle sysfs attributes by reading code, Documentation/cpuidle/,
and git logs.

Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 8cdda1c..968d8ba 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -101,6 +101,26 @@ Description:	CPU topology files that describe a logical CPU's relationship
 		See Documentation/cputopology.txt for more information.
 
 
+What:		/sys/devices/system/cpu/cpuidle/current_driver
+		/sys/devices/system/cpu/cpuidle/current_governer_ro
+Date:		September 2007
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:	Discover cpuidle policy and mechanism
+
+		Various CPUs today support multiple idle levels that are
+		differentiated by varying exit latencies and power
+		consumption during idle.
+
+		Idle policy (governor) is differentiated from idle mechanism
+		(driver)
+
+		current_driver: displays current idle mechanism
+
+		current_governor_ro: displays current idle policy
+
+		See files in Documentation/cpuidle/ for more information.
+
+
 What:      /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
 Date:      August 2008
 KernelVersion:	2.6.27
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 9/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/node
  2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
                   ` (7 preceding siblings ...)
  2009-10-30 22:54 ` [PATCH 8/9] Documentation: ABI: /sys/devices/system/cpu/cpuidle/ Greg Kroah-Hartman
@ 2009-10-30 22:54 ` Greg Kroah-Hartman
  8 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2009-10-30 22:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Chiang, Randy Dunlap, Greg Kroah-Hartman

From: Alex Chiang <achiang@hp.com>

Describe NUMA node symlink created for CPUs when CONFIG_NUMA is set.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 Documentation/ABI/testing/sysfs-devices-system-cpu |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 968d8ba..a703b9e 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -62,6 +62,21 @@ Description:	CPU topology files that describe kernel limits related to
 		See Documentation/cputopology.txt for more information.
 
 
+
+What:		/sys/devices/system/cpu/cpu#/node
+Date:		October 2009
+Contact:	Linux memory management mailing list <linux-mm@kvack.org>
+Description:	Discover NUMA node a CPU belongs to
+
+		When CONFIG_NUMA is enabled, a symbolic link that points
+		to the corresponding NUMA node directory.
+
+		For example, the following symlink is created for cpu42
+		in NUMA node 2:
+
+		/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
+
+
 What:		/sys/devices/system/cpu/cpu#/topology/core_id
 		/sys/devices/system/cpu/cpu#/topology/core_siblings
 		/sys/devices/system/cpu/cpu#/topology/core_siblings_list
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-10-30 22:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-30 22:09 [GIT PATCH] driver core fixes for 2.6.32-git Greg KH
2009-10-30 22:54 ` [PATCH 1/9] Driver core: fix driver_register() return value Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 2/9] Driver core: allow certain drivers prohibit bind/unbind via sysfs Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 3/9] Documentation: ABI: rename sysfs-devices-cache_disable properly Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 4/9] Documentation: ABI: document /sys/devices/system/cpu/ Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 5/9] Documentation: ABI: /sys/devices/system/cpu/ topology files Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 6/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/ " Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 7/9] Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 8/9] Documentation: ABI: /sys/devices/system/cpu/cpuidle/ Greg Kroah-Hartman
2009-10-30 22:54 ` [PATCH 9/9] Documentation: ABI: /sys/devices/system/cpu/cpu#/node Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).