Commit 1dc735bd authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

Pull microblaze fixes from Michal Simek:
 "One is fixing warning reported by sparse and the second warning was
  reported by Geert in his build regressions/improvements status update
  for -rc4."

* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Use static inline functions in cacheflush.h
  microblaze: Fix sparse warnings
parents 042dd60c 62bc82a8
...@@ -102,21 +102,23 @@ do { \ ...@@ -102,21 +102,23 @@ do { \
#define flush_cache_range(vma, start, len) do { } while (0) #define flush_cache_range(vma, start, len) do { } while (0)
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ static inline void copy_to_user_page(struct vm_area_struct *vma,
do { \ struct page *page, unsigned long vaddr,
u32 addr = virt_to_phys(dst); \ void *dst, void *src, int len)
memcpy((dst), (src), (len)); \ {
if (vma->vm_flags & VM_EXEC) { \ u32 addr = virt_to_phys(dst);
invalidate_icache_range((unsigned) (addr), \ memcpy(dst, src, len);
(unsigned) (addr) + PAGE_SIZE); \ if (vma->vm_flags & VM_EXEC) {
flush_dcache_range((unsigned) (addr), \ invalidate_icache_range(addr, addr + PAGE_SIZE);
(unsigned) (addr) + PAGE_SIZE); \ flush_dcache_range(addr, addr + PAGE_SIZE);
} \ }
} while (0) }
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ static inline void copy_from_user_page(struct vm_area_struct *vma,
do { \ struct page *page, unsigned long vaddr,
memcpy((dst), (src), (len)); \ void *dst, void *src, int len)
} while (0) {
memcpy(dst, src, len);
}
#endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */ #endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */
...@@ -99,13 +99,13 @@ static inline int access_ok(int type, const void __user *addr, ...@@ -99,13 +99,13 @@ static inline int access_ok(int type, const void __user *addr,
if ((get_fs().seg < ((unsigned long)addr)) || if ((get_fs().seg < ((unsigned long)addr)) ||
(get_fs().seg < ((unsigned long)addr + size - 1))) { (get_fs().seg < ((unsigned long)addr + size - 1))) {
pr_debug("ACCESS fail: %s at 0x%08x (size 0x%x), seg 0x%08x\n", pr_debug("ACCESS fail: %s at 0x%08x (size 0x%x), seg 0x%08x\n",
type ? "WRITE" : "READ ", (u32)addr, (u32)size, type ? "WRITE" : "READ ", (__force u32)addr, (u32)size,
(u32)get_fs().seg); (u32)get_fs().seg);
return 0; return 0;
} }
ok: ok:
pr_debug("ACCESS OK: %s at 0x%08x (size 0x%x), seg 0x%08x\n", pr_debug("ACCESS OK: %s at 0x%08x (size 0x%x), seg 0x%08x\n",
type ? "WRITE" : "READ ", (u32)addr, (u32)size, type ? "WRITE" : "READ ", (__force u32)addr, (u32)size,
(u32)get_fs().seg); (u32)get_fs().seg);
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment