public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* needs writeback on ptrace
@ 2008-02-15  0:52 Hideo Saito
  2008-02-15  5:29 ` Paul Mundt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hideo Saito @ 2008-02-15  0:52 UTC (permalink / raw)
  To: linux-sh

Hi Paul,

When I test gdb on linux-2.6.24 for SH7780, the gdb can't step the program.
I think inserted breakpoints can't write back to the physical memory.

Following changes is available for this problem.

--- ./arch/sh/mm/pg-sh4.c.org	2008-01-25 07:58:37.000000000 +0900
+++ ./arch/sh/mm/pg-sh4.c	2008-02-06 17:19:58.000000000 +0900
@@ -87,18 +109,21 @@ void copy_to_user_page(struct vm_area_st
 	void *vto;
 
 	__set_bit(PG_mapped, &page->flags);
 
 	vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
 	memcpy(vto, src, len);
 	kunmap_coherent(vto);
 
-	if (vma->vm_flags & VM_EXEC)
-		flush_cache_page(vma, vaddr, page_to_pfn(page));
+	if (vma->vm_flags & VM_EXEC) {
+		extern void __flush_invalidate_region_icache(void *start, int size);
+		__flush_wback_region(vto, len);
+		__flush_invalidate_region_icache(vto, len);
+	}
 }
 
 void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
 			 unsigned long vaddr, void *dst, const void *src,
 			 unsigned long len)
 {
 	void *vfrom;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-15  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15  0:52 needs writeback on ptrace Hideo Saito
2008-02-15  5:29 ` Paul Mundt
2008-02-15  7:40 ` Hideo Saito
2008-02-15  7:56 ` Paul Mundt
2008-02-15  9:10 ` Hideo Saito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox