[PATCH 1/2] Loongarch: KGDB: fix implicit declaration of flush_icache_range()

From: Randy Dunlap
Date: Mon Aug 28 2023 - 20:25:51 EST


Add <asm/cacheflush.h> to prevent a build error:

arch/loongarch/kernel/kgdb.c: In function 'do_single_step':
arch/loongarch/kernel/kgdb.c:440:9: error: implicit declaration of function 'flush_icache_range' [-Werror=implicit-function-declaration]
440 | flush_icache_range(addr, addr + BREAK_INSTR_SIZE);

Fixes: 8968eb010689 ("LoongArch: Add basic KGDB & KDB support")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Qing Zhang <zhangqing@xxxxxxxxxxx>
Cc: Hui Li <lihui@xxxxxxxxxxx>
Cc: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
Cc: Huacai Chen <chenhuacai@xxxxxxxxxx>
Cc: WANG Xuerui <kernel@xxxxxxxxxx>
Cc: loongarch@xxxxxxxxxxxxxxx
---
arch/loongarch/kernel/kgdb.c | 1 +
1 file changed, 1 insertion(+)

diff -- a/arch/loongarch/kernel/kgdb.c b/arch/loongarch/kernel/kgdb.c
--- a/arch/loongarch/kernel/kgdb.c
+++ b/arch/loongarch/kernel/kgdb.c
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/smp.h>

+#include <asm/cacheflush.h>
#include <asm/fpu.h>
#include <asm/lbt.h>
#include <asm/hw_breakpoint.h>