patch-2.2.18 linux/include/asm-ppc/page.h
Next file: linux/include/asm-ppc/pci-bridge.h
Previous file: linux/include/asm-ppc/nvram.h
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Sat Sep 2 19:33:24 2000
- Orig file:
v2.2.17/include/asm-ppc/page.h
- Orig date:
Sat Sep 9 18:42:50 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/asm-ppc/page.h linux/include/asm-ppc/page.h
@@ -81,6 +81,20 @@
#define MAP_PAGE_RESERVED (1<<15)
extern unsigned long get_zero_page_fast(void);
+
+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 /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _PPC_PAGE_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)