Re: [PATCH 1/2] Loongarch: KGDB: fix implicit declaration of flush_icache_range()
From: Huacai Chen
Date: Tue Aug 29 2023 - 00:14:07 EST
Hi, Randy,
On Tue, Aug 29, 2023 at 8:23 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> 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);
Thank you for your fixing, this will be included in linux-next.
Huacai
>
> 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>