[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXRGxnGpVHiB+Zvxq+G4K-BL8JsJGbG+7CNtJiqGwHOsQ@mail.gmail.com>
Date: Tue, 3 Oct 2023 14:15:36 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Ding, Shenghao" <shenghao-ding@...com>
Cc: "broonie@...nel.org" <broonie@...nel.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"perex@...ex.cz" <perex@...ex.cz>,
"pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
"Lu, Kevin" <kevin-lu@...com>,
"13916275206@....com" <13916275206@....com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"liam.r.girdwood@...el.com" <liam.r.girdwood@...el.com>,
"mengdong.lin@...el.com" <mengdong.lin@...el.com>,
"Xu, Baojun" <baojun.xu@...com>,
"thomas.gfeller@...rop.com" <thomas.gfeller@...rop.com>,
"Gupta, Peeyush" <peeyush@...com>,
"Navada Kanyana, Mukund" <navada@...com>,
"tiwai@...e.de" <tiwai@...e.de>, Arnd Bergmann <arnd@...db.de>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in m68k
Hi Shenghao,
On Tue, Oct 3, 2023 at 12:47 PM Ding, Shenghao <shenghao-ding@...com> wrote:
> > -----Original Message-----
> > From: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Sent: Tuesday, October 3, 2023 3:24 AM
> > To: Ding, Shenghao <shenghao-ding@...com>
> > Cc: broonie@...nel.org; robh+dt@...nel.org;
> > andriy.shevchenko@...ux.intel.com; lgirdwood@...il.com; perex@...ex.cz;
> > pierre-louis.bossart@...ux.intel.com; Lu, Kevin <kevin-lu@...com>;
> > 13916275206@....com; alsa-devel@...a-project.org; linux-
> > kernel@...r.kernel.org; liam.r.girdwood@...el.com; mengdong.lin@...el.com;
> > Xu, Baojun <baojun.xu@...com>; thomas.gfeller@...rop.com; Gupta, Peeyush
> > <peeyush@...com>; Navada Kanyana, Mukund <navada@...com>;
> > tiwai@...e.de
> > Subject: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in
> > m68k
> >
> > Hi Shenghao,
> >
> > Thanks for your patch!
> >
> > On Mon, Oct 2, 2023 at 4:38 PM Shenghao Ding <shenghao-ding@...com>
> > wrote:
> > > fixed m68k compiling issue: mapping table can save code field; storing
> > > the
> >
> > Please replicate the actual error message from the compiler, so it is recorded in
> > the commit description, and easy to find when someone searches for the actual
> > error message
> >
> > From the Reported-by (which is not included in the actual description, as it is
> > below the "---"):
> >
> > {standard input}: Assembler messages:
> > >> {standard input}:992: Error: value -148 out of range
> > {standard input}:992: Error: value of ffffff6c too large for field of 1 byte at
> > 0000045f
> >
> > > dev_idx as a member of block can reduce unnecessary time and system
> > > resource comsumption of dev_idx mapping every time the block data
> > > writing to the dsp.
> >
> > I am sorry, but I don't understand what this means.
> > Can you please elaborate?
> >
> > Also, can you please explain what the real issue is?
> > (My first guess when seeing the error message before was that a signed
> > integer is truncated to an unsigned char or so, but I couldn't see immediately
> > where that is happening)
> Sorry to late feedback. I had been troubled by this issue for several weeks. At first, I also think it would one of variables overflow, according to the compiling error message. However, after investigation, no result came out. In fact, compiler will report the line number where the variable overflow is, if there was risk on the variable overflow. Yet, this compiling error did not report any line number. Finally, I didn’t realize that it would be the code section overflow until that compiling error message magically disappeared, one day I removed some functions in the tas2781-fwlib.c. So, I began to simplify some functions in the code.
I managed to reproduce the issue with the m68k cross-compiler from
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/
| sound/soc/codecs/tas2781-fmwlib.c:779: switch (block->type) {
subq.l #1,%a0 |, tmp56
moveq #36,%d0 |,
cmp.l %a0,%d0 | tmp56,
jcs .L122 |
move.l %a0,%d0 | tmp56, tmp59
add.l %d0,%d0 | tmp59
move.w .L95(%pc,%d0.l),%d0 |, tmp60
.L125:
| sound/soc/codecs/tas2781-fmwlib.c:827: switch (block->type) {
jmp %pc@(2,%d0:w) | tmp66
.balignw 2,0x284c
.L95:
.word .L109-.L95
.word .L113-.L95
[...]
| sound/soc/codecs/tas2781-fmwlib.c:827: switch (block->type) {
moveq #36,%d0 |,
cmp.l %a0,%d0 | tmp77,
jcs .L122 |
move.l %a0,%d0 | tmp77,
add.l %d0,%d0 |
move.l %d0,%a0 |, tmp65
---> move.w .L95(%pc,%a0.l),%d0 |, tmp66
jra .L125 |
Looks like the compiler is sharing the jump table at L95 for two
different switch() statements, but the PC-relative offset to refer to
the table is too large when using -m68000. It works fine with -m68020.
Probably a compiler bug?
> > > Signed-off-by: Shenghao Ding <shenghao-ding@...com>
> > >
> > > ---
> > > Changes in v1:
> > > - | Reported-by: kernel test robot <lkp@...el.com>
> > > | Closes:
> > > | https://lore.kernel.org/oe-kbuild-all/202309222048.RnSqEIK5-lkp@intel.com/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists