Re: [bisected] kernel panic 2.6.22 -> 2.6.26-rc9+

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Sunday, July 13, 2008 - 11:22 am

On Sun, 13 Jul 2008 12:48:15 +0200 Krzysztof Halasa <khc@pm.waw.pl> wrote:


Ah.


I'd sugget something like this.  Can you test, please?

--- a/include/asm-arm/bitops.h~a
+++ a/include/asm-arm/bitops.h
@@ -277,9 +277,16 @@ static inline int constant_fls(int x)
  * the clz instruction for much better code efficiency.
  */
 
-#define fls(x) \
+#define __fls(x) \
 	( __builtin_constant_p(x) ? constant_fls(x) : \
 	  ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
+
+/* Implement fls() in C so that 64-bit args are suitably truncated */
+static inline int fls(int x)
+{
+	return __fls(x);
+}
+
 #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
 #define __ffs(x) (ffs(x) - 1)
 #define ffz(x) __ffs( ~(x) )
_

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Krzysztof Halasa, (Sat Jul 12, 5:28 pm)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Andrew Morton, (Sun Jul 13, 1:31 am)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Krzysztof Halasa, (Sun Jul 13, 3:48 am)
Re: [bisected] kernel panic 2.6.22 -> 2.6.26-rc9+, Andrew Morton, (Sun Jul 13, 11:22 am)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Krzysztof Halasa, (Sun Jul 13, 2:51 pm)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Andrew Morton, (Sun Jul 13, 2:55 pm)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Willy Tarreau, (Tue Jul 22, 9:52 pm)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Andrew Morton, (Tue Jul 22, 10:00 pm)
Re: [bisected] kernel panic 2.6.22 -&gt; 2.6.26-rc9+, Willy Tarreau, (Tue Jul 22, 10:06 pm)