Skip to content

Commit

Permalink
microblaze: Fix GDB issue caused by cache issue
Browse files Browse the repository at this point in the history
Used the same solution as SH. Changed len to PAGE_SIZE
in copy_to_user_page macro.

Implement flush_cache_page macro.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent cd34157 commit a706729
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions arch/microblaze/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ do { \
#define flush_cache_vmap(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)

#define flush_cache_page(vma, vmaddr, pfn) \
flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE);

/* MS: kgdb code use this macro, wrong len with FLASH */
#if 0
Expand All @@ -104,9 +106,13 @@ do { \
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
do { \
u32 addr = virt_to_phys(dst); \
invalidate_icache_range((unsigned) (addr), (unsigned) (addr) + (len));\
memcpy((dst), (src), (len)); \
flush_dcache_range((unsigned) (addr), (unsigned) (addr) + (len));\
if (vma->vm_flags & VM_EXEC) { \
invalidate_icache_range((unsigned) (addr), \
(unsigned) (addr) + PAGE_SIZE); \
flush_dcache_range((unsigned) (addr), \
(unsigned) (addr) + PAGE_SIZE); \
} \
} while (0)

#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
Expand Down

0 comments on commit a706729

Please sign in to comment.