aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm26
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-03 18:54:30 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:05:39 -0400
commitfd4fd5aac1282825195c6816ed40a2a6d42db5bf (patch)
tree5908cf4c88a7c9d69ea7bdc1c354d51b6ff47f86 /include/asm-arm26
parent28ae55c98e4d16eac9a05a8a259d7763ef3aeb18 (diff)
[PATCH] mm: consolidate get_order
Someone mentioned that almost all the architectures used basically the same implementation of get_order. This patch consolidates them into asm-generic/page.h and includes that in the appropriate places. The exceptions are ia64 and ppc which have their own (presumably optimised) versions. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-arm26')
-rw-r--r--include/asm-arm26/page.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h
index c334079b082b..d3f23ac4d468 100644
--- a/include/asm-arm26/page.h
+++ b/include/asm-arm26/page.h
@@ -89,20 +89,6 @@ typedef unsigned long pgprot_t;
89#ifdef __KERNEL__ 89#ifdef __KERNEL__
90#ifndef __ASSEMBLY__ 90#ifndef __ASSEMBLY__
91 91
92/* Pure 2^n version of get_order */
93static inline int get_order(unsigned long size)
94{
95 int order;
96
97 size = (size-1) >> (PAGE_SHIFT-1);
98 order = -1;
99 do {
100 size >>= 1;
101 order++;
102 } while (size);
103 return order;
104}
105
106#include <asm/memory.h> 92#include <asm/memory.h>
107 93
108#endif /* !__ASSEMBLY__ */ 94#endif /* !__ASSEMBLY__ */
@@ -112,4 +98,6 @@ static inline int get_order(unsigned long size)
112 98
113#endif /* __KERNEL__ */ 99#endif /* __KERNEL__ */
114 100
101#include <asm-generic/page.h>
102
115#endif 103#endif