[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H4ORNqMYh0maxkyZFjEn5HgC7vZHUZD8GicOn7pkN8C4g@mail.gmail.com>
Date: Tue, 29 Aug 2023 12:11:42 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, Qing Zhang <zhangqing@...ngson.cn>,
Hui Li <lihui@...ngson.cn>,
Binbin Zhou <zhoubinbin@...ngson.cn>,
WANG Xuerui <kernel@...0n.name>, loongarch@...ts.linux.dev
Subject: Re: [PATCH 2/2] Loongarch: KGDB: fix build when CPU_HAS_LBT not set
Hi, Randy,
On Tue, Aug 29, 2023 at 8:23 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> Fix build errors when CONFIG_CPU_HAS_LBT is not set:
>
> loongarch64-linux-ld: arch/loongarch/kernel/kgdb.o: in function `dbg_get_reg':
> arch/loongarch/kernel/kgdb.c:154:(.text+0xc7c): undefined reference to `_save_lbt'
> loongarch64-linux-ld: arch/loongarch/kernel/kgdb.o: in function `dbg_set_reg':
> arch/loongarch/kernel/kgdb.c:229:(.text+0x13a4): undefined reference to `_restore_lbt'
Thank you for your patch, this has been fixed in today's linux-next.
Huacai
>
> Fixes: 8968eb010689 ("LoongArch: Add basic KGDB & KDB support")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Qing Zhang <zhangqing@...ngson.cn>
> Cc: Hui Li <lihui@...ngson.cn>
> Cc: Binbin Zhou <zhoubinbin@...ngson.cn>
> Cc: Huacai Chen <chenhuacai@...nel.org>
> Cc: WANG Xuerui <kernel@...0n.name>
> Cc: loongarch@...ts.linux.dev
> ---
> arch/loongarch/kernel/kgdb.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> 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
> @@ -150,7 +150,8 @@ char *dbg_get_reg(int regno, void *mem,
> }
>
> /* Handle LBT registers */
> - if ((regs->csr_euen & CSR_EUEN_LBTEN)) {
> + if (IS_ENABLED(CONFIG_CPU_HAS_LBT) &&
> + (regs->csr_euen & CSR_EUEN_LBTEN)) {
> _save_lbt(¤t->thread.lbt);
>
> switch (regno) {
> @@ -211,7 +212,8 @@ int dbg_set_reg(int regno, void *mem, st
> }
>
> /* Handle LBT registers */
> - if ((regs->csr_euen & CSR_EUEN_LBTEN)) {
> + if (IS_ENABLED(CONFIG_CPU_HAS_LBT) &&
> + (regs->csr_euen & CSR_EUEN_LBTEN)) {
> switch (regno) {
> case DBG_FTOP: /* Process the ftop */
> memcpy((char *)¤t->thread.fpu.ftop, mem, reg_size);
Powered by blists - more mailing lists