]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kgdb: always use icache flush for sw breakpoints
authorJason Wessel <jason.wessel@windriver.com>
Tue, 1 Apr 2008 21:55:28 +0000 (16:55 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 18:05:43 +0000 (20:05 +0200)
On the ppc 4xx architecture the instruction cache must be flushed as
well as the data cache.  This patch just makes it generic for all
architectures where CACHE_FLUSH_IS_SAFE is set to 1.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/kgdb.c

index 4d1b3c232377a7c0e07a6c702d5590fbfd873fbb..1bd0ec1c80b284ec06870bc8bc2b2ce726e27815 100644 (file)
@@ -591,9 +591,9 @@ static void kgdb_flush_swbreak_addr(unsigned long addr)
        if (current->mm && current->mm->mmap_cache) {
                flush_cache_range(current->mm->mmap_cache,
                                  addr, addr + BREAK_INSTR_SIZE);
-       } else {
-               flush_icache_range(addr, addr + BREAK_INSTR_SIZE);
        }
+       /* Force flush instruction cache if it was outside the mm */
+       flush_icache_range(addr, addr + BREAK_INSTR_SIZE);
 }
 
 /*