pwm-pio OOPS when enabling on 6.12.34
Describe the bug
When testing pwm-pio on a Pi 5 2GB running an up-to-date Raspberry Pi OS 64-bit Bookworm Lite, I encountered errors which killed the current process.
The dmesg report showed WARNINGS and an OOPS.
Steps to reproduce the behaviour
Install Bookworm Lite using imager.
Run sudo apt update && sudo apt full-upgrade.
Enable pwm-pio in config.txt
dtoverlay=pwm-pio
Reboot.
Then the following command line sequence caused the problem
rpdom@raspberrypi:~ $ cd /sys/class/pwm/pwmchip1/
rpdom@raspberrypi:/sys/class/pwm/pwmchip1 $ cat npwm
1
rpdom@raspberrypi:/sys/class/pwm/pwmchip1 $ echo "0" >export
rpdom@raspberrypi:/sys/class/pwm/pwmchip1 $ cd pwm0
rpdom@raspberrypi:/sys/class/pwm/pwmchip1/pwm0 $ echo 50 >duty_cycle
rpdom@raspberrypi:/sys/class/pwm/pwmchip1/pwm0 $ echo 1000 > period
rpdom@raspberrypi:/sys/class/pwm/pwmchip1/pwm0 $ echo 1 > enable
At this point the shell exited and dmesg showed the trace.
Device (s)
Raspberry Pi 5
System
https://pastebin.com/c3WcrYjV
Logs
rpdom@raspberrypi:~ $ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[ 0.000000] Linux version 6.12.34+rpt-rpi-2712 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26)
[ 0.000000] KASLR enabled
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi 5 Model B Rev 1.0
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000003a000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000003a000000..0x000000003dffffff (65536 KiB) map reusable linux,cma
[ 0.000000] OF: reserved mem: 0x0000000000000000..0x000000000007ffff (512 KiB) nomap non-reusable atf@0
[ 0.000000] OF: reserved mem: 0x000000003fd165e0..0x000000003fd16657 (0 KiB) nomap non-reusable nvram@0
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] Faking node 0 at [mem 0x0000000000000000-0x000000001fffffff] (512MB)
[ 0.000000] Faking node 1 at [mem 0x0000000020000000-0x000000003fffffff] (512MB)
[ 0.000000] Faking node 2 at [mem 0x0000000040000000-0x000000005fffffff] (512MB)
[ 0.000000] Faking node 3 at [mem 0x0000000060000000-0x000000007fffffff] (512MB)
[ 0.000000] NUMA: Initialized distance table, cnt=4
[ 0.000000] NODE_DATA(0) allocated [mem 0x1fffd200-0x1fffffff]
[ 0.000000] NODE_DATA(1) allocated [mem 0x3fbfd200-0x3fbfffff]
[ 0.000000] NODE_DATA(2) allocated [mem 0x5fffd200-0x5fffffff]
[ 0.000000] NODE_DATA(3) allocated [mem 0x7fe9c080-0x7fe9ee7f]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000007ffff]
[ 0.000000] node 0: [mem 0x0000000000080000-0x000000001fffffff]
[ 0.000000] node 1: [mem 0x0000000020000000-0x000000003fbfffff]
[ 0.000000] node 2: [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] node 3: [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[ 0.000000] Initmem setup node 1 [mem 0x0000000020000000-0x000000003fbfffff]
[ 0.000000] Initmem setup node 2 [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] Initmem setup node 3 [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] On node 2, zone DMA: 256 pages in unavailable ranges
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.2
[ 0.000000] percpu: Embedded 15 pages/cpu s193368 r8192 d44200 u245760
[ 0.000000] pcpu-alloc: s193368 r8192 d44200 u245760 alloc=15*16384
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: Virtualization Host Extensions
[ 0.000000] CPU features: detected: Spectre-v4
[ 0.000000] CPU features: detected: Spectre-BHB
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] CPU features: detected: SSBS not fully self-synchronizing
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave nvme.max_host_mem_size_mb=0 numa=fake=4 system_heap.max_order=0 smsc95xx.macaddr=2C:CF:67:7B:65:FE vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 console=ttyAMA10,115200 console=tty1 root=PARTUUID=706a1aa4-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=GB
[ 0.000000] cgroup: Disabling memory control group subsystem
[ 0.000000] mempolicy: NUMA default policy overridden to 'interleave:0-3'
[ 0.000000] Fallback order for Node 0: 0 1 2 3
[ 0.000000] Fallback order for Node 1: 1 2 3 0
[ 0.000000] Fallback order for Node 2: 2 3 0 1
[ 0.000000] Fallback order for Node 3: 3 0 1 2
[ 0.000000] Built 4 zonelists, mobility grouping on. Total pages: 130816
[ 0.000000] Policy zone: DMA
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=4
[ 0.000000] ftrace: allocating 45269 entries in 45 pages
[ 0.000000] ftrace: allocated 45 pages with 4 groups
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.000000] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[ 0.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[ 0.000090] Console: colour dummy device 80x25
[ 0.000095] printk: legacy console [tty1] enabled
[ 0.000258] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[ 0.000265] pid_max: default: 32768 minimum: 301
[ 0.000308] LSM: initializing lsm=capability
[ 0.000704] Dentry cache hash table entries: 262144 (order: 7, 2097152 bytes, vmalloc)
[ 0.000938] Inode-cache hash table entries: 131072 (order: 6, 1048576 bytes, vmalloc)
[ 0.000957] Mount-cache hash table entries: 4096 (order: 1, 32768 bytes, vmalloc)
[ 0.000975] Mountpoint-cache hash table entries: 4096 (order: 1, 32768 bytes, vmalloc)
[ 0.001675] rcu: Hierarchical SRCU implementation.
[ 0.001686] rcu: Max phase no-delay instances is 1000.
[ 0.001729] Timer migration: 1 hierarchy levels; 8 children per group; 0 crossnode level
[ 0.002085] EFI services will not be available.
[ 0.002157] smp: Bringing up secondary CPUs ...
[ 0.002349] Detected PIPT I-cache on CPU1
[ 0.002385] CPU1: Booted secondary processor 0x0000000100 [0x414fd0b1]
[ 0.002598] Detected PIPT I-cache on CPU2
[ 0.002625] CPU2: Booted secondary processor 0x0000000200 [0x414fd0b1]
[ 0.002830] Detected PIPT I-cache on CPU3
[ 0.002850] CPU3: Booted secondary processor 0x0000000300 [0x414fd0b1]
[ 0.002877] smp: Brought up 4 nodes, 4 CPUs
[ 0.002892] SMP: Total of 4 processors activated.
[ 0.002894] CPU: All CPU(s) started at EL2
[ 0.002898] CPU features: detected: 32-bit EL0 Support
[ 0.002901] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[ 0.002905] CPU features: detected: Common not Private translations
[ 0.002908] CPU features: detected: CRC32 instructions
[ 0.002912] CPU features: detected: RCpc load-acquire (LDAPR)
[ 0.002915] CPU features: detected: LSE atomic instructions
[ 0.002917] CPU features: detected: Privileged Access Never
[ 0.002919] CPU features: detected: RAS Extension Support
[ 0.002923] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[ 0.002948] alternatives: applying system-wide alternatives
[ 0.004452] CPU features: detected: Hardware dirty bit management on CPU0-3
[ 0.004618] Memory: 1964576K/2093056K available (14208K kernel code, 2418K rwdata, 4928K rodata, 5696K init, 647K bss, 46960K reserved, 65536K cma-reserved)
[ 0.004750] devtmpfs: initialized
[ 0.006585] Enabled cp15_barrier support
[ 0.006591] Enabled setend support
[ 0.006633] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.006640] futex hash table entries: 1024 (order: 2, 65536 bytes, vmalloc)
[ 0.006771] 2G module region forced by RANDOMIZE_MODULE_REGION_FULL
[ 0.006775] 0 pages in range for non-PLT usage
[ 0.006776] 129308 pages in range for PLT usage
[ 0.006831] pinctrl core: initialized pinctrl subsystem
[ 0.006953] DMI not present or invalid.
[ 0.009066] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.009402] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[ 0.009432] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.009463] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.009479] audit: initializing netlink subsys (disabled)
[ 0.009529] audit: type=2000 audit(0.008:1): state=initialized audit_enabled=0 res=1
[ 0.009624] thermal_sys: Registered thermal governor 'step_wise'
[ 0.009632] cpuidle: using governor menu
[ 0.009684] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.009705] ASID allocator initialised with 32768 entries
[ 0.009929] Serial: AMBA PL011 UART driver
[ 0.010662] /soc@107c000000/interrupt-controller@7fff9000: Fixed dependency cycle(s) with /soc@107c000000/interrupt-controller@7fff9000
[ 0.010817] bcm2835-mbox 107c013880.mailbox: mailbox enabled
[ 0.010936] 107d001000.serial: ttyAMA10 at MMIO 0x107d001000 (irq = 16, base_baud = 0) is a PL011 rev3
[ 0.010947] printk: legacy console [ttyAMA10] enabled
[ 0.900566] raspberrypi-firmware soc@107c000000:firmware: Attached to firmware from 2025-06-09T09:30:52, variant start_cd
[ 0.915582] raspberrypi-firmware soc@107c000000:firmware: Firmware hash is 3a4915a400000000000000000000000000000000
[ 0.934473] bcm2835-dma 1000010000.dma: DMA legacy API manager, dmachans=0x1
[ 0.941800] iommu: Default domain type: Translated
[ 0.946636] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.959013] SCSI subsystem initialized
[ 0.962806] usbcore: registered new interface driver usbfs
[ 0.968317] usbcore: registered new interface driver hub
[ 0.973652] usbcore: registered new device driver usb
[ 0.978788] pps_core: LinuxPPS API ver. 1 registered
[ 0.983769] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.992940] PTP clock support registered
[ 0.997107] vgaarb: loaded
[ 0.999901] clocksource: Switched to clocksource arch_sys_counter
[ 1.006142] VFS: Disk quotas dquot_6.6.0
[ 1.010082] VFS: Dquot-cache hash table entries: 2048 (order 0, 16384 bytes)
[ 1.018249] NET: Registered PF_INET protocol family
[ 1.023208] IP idents hash table entries: 32768 (order: 4, 262144 bytes, vmalloc)
[ 1.031188] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 16384 bytes, vmalloc)
[ 1.039856] Table-perturb hash table entries: 65536 (order: 4, 262144 bytes, vmalloc)
[ 1.047721] TCP established hash table entries: 16384 (order: 3, 131072 bytes, vmalloc)
[ 1.055810] TCP bind hash table entries: 16384 (order: 5, 524288 bytes, vmalloc)
[ 1.063407] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.070021] MPTCP token hash table entries: 2048 (order: 1, 49152 bytes, vmalloc)
[ 1.077553] UDP hash table entries: 1024 (order: 1, 32768 bytes, vmalloc)
[ 1.084383] UDP-Lite hash table entries: 1024 (order: 1, 32768 bytes, vmalloc)
[ 1.091678] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 1.097467] RPC: Registered named UNIX socket transport module.
[ 1.103410] RPC: Registered udp transport module.
[ 1.108127] RPC: Registered tcp transport module.
[ 1.112845] RPC: Registered tcp-with-tls transport module.
[ 1.118347] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.124817] PCI: CLS 0 bytes, default 64
[ 1.128826] Trying to unpack rootfs image as initramfs...
[ 1.135534] kvm [1]: nv: 554 coarse grained trap handlers
[ 1.141114] kvm [1]: IPA Size Limit: 40 bits
[ 1.146138] kvm [1]: GICV region size/alignment is unsafe, using trapping (reduced performance)
[ 1.154922] kvm [1]: vgic interrupt IRQ9
[ 1.158874] kvm [1]: VHE mode initialized successfully
[ 1.164515] Initialise system trusted keyrings
[ 1.169133] workingset: timestamp_bits=42 max_order=17 bucket_order=0
[ 1.175909] NFS: Registering the id_resolver key type
[ 1.180994] Key type id_resolver registered
[ 1.185192] Key type id_legacy registered
[ 1.189224] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.195974] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.199037] Freeing initrd memory: 7472K
[ 1.203707] Key type asymmetric registered
[ 1.211557] Asymmetric key parser 'x509' registered
[ 1.216467] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 1.223981] io scheduler mq-deadline registered
[ 1.228528] io scheduler kyber registered
[ 1.232588] io scheduler bfq registered
[ 1.236765] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/interrupt-controller@7d510600, parent irq: 27)
[ 1.246858] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/interrupt-controller@7c502000, parent irq: 28)
[ 1.256934] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d508380, parent irq: 29)
[ 1.265613] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d508400, parent irq: 30)
[ 1.274290] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d503000, parent irq: 31)
[ 1.283789] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.318709] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 1.325296] 107d50c000.serial: ttyS0 at MMIO 0x107d50c000 (irq = 33, base_baud = 6000000) is a Broadcom BCM7271 UART
[ 1.335910] serial serial0: tty port ttyS0 registered
[ 1.341223] iproc-rng200 107d208000.rng: hwrng registered
[ 1.346671] vc-mem: phys_addr:0x00000000 mem_base=0x3fc00000 mem_size:0x40000000(1024 MiB)
[ 1.355147] bcm2712-iommu-cache 1000005b00.iommuc: bcm2712_iommu_cache_probe
[ 1.363483] brd: module loaded
[ 1.367425] loop: module loaded
[ 1.370660] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 1.378014] Loading iSCSI transport class v2.0-870.
[ 1.383533] usbcore: registered new interface driver lan78xx
[ 1.389224] usbcore: registered new interface driver smsc95xx
[ 1.395033] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.400814] dwc_otg: FIQ enabled
[ 1.400815] dwc_otg: NAK holdoff enabled
[ 1.400816] dwc_otg: FIQ split-transaction FSM enabled
[ 1.400818] Module dwc_common_port init
[ 1.401006] usbcore: registered new interface driver uas
[ 1.406346] usbcore: registered new interface driver usb-storage
[ 1.412435] mousedev: PS/2 mouse device common for all mice
[ 1.425505] rpi-rtc soc@107c000000:rpi_rtc: registered as rtc0
[ 1.432736] rpi-rtc soc@107c000000:rpi_rtc: setting system clock to 1970-01-01T00:00:14 UTC (14)
[ 1.441849] bcm2835-wdt bcm2835-wdt: Poweroff handler already present!
[ 1.448405] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 1.456754] sdhci: Secure Digital Host Controller Interface driver
[ 1.462970] sdhci: Copyright(c) Pierre Ossman
[ 1.467378] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.473126] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 1.479613] hid: raw HID events driver (C) Jiri Kosina
[ 1.484793] usbcore: registered new interface driver usbhid
[ 1.490384] usbhid: USB HID core driver
[ 1.494517] hw perfevents: enabled with armv8_cortex_a76 PMU driver, 7 (0,8000003f) counters available
[ 1.504088] NET: Registered PF_PACKET protocol family
[ 1.509177] Key type dns_resolver registered
[ 1.516885] registered taskstats version 1
[ 1.521064] Loading compiled-in X.509 certificates
[ 1.527307] Demotion targets for Node 0: null
[ 1.531682] Demotion targets for Node 1: null
[ 1.536053] Demotion targets for Node 2: null
[ 1.540637] Demotion targets for Node 3: null
[ 1.545148] Key type .fscrypt registered
[ 1.549081] Key type fscrypt-provisioning registered
[ 1.554778] brcm-pcie 1000120000.pcie: host bridge /axi/pcie@1000120000 ranges:
[ 1.562128] brcm-pcie 1000120000.pcie: No bus range found for /axi/pcie@1000120000, using [bus 00-ff]
[ 1.571654] brcm-pcie 1000120000.pcie: MEM 0x1f00000000..0x1ffffffffb -> 0x0000000000
[ 1.579956] brcm-pcie 1000120000.pcie: MEM 0x1c00000000..0x1effffffff -> 0x0400000000
[ 1.588260] brcm-pcie 1000120000.pcie: IB MEM 0x1f00000000..0x1f003fffff -> 0x0000000000
[ 1.596562] brcm-pcie 1000120000.pcie: IB MEM 0x0000000000..0x0fffffffff -> 0x1000000000
[ 1.604863] brcm-pcie 1000120000.pcie: IB MEM 0x1000130000..0x1000130fff -> 0xfffffff000
[ 1.614526] brcm-pcie 1000120000.pcie: PCI host bridge to bus 0002:00
[ 1.620996] pci_bus 0002:00: root bus resource [bus 00-ff]
[ 1.626500] pci_bus 0002:00: root bus resource [mem 0x1f00000000-0x1ffffffffb] (bus address [0x00000000-0xfffffffb])
[ 1.637067] pci_bus 0002:00: root bus resource [mem 0x1c00000000-0x1effffffff pref] (bus address [0x400000000-0x6ffffffff])
[ 1.648255] pci 0002:00:00.0: [14e4:2712] type 01 class 0x060400 PCIe Root Port
[ 1.655596] pci 0002:00:00.0: PCI bridge to [bus 00]
[ 1.660578] pci 0002:00:00.0: bridge window [mem 0x1f80000000-0x1fbfffffff]
[ 1.667756] pci 0002:00:00.0: PME# supported from D0 D3hot
[ 1.673854] pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 1.783905] brcm-pcie 1000120000.pcie: clkreq-mode set to default
[ 1.790021] brcm-pcie 1000120000.pcie: link up, 5.0 GT/s PCIe x4 (!SSC)
[ 1.796676] pci 0002:01:00.0: [1de4:0001] type 00 class 0x020000 PCIe Endpoint
[ 1.803937] pci 0002:01:00.0: BAR 0 [mem 0xffffc000-0xffffffff]
[ 1.809881] pci 0002:01:00.0: BAR 1 [mem 0xffc00000-0xffffffff]
[ 1.815825] pci 0002:01:00.0: BAR 2 [mem 0xffff0000-0xffffffff]
[ 1.821825] pci 0002:01:00.0: supports D1
[ 1.825845] pci 0002:01:00.0: PME# supported from D0 D1 D3hot D3cold
[ 1.839910] pci_bus 0002:01: busn_res: [bus 01-ff] end is updated to 01
[ 1.846555] pci 0002:00:00.0: bridge window [mem 0x1f00000000-0x1f005fffff]: assigned
[ 1.854418] pci 0002:01:00.0: BAR 1 [mem 0x1f00000000-0x1f003fffff]: assigned
[ 1.861582] pci 0002:01:00.0: BAR 2 [mem 0x1f00400000-0x1f0040ffff]: assigned
[ 1.868747] pci 0002:01:00.0: BAR 0 [mem 0x1f00410000-0x1f00413fff]: assigned
[ 1.875911] pci 0002:00:00.0: PCI bridge to [bus 01]
[ 1.880891] pci 0002:00:00.0: bridge window [mem 0x1f00000000-0x1f005fffff]
[ 1.888054] pci_bus 0002:00: resource 4 [mem 0x1f00000000-0x1ffffffffb]
[ 1.894693] pci_bus 0002:00: resource 5 [mem 0x1c00000000-0x1effffffff pref]
[ 1.901768] pci_bus 0002:01: resource 1 [mem 0x1f00000000-0x1f005fffff]
[ 1.908407] pci 0002:00:00.0: Max Payload Size set to 256/ 512 (was 128), Max Read Rq 512
[ 1.916885] pci 0002:01:00.0: Max Payload Size set to 256/ 256 (was 128), Max Read Rq 512
[ 1.925407] pcieport 0002:00:00.0: enabling device (0000 -> 0002)
[ 1.931549] pcieport 0002:00:00.0: PME: Signaling with IRQ 38
[ 1.937358] pcieport 0002:00:00.0: AER: enabled with IRQ 38
[ 1.943004] rp1 0002:01:00.0: bar0 len 0x4000, start 0x1f00410000, end 0x1f00413fff, flags, 0x40200
[ 1.952090] rp1 0002:01:00.0: bar1 len 0x400000, start 0x1f00000000, end 0x1f003fffff, flags, 0x40200
[ 1.961359] rp1 0002:01:00.0: enabling device (0000 -> 0002)
[ 1.967643] rp1 0002:01:00.0: chip_id 0x20001927
[ 1.976265] genirq: irq_chip rp1_irq_chip did not update eff. affinity mask of irq 100
[ 1.999568] macb 1f00100000.ethernet eth0: Cadence GEM rev 0x00070109 at 0x1f00100000 irq 106 (2c:cf:67:7b:65:fe)
[ 2.010668] dw_axi_dmac_platform 1f00188000.dma: DesignWare AXI DMA Controller, 8 channels
[ 2.019194] xhci-hcd xhci-hcd.0: xHCI Host Controller
[ 2.024271] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 1
[ 2.031954] xhci-hcd xhci-hcd.0: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000808000000810
[ 2.040960] xhci-hcd xhci-hcd.0: irq 131, io mem 0x1f00200000
[ 2.046777] xhci-hcd xhci-hcd.0: xHCI Host Controller
[ 2.051846] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 2
[ 2.059098] xhci-hcd xhci-hcd.0: Host supports USB 3.0 SuperSpeed
[ 2.065249] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[ 2.073549] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.080803] usb usb1: Product: xHCI Host Controller
[ 2.085696] usb usb1: Manufacturer: Linux 6.12.34+rpt-rpi-2712 xhci-hcd
[ 2.092335] usb usb1: SerialNumber: xhci-hcd.0
[ 2.096887] hub 1-0:1.0: USB hub found
[ 2.100658] hub 1-0:1.0: 2 ports detected
[ 2.104780] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.12
[ 2.113081] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.120334] usb usb2: Product: xHCI Host Controller
[ 2.125227] usb usb2: Manufacturer: Linux 6.12.34+rpt-rpi-2712 xhci-hcd
[ 2.131875] usb usb2: SerialNumber: xhci-hcd.0
[ 2.136462] hub 2-0:1.0: USB hub found
[ 2.140230] hub 2-0:1.0: 1 port detected
[ 2.144409] xhci-hcd xhci-hcd.1: xHCI Host Controller
[ 2.149584] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 3
[ 2.157264] xhci-hcd xhci-hcd.1: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000808000000810
[ 2.166362] xhci-hcd xhci-hcd.1: irq 136, io mem 0x1f00300000
[ 2.172183] xhci-hcd xhci-hcd.1: xHCI Host Controller
[ 2.177348] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 4
[ 2.184599] xhci-hcd xhci-hcd.1: Host supports USB 3.0 SuperSpeed
[ 2.190825] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[ 2.199123] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.206465] usb usb3: Product: xHCI Host Controller
[ 2.211358] usb usb3: Manufacturer: Linux 6.12.34+rpt-rpi-2712 xhci-hcd
[ 2.218089] usb usb3: SerialNumber: xhci-hcd.1
[ 2.222610] hub 3-0:1.0: USB hub found
[ 2.226385] hub 3-0:1.0: 2 ports detected
[ 2.230574] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.12
[ 2.238873] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.246219] usb usb4: Product: xHCI Host Controller
[ 2.251129] usb usb4: Manufacturer: Linux 6.12.34+rpt-rpi-2712 xhci-hcd
[ 2.257910] usb usb4: SerialNumber: xhci-hcd.1
[ 2.262426] hub 4-0:1.0: USB hub found
[ 2.266195] hub 4-0:1.0: 1 port detected
[ 2.271017] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[ 2.279414] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_probe: Success
[ 2.286731] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[ 2.295117] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_probe: Success
[ 2.302416] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[ 2.310793] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_probe: Success
[ 2.317924] sdhci-brcmstb 1000fff000.mmc: Got CD GPIO
[ 2.323098] mmc0: CQHCI version 5.10
[ 2.323175] mmc1: CQHCI version 5.10
[ 2.331253] of_cfs_init
[ 2.333747] of_cfs_init: OK
[ 2.336613] clk: Disabling unused clocks
[ 2.349241] PM: genpd: Disabling unused power domains
[ 2.363906] mmc0: SDHCI controller on 1000fff000.mmc [1000fff000.mmc] using ADMA 64-bit
[ 2.493562] mmc0: new ultra high speed SDR104 SDHC card at address b369
[ 2.500359] mmcblk0: mmc0:b369 SDABC 29.1 GiB
[ 2.505585] mmcblk0: p1 p2
[ 2.508444] mmcblk0: mmc0:b369 SDABC 29.1 GiB
[ 2.514441] mmc1: SDHCI controller on 1001100000.mmc [1001100000.mmc] using ADMA 64-bit
[ 2.525515] Freeing unused kernel memory: 5696K
[ 2.530161] Run /init as init process
[ 2.534074] with arguments:
[ 2.534075] /init
[ 2.534076] with environment:
[ 2.534077] HOME=/
[ 2.534078] TERM=linux
[ 2.553130] mmc1: new ultra high speed DDR50 SDIO card at address 0001
[ 2.647490] vc4_hvs 107c580000.hvs: bcm2712_iommu_of_xlate: MMU 1000005200.iommu
[ 2.655051] vc4_hvs 107c580000.hvs: bcm2712_iommu_probe_device: MMU 1000005200.iommu
[ 2.662886] vc4_hvs 107c580000.hvs: bcm2712_iommu_device_group: MMU 1000005200.iommu
[ 2.670719] vc4_hvs 107c580000.hvs: Adding to iommu group 1
[ 2.676329] vc4_hvs 107c580000.hvs: bcm2712_iommu_attach_dev: MMU 1000005200.iommu
[ 2.685135] vc4-drm axi:gpu: bcm2712_iommu_of_xlate: MMU 1000005200.iommu
[ 2.691970] vc4-drm axi:gpu: bcm2712_iommu_probe_device: MMU 1000005200.iommu
[ 2.699141] vc4-drm axi:gpu: bcm2712_iommu_device_group: MMU 1000005200.iommu
[ 2.706311] vc4-drm axi:gpu: Adding to iommu group 1
[ 2.711369] vc4-drm axi:gpu: bcm2712_iommu_attach_dev: MMU 1000005200.iommu
[ 2.720702] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops [vc4])
[ 2.988745] EXT4-fs (mmcblk0p2): mounted filesystem d4cc7d63-da78-48ad-9bdd-64ffbba449a8 ro with ordered data mode. Quota mode: none.
[ 3.198386] systemd[1]: System time before build time, advancing clock.
[ 3.574364] NET: Registered PF_INET6 protocol family
[ 3.579663] Segment Routing with IPv6
[ 3.583350] In-situ OAM (IOAM) with IPv6
[ 3.773913] systemd[1]: systemd 252.38-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[ 3.806778] systemd[1]: Detected architecture arm64.
[ 3.896559] systemd[1]: Hostname set to
Additional context
Originally reported on the forums https://forums.raspberrypi.com/viewtopic.php?t=390233
Seems to be around https://github.com/raspberrypi/linux/blob/rpi-6.12.y/drivers/pwm/pwm-pio-rp1.c#L118 (ppwm->pio is NULL). Candidate for a fix: https://github.com/raspberrypi/linux/pull/6972
Not quite enough context had been transferred from the forum thread :-(
I'd concluded the same thing over container_of not being appropriate in 6.12 - https://forums.raspberrypi.com/viewtopic.php?p=2328072#p2328072
However I was then getting a BUG: scheduling while atomic warning, but ran out of time yesterday to investigate hence asked for an issue to be raised to ensure it didn't get lost.
Good to know. This would have saved me sometime yesterday evening, but it actually it fun to do :) Regarding the atomic warning: Haven't seen this on 6.12.37 with what I was testing, but will test again once the ci is ready.
@rpdom if you're willing to test the patch, you can do so with sudo rpi-update pulls/6972.
Make sure to have a recovery strategy / backup for the (unlikely) case that the kernel wont boot. I've tested it on a CM5 and everything seems to look ok.
I'll agree that 6.12 works fine on my 2GB Pi5.
Time to have a quick look as to why it's throwing scheduling errors on 6.15 and 6.16, but that isn't a blocker for now. New PWM drivers are meant to use the waveform API, so it may be something that has crept in with that change.
...
Ah, the PWM device is specified as callable in an atomic context, in which case 1cc2e1faafb3b5a2be25112559bdb495736b5af7 added in 6.13 means the core will grab a spinlock, not a mutex. That explains the atomic context.
@rpdom if you're willing to test the patch, you can do so with
sudo rpi-update pulls/6972.Make sure to have a recovery strategy / backup for the (unlikely) case that the kernel wont boot. I've tested it on a CM5 and everything seems to look ok.
That seems to have fixed the problem, thank you. :-)
I’m getting the same "Invalid argument" error when trying to access the Bluetooth socket on my Raspberry Pi 5 running Ubuntu 24.04 Server, and after upgrading my Raspberry Pi OS with apt upgrade. Any chance this issue is resolved in Ubuntu 25.04 Server kernel?
The issue is unrelated to Bluetooth (invalid argument is a generic error message). Also as far as I know Ubuntu builds their own Kernel, so the bug report is probably better placed with them. If the same error happens with the latest Raspberry Pi OS and kernel I would suggest to open a new issue here.