[ewg] backport for kernel.h (upper_32_bits macro)

Glenn Streiff gstreiff at NetEffect.com
Sun Jan 20 19:28:05 PST 2008


> 
> So for a typical kernel.h backport file, I'm proposing:
> 

Hmm...forgot to #define BACKPORT_KERNEL_H_2_6_22.  Try this:

diff --git a/kernel_addons/backport/2.6.9_U6/include/linux/kernel.h b/kernel_addons/backport/2.6.9_U6/include/linux/kernel.h
index 110ecdf..1e302e8 100644
--- a/kernel_addons/backport/2.6.9_U6/include/linux/kernel.h
+++ b/kernel_addons/backport/2.6.9_U6/include/linux/kernel.h
@@ -1,7 +1,14 @@
+#ifndef BACKPORT_KERNEL_H_2_6_22
+#define BACKPORT_KERNEL_H_2_6_22
+
+#include_next <linux/kernel.h>
+
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+
+#endif
 #ifndef BACKPORT_KERNEL_H_2_6_18
 #define BACKPORT_KERNEL_H_2_6_18

-#include_next <linux/kernel.h>
 #include <linux/log2.h>

 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))


Looks like I need to run this through ofed_makedist.sh as well.

Regards,

Glenn



More information about the ewg mailing list