* Re: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in m68k
[not found] ` <79c4d534ad20452c992d8ace138e4384@ti.com>
@ 2023-10-03 12:15 ` Geert Uytterhoeven
2023-10-03 16:23 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-10-03 12:15 UTC (permalink / raw)
To: Ding, Shenghao
Cc: broonie@kernel.org, robh+dt@kernel.org,
andriy.shevchenko@linux.intel.com, lgirdwood@gmail.com,
perex@perex.cz, pierre-louis.bossart@linux.intel.com, Lu, Kevin,
13916275206@139.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com,
mengdong.lin@intel.com, Xu, Baojun, thomas.gfeller@q-drop.com,
Gupta, Peeyush, Navada Kanyana, Mukund, tiwai@suse.de,
Arnd Bergmann, linux-m68k
Hi Shenghao,
On Tue, Oct 3, 2023 at 12:47 PM Ding, Shenghao <shenghao-ding@ti.com> wrote:
> > -----Original Message-----
> > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > Sent: Tuesday, October 3, 2023 3:24 AM
> > To: Ding, Shenghao <shenghao-ding@ti.com>
> > Cc: broonie@kernel.org; robh+dt@kernel.org;
> > andriy.shevchenko@linux.intel.com; lgirdwood@gmail.com; perex@perex.cz;
> > pierre-louis.bossart@linux.intel.com; Lu, Kevin <kevin-lu@ti.com>;
> > 13916275206@139.com; alsa-devel@alsa-project.org; linux-
> > kernel@vger.kernel.org; liam.r.girdwood@intel.com; mengdong.lin@intel.com;
> > Xu, Baojun <baojun.xu@ti.com>; thomas.gfeller@q-drop.com; Gupta, Peeyush
> > <peeyush@ti.com>; Navada Kanyana, Mukund <navada@ti.com>;
> > tiwai@suse.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@ti.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@ti.com>
> > >
> > > ---
> > > Changes in v1:
> > > - | Reported-by: kernel test robot <lkp@intel.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@linux-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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in m68k
2023-10-03 12:15 ` [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in m68k Geert Uytterhoeven
@ 2023-10-03 16:23 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2023-10-03 16:23 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Ding, Shenghao, broonie@kernel.org, robh+dt@kernel.org,
andriy.shevchenko@linux.intel.com, lgirdwood@gmail.com,
perex@perex.cz, pierre-louis.bossart@linux.intel.com, Lu, Kevin,
13916275206@139.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com,
mengdong.lin@intel.com, Xu, Baojun, thomas.gfeller@q-drop.com,
Gupta, Peeyush, Navada Kanyana, Mukund, tiwai@suse.de,
Arnd Bergmann, linux-m68k
On Okt 03 2023, Geert Uytterhoeven wrote:
> 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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104028
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-03 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231002090434.1896-1-shenghao-ding@ti.com>
[not found] ` <CAMuHMdXr5oRgkFqYZnPe3Xdyq_QjtzhfL8Wa_e9JA0S1XhEhWw@mail.gmail.com>
[not found] ` <79c4d534ad20452c992d8ace138e4384@ti.com>
2023-10-03 12:15 ` [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: fixed compiling issue in m68k Geert Uytterhoeven
2023-10-03 16:23 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox