Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH] ASoC: tegra: fix build regression 32 bit kernels
@ 2026-05-08  8:00 Arnd Bergmann
  2026-05-08 10:02 ` Thierry Reding
  2026-05-08 12:51 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-05-08  8:00 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Thierry Reding, Jonathan Hunter, Sheetal
  Cc: Arnd Bergmann, linux-sound, linux-tegra, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Compile-testing this driver for 32-bit causes a build failure:

x86_64-linux-ld: sound/soc/tegra/tegra210_mixer.o: in function `tegra210_mixer_configure_gain':
tegra210_mixer.c:(.text+0x709): undefined reference to `__udivdi3'

As the driver is only actually used on 64-bit Tegra210, rework the
division to use the div_u64() helper that avoids the libgcc call.

Fixes: 36645381b864 ("ASoC: tegra: Add per-stream Mixer Fade controls")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/tegra/tegra210_mixer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c
index f05617b5f433..d21f55dad0e3 100644
--- a/sound/soc/tegra/tegra210_mixer.c
+++ b/sound/soc/tegra/tegra210_mixer.c
@@ -157,8 +157,8 @@ static int tegra210_mixer_configure_gain(struct snd_soc_component *cmpnt,
 			if (i == DURATION_N3_ID)
 				val = mixer->duration[id];
 			else if (i == DURATION_INV_N3_ID)
-				val = (u32)(BIT_ULL(31 + TEGRA210_MIXER_PRESCALAR) /
-					    mixer->duration[id]);
+				val = div_u64(BIT_ULL(31 + TEGRA210_MIXER_PRESCALAR),
+					      mixer->duration[id]);
 			else
 				val = gain_params.duration[i];
 		}
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tegra: fix build regression 32 bit kernels
  2026-05-08  8:00 [PATCH] ASoC: tegra: fix build regression 32 bit kernels Arnd Bergmann
@ 2026-05-08 10:02 ` Thierry Reding
  2026-05-08 12:51 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2026-05-08 10:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Jonathan Hunter, Sheetal, Arnd Bergmann, linux-sound, linux-tegra,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On Fri, May 08, 2026 at 10:00:25AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Compile-testing this driver for 32-bit causes a build failure:
> 
> x86_64-linux-ld: sound/soc/tegra/tegra210_mixer.o: in function `tegra210_mixer_configure_gain':
> tegra210_mixer.c:(.text+0x709): undefined reference to `__udivdi3'
> 
> As the driver is only actually used on 64-bit Tegra210, rework the
> division to use the div_u64() helper that avoids the libgcc call.

To be pedantic: the driver is also used on subsequent generations, but
your argument of it only ever being used on 64-bit systems is correct,
so:

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tegra: fix build regression 32 bit kernels
  2026-05-08  8:00 [PATCH] ASoC: tegra: fix build regression 32 bit kernels Arnd Bergmann
  2026-05-08 10:02 ` Thierry Reding
@ 2026-05-08 12:51 ` Mark Brown
  2026-05-08 13:23   ` Thierry Reding
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2026-05-08 12:51 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Thierry Reding,
	Jonathan Hunter, Sheetal, Arnd Bergmann, linux-sound, linux-tegra,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

On Fri, May 08, 2026 at 10:00:25AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Compile-testing this driver for 32-bit causes a build failure:
> 
> x86_64-linux-ld: sound/soc/tegra/tegra210_mixer.o: in function `tegra210_mixer_configure_gain':
> tegra210_mixer.c:(.text+0x709): undefined reference to `__udivdi3'

Someone already sent this.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tegra: fix build regression 32 bit kernels
  2026-05-08 12:51 ` Mark Brown
@ 2026-05-08 13:23   ` Thierry Reding
  0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2026-05-08 13:23 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arnd Bergmann, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Thierry Reding, Jonathan Hunter, Sheetal, Arnd Bergmann,
	linux-sound, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Fri, May 08, 2026 at 09:51:27PM +0900, Mark Brown wrote:
> On Fri, May 08, 2026 at 10:00:25AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > Compile-testing this driver for 32-bit causes a build failure:
> > 
> > x86_64-linux-ld: sound/soc/tegra/tegra210_mixer.o: in function `tegra210_mixer_configure_gain':
> > tegra210_mixer.c:(.text+0x709): undefined reference to `__udivdi3'
> 
> Someone already sent this.

Indeed. Acked that one too.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-08 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08  8:00 [PATCH] ASoC: tegra: fix build regression 32 bit kernels Arnd Bergmann
2026-05-08 10:02 ` Thierry Reding
2026-05-08 12:51 ` Mark Brown
2026-05-08 13:23   ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox