<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/firmware_class.c, branch linux-2.6.34.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-08-02T17:30:14+00:00</updated>
<entry>
<title>firmware_class: fix memory leak - free allocated pages</title>
<updated>2010-08-02T17:30:14+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2010-05-02T08:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9117b65d6f906775a52ed54c53b6039e59124a2d'/>
<id>urn:sha1:9117b65d6f906775a52ed54c53b6039e59124a2d</id>
<content type='text'>
commit dd336c554d8926c3348a2d5f2a5ef5597f6d1a06 upstream.

fix memory leak introduced by the patch 6e03a201bbe:
firmware: speed up request_firmware()

1. vfree won't release pages there were allocated explicitly and mapped
using vmap. The memory has to be vunmap-ed and the pages needs
to be freed explicitly

2. page array is moved into the 'struct
firmware' so that we can free it from release_firmware()
and not only in fw_dev_release()

The fix doesn't break the firmware load speed.

Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Ming Lei &lt;tom.leiming@gmail.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Singed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>driver-core: fix missing kernel-doc in firmware_class</title>
<updated>2010-03-19T14:12:16+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2010-03-10T19:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e59817bf089a3893e05a059026c668fb65f8c748'/>
<id>urn:sha1:e59817bf089a3893e05a059026c668fb65f8c748</id>
<content type='text'>
Fix kernel-doc warning in firmware_class.c:

Warning(drivers/base/firmware_class.c:94): No description found for parameter 'attr'

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: use sysfs_bin_attr_init in firmware class driver</title>
<updated>2010-03-19T14:12:10+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2010-03-09T18:30:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1955ca0ee55286cbc65a8ed7471d540ae83dac8'/>
<id>urn:sha1:e1955ca0ee55286cbc65a8ed7471d540ae83dac8</id>
<content type='text'>
Annotate dynamic sysfs attribute in fw_setup_device(). This gets
rid of the following lockdep warning:

bnx2 0000:08:00.0: firmware: requesting bnx2/bnx2-mips-06-5.0.0.j6.fw
BUG: key ffff880008293470 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x562/0x620()
Modules linked in: bnx2(+) sg tpm_bios floppy rtc_lib usb_storage i2c_piix4 joydev button container shpchp i2c_core sr_mod cdrom pci_hotplug usbhid hid ohci_hcd ehci_hcd sd_mod usbcore edd ext3 mbcache jbd fan ata_generic sata_svw pata_serverworks libata scsi_mod thermal processor
Pid: 1915, comm: work_for_cpu Not tainted 2.6.34-rc1-default #81
Call Trace:
 [&lt;ffffffff8107c1d2&gt;] ? lockdep_init_map+0x562/0x620
 [&lt;ffffffff81049fd8&gt;] warn_slowpath_common+0x78/0xd0
 [&lt;ffffffff8104a03f&gt;] warn_slowpath_null+0xf/0x20
 [&lt;ffffffff8107c1d2&gt;] lockdep_init_map+0x562/0x620
 [&lt;ffffffff8117a236&gt;] ? sysfs_new_dirent+0x76/0x120
 [&lt;ffffffff8126edb2&gt;] ? put_device+0x12/0x20
 [&lt;ffffffff811797cc&gt;] sysfs_add_file_mode+0x6c/0xd0
 [&lt;ffffffff8117983c&gt;] sysfs_add_file+0xc/0x10
 [&lt;ffffffff8117bf61&gt;] sysfs_create_bin_file+0x21/0x30
 [&lt;ffffffff81279c61&gt;] _request_firmware+0x2f1/0x650
 [&lt;ffffffff8127a04e&gt;] request_firmware+0xe/0x10
 [&lt;ffffffffa01ec19e&gt;] bnx2_init_one+0x8f5/0x177e [bnx2]
 [&lt;ffffffff81389eab&gt;] ? _raw_spin_unlock_irq+0x2b/0x40
 [&lt;ffffffff81040ed9&gt;] ? finish_task_switch+0x69/0x100
 [&lt;ffffffff81040e70&gt;] ? finish_task_switch+0x0/0x100
 [&lt;ffffffff81064b40&gt;] ? do_work_for_cpu+0x0/0x30
 [&lt;ffffffff811e6302&gt;] local_pci_probe+0x12/0x20
 [&lt;ffffffff81064b53&gt;] do_work_for_cpu+0x13/0x30
 [&lt;ffffffff81064b40&gt;] ? do_work_for_cpu+0x0/0x30
 [&lt;ffffffff81068c56&gt;] kthread+0x96/0xa0
 [&lt;ffffffff81003e64&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff8138a350&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff81068bc0&gt;] ? kthread+0x0/0xa0
 [&lt;ffffffff81003e60&gt;] ? kernel_thread_helper+0x0/0x10
---[ end trace a2ecee9c9602d195 ]---

Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>Driver core: Fix first line of kernel-doc for a few functions</title>
<updated>2010-03-08T01:04:51+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2010-02-14T14:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c31f07ad0dab02fe17195d32a965d57fd947707'/>
<id>urn:sha1:3c31f07ad0dab02fe17195d32a965d57fd947707</id>
<content type='text'>
The function name must be followed by a space, hypen, space, and a
short description.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver-core: firmware_class: remove base.h header inclusion</title>
<updated>2010-03-08T01:04:49+00:00</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>lrodriguez@atheros.com</email>
</author>
<published>2010-01-14T02:18:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=985fc176a6c03836454629be2f2a611ccc7c7002'/>
<id>urn:sha1:985fc176a6c03836454629be2f2a611ccc7c7002</id>
<content type='text'>
base.h is used by base drivers for sharing internal structures.
Turns out firmware_class does not depend on it at all so remove it.

Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Luis R. Rodriguez &lt;lrodriguez@atheros.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver-core: Add attribute argument to class_attribute show/store</title>
<updated>2010-03-08T01:04:48+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-05T11:48:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28812fe11a21826ba4c97c6c7971a619987cd912'/>
<id>urn:sha1:28812fe11a21826ba4c97c6c7971a619987cd912</id>
<content type='text'>
Passing the attribute to the low level IO functions allows all kinds
of cleanups, by sharing low level IO code without requiring
an own function for every piece of data.

Also drivers can extend the attributes with own data fields
and use that in the low level function.

This makes the class attributes the same as sysdev_class attributes
and plain attributes.

This will allow further cleanups in drivers.

Full tree sweep converting all users.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware_class: make request_firmware_nowait more useful</title>
<updated>2009-12-11T19:24:52+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2009-10-29T11:36:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ebfbd45f9d4ee9cd72529cf99e5f300eb398e67'/>
<id>urn:sha1:9ebfbd45f9d4ee9cd72529cf99e5f300eb398e67</id>
<content type='text'>
Unfortunately, one cannot hold on to the struct firmware
that request_firmware_nowait() hands off, which is needed
in some cases. Allow this by requiring the callback to
free it (via release_firmware).

Additionally, give it a gfp_t parameter -- all the current
users call it from a GFP_KERNEL context so the GFP_ATOMIC
isn't necessary. This also marks an API break which is
useful in a sense, although that is obviously not the
primary purpose of this change.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Ming Lei &lt;tom.leiming@gmail.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Cc: Pavel Roskin &lt;proski@gnu.org&gt;
Cc: Abhay Salunke &lt;abhay_salunke@dell.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: firmware_class:fix memory leak of page pointers array</title>
<updated>2009-07-28T20:45:22+00:00</updated>
<author>
<name>Ming Lei</name>
<email>tom.leiming@gmail.com</email>
</author>
<published>2009-07-11T03:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b4418c67a70278964b063b5e1f56dcb3d0a41f3'/>
<id>urn:sha1:3b4418c67a70278964b063b5e1f56dcb3d0a41f3</id>
<content type='text'>
The page pointers array is allocated in fw_realloc_buffer() called by
firmware_data_write(), and should be freed in release function of firmware
device.

Signed-off-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Firmware: firmware_class, fix lock imbalance</title>
<updated>2009-07-12T20:02:10+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-06-21T21:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=308975fa7ab2a8e0b91186158128668c823790ce'/>
<id>urn:sha1:308975fa7ab2a8e0b91186158128668c823790ce</id>
<content type='text'>
Add omitted unlock in firmware_data_read.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
