[radeon-alex:sound-for-next-stoney 1/3] acp-pcm-dma.c:undefined reference to `__umoddi3'

Agrawal, Akshu Akshu.Agrawal at amd.com
Mon Nov 6 04:32:25 UTC 2017


Hi Vijendar,

Below is the patch from Guenter Roeck <groeck at chromium.org> to fix build 
errors on 32 bit.

Regards,
Akshu

 From 3aa3a8549e986d860300e0623d048ec93482da19 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <groeck at chromium.org>
Date: Fri, 22 Sep 2017 09:43:27 -0700
Subject: [PATCH] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr 
during dma

ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!

64-bit divides require special operations to avoid build errors on 32-bit
systems.

BUG=b:63121716
TEST="Build i386:allmodconfig"

Change-Id: I684934d1d16d3f7f72eb1067f23dcb2acf15b645
Signed-off-by: Guenter Roeck <groeck at chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/678919
Reviewed-by: Jason Clinton <jclinton at chromium.org>
(cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
Reviewed-on: https://chromium-review.googlesource.com/681618
---
  sound/soc/amd/acp-pcm-dma.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 13d040a4d26f..ef7e98ad960c 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct 
snd_pcm_substream *substream)
         if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
                 if (bytescount > rtd->renderbytescount)
                         bytescount = bytescount - rtd->renderbytescount;
-               pos =  bytescount % buffersize;
         } else {
                 if (bytescount > rtd->capturebytescount)
                         bytescount = bytescount - rtd->capturebytescount;
-               pos = bytescount % buffersize;
         }
+       pos = do_div(bytescount, buffersize);
         return bytes_to_frames(runtime, pos);
  }


On 11/4/2017 7:26 AM, kbuild test robot wrote:
> tree:   git://people.freedesktop.org/~agd5f/linux.git sound-for-next-stoney
> head:   d01a736c0b1595c5e65b2f2b16fe2da87ec3bc4c
> commit: 41f9cb7a4d2aaf31aad6a87278f028add9d2d1a6 [1/3] ASoC: amd: Report accurate hw_ptr during dma
> config: i386-allyesconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>          git checkout 41f9cb7a4d2aaf31aad6a87278f028add9d2d1a6
>          # save the attached .config to linux build tree
>          make ARCH=i386
> 
> All errors (new ones prefixed by >>):
> 
>     sound/soc/amd/acp-pcm-dma.o: In function `acp_dma_pointer':
>>> acp-pcm-dma.c:(.text+0x3d7): undefined reference to `__umoddi3'
>     acp-pcm-dma.c:(.text+0x3fc): undefined reference to `__umoddi3'
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 


More information about the dri-devel mailing list