<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/lib, branch v2.6.20.21</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Kconfig: FAULT_INJECTION can be selected only if LOCKDEP is enabled.</title>
<updated>2007-03-09T18:50:21+00:00</updated>
<author>
<name>Paolo 'Blaisorblade' Giarrusso</name>
<email>blaisorblade@yahoo.it</email>
</author>
<published>2007-02-10T16:45:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7df8c214f25f15a352326ed9e7bcf6debb2f6fa3'/>
<id>7df8c214f25f15a352326ed9e7bcf6debb2f6fa3</id>
<content type='text'>
There is no prompt for STACKTRACE, so it is enabled only when 'select'ed.
FAULT_INJECTION depends on it, while LOCKDEP selects it. So FAULT_INJECTION
becomes visible in Kconfig only when LOCKDEP is enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no prompt for STACKTRACE, so it is enabled only when 'select'ed.
FAULT_INJECTION depends on it, while LOCKDEP selects it. So FAULT_INJECTION
becomes visible in Kconfig only when LOCKDEP is enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Missing critical phys_to_virt in lib/swiotlb.c</title>
<updated>2007-03-09T18:50:19+00:00</updated>
<author>
<name>David Moore</name>
<email>dcm@acm.org</email>
</author>
<published>2007-02-04T18:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e16b67f9a0ac6d9f89f680b7f3b439abfb1dac5e'/>
<id>e16b67f9a0ac6d9f89f680b7f3b439abfb1dac5e</id>
<content type='text'>
Missing critical phys_to_virt in lib/swiotlb.c

Adds missing call to phys_to_virt() in the
lib/swiotlb.c:swiotlb_sync_sg() function.  Without this change, a kernel
panic will always occur whenever a SWIOTLB bounce buffer from a
scatter-gather list gets synced.  Affected are especially Intel x86_64
machines with more than about 3 GB RAM.

Signed-off-by: David Moore &lt;dcm@acm.org&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Missing critical phys_to_virt in lib/swiotlb.c

Adds missing call to phys_to_virt() in the
lib/swiotlb.c:swiotlb_sync_sg() function.  Without this change, a kernel
panic will always occur whenever a SWIOTLB bounce buffer from a
scatter-gather list gets synced.  Affected are especially Intel x86_64
machines with more than about 3 GB RAM.

Signed-off-by: David Moore &lt;dcm@acm.org&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kobject: kobject_uevent() returns manageable value</title>
<updated>2006-12-20T18:56:44+00:00</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@gmail.com</email>
</author>
<published>2006-12-19T21:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=542cfce6f36e8c43f71ae9c235b78497f350ae55'/>
<id>542cfce6f36e8c43f71ae9c235b78497f350ae55</id>
<content type='text'>
Since kobject_uevent() function does not return an integer value to
indicate if its operation was completed with success or not, it is worth
changing it in order to report a proper status (success or error) instead
of returning void.

[randy.dunlap@oracle.com: Fix inline kobject functions]
Cc: Mauricio Lin &lt;mauriciolin@gmail.com&gt;
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@gmail.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since kobject_uevent() function does not return an integer value to
indicate if its operation was completed with success or not, it is worth
changing it in order to report a proper status (success or error) instead
of returning void.

[randy.dunlap@oracle.com: Fix inline kobject functions]
Cc: Mauricio Lin &lt;mauriciolin@gmail.com&gt;
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@gmail.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kref refcnt and false positives</title>
<updated>2006-12-20T18:56:43+00:00</updated>
<author>
<name>Venkatesh Pallipadi</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2006-12-19T21:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f334b60b43a0927f4ab1187cbdb4582f5227c3b1'/>
<id>f334b60b43a0927f4ab1187cbdb4582f5227c3b1</id>
<content type='text'>
With WARN_ON addition to kobject_init()
[ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/dont-use/broken-out/gregkh-driver-kobject-warn.patch ]

I started seeing following WARNING on CPU offline followed by online on my
x86_64 system.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [&lt;ffffffff8020ab45&gt;] dump_trace+0xaa/0x3ef
 [&lt;ffffffff8020aec4&gt;] show_trace+0x3a/0x50
 [&lt;ffffffff8020b0f6&gt;] dump_stack+0x15/0x17
 [&lt;ffffffff80350abc&gt;] kobject_init+0x3f/0x8a
 [&lt;ffffffff80350be1&gt;] kobject_register+0x1a/0x3e
 [&lt;ffffffff803bbd89&gt;] sysdev_register+0x5b/0xf9
 [&lt;ffffffff80211d0b&gt;] mce_create_device+0x77/0xf4
 [&lt;ffffffff80211dc2&gt;] mce_cpu_callback+0x3a/0xe5
 [&lt;ffffffff805632fd&gt;] notifier_call_chain+0x26/0x3b
 [&lt;ffffffff8023f6f3&gt;] raw_notifier_call_chain+0x9/0xb
 [&lt;ffffffff802519bf&gt;] _cpu_up+0xb4/0xdc
 [&lt;ffffffff80251a12&gt;] cpu_up+0x2b/0x42
 [&lt;ffffffff803bef00&gt;] store_online+0x4a/0x72
 [&lt;ffffffff803bb6ce&gt;] sysdev_store+0x24/0x26
 [&lt;ffffffff802baaa2&gt;] sysfs_write_file+0xcf/0xfc
 [&lt;ffffffff8027fc6f&gt;] vfs_write+0xae/0x154
 [&lt;ffffffff80280418&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8020963e&gt;] system_call+0x7e/0x83
DWARF2 unwinder stuck at system_call+0x7e/0x83
Leftover inexact backtrace:

This is a false positive as mce.c is unregistering/registering sysfs
interfaces cleanly on hotplug.

kref_put() and conditional decrement of refcnt seems to be the root cause
for this and the patch below resolves the issue for me.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With WARN_ON addition to kobject_init()
[ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/dont-use/broken-out/gregkh-driver-kobject-warn.patch ]

I started seeing following WARNING on CPU offline followed by online on my
x86_64 system.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [&lt;ffffffff8020ab45&gt;] dump_trace+0xaa/0x3ef
 [&lt;ffffffff8020aec4&gt;] show_trace+0x3a/0x50
 [&lt;ffffffff8020b0f6&gt;] dump_stack+0x15/0x17
 [&lt;ffffffff80350abc&gt;] kobject_init+0x3f/0x8a
 [&lt;ffffffff80350be1&gt;] kobject_register+0x1a/0x3e
 [&lt;ffffffff803bbd89&gt;] sysdev_register+0x5b/0xf9
 [&lt;ffffffff80211d0b&gt;] mce_create_device+0x77/0xf4
 [&lt;ffffffff80211dc2&gt;] mce_cpu_callback+0x3a/0xe5
 [&lt;ffffffff805632fd&gt;] notifier_call_chain+0x26/0x3b
 [&lt;ffffffff8023f6f3&gt;] raw_notifier_call_chain+0x9/0xb
 [&lt;ffffffff802519bf&gt;] _cpu_up+0xb4/0xdc
 [&lt;ffffffff80251a12&gt;] cpu_up+0x2b/0x42
 [&lt;ffffffff803bef00&gt;] store_online+0x4a/0x72
 [&lt;ffffffff803bb6ce&gt;] sysdev_store+0x24/0x26
 [&lt;ffffffff802baaa2&gt;] sysfs_write_file+0xcf/0xfc
 [&lt;ffffffff8027fc6f&gt;] vfs_write+0xae/0x154
 [&lt;ffffffff80280418&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8020963e&gt;] system_call+0x7e/0x83
DWARF2 unwinder stuck at system_call+0x7e/0x83
Leftover inexact backtrace:

This is a false positive as mce.c is unregistering/registering sysfs
interfaces cleanly on hotplug.

kref_put() and conditional decrement of refcnt seems to be the root cause
for this and the patch below resolves the issue for me.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Remove stack unwinder for now</title>
<updated>2006-12-15T16:47:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.osdl.org</email>
</author>
<published>2006-12-15T16:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1526e2cda64d5a1de56aef50bad9e5df14245c2'/>
<id>d1526e2cda64d5a1de56aef50bad9e5df14245c2</id>
<content type='text'>
It has caused more problems than it ever really solved, and is
apparently not getting cleaned up and fixed.  We can put it back when
it's stable and isn't likely to make warning or bug events worse.

In the meantime, enable frame pointers for more readable stack traces.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It has caused more problems than it ever really solved, and is
apparently not getting cleaned up and fixed.  We can put it back when
it's stable and isn't likely to make warning or bug events worse.

In the meantime, enable frame pointers for more readable stack traces.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] uml problems with linux/io.h</title>
<updated>2006-12-13T17:05:52+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2006-12-13T08:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ee36c2bf8edb1c3e3855a928b348d29c6359093d'/>
<id>ee36c2bf8edb1c3e3855a928b348d29c6359093d</id>
<content type='text'>
Remove useless includes of linux/io.h, don't even try to build iomap_copy
on uml (it doesn't have readb() et.al., so...)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove useless includes of linux/io.h, don't even try to build iomap_copy
on uml (it doesn't have readb() et.al., so...)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] SLAB: use a multiply instead of a divide in obj_to_index()</title>
<updated>2006-12-13T17:05:49+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2006-12-13T08:34:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a2d7a955d8de6cb19ed9cd194b3c83008a22c32'/>
<id>6a2d7a955d8de6cb19ed9cd194b3c83008a22c32</id>
<content type='text'>
When some objects are allocated by one CPU but freed by another CPU we can
consume lot of cycles doing divides in obj_to_index().

(Typical load on a dual processor machine where network interrupts are
handled by one particular CPU (allocating skbufs), and the other CPU is
running the application (consuming and freeing skbufs))

Here on one production server (dual-core AMD Opteron 285), I noticed this
divide took 1.20 % of CPU_CLK_UNHALTED events in kernel.  But Opteron are
quite modern cpus and the divide is much more expensive on oldest
architectures :

On a 200 MHz sparcv9 machine, the division takes 64 cycles instead of 1
cycle for a multiply.

Doing some math, we can use a reciprocal multiplication instead of a divide.

If we want to compute V = (A / B)  (A and B being u32 quantities)
we can instead use :

V = ((u64)A * RECIPROCAL(B)) &gt;&gt; 32 ;

where RECIPROCAL(B) is precalculated to ((1LL &lt;&lt; 32) + (B - 1)) / B

Note :

I wrote pure C code for clarity. gcc output for i386 is not optimal but
acceptable :

mull   0x14(%ebx)
mov    %edx,%eax // part of the &gt;&gt; 32
xor     %edx,%edx // useless
mov    %eax,(%esp) // could be avoided
mov    %edx,0x4(%esp) // useless
mov    (%esp),%ebx

[akpm@osdl.org: small cleanups]
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When some objects are allocated by one CPU but freed by another CPU we can
consume lot of cycles doing divides in obj_to_index().

(Typical load on a dual processor machine where network interrupts are
handled by one particular CPU (allocating skbufs), and the other CPU is
running the application (consuming and freeing skbufs))

Here on one production server (dual-core AMD Opteron 285), I noticed this
divide took 1.20 % of CPU_CLK_UNHALTED events in kernel.  But Opteron are
quite modern cpus and the divide is much more expensive on oldest
architectures :

On a 200 MHz sparcv9 machine, the division takes 64 cycles instead of 1
cycle for a multiply.

Doing some math, we can use a reciprocal multiplication instead of a divide.

If we want to compute V = (A / B)  (A and B being u32 quantities)
we can instead use :

V = ((u64)A * RECIPROCAL(B)) &gt;&gt; 32 ;

where RECIPROCAL(B) is precalculated to ((1LL &lt;&lt; 32) + (B - 1)) / B

Note :

I wrote pure C code for clarity. gcc output for i386 is not optimal but
acceptable :

mull   0x14(%ebx)
mov    %edx,%eax // part of the &gt;&gt; 32
xor     %edx,%edx // useless
mov    %eax,(%esp) // could be avoided
mov    %edx,0x4(%esp) // useless
mov    (%esp),%ebx

[akpm@osdl.org: small cleanups]
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in new debug options.</title>
<updated>2006-12-12T19:16:36+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2006-12-12T19:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86327d19f7d91270b0bbd06ad4581e2f6fa3bec0'/>
<id>86327d19f7d91270b0bbd06ad4581e2f6fa3bec0</id>
<content type='text'>
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] add MODULE_* attributes to bit reversal library</title>
<updated>2006-12-10T18:07:52+00:00</updated>
<author>
<name>Cal Peake</name>
<email>cp@absolutedigital.net</email>
</author>
<published>2006-12-10T11:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0258736a0a2cde8ab30725b601aeca4cf8bc93ab'/>
<id>0258736a0a2cde8ab30725b601aeca4cf8bc93ab</id>
<content type='text'>
Add MODULE_* attributes to the new bit reversal library. Most notably
MODULE_LICENSE which prevents superfluous kernel tainting.

Signed-off-by: Cal Peake &lt;cp@absolutedigital.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add MODULE_* attributes to the new bit reversal library. Most notably
MODULE_LICENSE which prevents superfluous kernel tainting.

Signed-off-by: Cal Peake &lt;cp@absolutedigital.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Kconfig refactoring for better menu nesting</title>
<updated>2006-12-10T17:55:39+00:00</updated>
<author>
<name>Don Mullis</name>
<email>dwm@meer.net</email>
</author>
<published>2006-12-10T10:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf4735a46a6b8dfc1a951f05683e80374d8baa70'/>
<id>bf4735a46a6b8dfc1a951f05683e80374d8baa70</id>
<content type='text'>
Refactor Kconfig content to maximize nesting of menus by menuconfig and
xconfig.

Tested by simultaneously running `make xconfig` with and without
patch, and comparing displays.

Signed-off-by: Don Mullis &lt;dwm@meer.net&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor Kconfig content to maximize nesting of menus by menuconfig and
xconfig.

Tested by simultaneously running `make xconfig` with and without
patch, and comparing displays.

Signed-off-by: Don Mullis &lt;dwm@meer.net&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
