GitHub/MotorolaMobilityLLC/kernel-slsi.git
16 years agokobject: convert s390 ipl.c to kobj_attr interface
Greg Kroah-Hartman [Fri, 2 Nov 2007 21:17:00 +0000 (17:17 -0400)]
kobject: convert s390 ipl.c to kobj_attr interface

This makes the code a bit simpler and and gets us one step closer to
deleting the deprecated subsys_attr code.

NOTE, this needs the next patch in the series in order to work properly.
This will build, but the sysfs files will not properly operate.

Thanks to Cornelia for the build fix on this patch.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Michael Holzheu <holzheu@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Volker Sameske <sameske@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert pseries/power.c to kobj_attr interface
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
kobject: convert pseries/power.c to kobj_attr interface

This makes the code a bit simpler and and gets us one step closer to
deleting the deprecated subsys_attr code.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert arm/mach-omap1/pm.c to kobj_attr interface
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
kobject: convert arm/mach-omap1/pm.c to kobj_attr interface

This makes the code a bit simpler and and gets us one step closer to
deleting the deprecated subsys_attr code.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cliff Brake <cbrake@accelent.com>
Cc: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert efivars to use kset_create for the vars sub-subsystem.
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
kset: convert efivars to use kset_create for the vars sub-subsystem.

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert efivars to use kset_create for the efi subsystem.
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
kset: convert efivars to use kset_create for the efi subsystem.

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agofirmware: export firmware_kset so that people can use that instead of the braindead...
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
firmware: export firmware_kset so that people can use that instead of the braindead firmware_register interface

Needed for future firmware subsystem cleanups.

In the end, the firmware_register/unregister functions will be deleted
entirely, but we need this symbol so that subsystems can migrate over.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert efivars to kobj_attr interface
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
kobject: convert efivars to kobj_attr interface

This cleans up a lot of code and gets rid of a unneeded macro, and gets
us one step closer to deleting the deprecated subsys_attr code.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoefivars: make new_var and del_var binary sysfs files
Greg Kroah-Hartman [Wed, 7 Nov 2007 21:56:19 +0000 (13:56 -0800)]
efivars: make new_var and del_var binary sysfs files

These files should not be "normal" sysfs files as they really are binary
ones.  This patch makes them binary files and saves code in doing so.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Tested-by: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoecryptfs: remove version_str file from sysfs
Greg Kroah-Hartman [Fri, 2 Nov 2007 20:20:40 +0000 (13:20 -0700)]
ecryptfs: remove version_str file from sysfs

This file violates the one-value-per-file sysfs rule.

If you all want it added back, please do something like a per-feature
file to show what is present and what isn't.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agofix struct user_info export's sysfs interaction
Kay Sievers [Fri, 2 Nov 2007 12:47:53 +0000 (13:47 +0100)]
fix struct user_info export's sysfs interaction

Clean up the use of ksets and kobjects. Kobjects are instances of
objects (like struct user_info), ksets are collections of objects of a
similar type (like the uids directory containing the user_info directories).
So, use kobjects for the user_info directories, and a kset for the "uids"
directory.

On object cleanup, the final kobject_put() was missing.

Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDriver Core: switch all dynamic ksets to kobj_sysfs_ops
Kay Sievers [Fri, 2 Nov 2007 12:47:53 +0000 (13:47 +0100)]
Driver Core: switch all dynamic ksets to kobj_sysfs_ops

Switch all dynamically created ksets, that export simple attributes,
to kobj_attribute from subsys_attribute. Struct subsys_attribute will
be removed.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDriver Core: add kobj_attribute handling
Kay Sievers [Fri, 2 Nov 2007 12:47:53 +0000 (13:47 +0100)]
Driver Core: add kobj_attribute handling

Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no
need for special kset operations, we want to be able to use
simple attribute operations at any kobject, not only ksets.

The whole concept of any default sysfs attribute operations
will go away with the upcoming removal of subsys_sysfs_ops.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert struct bus_device->drivers to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 20:31:26 +0000 (13:31 -0700)]
kset: convert struct bus_device->drivers to use kset_create

Dynamically create the kset instead of declaring it statically.

Having 3 static kobjects in one structure is not only foolish, but ripe
for nasty race conditions if handled improperly.  We also rename the
field to catch any potential users of it (not that there should be
outside of the driver core...)

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert struct bus_device->devices to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 20:31:26 +0000 (13:31 -0700)]
kset: convert struct bus_device->devices to use kset_create

Dynamically create the kset instead of declaring it statically.

Having 3 static kobjects in one structure is not only foolish, but ripe
for nasty race conditions if handled improperly.  We also rename the
field to catch any potential users of it (not that there should be
outside of the driver core...)

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert /sys/power to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 17:39:50 +0000 (10:39 -0700)]
kset: convert /sys/power to use kset_create

Dynamically create the kset instead of declaring it statically.  We also
rename power_subsys to power_kset to catch all users of the variable and
we properly export it so that people don't have to guess that it really
is present in the system.

The pseries code is wierd, why is it createing /sys/power if CONFIG_PM
is disabled?  Oh well, stupid big boxes ignoring config options...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert /sys/module to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 17:39:50 +0000 (10:39 -0700)]
kset: convert /sys/module to use kset_create

Dynamically create the kset instead of declaring it statically.  We also
rename module_subsys to module_kset to catch all users of the variable.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: move /sys/slab to /sys/kernel/slab
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kset: move /sys/slab to /sys/kernel/slab

/sys/kernel is where these things should go.
Also updated the documentation and tool that used this directory.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert slub to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kset: convert slub to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert /sys/devices/system to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kset: convert /sys/devices/system to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert s390 hypervisor to use kobject_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kobject: convert s390 hypervisor to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Thanks to Cornelia for the build fix.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Michael Holzheu <holzheu@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert /sys/hypervisor to use kobject_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kobject: convert /sys/hypervisor to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

We also rename hypervisor_subsys to hypervisor_kset to catch all users
of the variable.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert /sys/devices to use kset_create
Greg Kroah-Hartman [Thu, 1 Nov 2007 15:29:06 +0000 (09:29 -0600)]
kset: convert /sys/devices to use kset_create

Dynamically create the kset instead of declaring it statically.  We also
rename devices_subsys to devices_kset to catch all users of the
variable.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert drivers/base/firmware.c to use kset_create
Greg Kroah-Hartman [Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)]
kset: convert drivers/base/firmware.c to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert drivers/base/class.c to use kset_create
Greg Kroah-Hartman [Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)]
kset: convert drivers/base/class.c to use kset_create

Dynamically create the kset instead of declaring it statically.

The class_obj subsystem is not yet converted as it is more complex and
should be going away soon with the removal of class_device from the
kernel tree.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert drivers/base/bus.c to use kset_create
Greg Kroah-Hartman [Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)]
kset: convert drivers/base/bus.c to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert kernel_subsys to use kset_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kset: convert kernel_subsys to use kset_create

Dynamically create the kset instead of declaring it statically.  We also
rename kernel_subsys to kernel_kset to catch all users of this symbol
with a build error instead of an easy-to-ignore build warning.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: remove decl_subsys_name
Greg Kroah-Hartman [Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)]
kset: remove decl_subsys_name

The last user of this macro (pci hotplug core) is now switched over to
using a dynamic kset, so this macro is no longer needed at all.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert pci hotplug to use kset_create_and_add
Greg Kroah-Hartman [Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)]
kset: convert pci hotplug to use kset_create_and_add

This also renames pci_hotplug_slots_subsys to pcis_hotplug_slots_kset
catch all current users with a build error instead of a build warning
which can easily be missed.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert dlm to use kset_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kset: convert dlm to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert gfs2 dlm to use kset_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kset: convert gfs2 dlm to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert gfs2 to use kset_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kset: convert gfs2 to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert main fs kobject to use kobject_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 20:17:23 +0000 (14:17 -0600)]
kobject: convert main fs kobject to use kobject_create

This also renames fs_subsys to fs_kobj to catch all current users with a
build error instead of a build warning which can easily be missed.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: convert ecryptfs to use kset_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kset: convert ecryptfs to use kset_create

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert configfs to use kobject_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kobject: convert configfs to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert debugfs to use kobject_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kobject: convert debugfs to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert securityfs to use kobject_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kobject: convert securityfs to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert fuse to use kobject_create
Greg Kroah-Hartman [Mon, 29 Oct 2007 19:13:17 +0000 (20:13 +0100)]
kobject: convert fuse to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: get rid of kobject_kset_add_dir
Greg Kroah-Hartman [Tue, 6 Nov 2007 06:24:43 +0000 (22:24 -0800)]
kobject: get rid of kobject_kset_add_dir

kobject_kset_add_dir is only called in one place so remove it and use
kobject_create() instead.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: get rid of kobject_add_dir
Greg Kroah-Hartman [Tue, 6 Nov 2007 06:24:43 +0000 (22:24 -0800)]
kobject: get rid of kobject_add_dir

kobject_create_and_add is the same as kobject_add_dir, so drop
kobject_add_dir.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: add kobject_create_and_add function
Greg Kroah-Hartman [Mon, 5 Nov 2007 21:16:15 +0000 (13:16 -0800)]
kobject: add kobject_create_and_add function

This lets users create dynamic kobjects much easier.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokset: add kset_create_and_add function
Greg Kroah-Hartman [Thu, 27 Sep 2007 21:48:53 +0000 (14:48 -0700)]
kset: add kset_create_and_add function

Now ksets can be dynamically created on the fly, no static definitions
are required.  Thanks to Miklos for hints on how to make this work
better for the callers.

And thanks to Kay for finding some stupid bugs in my original version
and pointing out that we need to handle the fact that kobject's can have
a kset as a parent and to handle that properly in kobject_add().

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: remove kobj_set_kset_s as no one is using it anymore
Greg Kroah-Hartman [Tue, 16 Oct 2007 16:11:44 +0000 (10:11 -0600)]
kobject: remove kobj_set_kset_s as no one is using it anymore

What a confusing name for a macro...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: remove struct kobj_type from struct kset
Greg Kroah-Hartman [Tue, 16 Oct 2007 16:11:44 +0000 (10:11 -0600)]
kobject: remove struct kobj_type from struct kset

We don't need a "default" ktype for a kset.  We should set this
explicitly every time for each kset.  This change is needed so that we
can make ksets dynamic, and cleans up one of the odd, undocumented
assumption that the kset/kobject/ktype model has.

This patch is based on a lot of help from Kay Sievers.

Nasty bug in the block code was found by Dave Young
<hidave.darkstar@gmail.com>

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: add kobject_init_and_add function
Greg Kroah-Hartman [Tue, 4 Dec 2007 05:31:08 +0000 (21:31 -0800)]
kobject: add kobject_init_and_add function

Also add a kobject_init_and_add function which bundles up what a lot of
the current callers want to do all at once, and it properly handles the
memory usages, unlike kobject_register();

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: add kobject_add_ng function
Greg Kroah-Hartman [Tue, 4 Dec 2007 05:31:08 +0000 (21:31 -0800)]
kobject: add kobject_add_ng function

This is what the kobject_add function is going to become.

Add this to the kernel and then we can convert the tree over to use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: add kobject_init_ng function
Greg Kroah-Hartman [Tue, 4 Dec 2007 05:31:08 +0000 (21:31 -0800)]
kobject: add kobject_init_ng function

This is what the kobject_init function is going to become.

Add this to the kernel and then we can convert the tree over to use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: make kobject_cleanup be static
Greg Kroah-Hartman [Tue, 4 Dec 2007 05:31:08 +0000 (21:31 -0800)]
kobject: make kobject_cleanup be static

No one except the kobject core calls it so make the function static.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: fix up kobject_set_name to use kvasprintf
Greg Kroah-Hartman [Thu, 29 Nov 2007 23:32:47 +0000 (18:32 -0500)]
kobject: fix up kobject_set_name to use kvasprintf

Kay pointed out that kobject_set_name was being very stupid, doing two
allocations for every call, when it should just be using the kernel
function kvasprintf() instead.

This change adds the internal kobject_set_name_vargs() function, which
other follow-on patches will be using.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert icom to use kref, not kobject
Greg Kroah-Hartman [Tue, 4 Dec 2007 04:16:20 +0000 (21:16 -0700)]
kobject: convert icom to use kref, not kobject

The IBM icom serial driver is using a kobject only for reference
counting, nothing else.  So switch it to use a kref instead, which is
all that is needed, and is much smaller.

Cc: Anton Blanchard <anton@au.ibm.com>
Cc: Paul Mackerras <paulus@au.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ryan S. Arnold <rsa@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert hvcs to use kref, not kobject
Greg Kroah-Hartman [Wed, 28 Nov 2007 18:46:22 +0000 (10:46 -0800)]
kobject: convert hvcs to use kref, not kobject

hvcs is using a kobject only for reference counting, nothing else.  So
switch it to use a kref instead, which is all that is needed, and is
much smaller.

Cc: Anton Blanchard <anton@au.ibm.com>
Cc: Paul Mackerras <paulus@au.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ryan S. Arnold <rsa@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert hvc_console to use kref, not kobject
Greg Kroah-Hartman [Wed, 28 Nov 2007 18:46:22 +0000 (10:46 -0800)]
kobject: convert hvc_console to use kref, not kobject

hvc_console is using a kobject only for reference counting, nothing
else.  So switch it to use a kref instead, which is all that is needed,
and is much smaller.

Cc: Anton Blanchard <anton@au.ibm.com>
Cc: Paul Mackerras <paulus@au.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ryan S. Arnold <rsa@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: convert ibmasm to use kref, not kobject
Greg Kroah-Hartman [Tue, 4 Dec 2007 04:16:20 +0000 (21:16 -0700)]
kobject: convert ibmasm to use kref, not kobject

The IBM asm driver is using a kobject only for reference counting,
nothing else.  So switch it to use a kref instead, which is all that is
needed, and is much smaller.

Cc: Max Asböck <amax@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysfs: remove SPIN_LOCK_UNLOCKED
Jiri Slaby [Wed, 21 Nov 2007 22:55:19 +0000 (14:55 -0800)]
sysfs: remove SPIN_LOCK_UNLOCKED

SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Tejun Heo <teheo@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysfs: create optimal relative symlink targets
Kay Sievers [Thu, 1 Nov 2007 19:20:52 +0000 (20:20 +0100)]
sysfs: create optimal relative symlink targets

Instead of walking from the source down to the root of sysfs, and back
to the target, we stop at the first directory the source and the target
share.

This link:
  /devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/ep_81

pointed to:
  ../../../../../devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0/usb_endpoint/usbdev2.1_ep81

now it just points to:
  usb_endpoint/usbdev1.1_ep81

Thanks to Denis Cheng for bringing this up, and sending the initial patch.

CC: Denis Cheng <crquan@gmail.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: Make the dev_*() family of macros in device.h complete
Emil Medve [Tue, 30 Oct 2007 19:37:14 +0000 (14:37 -0500)]
driver core: Make the dev_*() family of macros in device.h complete

Removed duplicates defined elsewhere

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoecryptfs: clean up attribute mess
Greg Kroah-Hartman [Mon, 15 Oct 2007 22:01:24 +0000 (15:01 -0700)]
ecryptfs: clean up attribute mess

It isn't that hard to add simple kset attributes, so don't go through
all the gyrations of creating your own object type and show and store
functions.  Just use the functions that are already present.  This makes
things much simpler.

Note, the version_str string violates the "one value per file" rule for
sysfs.  I suggest changing this now (individual files per type supported
is one suggested way.)

Cc: Michael A. Halcrow <mahalcro@us.ibm.com>
Cc: Michael C. Thompson <mcthomps@us.ibm.com>
Cc: Tyler Hicks <tyhicks@ou.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agocosa: Convert from class_device to device for cosa sync driver
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
cosa: Convert from class_device to device for cosa sync driver

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agotifm: Convert from class_device to device for TI flash media
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
tifm: Convert from class_device to device for TI flash media

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agopktcdvd: Convert from class_device to device for block/pktcdvd
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
pktcdvd: Convert from class_device to device for block/pktcdvd

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoparide: Convert from class_device to device for block/paride
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
paride: Convert from class_device to device for block/paride

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agomtd: Convert from class_device to device for MTD/mtdchar
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
mtd: Convert from class_device to device for MTD/mtdchar

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMCP_UCB1200: Convert from class_device to device
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
MCP_UCB1200: Convert from class_device to device

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoadb: Convert from class_device to device
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
adb: Convert from class_device to device

struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Joshua Thompson <funaho@jurai.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoISDN: Convert from class_device to device for ISDN capi
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
ISDN: Convert from class_device to device for ISDN capi

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoIDE: Convert from class_device to device for ide-tape
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
IDE: Convert from class_device to device for ide-tape

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Gadi Oxman <gadio@netvision.net.il>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDMA: Convert from class_device to device for DMA engine
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
DMA: Convert from class_device to device for DMA engine

Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Shannon Nelson <shannon.nelson@intel.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agocoda: convert struct class_device to struct device
Kay Sievers [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
coda: convert struct class_device to struct device

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Tony Jones <tonyj@suse.de>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoaoechr: Convert from class_device to device
Tony Jones [Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)]
aoechr: Convert from class_device to device

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Sam Hopkins <sah@coraid.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokref: add kref_set()
Evgeniy Polyakov [Mon, 10 Dec 2007 20:03:43 +0000 (23:03 +0300)]
kref: add kref_set()

This adds kref_set() to the kref api for future use by people who really
know what they are doing with krefs...

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPM: Acquire device locks on suspend
Rafael J. Wysocki [Sat, 12 Jan 2008 19:40:46 +0000 (20:40 +0100)]
PM: Acquire device locks on suspend

This patch reorganizes the way suspend and resume notifications are
sent to drivers.  The major changes are that now the PM core acquires
every device semaphore before calling the methods, and calls to
device_add() during suspends will fail, while calls to device_del()
during suspends will block.

It also provides a way to safely remove a suspended device with the
help of the PM core, by using the device_pm_schedule_removal() callback
introduced specifically for this purpose, and updates two drivers (msr
and cpuid) that need to use it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: remove incorrect comment in kobject_rename
Greg Kroah-Hartman [Thu, 25 Oct 2007 04:52:56 +0000 (21:52 -0700)]
kobject: remove incorrect comment in kobject_rename

As pointed out by Kay.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDocumentation: Replace obsolete "driverfs" with "sysfs".
Robert P. J. Day [Wed, 7 Nov 2007 09:09:46 +0000 (04:09 -0500)]
Documentation: Replace obsolete "driverfs" with "sysfs".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
16 years agonozomi driver
Frank Seidel [Fri, 9 Nov 2007 13:49:23 +0000 (14:49 +0100)]
nozomi driver

This is a driver to control the cardbus wireless data card that works on
3g networks.

Greg Kroah-Hartman <gregkh@suse.de> did the initial driver cleanup.
Thanks to Arnaud Patard <apatard@mandriva.com> for help with bugfixing.
Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <satyam@infradead.org> for fixing buildbreakage.
Thanks to Frank Seidel <fseidel@suse.de> for a lot of bugfixes and
rewriting to make it a sane Linux driver
Thanks to Jiri Slaby <jirislaby@gmail.com> for a lot bugfixes, cleanups
and rewrites that make it much more readable.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
16 years agosysfs: Fix a copy-n-paste typo in comment
Jean Delvare [Tue, 8 Jan 2008 17:11:24 +0000 (18:11 +0100)]
sysfs: Fix a copy-n-paste typo in comment

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of Codingstyle
Zhang Le [Mon, 7 Jan 2008 16:59:16 +0000 (00:59 +0800)]
Chinese: add translation of Codingstyle

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of sparse.txt
Li Yang [Tue, 23 Oct 2007 17:04:21 +0000 (01:04 +0800)]
Chinese: add translation of sparse.txt

Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of volatile-considered-harmful.txt
Bryan Wu [Tue, 23 Oct 2007 17:00:23 +0000 (01:00 +0800)]
Chinese: add translation of volatile-considered-harmful.txt

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of stable_kernel_rules.txt
TripleX Chung [Tue, 23 Oct 2007 16:57:24 +0000 (00:57 +0800)]
Chinese: add translation of stable_kernel_rules.txt

Signed-off-by: TripleX Chung <triplex@zh-kernel.org>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of oops-tracing.txt
Dave Young [Tue, 23 Oct 2007 17:14:29 +0000 (01:14 +0800)]
Chinese: add translation of oops-tracing.txt

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of SubmittingDrivers
Li Yang [Tue, 23 Oct 2007 16:51:11 +0000 (00:51 +0800)]
Chinese: add translation of SubmittingDrivers

Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: add translation of SubmittingPatches
TripleX Chung [Tue, 23 Oct 2007 16:46:43 +0000 (00:46 +0800)]
Chinese: add translation of SubmittingPatches

Signed-off-by: TripleX Chung <triplex@zh-kernel.org>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: Change man-pages maintainer address in HOWOTO
Li Yang [Tue, 23 Oct 2007 13:58:51 +0000 (21:58 +0800)]
Chinese: Change man-pages maintainer address in HOWOTO

The email address of the man-pages maintainer has changed.

Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: rephrase English introduction in HOWTO
Li Yang [Tue, 24 Jul 2007 18:43:32 +0000 (02:43 +0800)]
Chinese: rephrase English introduction in HOWTO

Rephrase the introduction as suggested by Jesper Juhl.

Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoChinese: Add the known_regression URI to the HOWTO
Li Yang [Tue, 24 Jul 2007 18:03:06 +0000 (02:03 +0800)]
Chinese: Add the known_regression URI to the HOWTO

Update translation for commit be3884943674f8ee7656b1d8b71c087ec900c836.

Signed-off-by: Li Yang <leo@zh-kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoLinux 2.6.24
Linus Torvalds [Thu, 24 Jan 2008 22:58:37 +0000 (14:58 -0800)]
Linux 2.6.24

16 years agospi: omap2_mcspi PIO RX fix
Kalle Valo [Thu, 24 Jan 2008 22:00:40 +0000 (14:00 -0800)]
spi: omap2_mcspi PIO RX fix

Before transmission of the last word in PIO RX_ONLY mode rx+tx mode
is enabled:

/* prevent last RX_ONLY read from triggering
 * more word i/o: switch to rx+tx
 */
if (c == 0 && tx == NULL)
mcspi_write_cs_reg(spi,
OMAP2_MCSPI_CHCONF0, l);

But because c is decremented after the test, c will never be zero and
rx+tx will not be enabled. This breaks RX_ONLY mode PIO transfers.

Fix it by decrementing c in the beginning of the various I/O loops.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert "mac80211: warn when receiving frames with unaligned data"
Linus Torvalds [Thu, 24 Jan 2008 21:35:10 +0000 (13:35 -0800)]
Revert "mac80211: warn when receiving frames with unaligned data"

This reverts commit 81100eb80add328c4d2a377326f15aa0e7236398 for the
release, to avoid the unnecessary warning noise that is only really
relevant to wireless driver developers.

The warning will probably go right back in after I cut the release, but
at least we won't unnecessarily worry users.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 24 Jan 2008 16:12:38 +0000 (08:12 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Partially revert "Constify function pointer tables."

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Thu, 24 Jan 2008 16:09:50 +0000 (08:09 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  Revert "ACPI: Fan: Drop force_power_state acpi_device option"
  ACPI: EC: "DEBUG" needs to be defined earlier
  ACPI: EC: add leading zeros to debug messages
  ACPI: EC: fix dmesg spam regression
  ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.
  ACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-list
  ACPI: make _OSI(Linux) console messages smarter
  ACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI list
  ACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode output
  ACPI: create acpi_dmi_dump()
  DMI: create dmi_get_slot()
  DMI: move dmi_available declaration to linux/dmi.h
  ACPI: processor: Fix null pointer dereference in throttling

16 years agoslab: partially revert list3 changes
Mel Gorman [Thu, 24 Jan 2008 13:49:54 +0000 (05:49 -0800)]
slab: partially revert list3 changes

Partial revert the changes made by 04231b3002ac53f8a64a7bd142fde3fa4b6808c6
to the kmem_list3 management. On a machine with a memoryless node, this
BUG_ON was triggering

static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
{
struct list_head *entry;
struct slab *slabp;
struct kmem_list3 *l3;
void *obj;
int x;

l3 = cachep->nodelists[nodeid];
BUG_ON(!l3);

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix hugepages leak due to pagetable page sharing
Larry Woodman [Thu, 24 Jan 2008 13:49:25 +0000 (05:49 -0800)]
fix hugepages leak due to pagetable page sharing

The shared page table code for hugetlb memory on x86 and x86_64
is causing a leak.  When a user of hugepages exits using this code
the system leaks some of the hugepages.

-------------------------------------------------------
Part of /proc/meminfo just before database startup:
HugePages_Total:  5500
HugePages_Free:   5500
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

Just before shutdown:
HugePages_Total:  5500
HugePages_Free:   4475
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

After shutdown:
HugePages_Total:  5500
HugePages_Free:   4988
HugePages_Rsvd:
0 Hugepagesize:     2048 kB
----------------------------------------------------------

The problem occurs durring a fork, in copy_hugetlb_page_range().  It
locates the dst_pte using huge_pte_alloc().  Since huge_pte_alloc() calls
huge_pmd_share() it will share the pmd page if can, yet the main loop in
copy_hugetlb_page_range() does a get_page() on every hugepage.  This is a
violation of the shared hugepmd pagetable protocol and creates additional
referenced to the hugepages causing a leak when the unmap of the VMA
occurs.  We can skip the entire replication of the ptes when the hugepage
pagetables are shared.  The attached patch skips copying the ptes and the
get_page() calls if the hugetlbpage pagetable is shared.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Ken Chen <kenchen@google.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosysctl: kill binary sysctl KERN_PPC_L2CR
Eric W. Biederman [Thu, 24 Jan 2008 13:52:13 +0000 (05:52 -0800)]
sysctl: kill binary sysctl KERN_PPC_L2CR

: Stefan Roese <sr@denx.de> said:
> ppc: 4xx: sysctl table check failed: /kernel/l2cr .1.31 Missing strategy
>
> I'm seeing this error message when booting an recent arch/ppc kernel on
> 4xx platforms (tested on Ocotea and other 4xx platforms). Booting NFS
> rootfs still works fine, but this message kind of makes me "nervous".
> This is not seen on 4xx arch/powerpc platforms. Here the bootlog:

Because the data field was never filled and a binary sysctl handler was
never written this sysctl has never been usable through the sys_sysctl
interface.  So just remove the binary sysctl number.  Making the kernel
sanity checks happy.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Stefan Roese <sr@denx.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolockdep: fix kernel crash on module unload
Arjan van de Ven [Thu, 24 Jan 2008 06:00:45 +0000 (07:00 +0100)]
lockdep: fix kernel crash on module unload

Michael Wu noticed in his lkml post at

    http://marc.info/?l=linux-kernel&m=119396182726091&w=2

that certain wireless drivers ended up having their name in module
memory, which would then crash the kernel on module unload.

The patch he proposed was a bit clumsy in that it increased the size of
a lockdep entry significantly; the patch below tries another approach,
it checks, on module teardown, if the name of a class is in module space
and then zaps the class.  This is very similar to what we already do
with keys that are in module space.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SPARC64]: Partially revert "Constify function pointer tables."
David S. Miller [Thu, 24 Jan 2008 05:32:04 +0000 (21:32 -0800)]
[SPARC64]: Partially revert "Constify function pointer tables."

This partially reverts 872e2be7c4056496c2871bd9b0f2fae6c374fe47
(Constify function pointer tables.)

The solaris/socksys.c transformation wasn't valid:

arch/sparc64/solaris/socksys.c:192: error: assignment of read-only variable ‘socksys_file_ops’
arch/sparc64/solaris/socksys.c:195: error: assignment of read-only variable ‘socksys_file_ops’
arch/sparc64/solaris/socksys.c:196: error: assignment of read-only variable ‘socksys_file_ops’

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPull dmi-2.6.24 into release branch
Len Brown [Thu, 24 Jan 2008 04:50:01 +0000 (23:50 -0500)]
Pull dmi-2.6.24 into release branch

16 years agoPull bugzilla-9798 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:46 +0000 (23:48 -0500)]
Pull bugzilla-9798 into release branch

16 years agoPull bugzilla-8459 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:33 +0000 (23:48 -0500)]
Pull bugzilla-8459 into release branch

16 years agoPull bugzilla-9747 into release branch
Len Brown [Thu, 24 Jan 2008 04:48:19 +0000 (23:48 -0500)]
Pull bugzilla-9747 into release branch

16 years agoRevert "ACPI: Fan: Drop force_power_state acpi_device option"
Len Brown [Thu, 24 Jan 2008 03:41:20 +0000 (22:41 -0500)]
Revert "ACPI: Fan: Drop force_power_state acpi_device option"

This reverts commit 93ad7c07ad487b036add8760dabcc35666a550ef.

http://bugzilla.kernel.org/show_bug.cgi?id=9798

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: "DEBUG" needs to be defined earlier
Márton Németh [Thu, 24 Jan 2008 03:34:09 +0000 (22:34 -0500)]
ACPI: EC: "DEBUG" needs to be defined earlier

The "DEBUG" symbol needs to be defined before #including <linux/kernel.h> to
get the pr_debug() working.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>