[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210210113830.xeechzpctz5repv5@maple.lan>
Date: Wed, 10 Feb 2021 11:38:30 +0000
From: Daniel Thompson <daniel.thompson@...aro.org>
To: "Maciej W. Rozycki" <macro@...am.me.uk>
Cc: Arnd Bergmann <arnd@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Arnd Bergmann <arnd@...db.de>,
kernel test robot <lkp@...el.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Paul Cercueil <paul@...pouillou.net>,
Paul Burton <paulburton@...nel.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] MIPS: make kgdb depend on FPU support
On Mon, Feb 08, 2021 at 06:03:08PM +0100, Maciej W. Rozycki wrote:
> On Fri, 22 Jan 2021, Arnd Bergmann wrote:
>
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > kgdb fails to build when the FPU support is disabled:
> >
> > arch/mips/kernel/kgdb.c: In function 'dbg_set_reg':
> > arch/mips/kernel/kgdb.c:147:35: error: 'struct thread_struct' has no member named 'fpu'
> > 147 | memcpy((void *)¤t->thread.fpu.fcr31, mem,
> > | ^
> > arch/mips/kernel/kgdb.c:155:34: error: 'struct thread_struct' has no member named 'fpu'
> > 155 | memcpy((void *)¤t->thread.fpu.fpr[fp_reg], mem,
> >
> > This is only relevant for CONFIG_EXPERT=y, so disallowing it
> > in Kconfig is an easier workaround than fixing it properly.
>
> Wrapping the relevant parts of this file into #ifdef MIPS_FP_SUPPORT
> would be as easy though and would qualify as a proper fix given that we
> have no XML description support for the MIPS target (so we need to supply
> the inexistent registers in the protocol; or maybe we can return NULL in
> `dbg_get_reg' to get them padded out in the RSP packet, I haven't checked
> if generic KGDB code supports this feature).
Returning NULL should be fine.
The generic code will cope OK. The values in the f.p. registers may
act a little odd if gdb uses a 'G' packet to set them to non-zero values
(since kgdb will cache the values gdb sent it) but the developer
operating the debugger will probably figure out what is going on without
too much pain.
Daniel.
Powered by blists - more mailing lists