patch-2.2.18 linux/include/asm-arm/page.h

Next file: linux/include/asm-arm/proc-armo/assembler.h
Previous file: linux/include/asm-arm/memc.h
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/asm-arm/page.h linux/include/asm-arm/page.h
@@ -19,4 +19,17 @@
 /* void *__va(unsigned long x) */
 #define __va(x)			((void *)(__phys_to_virt((unsigned long)(x))))
 
+extern __inline__ int get_order(unsigned long size)
+{
+        int order;
+
+        size = (size-1) >> (PAGE_SHIFT-1);
+        order = -1;
+        do {
+                size >>= 1;
+                order++;
+        } while (size);
+        return order;
+}
+
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)