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

Cannot load vc4 driver #1210

Closed
xiaoguorou opened this issue Nov 30, 2015 · 25 comments
Closed

Cannot load vc4 driver #1210

xiaoguorou opened this issue Nov 30, 2015 · 25 comments

Comments

@xiaoguorou
Copy link

My pi is rpi B Rev 2(2015-09-24-raspbian-jessie), with latest rpi-4.2.y kernel:

  1. Update firmware;
    2)Using gohai build script: https://github.com/gohai/vc4-buildbot/blob/master/BuildRaspbianVc4.py linux build part;
    3)add:
    avoid_warnings=2
    dtoverlay=vc4-kms-v3d
    to config.txt;

I cannot load vc4 driver, there is nothing vc4 message in dmesg;

And if I use modprobe vc4, seem it load it, but the dmesg has only these message:
[drm] Initialized drm 1.1.0 20060810

Still cannot use vc4 driver;

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

What does:

sudo vcdbg log msg |& grep -v gpioman | grep -iv hdmi

show?

@xiaoguorou
Copy link
Author

It shows:

001119.975: *** Restart logging
001120.927: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
001121.709: Loading 'kernel.img' from SD card
001366.108: Kernel trailer DTOK property says yes
001366.369: Loading 'bcm2708-rpi-b.dtb' from SD card
001408.595: Failed to load overlay 'vc4-kms-v3d'
001408.643: dtparam: cache_line_size=32
003913.075: vchiq_core: vchiq_init_state: slot_zero = 0x5bc80000, is_master = 1

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

001408.595: Failed to load overlay 'vc4-kms-v3d'

There's your answer. Does vc4-kms-v3d-overlay.dtb exist in /boot/overlays/?

@xiaoguorou
Copy link
Author

But if I copy the vc4-kms-v3d-overlay.dtb to /boot/overlays, it cannot boot:

Uncompressing Linux... done, booting the kernel.

It will hang in there.

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

The VC4 KMS driver needs lots of RAM to work well, so the overlay is aimed at Pi 2 users with 1GB. I see you are on a Pi Model B, so you are probably running out of memory. You are unlikely to have a good user experience, but if you really want to try then add this to your cmdline.txt (you will need a recent firmware - Nov 11th or later):

cma=64M

This will override the 256M allocation requested by the overlay.

@xiaoguorou
Copy link
Author

Now it can boot, but it still hang:

cma: Failed to reserve 64MiB
....
...
Kernel command line: cma=256M@512M ....
...
...
systemd[1]: Mounting FUSE Control File System...

I found that my board is rpi B Rev 2, but it still load bcm2708-rpi-b.dtb, is this right?

@wuyuehang
Copy link

hi @pelwell @bobodeng520
are those dtb blobs used by kernel really loaded from SD?
i patch the bcm2709-rpi-2-b.dts:7: model = "Modifyme RPi 2"; but when booting up, the kernel
stay still with this

[    0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.1
[    0.000000] cma: Reserved 256 MiB at 0x20000000
[    0.000000] Memory policy: Data cache writealloc

refer to source code, i think it should be updated to Modifyme RPi 2. do i miss something?

717const void * __init of_flat_dt_match_machine(const void *default_match,
718     const void * (*get_next_compat)(const char * const**))
719{
720 const void *data = NULL;
721 const void *best_data = default_match;
...
738     pr_err("\n unrecognized device tree list:\n[ ");
739
740     prop = of_get_flat_dt_prop(dt_root, "compatible", &size);
741     if (prop) {
742         while (size > 0) {
743             printk("'%s' ", prop);
744             size -= strlen(prop) + 1;
745             prop += strlen(prop) + 1;
746         }
747     }
748     printk("]\n\n");
749     return NULL;
750 }
751
752 pr_info("Machine model: %s\n", of_flat_dt_get_machine_name());
753
754 return best_data;
755}

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

@bobodeng520 Try decreasing your gpu_mem in your config.txt, or set it to something small like 32 (M). You might even get away with 16, but then you won't be able to use a camera.

@wuyuehang Yes 0 the .dtbs are loaded from the SD Card. The firmware overwrites the model property with a more specific string including the revision number.

@wuyuehang
Copy link

Yes 0 the .dtbs are loaded from the SD Card. The firmware overwrites the model property with a more specific string including the revision number.

ok i see, according to @pelwell 's explain, @bobodeng520 dtb can your dtb blobs are overwriten by firmware too? seems cmdline arguments are cma=256M@512M?

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

@wuyuehang Thanks for your interest. I wrote most of the Device Tree support in the firmware, so I know that using the latest firmware settings in cmdline.txt will override anything added by DT overlays.

@xiaoguorou
Copy link
Author

@pelwell @wuyuehang, However decrease memory to 32, 16, there still cannot reserve memory, the kernel command line will always be 256M@512M, and hang in the same place;
Can you help me out of this?

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

What does "vcgencmd version" show? I think your firmware may need an update.

@pelwell
Copy link
Contributor

pelwell commented Nov 30, 2015

And be sure to check the end of the kernel command - that is where entries from cmdline.txt will appear, and because they are processed after the earlier ones they will take precedence.

@wuyuehang
Copy link

@bobodeng520 maybe revert firmware before the following commit, give a try, not sure whether it will help.
firmware: arm_loader: Apply firmware DT settings after the overlays

I wrote most of the Device Tree support in the firmware, so I know that using the latest firmware settings in cmdline.txt will override anything added by DT overlays.

@pelwell i doesn't doubt the firmware overwriting behavior until saw this issue and modify its machine mode name. before that i'm guessing it's falling back to atags without dtb.

@xiaoguorou
Copy link
Author

What does "vcgencmd version" show? I think your firmware may need an update.

Nov 18 2015 15:43:45
Copyright (c) 2012 Broadcom
version 0c9af7cde38e223c95c3404f468db8fc5004495c (clean) (release)

@pelwell My firmware is up-to-date.

@pelwell
Copy link
Contributor

pelwell commented Dec 1, 2015

Reading back through the thread, it is clear that your addition to cmdline.txt is having an effect. Without it, the Pi doesn't get past "booting the kernel", but with it you get a failure later on. You will still see cma=256M@512M, but it will be before "cma=64M" which is the important thing.

Try decreasing the CMA size - "cma=32M" for example - until it boots.

@xiaoguorou
Copy link
Author

@pelwell I have try this:
After comment vc4-kms-v3d:

#dtoverlay=vc4-kms-v3d

The memory can allocated:

cma: Reserved 16 MiB at 0x1b000000

And the Kernel command line has nothing about cma=256M@512M,

But if open vc4-kms-v3d:

cma: Failed to reserve 16 MiB

And it will hang

@pelwell
Copy link
Contributor

pelwell commented Dec 1, 2015

What is your gpu_mem set to? Can you post the entire boot log?

@xiaoguorou
Copy link
Author

After setting gpu_mem=16 in config.txt, cma=8M in cmdline.txt
the board can boot up, and load the vc4 driver;
But the net cannot work

@pelwell
Copy link
Contributor

pelwell commented Dec 1, 2015

Without a boot log I can't be sure of the RAM size of your Pi, but it is likely to be 256M. I think you are going to have to accept that the new VC4 driver isn't going to work for you unless you upgrade to a Pi 2, and even then it is still a work-in-progress.

@xiaoguorou
Copy link
Author

@pelwell Here is my boot log(gpu_mem=16, cma=8M):

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.2.6-2708+ (root@milesdeng) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #2 PREEMPT 5
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Model B Rev 2
[    0.000000] cma: Failed to reserve 16 MiB
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 126976
[    0.000000] free_area_init_node: node 0, pgdat c08a37cc, node_mem_map deb9b000
[    0.000000]   Normal zone: 1116 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 126976 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 125860
[    0.000000] Kernel command line: cma=256M@512M dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=t
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 493328K/507904K available (6207K kernel code, 496K rwdata, 1784K rodata, 356K init, 724K bss, 14576K reserved, )
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xdf800000 - 0xff000000   ( 504 MB)
    lowmem  : 0xc0000000 - 0xdf000000   ( 496 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc07d6180   (7993 kB)
      .init : 0xc07d7000 - 0xc0830000   ( 356 kB)
      .data : 0xc0830000 - 0xc08ac224   ( 497 kB)
       .bss : 0xc08ac224 - 0xc0961608   ( 725 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Additional per-CPU info printed with stalls.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:522
[    0.000033] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000080] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000181] bcm2835: system timer (irq = 36)
[    0.000500] Console: colour dummy device 80x30
[    0.002240] console [tty1] enabled
[    0.002307] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060401] pid_max: default: 32768 minimum: 301
[    0.060789] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060882] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.061991] Initializing cgroup subsys blkio
[    0.062099] Initializing cgroup subsys memory
[    0.062186] Initializing cgroup subsys devices
[    0.062265] Initializing cgroup subsys freezer
[    0.062341] Initializing cgroup subsys net_cls
[    0.062474] CPU: Testing write buffer coherency: ok
[    0.062612] ftrace: allocating 20117 entries in 59 pages
[    0.173241] Setting up static identity map for 0x81c0 - 0x81f8
[    0.175962] devtmpfs: initialized
[    0.184848] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.185302] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.186186] pinctrl core: initialized pinctrl subsystem
[    0.187096] NET: Registered protocol family 16
[    0.192392] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.195430] bcm2708.uart_clock = 3000000
[    0.212086] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.212159] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.212352] Serial: AMBA PL011 UART driver
[    0.212850] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 90, base_baud = 0) is a PL011 rev2
[    1.357984] console [ttyAMA0] enabled
[    1.362467] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    1.440842] bcm2835-dma 20007000.dma: DMA legacy API manager at f2007000, dmachans=0x1
[    1.450038] bcm2835-dma 20007000.dma: dma_debug:0
[    1.455889] SCSI subsystem initialized
[    1.460149] usbcore: registered new interface driver usbfs
[    1.465820] usbcore: registered new interface driver hub
[    1.471428] usbcore: registered new device driver usb
[    1.477454] raspberrypi-firmware soc:firmware: Attached to firmware from 2015-11-18 15:44
[    1.513630] clocksource: Switched to clocksource timer
[    1.568857] FS-Cache: Loaded
[    1.572195] CacheFiles: Loaded
[    1.592384] NET: Registered protocol family 2
[    1.598326] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    1.605802] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    1.612364] TCP: Hash tables configured (established 4096 bind 4096)
[    1.618927] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.624893] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.631592] NET: Registered protocol family 1
[    1.636692] RPC: Registered named UNIX socket transport module.
[    1.642692] RPC: Registered udp transport module.
[    1.647566] RPC: Registered tcp transport module.
[    1.652322] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.660342] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    1.669613] futex hash table entries: 256 (order: -1, 3072 bytes)
[    1.693076] VFS: Disk quotas dquot_6.6.0
[    1.697647] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.707368] FS-Cache: Netfs 'nfs' registered for caching
[    1.714556] NFS: Registering the id_resolver key type
[    1.719779] Key type id_resolver registered
[    1.724148] Key type id_legacy registered
[    1.731547] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.739669] io scheduler noop registered
[    1.743875] io scheduler deadline registered (default)
[    1.749487] io scheduler cfq registered
[    1.756730] vc-cma: Videocore CMA driver
[    1.760739] vc-cma: vc_cma_base      = 0x00000000
[    1.765695] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.771146] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.777109] vc-mem: phys_addr:0x00000000 mem_base=0x1fa00000 mem_size:0x20000000(512 MiB)
[    1.805955] brd: module loaded
[    1.818569] loop: module loaded
[    1.822845] vchiq: vchiq_init_state: slot_zero = 0xdfc97000, is_master = 0
[    1.831945] Loading iSCSI transport class v2.0-870.
[    1.838422] usbcore: registered new interface driver smsc95xx
[    1.844487] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.050769] Core Release: 2.80a
[    2.054098] Setting default values for core params
[    2.058974] Finished setting default values for core params
[    2.265015] Using Buffer DMA mode
[    2.268393] Periodic Transfer Interrupt Enhancement - disabled
[    2.274313] Multiprocessor Interrupt Enhancement - disabled
[    2.279931] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.284371] Dedicated Tx FIFOs mode
[    2.288189] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdfce0000 dma = 0x5e780000 len=9024
[    2.298189] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
[    2.315068] dwc_otg: Microframe scheduler enabled
[    2.315136] WARN::hcd_init_fiq:412: FIQ on core 0 at 0xc042dde4
[    2.321109] WARN::hcd_init_fiq:413: FIQ ASM at 0xc042e094 length 36
[    2.327432] WARN::hcd_init_fiq:438: MPHI regs_base at 0xdfcda000
[    2.333608] dwc_otg 20980000.usb: DWC OTG Controller
[    2.338726] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[    2.346214] dwc_otg 20980000.usb: irq 65, io mem 0x00000000
[    2.351881] Init: Port Power? op_state=1
[    2.355891] Init: Power Port (0)
[    2.359534] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.366461] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.373810] usb usb1: Product: DWC OTG Controller
[    2.378564] usb usb1: Manufacturer: Linux 4.2.6-2708+ dwc_otg_hcd
[    2.384748] usb usb1: SerialNumber: 20980000.usb
[    2.390477] hub 1-0:1.0: USB hub found
[    2.394543] hub 1-0:1.0: 1 port detected
[    2.399167] dwc_otg: FIQ enabled
[    2.399190] dwc_otg: NAK holdoff enabled
[    2.399204] dwc_otg: FIQ split-transaction FSM enabled
[    2.399258] Module dwc_common_port init
[    2.399863] usbcore: registered new interface driver usb-storage
[    2.406592] mousedev: PS/2 mouse device common for all mice
[    2.413566] bcm2835-cpufreq: min=700000 max=700000
[    2.418891] sdhci: Secure Digital Host Controller Interface driver
[    2.425281] sdhci: Copyright(c) Pierre Ossman
[    2.430389] mmc-bcm2835 20300000.mmc: mmc_debug:0 mmc_debug2:0
[    2.436469] mmc-bcm2835 20300000.mmc: DMA channels allocated
[    2.474088] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.480474] ledtrig-cpu: registered to indicate activity on CPUs
[    2.487036] hidraw: raw HID events driver (C) Jiri Kosina
[    2.497703] usbcore: registered new interface driver usbhid
[    2.503457] usbhid: USB HID core driver
[    2.515401] Initializing XFRM netlink socket
[    2.519805] NET: Registered protocol family 17
[    2.524665] Key type dns_resolver registered
[    2.531165] registered taskstats version 1
[    2.535803] vc-sm: Videocore shared memory driver
[    2.540578] [vc_sm_connected_init]: start
[    2.545364] vc_vchi_sm_init: failed to open VCHI service (-1)
[    2.551104] [vc_sm_connected_init]: failed to initialize shared memory service
[    2.558899] [vc_sm_connected_init]: end - returning -1
[    2.569116] Waiting for root device /dev/mmcblk0p2...
[    2.581684] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.593907] Indeed it is in host mode hprt0 = 00021501
[    2.603786] mmc0: new high speed SDHC card at address e624
[    2.613774] mmcblk0: mmc0:e624 SL16G 14.8 GiB 
[    2.624994]  mmcblk0: p1 p2
[    2.706800] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.715334] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.733268] devtmpfs: mounted
[    2.737850] Freeing unused kernel memory: 356K (c07d7000 - c0830000)
[    2.793764] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.803045] Indeed it is in host mode hprt0 = 00001101
[    3.024607] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    3.031431] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.040775] hub 1-1:1.0: USB hub found
[    3.044986] hub 1-1:1.0: 3 ports detected
[    3.104459] random: systemd urandom read with 48 bits of entropy available
[    3.119433] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -S)
[    3.134166] systemd[1]: Detected architecture 'arm'.
[    3.313042] NET: Registered protocol family 10
[    3.319595] systemd[1]: Inserted module 'ipv6'
[    3.324327] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.344506] systemd[1]: Set hostname to <raspberrypi>.
[    3.444330] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.458020] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.477068] smsc95xx v1.0.4
[    3.532653] uart-pl011 20201000.uart: no DMA platform data
[    3.565978] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:2c:c7:60
[    4.302456] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    4.311385] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.319535] systemd[1]: Expecting device dev-ttyAMA0.device...
[    4.326668] systemd[1]: Starting Remote File Systems (Pre).
[    4.333026] systemd[1]: Reached target Remote File Systems (Pre).
[    4.339871] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[    4.350541] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    4.360506] systemd[1]: Starting Encrypted Volumes.
[    4.366361] systemd[1]: Reached target Encrypted Volumes.
[    4.372041] systemd[1]: Starting Swap.
[    4.376743] systemd[1]: Reached target Swap.
[    4.381295] systemd[1]: Expecting device dev-mmcblk0p1.device...
[    4.388274] systemd[1]: Starting Root Slice.
[    4.393493] systemd[1]: Created slice Root Slice.
[    4.398692] systemd[1]: Starting User and Session Slice.
[    4.405424] systemd[1]: Created slice User and Session Slice.
[    4.411462] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[    4.419557] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.427013] systemd[1]: Starting Delayed Shutdown Socket.
[    4.433477] systemd[1]: Listening on Delayed Shutdown Socket.
[    4.439735] systemd[1]: Starting Journal Socket (/dev/log).
[    4.446691] systemd[1]: Listening on Journal Socket (/dev/log).
[    4.452982] systemd[1]: Starting udev Control Socket.
[    4.459367] systemd[1]: Listening on udev Control Socket.
[    4.465331] systemd[1]: Starting udev Kernel Socket.
[    4.471304] systemd[1]: Listening on udev Kernel Socket.
[    4.477165] systemd[1]: Starting Journal Socket.
[    4.483003] systemd[1]: Listening on Journal Socket.
[    4.488658] systemd[1]: Starting System Slice.
[    4.494566] systemd[1]: Created slice System Slice.
[    4.499918] systemd[1]: Starting File System Check on Root Device...
[    4.512367] systemd[1]: Starting system-systemd\x2dfsck.slice.
[    4.529531] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    4.538396] systemd[1]: Starting system-getty.slice.
[    4.551299] systemd[1]: Created slice system-getty.slice.
[    4.562658] systemd[1]: Starting system-serial\x2dgetty.slice.
[    4.571563] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    4.580030] systemd[1]: Starting Increase datagram queue length...
[    4.597947] systemd[1]: Starting Restore / save the current clock...
[    4.641849] systemd[1]: Mounting POSIX Message Queue File System...
[    4.674062] systemd[1]: Mounted Huge Pages File System.
[    4.729384] systemd[1]: Mounting Debug File System...
[    4.778739] systemd[1]: Started Set Up Additional Binary Formats.
[    4.882845] systemd[1]: Starting Load Kernel Modules...
[    4.929776] systemd[1]: Starting udev Coldplug all Devices...
[    4.987541] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    5.045055] systemd[1]: Starting Slices.
[    5.067184] systemd[1]: Reached target Slices.
[    5.099888] fuse init (API version 7.23)
[    5.115901] systemd[1]: Mounted Debug File System.
[    5.134977] systemd[1]: Mounted POSIX Message Queue File System.
[    5.166584] systemd[1]: Started File System Check on Root Device.
[    5.221181] systemd[1]: Started Increase datagram queue length.
[    5.249597] systemd[1]: Started Restore / save the current clock.
[    5.259660] i2c /dev entries driver
[    5.294634] systemd[1]: Started Create list of required static device nodes for the current kernel.
[    5.317117] systemd[1]: Started Load Kernel Modules.
[    5.340524] systemd[1]: Time has been changed
[    5.515464] systemd[1]: Started udev Coldplug all Devices.
[    5.702703] systemd[1]: Starting Apply Kernel Variables...
[    5.716324] systemd[1]: Mounting Configuration File System...
[    5.746343] systemd[1]: Mounting FUSE Control File System...
[    5.789553] systemd[1]: Starting Create Static Device Nodes in /dev...
[    5.799526] systemd[1]: Starting Syslog Socket.
[    5.818884] systemd[1]: Listening on Syslog Socket.
[    5.819251] systemd[1]: Starting Journal Service...
[    5.879472] systemd[1]: Started Journal Service.
[    6.298730] systemd-udevd[92]: starting version 215
[    8.272608] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    8.553319] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[    8.594175] bcm2708_i2c 20805000.i2c: BSC2 Controller at 0x20805000 (irq 86) (baudrate 100000)
[    8.685090] random: nonblocking pool is initialized
[    8.891639] [drm] Initialized drm 1.1.0 20060810
[    9.195893] ------------[ cut here ]------------
[    9.196061] WARNING: CPU: 0 PID: 119 at drivers/gpu/drm/vc4/vc4_hdmi.c:521 vc4_hdmi_bind+0x330/0x384 [vc4]()
[    9.196078] Modules linked in: vc4(+) drm_kms_helper drm sysimgblt sysfillrect syscopyarea i2c_bcm2708 bcm2835_gpiomem uio_pdrv_gen6
[    9.196174] CPU: 0 PID: 119 Comm: systemd-udevd Not tainted 4.2.6-2708+ #2
[    9.196188] Hardware name: BCM2708
[    9.196255] [<c0016be0>] (unwind_backtrace) from [<c0013990>] (show_stack+0x20/0x24)
[    9.196303] [<c0013990>] (show_stack) from [<c05975b4>] (dump_stack+0x20/0x28)
[    9.196345] [<c05975b4>] (dump_stack) from [<c0024314>] (warn_slowpath_common+0x8c/0xc4)
[    9.196376] [<c0024314>] (warn_slowpath_common) from [<c0024378>] (warn_slowpath_null+0x2c/0x34)
[    9.196468] [<c0024378>] (warn_slowpath_null) from [<bf1be624>] (vc4_hdmi_bind+0x330/0x384 [vc4])
[    9.196576] [<bf1be624>] (vc4_hdmi_bind [vc4]) from [<c0395ad0>] (component_bind_all+0xc0/0x1e0)
[    9.196655] [<c0395ad0>] (component_bind_all) from [<bf1bc088>] (vc4_drm_bind+0xb0/0x19c [vc4])
[    9.196733] [<bf1bc088>] (vc4_drm_bind [vc4]) from [<c0395dec>] (try_to_bring_up_master.part.0+0xd8/0x114)
[    9.196771] [<c0395dec>] (try_to_bring_up_master.part.0) from [<c0395edc>] (component_master_add_with_match+0xb4/0x138)
[    9.196849] [<c0395edc>] (component_master_add_with_match) from [<bf1bc210>] (vc4_platform_drm_probe+0x9c/0xb4 [vc4])
[    9.196931] [<bf1bc210>] (vc4_platform_drm_probe [vc4]) from [<c039c0b8>] (platform_drv_probe+0x3c/0x6c)
[    9.196966] [<c039c0b8>] (platform_drv_probe) from [<c039a8cc>] (driver_probe_device+0x1bc/0x264)
[    9.196995] [<c039a8cc>] (driver_probe_device) from [<c039aa10>] (__driver_attach+0x9c/0xa0)
[    9.197022] [<c039aa10>] (__driver_attach) from [<c0398d1c>] (bus_for_each_dev+0x64/0x98)
[    9.197052] [<c0398d1c>] (bus_for_each_dev) from [<c039a1f4>] (driver_attach+0x28/0x30)
[    9.197079] [<c039a1f4>] (driver_attach) from [<c0399f50>] (bus_add_driver+0xf8/0x208)
[    9.197106] [<c0399f50>] (bus_add_driver) from [<c039b124>] (driver_register+0x88/0x104)
[    9.197134] [<c039b124>] (driver_register) from [<c039bf64>] (__platform_driver_register+0x58/0x6c)
[    9.197210] [<c039bf64>] (__platform_driver_register) from [<bf1cc05c>] (vc4_drm_register+0x5c/0x74 [vc4])
[    9.197291] [<bf1cc05c>] (vc4_drm_register [vc4]) from [<c0009768>] (do_one_initcall+0x90/0x1e8)
[    9.197338] [<c0009768>] (do_one_initcall) from [<c008c004>] (do_init_module+0x6c/0x1e4)
[    9.197372] [<c008c004>] (do_init_module) from [<c008d9c0>] (load_module+0x1778/0x1e9c)
[    9.197406] [<c008d9c0>] (load_module) from [<c008e288>] (SyS_finit_module+0x74/0x80)
[    9.197442] [<c008e288>] (SyS_finit_module) from [<c000fbc0>] (ret_fast_syscall+0x0/0x54)
[    9.197460] ---[ end trace 0161c36c13415648 ]---
[    9.197623] vc4-drm soc:gpu@7e4c0000: bound 20902000.hdmi (ops vc4_hdmi_ops [vc4])
[    9.197882] vc4-drm soc:gpu@7e4c0000: bound 20807000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.198114] vc4-drm soc:gpu@7e4c0000: bound 20207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.198325] vc4-drm soc:gpu@7e4c0000: bound 20206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.198440] vc4-drm soc:gpu@7e4c0000: bound 20400000.hvs (ops vc4_hvs_ops [vc4])
[    9.274637] [drm:vc4_v3d_bind [vc4]] *ERROR* V3D_IDENT0 read 0xdeadbeef instead of 0x02443356
[    9.274781] vc4-drm soc:gpu@7e4c0000: failed to bind 20c00000.v3d (ops vc4_v3d_ops [vc4]): -22
[    9.297330] vc4-drm soc:gpu@7e4c0000: master bind failed: -22
[    9.297402] vc4-drm: probe of soc:gpu@7e4c0000 failed with error -22
[   10.877294] systemd-journald[89]: Received request to flush runtime journal from PID 1
[   11.846981] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   11.847847] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   17.062448] Adding 102396k swap on /var/swap.  Priority:-1 extents:6 across:573436k SSFS

@pelwell
Copy link
Contributor

pelwell commented Dec 1, 2015

From that log I can see that you have one of the newer 512MB B's, and that the initial 16MB CMA allocation is failing. At the moment this project is being developed for Pi 2 - although the intention is that it should run on a Pi 1 eventually, that isn't a priority at the moment.

@ED6E0F17
Copy link

ED6E0F17 commented Dec 1, 2015

Your CMA allocation will be reduced to 32Mb less than GPU mem, so you need more GPU and CMA. I am using GPU 128, CMA 128 on a model A, and getting 96Mb CMA (still available to linux)

@Ruffio
Copy link

Ruffio commented Aug 17, 2016

@bobodeng520 has your issue been resolved? If so, please close this issue. Thanks.

popcornmix pushed a commit that referenced this issue Nov 28, 2016
This can fix below dump when the lock is accessed at host
mode due to it is not initialized.

[   46.119638] INFO: trying to register non-static key.
[   46.124643] the code is fine but needs lockdep annotation.
[   46.130144] turning off the locking correctness validator.
[   46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
[   46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[   46.148923] Backtrace:
[   46.151448] [<c010c460>] (dump_backtrace) from [<c010c658>] (show_stack+0x18/0x1c)
[   46.159038]  r7:edf52000
[   46.161412]  r6:60000193
[   46.163967]  r5:00000000
[   46.165035]  r4:c0e25c2c

[   46.169109] [<c010c640>] (show_stack) from [<c03f58a4>] (dump_stack+0xb4/0xe8)
[   46.176362] [<c03f57f0>] (dump_stack) from [<c016d690>] (register_lock_class+0x4fc/0x56c)
[   46.184554]  r10:c0e25d24
[   46.187014]  r9:edf53e70
[   46.189569]  r8:c1642444
[   46.190637]  r7:ee9da024
[   46.193191]  r6:00000000
[   46.194258]  r5:00000000
[   46.196812]  r4:00000000
[   46.199185]  r3:00000001

[   46.203259] [<c016d194>] (register_lock_class) from [<c0171294>] (__lock_acquire+0x80/0x10f0)
[   46.211797]  r10:c0e25d24
[   46.214257]  r9:edf53e70
[   46.216813]  r8:ee9da024
[   46.217880]  r7:c1642444
[   46.220435]  r6:edcd1800
[   46.221502]  r5:60000193
[   46.224057]  r4:00000000

[   46.227953] [<c0171214>] (__lock_acquire) from [<c01726c0>] (lock_acquire+0x74/0x94)
[   46.235710]  r10:00000001
[   46.238169]  r9:edf53e70
[   46.240723]  r8:edf53f80
[   46.241790]  r7:00000001
[   46.244344]  r6:00000001
[   46.245412]  r5:60000193
[   46.247966]  r4:00000000

[   46.251866] [<c017264c>] (lock_acquire) from [<c096c8fc>] (_raw_spin_lock_irqsave+0x40/0x54)
[   46.260319]  r7:ee1c6a00
[   46.262691]  r6:c062a570
[   46.265247]  r5:20000113
[   46.266314]  r4:ee9da014

[   46.270393] [<c096c8bc>] (_raw_spin_lock_irqsave) from [<c062a570>] (ci_port_test_show+0x2c/0x70)
[   46.279280]  r6:eebd2000
[   46.281652]  r5:ee9da010
[   46.284207]  r4:ee9da014

[   46.286810] [<c062a544>] (ci_port_test_show) from [<c0248d04>] (seq_read+0x1ac/0x4f8)
[   46.294655]  r9:edf53e70
[   46.297028]  r8:edf53f80
[   46.299583]  r7:ee1c6a00
[   46.300650]  r6:00000001
[   46.303205]  r5:00000000
[   46.304273]  r4:eebd2000
[   46.306850] [<c0248b58>] (seq_read) from [<c039e864>] (full_proxy_read+0x54/0x6c)
[   46.314348]  r10:00000000
[   46.316808]  r9:c0a6ad30
[   46.319363]  r8:edf53f80
[   46.320430]  r7:00020000
[   46.322986]  r6:b6de3000
[   46.324053]  r5:ee1c6a00
[   46.326607]  r4:c0248b58

[   46.330505] [<c039e810>] (full_proxy_read) from [<c021ec98>] (__vfs_read+0x34/0x118)
[   46.338262]  r9:edf52000
[   46.340635]  r8:c0107fc4
[   46.343190]  r7:00020000
[   46.344257]  r6:edf53f80
[   46.346812]  r5:c039e810
[   46.347879]  r4:ee1c6a00
[   46.350447] [<c021ec64>] (__vfs_read) from [<c021fbd0>] (vfs_read+0x8c/0x11c)
[   46.357597]  r9:edf52000
[   46.359969]  r8:c0107fc4
[   46.362524]  r7:edf53f80
[   46.363592]  r6:b6de3000
[   46.366147]  r5:ee1c6a00
[   46.367214]  r4:00020000
[   46.369782] [<c021fb44>] (vfs_read) from [<c0220a4c>] (SyS_read+0x4c/0xa8)
[   46.376672]  r8:c0107fc4
[   46.379045]  r7:00020000
[   46.381600]  r6:b6de3000
[   46.382667]  r5:ee1c6a00
[   46.385222]  r4:ee1c6a00

[   46.387817] [<c0220a00>] (SyS_read) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
[   46.395314]  r7:00000003
[   46.397687]  r6:b6de3000
[   46.400243]  r5:00020000
[   46.401310]  r4:00020000

Cc: <stable@vger.kernel.org>
Fixes: 26c696c ("USB: Chipidea: rename struct
	       	ci13xxx variables from udc to ci")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
popcornmix pushed a commit that referenced this issue Dec 2, 2016
commit a5d906b upstream.

This can fix below dump when the lock is accessed at host
mode due to it is not initialized.

[   46.119638] INFO: trying to register non-static key.
[   46.124643] the code is fine but needs lockdep annotation.
[   46.130144] turning off the locking correctness validator.
[   46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
[   46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[   46.148923] Backtrace:
[   46.151448] [<c010c460>] (dump_backtrace) from [<c010c658>] (show_stack+0x18/0x1c)
[   46.159038]  r7:edf52000
[   46.161412]  r6:60000193
[   46.163967]  r5:00000000
[   46.165035]  r4:c0e25c2c

[   46.169109] [<c010c640>] (show_stack) from [<c03f58a4>] (dump_stack+0xb4/0xe8)
[   46.176362] [<c03f57f0>] (dump_stack) from [<c016d690>] (register_lock_class+0x4fc/0x56c)
[   46.184554]  r10:c0e25d24
[   46.187014]  r9:edf53e70
[   46.189569]  r8:c1642444
[   46.190637]  r7:ee9da024
[   46.193191]  r6:00000000
[   46.194258]  r5:00000000
[   46.196812]  r4:00000000
[   46.199185]  r3:00000001

[   46.203259] [<c016d194>] (register_lock_class) from [<c0171294>] (__lock_acquire+0x80/0x10f0)
[   46.211797]  r10:c0e25d24
[   46.214257]  r9:edf53e70
[   46.216813]  r8:ee9da024
[   46.217880]  r7:c1642444
[   46.220435]  r6:edcd1800
[   46.221502]  r5:60000193
[   46.224057]  r4:00000000

[   46.227953] [<c0171214>] (__lock_acquire) from [<c01726c0>] (lock_acquire+0x74/0x94)
[   46.235710]  r10:00000001
[   46.238169]  r9:edf53e70
[   46.240723]  r8:edf53f80
[   46.241790]  r7:00000001
[   46.244344]  r6:00000001
[   46.245412]  r5:60000193
[   46.247966]  r4:00000000

[   46.251866] [<c017264c>] (lock_acquire) from [<c096c8fc>] (_raw_spin_lock_irqsave+0x40/0x54)
[   46.260319]  r7:ee1c6a00
[   46.262691]  r6:c062a570
[   46.265247]  r5:20000113
[   46.266314]  r4:ee9da014

[   46.270393] [<c096c8bc>] (_raw_spin_lock_irqsave) from [<c062a570>] (ci_port_test_show+0x2c/0x70)
[   46.279280]  r6:eebd2000
[   46.281652]  r5:ee9da010
[   46.284207]  r4:ee9da014

[   46.286810] [<c062a544>] (ci_port_test_show) from [<c0248d04>] (seq_read+0x1ac/0x4f8)
[   46.294655]  r9:edf53e70
[   46.297028]  r8:edf53f80
[   46.299583]  r7:ee1c6a00
[   46.300650]  r6:00000001
[   46.303205]  r5:00000000
[   46.304273]  r4:eebd2000
[   46.306850] [<c0248b58>] (seq_read) from [<c039e864>] (full_proxy_read+0x54/0x6c)
[   46.314348]  r10:00000000
[   46.316808]  r9:c0a6ad30
[   46.319363]  r8:edf53f80
[   46.320430]  r7:00020000
[   46.322986]  r6:b6de3000
[   46.324053]  r5:ee1c6a00
[   46.326607]  r4:c0248b58

[   46.330505] [<c039e810>] (full_proxy_read) from [<c021ec98>] (__vfs_read+0x34/0x118)
[   46.338262]  r9:edf52000
[   46.340635]  r8:c0107fc4
[   46.343190]  r7:00020000
[   46.344257]  r6:edf53f80
[   46.346812]  r5:c039e810
[   46.347879]  r4:ee1c6a00
[   46.350447] [<c021ec64>] (__vfs_read) from [<c021fbd0>] (vfs_read+0x8c/0x11c)
[   46.357597]  r9:edf52000
[   46.359969]  r8:c0107fc4
[   46.362524]  r7:edf53f80
[   46.363592]  r6:b6de3000
[   46.366147]  r5:ee1c6a00
[   46.367214]  r4:00020000
[   46.369782] [<c021fb44>] (vfs_read) from [<c0220a4c>] (SyS_read+0x4c/0xa8)
[   46.376672]  r8:c0107fc4
[   46.379045]  r7:00020000
[   46.381600]  r6:b6de3000
[   46.382667]  r5:ee1c6a00
[   46.385222]  r4:ee1c6a00

[   46.387817] [<c0220a00>] (SyS_read) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
[   46.395314]  r7:00000003
[   46.397687]  r6:b6de3000
[   46.400243]  r5:00020000
[   46.401310]  r4:00020000

Fixes: 26c696c ("USB: Chipidea: rename struct ci13xxx variables from udc to ci")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
popcornmix pushed a commit that referenced this issue Dec 2, 2016
commit a5d906b upstream.

This can fix below dump when the lock is accessed at host
mode due to it is not initialized.

[   46.119638] INFO: trying to register non-static key.
[   46.124643] the code is fine but needs lockdep annotation.
[   46.130144] turning off the locking correctness validator.
[   46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
[   46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[   46.148923] Backtrace:
[   46.151448] [<c010c460>] (dump_backtrace) from [<c010c658>] (show_stack+0x18/0x1c)
[   46.159038]  r7:edf52000
[   46.161412]  r6:60000193
[   46.163967]  r5:00000000
[   46.165035]  r4:c0e25c2c

[   46.169109] [<c010c640>] (show_stack) from [<c03f58a4>] (dump_stack+0xb4/0xe8)
[   46.176362] [<c03f57f0>] (dump_stack) from [<c016d690>] (register_lock_class+0x4fc/0x56c)
[   46.184554]  r10:c0e25d24
[   46.187014]  r9:edf53e70
[   46.189569]  r8:c1642444
[   46.190637]  r7:ee9da024
[   46.193191]  r6:00000000
[   46.194258]  r5:00000000
[   46.196812]  r4:00000000
[   46.199185]  r3:00000001

[   46.203259] [<c016d194>] (register_lock_class) from [<c0171294>] (__lock_acquire+0x80/0x10f0)
[   46.211797]  r10:c0e25d24
[   46.214257]  r9:edf53e70
[   46.216813]  r8:ee9da024
[   46.217880]  r7:c1642444
[   46.220435]  r6:edcd1800
[   46.221502]  r5:60000193
[   46.224057]  r4:00000000

[   46.227953] [<c0171214>] (__lock_acquire) from [<c01726c0>] (lock_acquire+0x74/0x94)
[   46.235710]  r10:00000001
[   46.238169]  r9:edf53e70
[   46.240723]  r8:edf53f80
[   46.241790]  r7:00000001
[   46.244344]  r6:00000001
[   46.245412]  r5:60000193
[   46.247966]  r4:00000000

[   46.251866] [<c017264c>] (lock_acquire) from [<c096c8fc>] (_raw_spin_lock_irqsave+0x40/0x54)
[   46.260319]  r7:ee1c6a00
[   46.262691]  r6:c062a570
[   46.265247]  r5:20000113
[   46.266314]  r4:ee9da014

[   46.270393] [<c096c8bc>] (_raw_spin_lock_irqsave) from [<c062a570>] (ci_port_test_show+0x2c/0x70)
[   46.279280]  r6:eebd2000
[   46.281652]  r5:ee9da010
[   46.284207]  r4:ee9da014

[   46.286810] [<c062a544>] (ci_port_test_show) from [<c0248d04>] (seq_read+0x1ac/0x4f8)
[   46.294655]  r9:edf53e70
[   46.297028]  r8:edf53f80
[   46.299583]  r7:ee1c6a00
[   46.300650]  r6:00000001
[   46.303205]  r5:00000000
[   46.304273]  r4:eebd2000
[   46.306850] [<c0248b58>] (seq_read) from [<c039e864>] (full_proxy_read+0x54/0x6c)
[   46.314348]  r10:00000000
[   46.316808]  r9:c0a6ad30
[   46.319363]  r8:edf53f80
[   46.320430]  r7:00020000
[   46.322986]  r6:b6de3000
[   46.324053]  r5:ee1c6a00
[   46.326607]  r4:c0248b58

[   46.330505] [<c039e810>] (full_proxy_read) from [<c021ec98>] (__vfs_read+0x34/0x118)
[   46.338262]  r9:edf52000
[   46.340635]  r8:c0107fc4
[   46.343190]  r7:00020000
[   46.344257]  r6:edf53f80
[   46.346812]  r5:c039e810
[   46.347879]  r4:ee1c6a00
[   46.350447] [<c021ec64>] (__vfs_read) from [<c021fbd0>] (vfs_read+0x8c/0x11c)
[   46.357597]  r9:edf52000
[   46.359969]  r8:c0107fc4
[   46.362524]  r7:edf53f80
[   46.363592]  r6:b6de3000
[   46.366147]  r5:ee1c6a00
[   46.367214]  r4:00020000
[   46.369782] [<c021fb44>] (vfs_read) from [<c0220a4c>] (SyS_read+0x4c/0xa8)
[   46.376672]  r8:c0107fc4
[   46.379045]  r7:00020000
[   46.381600]  r6:b6de3000
[   46.382667]  r5:ee1c6a00
[   46.385222]  r4:ee1c6a00

[   46.387817] [<c0220a00>] (SyS_read) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
[   46.395314]  r7:00000003
[   46.397687]  r6:b6de3000
[   46.400243]  r5:00020000
[   46.401310]  r4:00020000

Fixes: 26c696c ("USB: Chipidea: rename struct ci13xxx variables from udc to ci")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@JamesH65
Copy link
Contributor

Closing due to lack of activity. Reopen if you feel this issue is still relevant.

popcornmix pushed a commit that referenced this issue Dec 31, 2020
[ Upstream commit e6db818 ]

running kernel with CONFIG_DEBUG_LOCKS_ALLOC enabled will below warning:

BUG: key ffff502e09807098 has not been registered!
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 5 PID: 129 at kernel/locking/lockdep.c:4623
	lockdep_init_map_waits+0xe8/0x250
Modules linked in:
CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G
       W         5.10.0-rc1-00277-ged49f224ca3f-dirty #1210
Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
Workqueue: events deferred_probe_work_func
pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
pc : lockdep_init_map_waits+0xe8/0x250
lr : lockdep_init_map_waits+0xe8/0x250
 [ Trimmed ]

Call trace:
 lockdep_init_map_waits+0xe8/0x250
 __kernfs_create_file+0x78/0x180
 sysfs_add_file_mode_ns+0x94/0x1c8
 internal_create_group+0x110/0x3e0
 sysfs_create_group+0x18/0x28
 devm_device_add_group+0x4c/0xb0
 add_all_attributes+0x438/0x490
 sdw_slave_sysfs_dpn_init+0x128/0x138
 sdw_slave_sysfs_init+0x80/0xa0
 sdw_drv_probe+0x94/0x170
 really_probe+0x118/0x3e0
 driver_probe_device+0x5c/0xc0

 [ Trimmed ]

CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G
     W         5.10.0-rc1-00277-ged49f224ca3f-dirty #1210
Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
Workqueue: events deferred_probe_work_func
Call trace:
 dump_backtrace+0x0/0x1c0
 show_stack+0x18/0x68
 dump_stack+0xd8/0x134
 __warn+0xa0/0x158
 report_bug+0xc8/0x178
 bug_handler+0x20/0x78
 brk_handler+0x70/0xc8

[ Trimmed ]

Fix this by initializing dynamically allocated sysfs attribute to keep lockdep happy!

Fixes: bcac590 ("soundwire: add Slave sysfs support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201104112941.1134-1-srinivas.kandagatla@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@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

6 participants