Chagallwifi with postmarketOS and xfce

In my last postmarketOS related post I ended by mentioning some hacks I tried for disabling FIMC-IS on samsung-chagallwifi. After putting that aside for a few weeks I revisited the problem. The full kernel output, from boot to panic, was something like:

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.113-03176-g7d151a4b9fe7-dirty (pmos@grimlerstat) (gcc version 4.9.2 (postmarketOS 4.9.2) ) #13 SMP PREEMPT Tue Jan 19 18:59:09 UTC 2021
[    0.000000] CPU: ARMv7 Processor [412fc0f3] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine: Samsung EXYNOS5420
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] S5P/CMA: Reserved 0x00600000@0xdf400000 for 'ion'
[    0.000000] S5P/CMA: Reserved 0x00100000@0xdf300000 for 'drm_mfc_sh'
[    0.000000] S5P/CMA: Reserved 0x00800000@0xdeb00000 for 'drm_g2d_wfd'
[    0.000000] S5P/CMA: Reserved 0x00002000@0xdeafe000 for 'bl_mem'
[    0.000000] S5P/CMA: Reserved 0x0ce00000@0xd1c00000 for 'drm_video'
[    0.000000] S5P/CMA: Reserved 0x01000000@0xd0c00000 for 'drm_mfc_input'
[    0.000000] S5P/CMA: Reserved 0x00200000@0xd0a00000 for 'drm_mfc_fw'
[    0.000000] S5P/CMA: Reserved 0x00100000@0xd0900000 for 'drm_sectbl'
[    0.000000] S5P/CMA: Reserved 0x00020000@0xd0800000 for 'drm_secdma'
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] CPU EXYNOS5420 (id 0xe5420020)
[    0.000000] S3C24XX Clocks, Copyright 2004 Simtec Electronics
[    0.000000] clkout: bad source 0
[    0.000000] s3c_register_clksrc: clock sclk_hsic_12m has no registers set
[    0.000000] fout_ipll: source is ipll (0), rate is 432000000
[    0.000000] mout_apll: source is fout_apll (1), rate is 800000000
[    0.000000] mout_mpll: source is fout_mpll (1), rate is 532000000
[    0.000000] mout_bpll: source is fout_bpll (1), rate is 800000000
[    0.000000] sclk_bpll: source is ext_xtal (0), rate is 24000000
[    0.000000] mout_dpll: source is fout_dpll (1), rate is 600000000
[    0.000000] mout_ipll: source is fout_ipll (1), rate is 432000000
[    0.000000] mout_epll: source is fout_epll (1), rate is 100000000
[    0.000000] mout_cpll: source is fout_cpll (1), rate is 666000000
[    0.000000] mout_rpll: source is fout_rpll (1), rate is 266000000
[    0.000000] mout_vpll: source is fout_vpll (1), rate is 350000000
[    0.000000] mout_spll: source is fout_spll (1), rate is 400000000
[    0.000000] mout_cpu: source is mout_apll (0), rate is 800000000
[    0.000000] mout_hpm_cpu: source is mout_apll (0), rate is 800000000
[    0.000000] mout_kpll: source is fout_kpll (1), rate is 600000000
[    0.000000] mout_kfc: source is mout_kpll (0), rate is 600000000
[    0.000000] mout_hpm_kfc: source is mout_kpll (0), rate is 600000000
[    0.000000] mclk_cdrex: source is mout_bpll (0), rate is 800000000
[    0.000000] aclk_200_fsys_dout: source is mout_dpll (1), rate is 200000000
[    0.000000] aclk_200_fsys_sw: source is aclk_200_fsys_dout (0), rate is 200000000
[    0.000000] aclk_200_fsys: source is aclk_200_fsys_sw (1), rate is 200000000
[    0.000000] pclk_200_fsys_dout: source is mout_dpll (1), rate is 200000000
[    0.000000] pclk_200_fsys_sw: source is pclk_200_fsys_dout (0), rate is 200000000
[    0.000000] pclk_200_fsys: source is pclk_200_fsys_sw (1), rate is 200000000
[    0.000000] aclk_100_noc_dout: source is mout_dpll (1), rate is 100000000
[    0.000000] aclk_100_noc_sw: source is aclk_100_noc_dout (0), rate is 100000000
[    0.000000] aclk_100_noc: source is aclk_100_noc_sw (1), rate is 100000000
[    0.000000] aclk_400_wcore_mout: source is mout_mpll (2), rate is 532000000
[    0.000000] aclk_400_wcore_dout: source is aclk_400_wcore_mout (0), rate is 532000000
[    0.000000] aclk_400_wcore_sw: source is mout_spll (1), rate is 400000000
[    0.000000] aclk_400_wcore: source is aclk_400_wcore_sw (1), rate is 400000000
[    0.000000] aclk_200_fsys2_dout: source is mout_dpll (1), rate is 200000000
[    0.000000] aclk_200_fsys2_sw: source is aclk_200_fsys2_dout (0), rate is 200000000
[    0.000000] aclk_200_fsys2: source is aclk_200_fsys2_sw (1), rate is 200000000
[    0.000000] aclk_200_dout: source is mout_dpll (1), rate is 200000000
[    0.000000] aclk_200_sw: source is aclk_200_dout (0), rate is 200000000
[    0.000000] aclk_200_disp1: source is aclk_200_sw (1), rate is 200000000
[    0.000000] aclk_400_mscl_dout: source is mout_cpll (0), rate is 666000000
[    0.000000] aclk_400_mscl_sw: source is mout_spll (1), rate is 400000000
[    0.000000] aclk_400_mscl: source is aclk_400_mscl_sw (1), rate is 400000000
[    0.000000] aclk_400_isp_dout: source is mout_cpll (0), rate is 666000000
[    0.000000] aclk_400_isp_sw: source is mout_spll (1), rate is 400000000
[    0.000000] aclk_400_isp: source is aclk_400_isp_sw (1), rate is 400000000
[    0.000000] aclk_333_dout: source is mout_cpll (0), rate is 333000000
[    0.000000] aclk_333_sw: source is aclk_333_dout (0), rate is 333000000
[    0.000000] aclk_333: source is aclk_333_sw (1), rate is 333000000
[    0.000000] aclk_166_dout: source is mout_cpll (0), rate is 166500000
[    0.000000] aclk_166_sw: source is aclk_166_dout (0), rate is 166500000
[    0.000000] aclk_166: source is aclk_166_sw (1), rate is 166500000
[    0.000000] aclk_266_dout: source is mout_mpll (2), rate is 266000000
[    0.000000] aclk_266_sw: source is aclk_266_dout (0), rate is 266000000
[    0.000000] aclk_266: source is aclk_266_sw (1), rate is 266000000
[    0.000000] aclk_266_isp: source is aclk_266_sw (1), rate is 266000000
[    0.000000] aclk_66_dout: source is mout_cpll (0), rate is 66600000
[    0.000000] aclk_66_sw: source is aclk_66_dout (0), rate is 66600000
[    0.000000] aclk_66_peric: source is aclk_66_sw (1), rate is 66600000
[    0.000000] aclk_66_psgen: source is aclk_66_sw (1), rate is 66600000
[    0.000000] aclk_66_gpio: source is aclk_66_sw (0), rate is 66600000
[    0.000000] aclk_333_432_isp0_dout: source is mout_ipll (0), rate is 432000000
[    0.000000] aclk_333_432_isp0_sw: source is aclk_333_432_isp0_dout (0), rate is 432000000
[    0.000000] aclk_333_432_isp0: source is aclk_333_432_isp0_sw (1), rate is 432000000
[    0.000000] aclk_333_432_isp_dout: source is mout_ipll (0), rate is 432000000
[    0.000000] aclk_333_432_isp_sw: source is aclk_333_432_isp_dout (0), rate is 432000000
[    0.000000] aclk_333_432_isp: source is aclk_333_432_isp_sw (1), rate is 432000000
[    0.000000] aclk_333_432_gscl_dout: source is mout_ipll (0), rate is 432000000
[    0.000000] aclk_333_432_gscl_sw: source is aclk_333_432_gscl_dout (0), rate is 432000000
[    0.000000] aclk_333_432_gscl: source is aclk_333_432_gscl_sw (1), rate is 432000000
[    0.000000] aclk_300_gscl_dout: source is mout_dpll (1), rate is 300000000
[    0.000000] aclk_300_gscl_sw: source is aclk_300_gscl_dout (0), rate is 300000000
[    0.000000] aclk_300_gscl: source is aclk_300_gscl_sw (1), rate is 300000000
[    0.000000] aclk_300_disp1_dout: source is mout_dpll (1), rate is 300000000
[    0.000000] aclk_300_disp1_sw: source is aclk_300_disp1_dout (0), rate is 300000000
[    0.000000] aclk_300_disp1: source is aclk_300_disp1_sw (1), rate is 300000000
[    0.000000] aclk_400_disp1_dout: source is mout_dpll (1), rate is 300000000
[    0.000000] aclk_400_disp1_sw: source is mout_spll (1), rate is 400000000
[    0.000000] aclk_400_disp1: source is aclk_400_disp1_sw (1), rate is 400000000
[    0.000000] aclk_300_jpeg_dout: source is mout_dpll (1), rate is 300000000
[    0.000000] aclk_300_jpeg_sw: source is aclk_300_jpeg_dout (0), rate is 300000000
[    0.000000] aclk_300_jpeg: source is aclk_300_jpeg_sw (1), rate is 300000000
[    0.000000] aclk_g3d_dout: source is mout_vpll (0), rate is 350000000
[    0.000000] aclk_g3d_sw: source is aclk_g3d_dout (0), rate is 350000000
[    0.000000] aclk_g3d: source is aclk_g3d_sw (1), rate is 350000000
[    0.000000] aclk_266_g2d_dout: source is mout_mpll (2), rate is 266000000
[    0.000000] aclk_266_g2d_sw: source is aclk_266_g2d_dout (0), rate is 266000000
[    0.000000] aclk_266_g2d: source is aclk_266_g2d_sw (1), rate is 266000000
[    0.000000] aclk_333_g2d_dout: source is mout_cpll (0), rate is 333000000
[    0.000000] aclk_333_g2d_sw: source is aclk_333_g2d_dout (0), rate is 333000000
[    0.000000] aclk_333_g2d: source is aclk_333_g2d_sw (1), rate is 333000000
[    0.000000] mau_epll_clk: source is mout_epll (0), rate is 100000000
[    0.000000] mx_mspll_ccore: source is mout_spll (3), rate is 400000000
[    0.000000] mx_mspll_cpu: source is mout_spll (3), rate is 400000000
[    0.000000] mx_mspll_kfc: source is mout_spll (3), rate is 400000000
[    0.000000] mout_mdnie1: source is mout_mpll (3), rate is 532000000
[    0.000000] mout_fimd1: source is mout_rpll (0), rate is 266000000
[    0.000000] sclk_audio: source is xtal (0), rate is 24000000
[    0.000000] sclk_pixel: source is xtal (0), rate is 24000000
[    0.000000] sclk_spi0_isp: source is xtal (0), rate is 24000000
[    0.000000] sclk_spi1_isp: source is xtal (0), rate is 24000000
[    0.000000] dout_audio0: source is xtal (0), rate is 24000000
[    0.000000] dout_audio1: source is xtal (0), rate is 24000000
[    0.000000] dout_audio2: source is xtal (0), rate is 24000000
[    0.000000] clkout: bad source 0
[    0.000000] uclk1: source is mout_mpll (3), rate is 53200000
[    0.000000] uclk1: source is mout_mpll (3), rate is 53200000
[    0.000000] uclk1: source is mout_mpll (3), rate is 53200000
[    0.000000] uclk1: source is mout_mpll (3), rate is 53200000
[    0.000000] uclk1: source is mout_mpll (3), rate is 53200000
[    0.000000] sclk_dwmci: source is mout_spll (4), rate is 200000000
[    0.000000] sclk_dwmci: source is mout_spll (4), rate is 36363636
[    0.000000] sclk_dwmci: source is mout_spll (4), rate is 200000000
[    0.000000] sclk_fimd: source is mout_mdnie1 (1), rate is 266000000
[    0.000000] sclk_usbdrd30: source is xtal (0), rate is 24000000
[    0.000000] sclk_usbphy30: source is xtal (0), rate is 24000000
[    0.000000] sclk_usbphy30: source is xtal (0), rate is 24000000
[    0.000000] sclk_isp_sensor0: source is xtal (0), rate is 24000000
[    0.000000] sclk_isp_sensor1: source is xtal (0), rate is 24000000
[    0.000000] sclk_isp_sensor2: source is xtal (0), rate is 24000000
[    0.000000] sclk_pwm_isp: source is xtal (0), rate is 24000000
[    0.000000] sclk_uart_isp: source is xtal (0), rate is 24000000
[    0.000000] sclk_pwm: source is mout_mpll (3), rate is 53200000
[    0.000000] (sec_debug_set_upload_magic) 66262564
[    0.000000] (sec_debug_set_upload_cause) cafebabe
[    0.000000] Initialized persistent memory from 40000000-401fffff
[    0.000000] sec_debug_magic_init: success reserving magic code area
[    0.000000] PERCPU: Embedded 9 pages/cpu @c397c000 s12672 r8192 d16000 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 778764
[    0.000000] Kernel command line: console=ttySAC2,115200n8 vmalloc=512M androidboot.console=ttySAC2
[    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: 3066MB = 3066MB total
[    0.000000] Memory: 2843492k/2843492k available, 296092k reserved, 2382840K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xdf800000 - 0xff000000   ( 504 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdf000000   ( 496 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0b10000   (11296 kB)
[    0.000000]       .init : 0xc0b10000 - 0xc0b59180   ( 293 kB)
[    0.000000]       .data : 0xc0b5a000 - 0xc0eda548   (3586 kB)
[    0.000000]        .bss : 0xc0eda56c - 0xc140f770   (5333 kB)
[    0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:855
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000132] Calibrating delay loop... 1590.88 BogoMIPS (lpj=3977216)
[    0.045071] pid_max: default: 32768 minimum: 301
[    0.045258] Security Framework initialized
[    0.045288] SELinux:  Initializing.
[    0.045480] Mount-cache hash table entries: 512
[    0.046518] Initializing cgroup subsys debug
[    0.046541] Initializing cgroup subsys cpuacct
[    0.046557] Initializing cgroup subsys freezer
[    0.046611] CPU: Testing write buffer coherency: ok
[    0.046788] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.046857] Setting up static identity map for 0x207ce510 - 0x207ce568
[    0.098102] CPU1: Booted secondary processor
[    0.116844] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.138109] CPU2: Booted secondary processor
[    0.156845] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.178097] CPU3: Booted secondary processor
[    0.196846] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.197056] Brought up 4 CPUs
[    0.197083] SMP: Total of 4 processors activated (6363.54 BogoMIPS).
[    0.198081] devtmpfs: initialized
[    0.224523] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.225259] gpiochip_add: registered GPIOs 166 to 173 on device: GPY7
[    0.225284] gpiochip_add: registered GPIOs 175 to 182 on device: GPX0
[    0.225307] gpiochip_add: registered GPIOs 184 to 191 on device: GPX1
[    0.225329] gpiochip_add: registered GPIOs 193 to 200 on device: GPX2
[    0.225350] gpiochip_add: registered GPIOs 202 to 209 on device: GPX3
[    0.225382] gpiochip_add: registered GPIOs 54 to 61 on device: GPC0
[    0.225404] gpiochip_add: registered GPIOs 63 to 70 on device: GPC1
[    0.225424] gpiochip_add: registered GPIOs 72 to 78 on device: GPC2
[    0.225445] gpiochip_add: registered GPIOs 80 to 83 on device: GPC3
[    0.225465] gpiochip_add: registered GPIOs 85 to 86 on device: GPC4
[    0.225486] gpiochip_add: registered GPIOs 88 to 95 on device: GPD1
[    0.225507] gpiochip_add: registered GPIOs 111 to 116 on device: GPY0
[    0.225528] gpiochip_add: registered GPIOs 118 to 121 on device: GPY1
[    0.225548] gpiochip_add: registered GPIOs 123 to 128 on device: GPY2
[    0.225569] gpiochip_add: registered GPIOs 130 to 137 on device: GPY3
[    0.225589] gpiochip_add: registered GPIOs 139 to 146 on device: GPY4
[    0.225609] gpiochip_add: registered GPIOs 148 to 155 on device: GPY5
[    0.225629] gpiochip_add: registered GPIOs 157 to 164 on device: GPY6
[    0.225657] gpiochip_add: registered GPIOs 211 to 218 on device: GPE0
[    0.225677] gpiochip_add: registered GPIOs 220 to 221 on device: GPE1
[    0.225698] gpiochip_add: registered GPIOs 223 to 228 on device: GPF0
[    0.225718] gpiochip_add: registered GPIOs 230 to 237 on device: GPF1
[    0.225738] gpiochip_add: registered GPIOs 239 to 246 on device: GPG0
[    0.225758] gpiochip_add: registered GPIOs 248 to 255 on device: GPG1
[    0.225778] gpiochip_add: registered GPIOs 257 to 258 on device: GPG2
[    0.225798] gpiochip_add: registered GPIOs 106 to 109 on device: GPJ4
[    0.225827] gpiochip_add: registered GPIOs 0 to 7 on device: GPA0
[    0.225847] gpiochip_add: registered GPIOs 9 to 14 on device: GPA1
[    0.225868] gpiochip_add: registered GPIOs 16 to 23 on device: GPA2
[    0.225888] gpiochip_add: registered GPIOs 25 to 29 on device: GPB0
[    0.225908] gpiochip_add: registered GPIOs 31 to 35 on device: GPB1
[    0.225929] gpiochip_add: registered GPIOs 37 to 40 on device: GPB2
[    0.225949] gpiochip_add: registered GPIOs 42 to 49 on device: GPB3
[    0.225969] gpiochip_add: registered GPIOs 51 to 52 on device: GPB4
[    0.225990] gpiochip_add: registered GPIOs 97 to 104 on device: GPH0
[    0.226015] gpio: GPZ has no PM function
[    0.226035] gpiochip_add: registered GPIOs 260 to 266 on device: GPZ
[    0.227036] dummy: 
[    0.227563] NET: Registered protocol family 16
[    0.234591] Last reset was reset (RST_STAT=0x800)
[    0.245015] [GPIO_DVS] secgpio_dvs_probe has been created!!!
[    0.245756] [GPIO_DVS] secgpio_dvs_init has been initialized!!!
[    0.251535] RPLL is on
[    0.251557] RPLL is off
[    0.256095] synaptics_dsx_tsp_init lcdtype 0. tsp driver unload
[    0.256123] touchkey_init, system_rev : 7
[    0.256142] touchkey_init lcdtype 0. touchkey driver unload
[    0.259346] bootloader fb located at        0-  F9FFFF
[    0.264762] brcm_wlan_init: start
[    0.264842] brcm_init_wlan_mem: WIFI MEM Allocated
[    0.265142] exynos5_universal5420_sensor_init, is called
[    0.265459] exynos5_universal5420_sensor_init: SENSORS_VFS61XX init. system rev : 7
[    0.265518] exynos5_universal5420_sensor_init: spi1_set_platdata ...
[    0.266108] sii8240_cfg_gpio()
[    0.266138] Registered chained gpio int handler for interrupt 78.
[    0.266214] Registered interrupt support for gpio group 11.
[    0.266245] [sii8240] exynos5_universal5410_mhl_init - done
[    0.266265] [exynos5_universal5420_fpga_init] initialization start!
[    0.266305] irda_device_init called!
[    0.266329] irda_device_init complete
[    0.267115] persistent_ram: error in header, 6
[    0.267137] persistent_ram: found existing buffer, size 65495, start 65495
[    0.482495] console [ram-1] enabled
[    0.485104] gpio_init_done
[    0.485196] [GPIO_DVS][check_gpio_status] state : init
[    0.486087] [GPIO_DVS][check_gpio_status] --
[    0.486520] CCI is not supportedS3C Power Management, Copyright 2004 Simtec Electronics
[    0.487881] EPLL is on
[    0.488365] PM DOMAIN : pd-mfc, Device : s5p-mfc-v6 Registered
[    0.488529] PM DOMAIN : pd-mfc, Device : exynos-sysmmu.0 Registered
[    0.488806] PM DOMAIN : pd-g3d, Device : mali.0 Registered
[    0.489502] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.12 Registered
[    0.489667] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.13 Registered
[    0.489830] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.21 Registered
[    0.490256] PM DOMAIN : pd-gscaler0, Device : exynos-sysmmu.5 Registered
[    0.490357] PM DOMAIN : pd-gscaler1, Device : exynos-sysmmu.6 Registered
[    0.490459] PM DOMAIN : pd-gscaler0, Device : exynos-gsc.0 Registered
[    0.490622] PM DOMAIN : pd-gscaler1, Device : exynos-gsc.1 Registered
[    0.491314] PM DOMAIN : pd-fimd1, Device : exynos5-fb.1 Registered
[    0.491477] PM DOMAIN : pd-fimd1, Device : exynos-sysmmu.11 Registered
[    0.491646] PM DOMAIN : pd-fimd1, Device : exynos-sysmmu.30 Registered
[    0.492644] PM DOMAIN : pd-dsim1, Device : s5p-mipi-dsim.1 Registered
[    0.492813] PM DOMAIN : pd-mixer, Device : s5p-mixer Registered
[    0.492973] PM DOMAIN : pd-mixer, Device : exynos-sysmmu.2 Registered
[    0.493135] PM DOMAIN : pd-hdmi, Device : exynos5-hdmi Registered
[    0.493645] PM DOMAIN : cant find clock, to add power domain
[    0.493808] PM DOMAIN : pd-maudio, Device : samsung-i2s.0 Registered
[    0.493969] PM DOMAIN : pd-maudio, Device : samsung-rp Registered
[    0.494502] PM DOMAIN : pd-mscl0, Device : exynos5-scaler.0 Registered
[    0.494665] PM DOMAIN : pd-mscl0, Device : exynos-sysmmu.23 Registered
[    0.494827] PM DOMAIN : pd-mscl0, Device : exynos-sysmmu.24 Registered
[    0.494990] PM DOMAIN : pd-mscl1, Device : exynos5-scaler.1 Registered
[    0.495151] PM DOMAIN : pd-mscl1, Device : exynos-sysmmu.25 Registered
[    0.495252] PM DOMAIN : pd-mscl1, Device : exynos-sysmmu.26 Registered
[    0.495413] PM DOMAIN : pd-mscl2, Device : exynos5-scaler.2 Registered
[    0.495574] PM DOMAIN : pd-mscl2, Device : exynos-sysmmu.27 Registered
[    0.495734] PM DOMAIN : pd-mscl2, Device : exynos-sysmmu.28 Registered
[    0.496316] PM DOMAIN : platform_device has not platform bus
[    0.496413] PM DOMAIN : platform_device has not platform bus
[    0.496591] PM DOMAIN : pd-flite0, Device : exynos-fimc-lite.0 Registered
[    0.496764] PM DOMAIN : pd-flite1, Device : exynos-fimc-lite.1 Registered
[    0.496959] ------------[ cut here ]------------
[    0.497060] WARNING: at /mnt/linux/kernel/mutex.c:198 __mutex_lock_slowpath+0x338/0x350()
[    0.497208] Modules linked in:
[    0.497427] Backtrace: 
[    0.497595] [<c0012e58>] (dump_backtrace+0x0/0x10c) from [<c07c4c5c>] (dump_stack+0x18/0x1c)
[    0.497744]  r6:c07cbbd4 r5:00000009 r4:00000000 r3:60000093
[    0.498197] [<c07c4c44>] (dump_stack+0x0/0x1c) from [<c0035aa4>] (warn_slowpath_common+0x5c/0x6c)
[    0.498356] [<c0035a48>] (warn_slowpath_common+0x0/0x6c) from [<c0035b58>] (warn_slowpath_null+0x24/0x2c)
[    0.498505]  r8:de9a0dfc r7:de848000 r6:de844038 r5:c0e46af8 r4:c0e46af4
[    0.498946] r3:00000009
[    0.499176] [<c0035b34>] (warn_slowpath_null+0x0/0x2c) from [<c07cbbd4>] (__mutex_lock_slowpath+0x338/0x350)
[    0.499335] [<c07cb89c>] (__mutex_lock_slowpath+0x0/0x350) from [<c07cbc18>] (mutex_lock+0x2c/0x44)
[    0.499494] [<c07cbbec>] (mutex_lock+0x0/0x44) from [<c0376970>] (genpd_acquire_lock+0x58/0xa0)
[    0.499642]  r4:c0e46af4 r3:c0055d88
[    0.499944] [<c0376918>] (genpd_acquire_lock+0x0/0xa0) from [<c0378a10>] (__pm_genpd_add_device+0xc4/0x228)
[    0.500092]  r6:00000000 r5:c0e46a78 r4:c0e58d68
[    0.500464] [<c037894c>] (__pm_genpd_add_device+0x0/0x228) from [<c001f888>] (exynos_pm_add_dev+0x5c/0xd0)
[    0.500619] [<c001f82c>] (exynos_pm_add_dev+0x0/0xd0) from [<c001f924>] (exynos_pm_add_platdev+0x28/0x4c)
[    0.500767]  r5:c002042c r4:00000000
[    0.501011] [<c001f8fc>] (exynos_pm_add_platdev+0x0/0x4c) from [<c0b19628>] (exynos5_pm_domain_init+0xce4/0x100c)
[    0.501229] [<c0b18944>] (exynos5_pm_domain_init+0x0/0x100c) from [<c000865c>] (do_one_initcall+0x118/0x170)
[    0.501378]  r7:c0eda580 r6:c0eda580 r5:c0b18944 r4:c0eda580
[    0.501761] [<c0008544>] (do_one_initcall+0x0/0x170) from [<c0b109e4>] (kernel_init+0x144/0x1e0)
[    0.501925] [<c0b108a0>] (kernel_init+0x0/0x1e0) from [<c0038d7c>] (do_exit+0x0/0x7dc)
[    0.502073]  r7:00000013
[    0.502306] ---[ end trace e9dda4afd3a9be9a ]---
[    0.502457] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    0.502543] pgd = c0004000
[    0.502689] [00000000] *pgd=66262564
[    0.502853] Internal error: Oops: b5 [#1] PREEMPT SMP ARM

The kernel gives quite a lot of information, but at the same time a lot of it is not very helpful. The last lines before the crash were

[    0.488365] PM DOMAIN : pd-mfc, Device : s5p-mfc-v6 Registered
[    0.488529] PM DOMAIN : pd-mfc, Device : exynos-sysmmu.0 Registered
[    0.488806] PM DOMAIN : pd-g3d, Device : mali.0 Registered
[    0.489502] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.12 Registered
[    0.489667] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.13 Registered
[    0.489830] PM DOMAIN : pd-gscl, Device : exynos-sysmmu.21 Registered
[    0.490256] PM DOMAIN : pd-gscaler0, Device : exynos-sysmmu.5 Registered
[    0.490357] PM DOMAIN : pd-gscaler1, Device : exynos-sysmmu.6 Registered
[    0.490459] PM DOMAIN : pd-gscaler0, Device : exynos-gsc.0 Registered
[    0.490622] PM DOMAIN : pd-gscaler1, Device : exynos-gsc.1 Registered
[    0.491314] PM DOMAIN : pd-fimd1, Device : exynos5-fb.1 Registered
[    0.491477] PM DOMAIN : pd-fimd1, Device : exynos-sysmmu.11 Registered
[    0.491646] PM DOMAIN : pd-fimd1, Device : exynos-sysmmu.30 Registered
[    0.492644] PM DOMAIN : pd-dsim1, Device : s5p-mipi-dsim.1 Registered
[    0.492813] PM DOMAIN : pd-mixer, Device : s5p-mixer Registered
[    0.492973] PM DOMAIN : pd-mixer, Device : exynos-sysmmu.2 Registered
[    0.493135] PM DOMAIN : pd-hdmi, Device : exynos5-hdmi Registered
[    0.493645] PM DOMAIN : cant find clock, to add power domain
[    0.493808] PM DOMAIN : pd-maudio, Device : samsung-i2s.0 Registered
[    0.493969] PM DOMAIN : pd-maudio, Device : samsung-rp Registered
[    0.494502] PM DOMAIN : pd-mscl0, Device : exynos5-scaler.0 Registered
[    0.494665] PM DOMAIN : pd-mscl0, Device : exynos-sysmmu.23 Registered
[    0.494827] PM DOMAIN : pd-mscl0, Device : exynos-sysmmu.24 Registered
[    0.494990] PM DOMAIN : pd-mscl1, Device : exynos5-scaler.1 Registered
[    0.495151] PM DOMAIN : pd-mscl1, Device : exynos-sysmmu.25 Registered
[    0.495252] PM DOMAIN : pd-mscl1, Device : exynos-sysmmu.26 Registered
[    0.495413] PM DOMAIN : pd-mscl2, Device : exynos5-scaler.2 Registered
[    0.495574] PM DOMAIN : pd-mscl2, Device : exynos-sysmmu.27 Registered
[    0.495734] PM DOMAIN : pd-mscl2, Device : exynos-sysmmu.28 Registered
[    0.496316] PM DOMAIN : platform_device has not platform bus
[    0.496413] PM DOMAIN : platform_device has not platform bus
[    0.496591] PM DOMAIN : pd-flite0, Device : exynos-fimc-lite.0 Registered
[    0.496764] PM DOMAIN : pd-flite1, Device : exynos-fimc-lite.1 Registered

All the lines ending with “Registered” look like info messages, but the lines

[    0.493645] PM DOMAIN : cant find clock, to add power domain
[    0.496316] PM DOMAIN : platform_device has not platform bus
[    0.496413] PM DOMAIN : platform_device has not platform bus

seem to indicate some problem. To bad they do not say what it is that fails, just some clock and platform device. Since the backtrace showed an error in exynos_pm_add_dev I added info messages to that function and exynos_pm_add_clk where the “cant find clock” message came from:

diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index d6103ea3abfd0..c8e9eaaf171ee 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -72,6 +72,7 @@ void exynos_pm_add_dev(struct exynos_pm_domain *domain,
                        struct device *dev)
 {
        int ret = 0;
+       pr_err("PMOS DEBUG: adding %s\n", domain->pd.name)
 
        if (domain == NULL) {
                pr_err("PM DOMAIN : cant add device, domain is empty\n");
@@ -135,7 +136,7 @@ void exynos_pm_add_clk(struct exynos_pm_domain *domain,
 
        clk = clk_get(dev, con_id);
        if (IS_ERR(clk)) {
-               pr_err("PM DOMAIN : cant find clock, to add power domain\n");
+               pr_err("PM DOMAIN : cant find clock %s, to add power domain\n", domain->pd.name);
                kfree(exynos_clk);
                return;
        }

Booting the kernel then showed that clock that could not be added was “dp”, and the device that was added right before the panic was “pd-isp”. After studying pm_domains.c and pm_domains5.c I tried solving the clock error (or rather just make it not occur) by disabling CONFIG_S5P_DP, since “dp” is only added if this config option is set. After solving some compilation errors this did not solve the panic though. Next attempt I made was to move an ifdef guard that prevented pd-isp being initialized when FIMC-IS is disabled:

diff --git a/arch/arm/mach-exynos/pm_domains5.c b/arch/arm/mach-exynos/pm_domains5.c
index 3220333bed94d..2599bb7569588 100644
--- a/arch/arm/mach-exynos/pm_domains5.c
+++ b/arch/arm/mach-exynos/pm_domains5.c
@@ -1224,8 +1224,8 @@ static int exynos5420_pm_domain_init(void)
        exynos_pm_add_clk(&exynos5420_spd_mscl1, NULL, "mscl");
        exynos_pm_add_clk(&exynos5420_spd_mscl2, NULL, "mscl");
 #endif
-#ifdef CONFIG_EXYNOS5_DEV_FIMC_IS
        exynos_pm_powerdomain_init(&exynos54xx_pd_isp);
+#ifdef CONFIG_EXYNOS5_DEV_FIMC_IS
        exynos_pm_add_platdev(&exynos54xx_pd_isp, &exynos5_device_fimc_is);
        exynos_pm_add_platdev(&exynos54xx_pd_isp, &s3c64xx_device_spi3);
        exynos_pm_add_clk(&exynos54xx_pd_isp,
        &exynos5_device_fimc_is.dev, "gscl_wrap0");

and this actually worked. The kernel booted reliably and I was able to ssh into the device! Most important thing to take away from this is probably that verbose debug messages are very useful, and trying out things that you think might solve the problem can be more efficient than only studying the code. The fix was merged into pmaports in MR1884.