]> git.proxmox.com Git - mirror_spl.git/commitdiff
Changed ptob()/btop() mult/div into bit shifts.
authorRicardo M. Correia <Ricardo.M.Correia@Sun.COM>
Wed, 25 Feb 2009 21:06:15 +0000 (21:06 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 25 Feb 2009 23:50:58 +0000 (15:50 -0800)
Added necessary include for PAGE_SHIFT.

include/sys/param.h

index d6b4f761f3fe64d0f12322a7481cb8deeb2beb52..dbcdb6e9c18f28d5c796e0c014dde9a3af44e35d 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef _SPL_PARAM_H
 #define _SPL_PARAM_H
 
+#include <asm/page.h>
+
 /* Pages to bytes and back */
-#define ptob(pages)                    (pages * PAGE_SIZE)
-#define btop(bytes)                    (bytes / PAGE_SIZE)
+#define ptob(pages)                    (pages << PAGE_SHIFT)
+#define btop(bytes)                    (bytes >> PAGE_SHIFT)
 
 #endif /* SPL_PARAM_H */