Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fails when compiling for kernel 3.17 #68

Closed
CvH opened this issue Jan 10, 2015 · 4 comments
Closed

Make fails when compiling for kernel 3.17 #68

CvH opened this issue Jan 10, 2015 · 4 comments

Comments

@CvH
Copy link

CvH commented Jan 10, 2015

After the latest merge of the media_tree i get this error if i build for kernel 3.17.7
I have tried different media_build rev with no luck. Any suggestion ?

CC [M]  /v4l/saa716x_ff_main.o
CC [M]  /v4l/saa716x_ff_cmd.o
/v4l/saa716x_rom.c: In function 'saa716x_eeprom_data':
/v4l/saa716x_rom.c:1070:1: warning: the frame size of 1120 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }
 ^
  CC [M]  /v4l/saa716x_ff_ir.o
  CC [M]  /v4l/radio-shark2.o
  CC [M]  /v4l/radio-tea5777.o
  CC [M]  /v4l/smiapp-core.o
  CC [M]  /v4l/smiapp-regs.o
  CC [M]  /v4l/smiapp-quirk.o
  CC [M]  /v4l/smiapp-limits.o
  CC [M]  /v4l/smsdvb-main.o
  CC [M]  /v4l/smsdvb-debugfs.o
  CC [M]  /v4l/smscoreapi.o
  CC [M]  /v4l/sms-cards.o
  CC [M]  /v4l/smsendian.o
  CC [M]  /v4l/smsir.o
  CC [M]  /v4l/bt87x.o
  CC [M]  /v4l/solo6x10-core.o
  CC [M]  /v4l/solo6x10-i2c.o
/v4l/smiapp-core.c: In function 'smiapp_get_pdata':
/v4l/smiapp-core.c:3061:3: error: implicit declaration of function 'of_read_number' [-Werror=implicit-function-declaration]
   pdata->op_sys_clock[i] = of_read_number(val + i * 2, 2);
   ^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/v4l/smiapp-core.o' failed
make[4]: *** [/v4l/smiapp-core.o] Error 1
make[4]: *** Warte auf noch nicht beendete Prozesse...
Makefile:1373: recipe for target '_module_/v4l' failed
make[3]: *** [_module_/v4l] Error 2
make[3]: Leaving directory '/linux-3.17.7'
Makefile:51: recipe for target 'default' failed
make[2]: *** [default] Error 2
make[2]: Leaving directory '/v4l'
Makefile:26: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory ''
make: *** [release] Fehler 2
@bas-t
Copy link
Contributor

bas-t commented Jan 12, 2015

@ljalves
Copy link
Owner

ljalves commented Jan 13, 2015

Just do this until media_build gets fixed:

  1. Edit v4l/.config (assuming you are right after you got the error, in media_build folder)

  2. Change:
    CONFIG_VIDEO_SMIAPP_PLL=m
    to:
    CONFIG_VIDEO_SMIAPP_PLL=n
    and
    CONFIG_VIDEO_SMIAPP=m
    to:
    CONFIG_VIDEO_SMIAPP=n

This should allow you to compile the media_tree.

@CvH
Copy link
Author

CvH commented Jan 13, 2015

it "works" for the meantime, tx

@ljalves
Copy link
Owner

ljalves commented Jan 15, 2015

Closing this issue since it's related to media_build.
This type of errors should be reported to the linux-media mailing list (after confirming that they also occur in the official media tree).

Last build log also reports that error:
http://hverkuil.home.xs4all.nl/logs/Thursday.log

@ljalves ljalves closed this as completed Jan 15, 2015
@ljalves ljalves mentioned this issue Jan 16, 2015
crazycat69 pushed a commit to crazycat69/linux_media that referenced this issue Jul 1, 2023
When using DMA mode we are facing with Oops:
[  396.458157] Unable to handle kernel access to user memory without uaccess routines at virtual address 000000000000000c
[  396.469374] Oops [ljalves#1]
[  396.471839] Modules linked in:
[  396.475144] CPU: 0 PID: 114 Comm: arecord Not tainted 6.0.0-00164-g9a8eccdaf2be-dirty ljalves#68
[  396.483619] Hardware name: YMP ELCT FPGA (DT)
[  396.488156] epc : dmaengine_pcm_open+0x1d2/0x342
[  396.493227]  ra : dmaengine_pcm_open+0x1d2/0x342
[  396.498140] epc : ffffffff807fe346 ra : ffffffff807fe346 sp : ffffffc804e138f0
[  396.505602]  gp : ffffffff817bf730 tp : ffffffd8042c8ac0 t0 : 6500000000000000
[  396.513045]  t1 : 0000000000000064 t2 : 656e69676e65616d s0 : ffffffc804e13990
[  396.520477]  s1 : ffffffd801b86a18 a0 : 0000000000000026 a1 : ffffffff816920f8
[  396.527897]  a2 : 0000000000000010 a3 : fffffffffffffffe a4 : 0000000000000000
[  396.535319]  a5 : 0000000000000000 a6 : ffffffd801b87040 a7 : 0000000000000038
[  396.542740]  s2 : ffffffd801b94a00 s3 : 0000000000000000 s4 : ffffffd80427f5e8
[  396.550153]  s5 : ffffffd80427f5e8 s6 : ffffffd801b44410 s7 : fffffffffffffff5
[  396.557569]  s8 : 0000000000000800 s9 : 0000000000000001 s10: ffffffff8066d254
[  396.564978]  s11: ffffffd8059cf768 t3 : ffffffff817d5577 t4 : ffffffff817d5577
[  396.572391]  t5 : ffffffff817d5578 t6 : ffffffc804e136e8
[  396.577876] status: 0000000200000120 badaddr: 000000000000000c cause: 000000000000000d
[  396.586007] [<ffffffff806839f4>] snd_soc_component_open+0x1a/0x68
[  396.592439] [<ffffffff807fdd62>] __soc_pcm_open+0xf0/0x502
[  396.598217] [<ffffffff80685d86>] soc_pcm_open+0x2e/0x4e
[  396.603741] [<ffffffff8066cea4>] snd_pcm_open_substream+0x442/0x68e
[  396.610313] [<ffffffff8066d1ea>] snd_pcm_open+0xfa/0x212
[  396.615868] [<ffffffff8066d39c>] snd_pcm_capture_open+0x3a/0x60
[  396.622048] [<ffffffff8065b35a>] snd_open+0xa8/0x17a
[  396.627421] [<ffffffff801ae036>] chrdev_open+0xa0/0x218
[  396.632893] [<ffffffff801a5a28>] do_dentry_open+0x17c/0x2a6
[  396.638713] [<ffffffff801a6d9a>] vfs_open+0x1e/0x26
[  396.643850] [<ffffffff801b8544>] path_openat+0x96e/0xc96
[  396.649518] [<ffffffff801b9390>] do_filp_open+0x7c/0xf6
[  396.655034] [<ffffffff801a6ff2>] do_sys_openat2+0x8a/0x11e
[  396.660765] [<ffffffff801a735a>] sys_openat+0x50/0x7c
[  396.666068] [<ffffffff80003aca>] ret_from_syscall+0x0/0x2
[  396.674964] ---[ end trace 0000000000000000 ]---

It happens because of play_dma_data/capture_dma_data pointers are NULL.
Current implementation assigns these pointers at snd_soc_dai_driver
startup() callback and reset them back to NULL at shutdown(). But
soc_pcm_open() sequence uses DMA pointers in dmaengine_pcm_open()
before snd_soc_dai_driver startup().
Most generic DMA capable I2S drivers use snd_soc_dai_driver probe()
callback to init DMA pointers only once at probe. So move DMA init
to dw_i2s_dai_probe and drop shutdown() and startup() callbacks.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20230512110343.66664-1-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants