From: Daniel Thompson <daniel.thompson@linaro.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Arnd Bergmann <arnd@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Paul Cercueil <paul@crapouillou.net>,
Paul Burton <paulburton@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] MIPS: make kgdb depend on FPU support
Date: Wed, 10 Feb 2021 11:38:30 +0000 [thread overview]
Message-ID: <20210210113830.xeechzpctz5repv5@maple.lan> (raw)
In-Reply-To: <alpine.DEB.2.21.2102081748280.35623@angie.orcam.me.uk>
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@arndb.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.
next prev parent reply other threads:[~2021-02-10 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 11:02 [PATCH 1/2] MIPS: jazz: always allow little-endian builds Arnd Bergmann
2021-01-22 11:02 ` [PATCH 2/2] MIPS: make kgdb depend on FPU support Arnd Bergmann
2021-01-22 13:06 ` Thomas Bogendoerfer
2021-02-08 17:03 ` Maciej W. Rozycki
2021-02-10 11:38 ` Daniel Thompson [this message]
2021-02-10 12:11 ` Maciej W. Rozycki
2021-02-10 12:29 ` Daniel Thompson
2021-02-10 14:15 ` Maciej W. Rozycki
2021-02-10 17:05 ` Daniel Thompson
2021-01-22 13:05 ` [PATCH 1/2] MIPS: jazz: always allow little-endian builds Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210210113830.xeechzpctz5repv5@maple.lan \
--to=daniel.thompson@linaro.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=lkp@intel.com \
--cc=macro@orcam.me.uk \
--cc=paul@crapouillou.net \
--cc=paulburton@kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.