From: Paul Mundt Date: Wed, 11 Apr 2012 01:48:24 +0000 (+0900) Subject: sh: kgdb: Unset CACHE_FLUSH_IS_SAFE for SMP. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=21cb20d758254e68a369ba83c721f8ce083e6659;p=linux-beck.git sh: kgdb: Unset CACHE_FLUSH_IS_SAFE for SMP. Our SMP cache flush ops use CPU cross calls to deal with things like I-cache accesses not being broadcast in hardware, so ensure that the CACHE_FLUSH_IS_SAFE reflects this. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/include/asm/kgdb.h b/arch/sh/include/asm/kgdb.h index 00485198f598..9e7d2d1b03e0 100644 --- a/arch/sh/include/asm/kgdb.h +++ b/arch/sh/include/asm/kgdb.h @@ -23,10 +23,15 @@ static inline void arch_kgdb_breakpoint(void) __asm__ __volatile__ ("trapa #0x3c\n"); } -#define BUFMAX 2048 - -#define CACHE_FLUSH_IS_SAFE 1 #define BREAK_INSTR_SIZE 2 +#define BUFMAX 2048 + +#ifdef CONFIG_SMP +# define CACHE_FLUSH_IS_SAFE 0 +#else +# define CACHE_FLUSH_IS_SAFE 1 +#endif + #define GDB_ADJUSTS_BREAK_OFFSET #endif /* __ASM_SH_KGDB_H */