Power Management suspend causes fatal kernel crash

Hello Team,

We are working on a product based on DB410 and working on Linaro-18.01 platform.

The described kernel-crash was observed during system suspend/resume.

In order to reproduce the issue all is needed is to call the following command,
tap the screen to wake up the system and call it again
(repeat several times usually happens after the two or three iterations)

$ echo mem > /sys/power/state
[ 54.414640] PM: suspend entry (s2idle)
[ 54.414658] PM: Syncing filesystems … done.
[ 54.469807] Freezing user space processes … (elapsed 0.001 seconds) done.
[ 54.471124] OOM killer disabled.
[ 54.476888] Freezing remaining freezable tasks … (elapsed 0.001 seconds) done.
[ 54.480389] Suspending console(s) (use no_console_suspend to debug)

################ [screen tapped here- System resumes] #########################

[ 54.489244] secs = 4163525, h:m:s == 4:32:5, d/m/y = 18/1/70
[ 54.541672] [FTS][Info]gesture suspend…
[ 54.605256] [FTS][Error][GESTURE]Enter into gesture(suspend) failed!
[ 54.605256]
[ 58.345850] irq event 10: bogus return value fffffff3
[ 58.345857] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C O 4.14.0-qcomlt-arm64 #631
[ 58.345859] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[ 58.345861] Call trace:
[ 58.345871] [] dump_backtrace+0x0/0x390
[ 58.345877] [] show_stack+0x14/0x20
[ 58.345882] [] dump_stack+0x9c/0xbc
[ 58.345888] [] __report_bad_irq+0x48/0xd8
[ 58.345892] [] note_interrupt+0x1e8/0x2e4
[ 58.345896] [] handle_irq_event_percpu+0x54/0x68
[ 58.345899] [] handle_irq_event+0x48/0x78
[ 58.345903] [] handle_fasteoi_irq+0xac/0x160
[ 58.345909] [] generic_handle_irq+0x24/0x38
[ 58.345913] [] __handle_domain_irq+0x60/0xb8
[ 58.345916] [] gic_handle_irq+0x50/0xa0
[ 58.345919] Exception stack(0xffff0000092f3dd0 to 0xffff0000092f3f10)
[ 58.345922] 3dc0: 0000000000000020 ffff80003c158200
[ 58.345926] 3de0: 0000000000000001 0000000000000000 0000000000000000 0000800036b51000
[ 58.345930] 3e00: 0000000000000001 0000000000000000 0000000000000002 ffff0000092f3e80
[ 58.345934] 3e20: 0000000000000a80 0000000000000000 0000000000000001 0000000000012c00
[ 58.345938] 3e40: 00003d08ffff9c00 0000000000000000 0000000000000000 0000000000000000
[ 58.345942] 3e60: 0000000000000000 ffff0000092f9e8c ffff0000092f9df0 ffff0000092d7000
[ 58.345947] 3e80: ffff0000092e24d8 ffff0000092f9e9c ffff80003c158200 ffff000009303080
[ 58.345951] 3ea0: ffff80003c14cc00 0000000000000000 00000000811c0018 ffff0000092f3f10
[ 58.345955] 3ec0: ffff00000808535c ffff0000092f3f10 ffff000008085360 0000000000000145
[ 58.345959] 3ee0: 0000000000000000 0000000000000000 ffffffffffffffff 00000000811c0018
[ 58.345962] 3f00: ffff0000092f3f10 ffff000008085360
[ 58.345966] [] el1_irq+0xb0/0x124
[ 58.345971] [] arch_cpu_idle+0x10/0x18
[ 58.345975] [] do_idle+0x1ac/0x1e0
[ 58.345979] [] cpu_startup_entry+0x20/0x28
[ 58.345983] [] rest_init+0xd0/0xdc
[ 58.345988] [] start_kernel+0x390/0x3a4
[ 58.345990] handlers:
[ 58.345994] [] bam_dma_irq
[ 58.581988] [FTS][Info]TP Ready, Device ID = 0x54
[ 58.581990] [FTS][Info]gesture resume…
[ 58.585886] Normal gest_id=ff
[ 58.585889] [FTS][Info]fts normal_gesture_id==0xff
[ 58.585891] [FTS][Info]invalid point_num(15)
[ 58.837282] OOM killer enabled.
[ 58.841785] Restarting tasks … done.
[ 58.846054] PM: suspend exit

Other wakeup source: charger removal

Please suggest here how can we solve above crash.

Regards,
Parth Y Shah

You should look at whatever driver (FTS driver?) returns an incorrect interrupt handler value.