git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
asm-m68k
/
page.h
diff --git
a/include/asm-m68k/page.h
b/include/asm-m68k/page.h
index
6b7d6a0
..
3725c9b
100644
(file)
--- a/
include/asm-m68k/page.h
+++ b/
include/asm-m68k/page.h
@@
-52,15
+52,13
@@
static inline void copy_page(void *to, void *from)
static inline void clear_page(void *page)
{
static inline void clear_page(void *page)
{
- unsigned long
data,
tmp;
-
void
*sp = page;
+ unsigned long tmp;
+
unsigned long
*sp = page;
- data = 0;
-
- *((unsigned long *)(page))++ = 0;
- *((unsigned long *)(page))++ = 0;
- *((unsigned long *)(page))++ = 0;
- *((unsigned long *)(page))++ = 0;
+ *sp++ = 0;
+ *sp++ = 0;
+ *sp++ = 0;
+ *sp++ = 0;
__asm__ __volatile__("1:\t"
".chip 68040\n\t"
__asm__ __volatile__("1:\t"
".chip 68040\n\t"
@@
-69,8
+67,8
@@
static inline void clear_page(void *page)
"subqw #8,%2\n\t"
"subqw #8,%2\n\t"
"dbra %1,1b\n\t"
"subqw #8,%2\n\t"
"subqw #8,%2\n\t"
"dbra %1,1b\n\t"
- : "=a" (
page
), "=d" (tmp)
- : "a" (
sp), "0" (page
),
+ : "=a" (
sp
), "=d" (tmp)
+ : "a" (
page), "0" (sp
),
"1" ((PAGE_SIZE - 16) / 16 - 1));
}
"1" ((PAGE_SIZE - 16) / 16 - 1));
}
@@
-109,20
+107,6
@@
typedef struct { unsigned long pgprot; } pgprot_t;
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-/* Pure 2^n version of get_order */
-static 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 /* !__ASSEMBLY__ */
#include <asm/page_offset.h>
#endif /* !__ASSEMBLY__ */
#include <asm/page_offset.h>
@@
-140,13
+124,13
@@
extern unsigned long m68k_memoffset;
#define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset)
#define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset))
#else
#define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset)
#define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset))
#else
-#define __pa(vaddr) virt_to_phys((void *)
vaddr
)
-#define __va(paddr) phys_to_virt((unsigned long)
paddr
)
+#define __pa(vaddr) virt_to_phys((void *)
(vaddr)
)
+#define __va(paddr) phys_to_virt((unsigned long)
(paddr)
)
#endif
#else /* !CONFIG_SUN3 */
/* This #define is a horrible hack to suppress lots of warnings. --m */
#endif
#else /* !CONFIG_SUN3 */
/* This #define is a horrible hack to suppress lots of warnings. --m */
-#define __pa(x) ___pa((unsigned long)
x
)
+#define __pa(x) ___pa((unsigned long)
(x)
)
static inline unsigned long ___pa(unsigned long x)
{
if(x == 0)
static inline unsigned long ___pa(unsigned long x)
{
if(x == 0)
@@
-192,6
+176,10
@@
static inline void *__va(unsigned long x)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+#define devmem_is_allowed(x) 1
+
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
+#include <asm-generic/page.h>
+
#endif /* _M68K_PAGE_H */
#endif /* _M68K_PAGE_H */