aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
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-m68knommu
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-m68knommu')
-rw-r--r--include/asm-m68knommu/page.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h
index ff6a9265ed1c..942dfbead27f 100644
--- a/include/asm-m68knommu/page.h
+++ b/include/asm-m68knommu/page.h
@@ -48,20 +48,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
48/* to align the pointer to the (next) page boundary */ 48/* to align the pointer to the (next) page boundary */
49#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) 49#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
50 50
51/* Pure 2^n version of get_order */
52extern __inline__ int get_order(unsigned long size)
53{
54 int order;
55
56 size = (size-1) >> (PAGE_SHIFT-1);
57 order = -1;
58 do {
59 size >>= 1;
60 order++;
61 } while (size);
62 return order;
63}
64
65extern unsigned long memory_start; 51extern unsigned long memory_start;
66extern unsigned long memory_end; 52extern unsigned long memory_end;
67 53
@@ -93,4 +79,6 @@ extern unsigned long memory_end;
93 79
94#endif /* __KERNEL__ */ 80#endif /* __KERNEL__ */
95 81
82#include <asm-generic/page.h>
83
96#endif /* _M68KNOMMU_PAGE_H */ 84#endif /* _M68KNOMMU_PAGE_H */