Skip to content

Commit

Permalink
surface3-spi: workaround: disable DMA mode to avoid crash by default
Browse files Browse the repository at this point in the history
On Arch Linux kernel at least after 4.19, touch input is broken after suspend
(s2idle).

        kern  :err   : [  +0.203408] Surface3-spi spi-MSHW0037:00: SPI transfer timed out

On recent stable Arch Linux kernel (at least after 5.1), touch input will
crash after the first touch.

        kern  :err   : [  +0.203592] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
        kern  :err   : [  +0.000173] spi_master spi1: failed to transfer one message from queue

I found on an affected system (Arch Linux kernel, etc.), the touchscreen
driver uses DMA mode by default. Then, we found some kernels with different
kernel config (5.1 kernel config from Jakeday [1] or Chromium OS kernel
chromeos-4.19 [2]) will use PIO mode by default and no such issues there.

So, this commit disables DMA mode on the touchscreen driver side as a quick
workaround to avoid touch input crash.
We may need to properly set up DMA mode to use the touchscreen driver with
DMA mode.

You can still switch DMA/PIO mode if you want:

  switch to DMA mode (maybe broken)
        echo 1 | sudo tee /sys/module/surface3_spi/parameters/use_dma
  back to PIO mode
        echo 0 | sudo tee /sys/module/surface3_spi/parameters/use_dma

Link to issue: jakeday/linux-surface#596

References:
[1] https://github.com/jakeday/linux-surface/blob/master/configs/5.1/config
[2] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/chromeos-4.19

Tested on Arch Linux 5.4.1 with Surface 3, which will use DMA by default.
This commit made the driver use PIO by default and no touch input crash.
Also tested on chromeos-4.19 4.19.90 with Surface 3, which will use PIO by default
even without this commit. After this commit, it still uses PIO and confirmed
no functional changes regarding touch input.

More details:
  We can confirm which mode the touchscreen driver uses; first, enable
  debug output:

        echo "file drivers/spi/spi-pxa2xx.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
        echo "file drivers/input/touchscreen/surface3_spi.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control

  Then, try to make a touch input and see dmesg log

        (On Arch Linux kernel, uses DMA)
        kern  :debug : [  +0.006383] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
        kern  :debug : [  +0.000495] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received
	-> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 18 00 e4 01 00 04 1a 04 1a e3 0c e3 0c b0 00
	c5 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

        (On the kernels I referenced above, uses PIO)
        kern  :debug : [  +0.009260] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, PIO
        kern  :debug : [  +0.001105] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received
	-> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 24 00 e4 01 00 58 0b 58 0b 83 12 83 12 26 01
	95 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  • Loading branch information
kitakar5525 authored and qzed committed Dec 27, 2019
1 parent 94e747e commit 66c8401
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions drivers/input/touchscreen/surface3_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
#define SURFACE3_REPORT_TOUCH 0xd2
#define SURFACE3_REPORT_PEN 0x16

bool use_dma = false;
module_param(use_dma, bool, 0644);
MODULE_PARM_DESC(use_dma,
"Disable DMA mode if you encounter touch input crash. "
"(default: false, disabled to avoid crash)");

struct surface3_ts_data {
struct spi_device *spi;
struct gpio_desc *gpiod_rst[2];
Expand Down Expand Up @@ -326,6 +332,13 @@ static int surface3_spi_create_pen_input(struct surface3_ts_data *data)
return 0;
}

static bool surface3_spi_can_dma(struct spi_controller *ctlr,
struct spi_device *spi,
struct spi_transfer *tfr)
{
return use_dma;
}

static int surface3_spi_probe(struct spi_device *spi)
{
struct surface3_ts_data *data;
Expand Down Expand Up @@ -368,6 +381,19 @@ static int surface3_spi_probe(struct spi_device *spi)
if (error)
return error;

/*
* Set up DMA
*
* TODO: Currently, touch input with DMA seems to be broken.
* On 4.19 LTS, touch input will crash after suspend.
* On recent stable kernel (at least after 5.1), touch input will crash after
* the first touch. No problem with PIO on those kernels.
* Maybe we need to configure DMA here.
*
* Link to issue: https://github.com/jakeday/linux-surface/issues/596
*/
spi->controller->can_dma = surface3_spi_can_dma;

return 0;
}

Expand Down

17 comments on commit 66c8401

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which DMA driver is in use? dw_dmac ?

@kitakar5525
Copy link
Member Author

@kitakar5525 kitakar5525 commented on 66c8401 Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe, according to the following output:

$ sudo modprobe -r spi_pxa2xx_platform
modprobe: FATAL: Module dw_dmac is builtin.

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anybody try this touchscreen (w/o above mentioned patch!) on recent (v5.5-rc6) kernels? There were few changes to LPSS power handling between v4.19 and v5.5.

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the info! I tried v5.5-rc6 with this Arch Linux 5.4.1-arch1 based config (and w/o the above patch), but still reproducible.

I'll try to report this issue (maybe Bugzilla?) later.

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kernel BugZilla works for me. Thanks!

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Oh, I saw you committed surface3-wmi driver before!)
OK, I'll tell you when I submitted a bugreport to Bugzilla.

By the way, Interestingly, I can fix the touch input crash with DMA mode by reloading only spi_pxa2xx_platform module after (and only after) the crash
(with causing kernel NULL pointer dereference).

sudo modprobe -r spi_pxa2xx_platform
sudo modprobe spi_pxa2xx_platform
log: reloading only `spi_pxa2xx_platform` after touch input crash (plaintext)

$ lsmod | grep spi
intel_spi_platform     16384  0
intel_spi              24576  1 intel_spi_platform
spi_nor                61440  1 intel_spi
mtd                    77824  6 spi_nor,cmdlinepart,intel_spi,ofpart
surface3_spi           20480  0
spi_pxa2xx_platform    32768  0

$ lsmod | grep dma
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               139264  9 snd_soc_rt5651,snd_soc_sst_bytcr_rt5640,snd_soc_rt5670,snd_soc_rt5640,snd_hdmi_lpe_audio,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_soc_rt5645,snd_pcm_dmaengine

# dw_dmac is built-in on Arch Linux config.
$ zcat /proc/config.gz | grep -i "dw_dmac"
CONFIG_DW_DMAC_CORE=y
CONFIG_DW_DMAC=y
CONFIG_DW_DMAC_PCI=y

$ dmesg -xw
kern  :notice: [    0.000000] Linux version 5.5.0-rc6-1-mainline (linux-mainline@archlinux) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Tue, 14 Jan 2020 01:50:32 +0000
kern  :info  : [    0.000000] Command line: \\boot\vmlinuz-linux-mainline initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux-mainline.img root=LABEL=Arch_Linux rw quiet fbcon=scrollback:4096k log_buf_len=16M
[...]
#
# First touch with debug output:
#         echo "file drivers/spi/spi-pxa2xx.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#         echo "file drivers/input/touchscreen/surface3_spi.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#
kern  :debug : [   89.330050] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.330961] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 01 00 e7 00 00 78 16 78 16 ae 08 ae 08 60 01 8a 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.333058] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.333519] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 02 00 e7 00 00 78 16 78 16 ae 08 ae 08 60 01 94 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.343015] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.343541] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 03 00 e7 00 00 7c 16 7c 16 d0 08 d0 08 69 01 9e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.352809] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.353216] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 04 00 e7 00 00 81 16 81 16 26 09 26 09 71 01 a6 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.362585] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.363121] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 05 00 e7 00 00 7e 16 7e 16 a2 09 a2 09 70 01 af 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.372493] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.372876] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 06 00 e7 00 00 68 16 68 16 42 0a 42 0a 70 01 ad 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.382387] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.383012] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 07 00 e7 00 00 3c 16 3c 16 0b 0b 0b 0b 6f 01 b5 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.392564] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.393032] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 08 00 e7 00 00 0a 16 0a 16 0b 0c 0b 0c 77 01 bd 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.402155] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.402811] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 09 00 e7 00 00 db 15 db 15 30 0d 30 0d 76 01 c4 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.412410] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.412922] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0a 00 e7 00 00 9c 15 9c 15 a8 0e a8 0e 75 01 c1 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   89.422145] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   89.422856] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0b 00 e4 00 00 9c 15 9c 15 a8 0e a8 0e 75 01 c1 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
#
# Second touch then touch input stopped responding
#
kern  :debug : [   99.532806] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [   99.736078] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [   99.736249] spi_master spi1: failed to transfer one message from queue
kern  :debug : [   99.736372] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [   99.939496] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [   99.939674] spi_master spi1: failed to transfer one message from queue
kern  :debug : [   99.939873] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.142749] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.142912] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.143137] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.346188] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.346357] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.346491] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.549373] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.549556] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.549767] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.752385] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.752506] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.752581] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.955715] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.955825] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.955901] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.159048] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.159158] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.159222] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.362829] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.363022] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.363171] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.565957] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.566212] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.566303] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.768955] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.769066] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.769130] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.972362] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.972476] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.972555] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.175635] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.175766] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.175858] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.379400] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.379576] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.379721] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.582299] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.582417] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.582502] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.786242] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.786418] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.786576] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.989329] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.989500] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.989932] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.193065] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.193240] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.193385] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.396025] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.396174] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.396319] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.599343] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.599481] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.599580] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.802412] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.802589] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.802724] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.005964] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
#
# Reload module
#         $ sudo modprobe -r spi_pxa2xx_platform
#         modprobe: FATAL: Module dw_dmac is builtin.
#         $ sudo modprobe spi_pxa2xx_platform
#
kern  :alert : [  104.006016] BUG: kernel NULL pointer dereference, address: 0000000000000000
kern  :alert : [  104.006039] #PF: supervisor read access in kernel mode
kern  :alert : [  104.006048] #PF: error_code(0x0000) - not-present page
kern  :info  : [  104.006057] PGD 0 P4D 0 
kern  :warn  : [  104.006084] Oops: 0000 [#1] PREEMPT SMP PTI
kern  :warn  : [  104.006103] CPU: 3 PID: 337 Comm: irq/77-Surface3 Tainted: G           OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  104.006112] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  104.006147] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  104.006167] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  104.006178] RSP: 0018:ffff9811c0637bf8 EFLAGS: 00010202
kern  :warn  : [  104.006192] RAX: ffff95b233ef7000 RBX: ffff9811c0637dc8 RCX: 0000000000000004
kern  :warn  : [  104.006201] RDX: ffff9811c034d000 RSI: 000000000000000c RDI: ffff95b233ef7600
kern  :warn  : [  104.006210] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  104.006219] R10: 0000000000000000 R11: 0000000000000001 R12: ffff95b233ef7000
kern  :warn  : [  104.006229] R13: 00000000ffffff92 R14: ffff95b233ef74e0 R15: ffff95b233f87360
kern  :warn  : [  104.006240] FS:  0000000000000000(0000) GS:ffff95b23a980000(0000) knlGS:0000000000000000
kern  :warn  : [  104.006250] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  104.006259] CR2: 0000000000000000 CR3: 000000009a00a000 CR4: 00000000001006e0
kern  :warn  : [  104.006268] Call Trace:
kern  :warn  : [  104.006307]  spi_transfer_one_message+0x2f5/0x530
kern  :warn  : [  104.006336]  __spi_pump_messages+0x317/0x650
kern  :warn  : [  104.006359]  ? _raw_spin_unlock_irqrestore+0x20/0x40
kern  :warn  : [  104.006376]  __spi_sync+0x1f3/0x200
kern  :warn  : [  104.006399]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  104.006413]  spi_sync+0x2c/0x50
kern  :warn  : [  104.006436]  spi_sync_transfer.constprop.0+0x65/0x80 [surface3_spi]
kern  :warn  : [  104.006460]  ? spi_finalize_current_transfer+0x20/0x20
kern  :warn  : [  104.006481]  spi_read.constprop.0+0x40/0x60 [surface3_spi]
kern  :warn  : [  104.006506]  surface3_spi_irq_handler+0x53/0x33b [surface3_spi]
kern  :warn  : [  104.006522]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  104.006535]  irq_thread_fn+0x20/0x60
kern  :warn  : [  104.006550]  irq_thread+0xee/0x180
kern  :warn  : [  104.006568]  ? wake_threads_waitq+0x30/0x30
kern  :warn  : [  104.006587]  kthread+0xfb/0x130
kern  :warn  : [  104.006602]  ? irq_thread_check_affinity+0xd0/0xd0
kern  :warn  : [  104.006614]  ? kthread_park+0x90/0x90
kern  :warn  : [  104.006630]  ret_from_fork+0x35/0x40
kern  :warn  : [  104.006656] Modules linked in: quota_v2 quota_tree fuse usb_storage rfcomm cmac algif_hash algif_skcipher af_alg bnep btusb input_leds btrtl btbcm btintel bluetooth ecdh_generic ecc cdc_mbim cdc_wdm hid_multitouch cdc_ncm usbnet mii zram hid_sensor_als hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_soc_sst_bytcr_rt5640 joydev mousedev mei_hdcp intel_rapl_msr intel_powerclamp coretemp kvm_intel kvm snd_soc_rt5670 snd_soc_rt5651 ofpart cmdlinepart intel_spi_platform intel_spi irqbypass spi_nor mtd iTCO_wdt iTCO_vendor_support hid_sensor_hub crct10dif_pclmul nls_iso8859_1 crc32_pclmul gpio_keys nls_cp437 vfat ghash_clmulni_intel fat mwifiex_pcie mwifiex aesni_intel crypto_simd cryptd glue_helper intel_cstate pcspkr cfg80211 snd_soc_rt5645 snd_intel_sst_acpi snd_intel_sst_core snd_soc_sst_atom_hifi2_platform snd_soc_rt5640 snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231
kern  :warn  : [  104.006975]  processor_thermal_device snd_soc_core intel_rapl_common mei_txe rfkill surface3_spi intel_soc_dts_iosf intel_xhci_usb_role_switch mei roles intel_atomisp2_pm lpc_ich snd_hdmi_lpe_audio snd_compress soc_button_array ac97_bus snd_pcm_dmaengine evdev mac_hid tpm_crb ac pwm_lpss_platform snd_pcm intel_int0002_vgpio i2c_hid snd_timer tpm_tis snd tpm_tis_core surface3_button soundcore wmi surfacepro3_button tpm spi_pxa2xx_platform(-) pwm_lpss int3400_thermal acpi_thermal_rel 8250_dw rng_core dptf_power int3403_thermal int340x_thermal_zone sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic hid_generic crc16 mbcache jbd2 usbhid hid mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  104.007287] CR2: 0000000000000000
kern  :warn  : [  104.007303] ---[ end trace 55d1d4185f08ebc5 ]---
kern  :warn  : [  104.007323] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  104.007338] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  104.007348] RSP: 0018:ffff9811c0637bf8 EFLAGS: 00010202
kern  :warn  : [  104.007360] RAX: ffff95b233ef7000 RBX: ffff9811c0637dc8 RCX: 0000000000000004
kern  :warn  : [  104.007369] RDX: ffff9811c034d000 RSI: 000000000000000c RDI: ffff95b233ef7600
kern  :warn  : [  104.007378] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  104.007387] R10: 0000000000000000 R11: 0000000000000001 R12: ffff95b233ef7000
kern  :warn  : [  104.007397] R13: 00000000ffffff92 R14: ffff95b233ef74e0 R15: ffff95b233f87360
kern  :warn  : [  104.007409] FS:  0000000000000000(0000) GS:ffff95b23a980000(0000) knlGS:0000000000000000
kern  :warn  : [  104.007419] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  104.007428] CR2: 0000000000000000 CR3: 000000009a00a000 CR4: 00000000001006e0
kern  :alert : [  104.007474] BUG: kernel NULL pointer dereference, address: 0000000000000027
kern  :alert : [  104.007485] #PF: supervisor read access in kernel mode
kern  :alert : [  104.007494] #PF: error_code(0x0000) - not-present page
kern  :info  : [  104.007501] PGD 0 P4D 0 
kern  :warn  : [  104.007515] Oops: 0000 [#2] PREEMPT SMP PTI
kern  :warn  : [  104.007529] CPU: 3 PID: 337 Comm: irq/77-Surface3 Tainted: G      D    OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  104.007538] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  104.007553] RIP: 0010:do_exit+0x373/0xb30
kern  :warn  : [  104.007565] Code: 83 ce 24 00 48 89 df e8 1b 7c 26 00 45 84 f6 0f 85 72 04 00 00 48 89 df e8 ca 44 02 00 e8 d5 f7 01 00 48 89 df e8 ad 10 fa ff <f6> 43 27 02 0f 85 e5 05 00 00 48 89 df e8 8b 45 16 00 48 89 df e8
kern  :warn  : [  104.007575] RSP: 0018:ffff9811c0637e90 EFLAGS: 00010286
kern  :warn  : [  104.007586] RAX: 0000000080000000 RBX: 0000000000000000 RCX: 0000000000000000
kern  :warn  : [  104.007595] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000ffffffff
kern  :warn  : [  104.007604] RBP: ffff95b238afa470 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  104.007613] R10: ffff9811c0637908 R11: ffff9811c063790d R12: ffff95b238af9d00
kern  :warn  : [  104.007623] R13: ffffffffa26d1db0 R14: 0000000000000000 R15: ffff95b238afa4a4
kern  :warn  : [  104.007634] FS:  0000000000000000(0000) GS:ffff95b23a980000(0000) knlGS:0000000000000000
kern  :warn  : [  104.007644] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  104.007653] CR2: 0000000000000027 CR3: 000000009a00a000 CR4: 00000000001006e0
kern  :warn  : [  104.007661] Call Trace:
kern  :warn  : [  104.007682]  ? task_work_run+0x93/0xb0
kern  :warn  : [  104.007701]  ? do_exit+0x36b/0xb30
kern  :warn  : [  104.007716]  ? kthread+0xfb/0x130
kern  :warn  : [  104.007739]  ? rewind_stack_do_exit+0x17/0x20
kern  :warn  : [  104.007757] Modules linked in: quota_v2 quota_tree fuse usb_storage rfcomm cmac algif_hash algif_skcipher af_alg bnep btusb input_leds btrtl btbcm btintel bluetooth ecdh_generic ecc cdc_mbim cdc_wdm hid_multitouch cdc_ncm usbnet mii zram hid_sensor_als hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_soc_sst_bytcr_rt5640 joydev mousedev mei_hdcp intel_rapl_msr intel_powerclamp coretemp kvm_intel kvm snd_soc_rt5670 snd_soc_rt5651 ofpart cmdlinepart intel_spi_platform intel_spi irqbypass spi_nor mtd iTCO_wdt iTCO_vendor_support hid_sensor_hub crct10dif_pclmul nls_iso8859_1 crc32_pclmul gpio_keys nls_cp437 vfat ghash_clmulni_intel fat mwifiex_pcie mwifiex aesni_intel crypto_simd cryptd glue_helper intel_cstate pcspkr cfg80211 snd_soc_rt5645 snd_intel_sst_acpi snd_intel_sst_core snd_soc_sst_atom_hifi2_platform snd_soc_rt5640 snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231
kern  :warn  : [  104.007894]  processor_thermal_device snd_soc_core intel_rapl_common mei_txe rfkill surface3_spi intel_soc_dts_iosf intel_xhci_usb_role_switch mei roles intel_atomisp2_pm lpc_ich snd_hdmi_lpe_audio snd_compress soc_button_array ac97_bus snd_pcm_dmaengine evdev mac_hid tpm_crb ac pwm_lpss_platform snd_pcm intel_int0002_vgpio i2c_hid snd_timer tpm_tis snd tpm_tis_core surface3_button soundcore wmi surfacepro3_button tpm spi_pxa2xx_platform(-) pwm_lpss int3400_thermal acpi_thermal_rel 8250_dw rng_core dptf_power int3403_thermal int340x_thermal_zone sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic hid_generic crc16 mbcache jbd2 usbhid hid mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  104.008047] CR2: 0000000000000027
kern  :warn  : [  104.008059] ---[ end trace 55d1d4185f08ebc6 ]---
kern  :warn  : [  104.008078] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  104.008091] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  104.008101] RSP: 0018:ffff9811c0637bf8 EFLAGS: 00010202
kern  :warn  : [  104.008113] RAX: ffff95b233ef7000 RBX: ffff9811c0637dc8 RCX: 0000000000000004
kern  :warn  : [  104.008122] RDX: ffff9811c034d000 RSI: 000000000000000c RDI: ffff95b233ef7600
kern  :warn  : [  104.008131] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  104.008140] R10: 0000000000000000 R11: 0000000000000001 R12: ffff95b233ef7000
kern  :warn  : [  104.008150] R13: 00000000ffffff92 R14: ffff95b233ef74e0 R15: ffff95b233f87360
kern  :warn  : [  104.008161] FS:  0000000000000000(0000) GS:ffff95b23a980000(0000) knlGS:0000000000000000
kern  :warn  : [  104.008171] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  104.008180] CR2: 0000000000000027 CR3: 000000009a00a000 CR4: 00000000001006e0
kern  :alert : [  104.008192] Fixing recursive fault but reboot is needed!
kern  :warn  : [  109.605296] spi_master spi1: could not stop message queue
kern  :err   : [  109.605331] spi_master spi1: problem destroying queue
kern  :err   : [  109.605345] spi_master spi1: queue remove failed
kern  :info  : [  109.873242] input: Surface3 SPI Capacitive TouchScreen as /devices/pci0000:00/8086228E:00/spi_master/spi1/spi-MSHW0037:00/input/input39
kern  :info  : [  109.875181] input: Surface3 SPI Pen Input as /devices/pci0000:00/8086228E:00/spi_master/spi1/spi-MSHW0037:00/input/input40
[...] (omitting irrelevant ASoC output lines)
#
# First touch after the reload with debug output:
#         echo "file drivers/spi/spi-pxa2xx.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#         echo "file drivers/input/touchscreen/surface3_spi.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#
kern  :debug : [  112.435017] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.435636] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 01 00 e7 00 00 d4 19 d4 19 2e 0a 2e 0a 60 01 d9 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.442322] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.442808] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 02 00 e7 00 00 d4 19 d4 19 2e 0a 2e 0a 69 01 ec 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.449406] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.450220] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 03 00 e7 00 00 dd 19 dd 19 5a 0a 5a 0a 71 01 fd 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.457270] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.458243] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 04 00 e7 00 00 e8 19 e8 19 96 0a 96 0a 79 01 0e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.464066] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.464574] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 05 00 e7 00 00 f3 19 f3 19 ec 0a ec 0a 81 01 1e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.471741] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.472232] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 06 00 e7 00 00 fc 19 fc 19 40 0b 40 0b 88 01 2e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.478844] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.479299] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 07 00 e7 00 00 02 1a 02 1a ad 0b ad 0b 8f 01 3c 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.486116] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.486615] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 08 00 e7 00 00 05 1a 05 1a 10 0c 10 0c 95 01 40 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.493517] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.493972] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 09 00 e7 00 00 04 1a 04 1a 8b 0c 8b 0c 9b 01 4e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.500863] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.501342] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0a 00 e7 00 00 fa 19 fa 19 25 0d 25 0d 98 01 51 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  112.508163] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  112.508621] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0b 00 e4 00 00 fa 19 fa 19 25 0d 25 0d 98 01 51 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
#
# Second touch working now with DMA
#
kern  :debug : [  117.132423] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.133081] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0c 00 e7 01 00 fc 19 fc 19 c7 0b c7 0b 69 01 d9 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.139287] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.139809] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0d 00 e7 01 00 fc 19 fc 19 c7 0b c7 0b 71 01 ec 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.146814] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.147207] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0e 00 e7 01 00 fd 19 fd 19 de 0b de 0b 79 01 fd 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.154032] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.154555] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 0f 00 e7 01 00 00 1a 00 1a 07 0c 07 0c 78 01 04 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.161361] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.161860] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 10 00 e7 01 00 02 1a 02 1a 58 0c 58 0c 77 01 15 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.168659] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.169262] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 11 00 e7 01 00 02 1a 02 1a af 0c af 0c 7e 01 1b 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.176000] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.176637] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 12 00 e7 01 00 01 1a 01 1a 29 0d 29 0d 7d 01 17 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [  117.183361] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [  117.183985] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 13 00 e4 01 00 01 1a 01 1a 29 0d 29 0d 7d 01 17 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

log with color (html)
reloading-only-spi_pxa2xx_platform-after-touch-input-crash.html.gz

When I reload spi_pxa2xx_platform module with surface3_spi like this (after touch input crash), I can avoid the kernel NULL pointer dereference,
but the touch input crash is still reproducible after this reload.

sudo modprobe -r surface3_spi
sudo modprobe -r spi_pxa2xx_platform
sudo modprobe spi_pxa2xx_platform
sudo modprobe surface3_spi

@andy-shev
Copy link
Contributor

@andy-shev andy-shev commented on 66c8401 Jan 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kernel crash happens due to error in the error handling while removal process is ongoing.
I'm wondering if below patch helps:

--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
  @@ -218,6 +218,7 @@ void pxa2xx_spi_dma_release(struct driver_data *drv_data)
   {
        struct spi_controller *controller = drv_data->controller;
 
+       atomic_set(&drv_data->dma_running, 0);
        if (controller->dma_rx) {
                dmaengine_terminate_sync(controller->dma_rx);
                dma_release_channel(controller->dma_rx);

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried with the patch (plus debug print).

diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index 37567bc7a..a74f4f621 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -218,6 +218,9 @@ void pxa2xx_spi_dma_release(struct driver_data *drv_data)
 {
        struct spi_controller *controller = drv_data->controller;
 
+       pr_alert("DEBUG: before atomic_set()\n");
+       atomic_set(&drv_data->dma_running, 0);
+
        if (controller->dma_rx) {
                dmaengine_terminate_sync(controller->dma_rx);
                dma_release_channel(controller->dma_rx);

This time, caused another kernel NULL pointer dereference:

log: reload-with-patch-after-touch-input-crash

# Applied following patch to try to fix kernel NULL pointer dereference on 
# reloading spi_pxa2xx_platform module after touch input crash happened
diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index 37567bc7a..a74f4f621 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -218,6 +218,9 @@ void pxa2xx_spi_dma_release(struct driver_data *drv_data)
 {
        struct spi_controller *controller = drv_data->controller;
 
+       pr_alert("DEBUG: before atomic_set()\n");
+       atomic_set(&drv_data->dma_running, 0);
+
        if (controller->dma_rx) {
                dmaengine_terminate_sync(controller->dma_rx);
                dma_release_channel(controller->dma_rx);



#
# reload spi_pxa2xx_platform after touch crash
#         sudo modprobe -r spi_pxa2xx_platform
#         sudo modprobe spi_pxa2xx_platform
#
kern  :alert : [  148.548499] DEBUG: before atomic_set()
kern  :alert : [  148.554677] DEBUG: before atomic_set()
kern  :alert : [  148.555322] DEBUG: before atomic_set()
kern  :err   : [  148.641419] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  148.641464] spi_master spi1: failed to transfer one message from queue
kern  :alert : [  148.641561] BUG: kernel NULL pointer dereference, address: 0000000000000000
kern  :alert : [  148.641574] #PF: supervisor read access in kernel mode
kern  :alert : [  148.641581] #PF: error_code(0x0000) - not-present page
kern  :info  : [  148.641588] PGD 0 P4D 0 
kern  :warn  : [  148.641607] Oops: 0000 [#1] PREEMPT SMP PTI
kern  :warn  : [  148.641622] CPU: 3 PID: 327 Comm: irq/77-Surface3 Tainted: G           OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  148.641630] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  148.641652] RIP: 0010:pxa2xx_spi_dma_prepare_one+0xa1/0x150 [spi_pxa2xx_platform]
kern  :warn  : [  148.641666] Code: 8b 45 30 41 83 fd 01 0f 84 96 00 00 00 48 89 44 24 08 4d 8b a1 d0 05 00 00 48 8d 5a 38 44 89 44 24 18 41 8b 42 10 89 44 24 20 <49> 8b 04 24 48 8b 80 f0 00 00 00 48 85 c0 0f 84 99 05 00 00 4c 89
kern  :warn  : [  148.641673] RSP: 0018:ffffaf4f4057bb30 EFLAGS: 00010246
kern  :warn  : [  148.641690] RAX: 0000000000000001 RBX: ffffaf4f4057bdf0 RCX: 0000000000000000
kern  :warn  : [  148.641693] RDX: ffffaf4f4057bdc8 RSI: ffffaf4f4057bb30 RDI: ffffaf4f4057bb68
kern  :warn  : [  148.641696] RBP: ffff8c0734a12e00 R08: 0000000000000001 R09: ffff8c0734a12800
kern  :warn  : [  148.641699] R10: ffff8c07359a8540 R11: 0000000000000008 R12: 0000000000000000
kern  :warn  : [  148.641703] R13: 0000000000000001 R14: ffff8c07359a8540 R15: ffff8c0734a12800
kern  :warn  : [  148.641707] FS:  0000000000000000(0000) GS:ffff8c073a980000(0000) knlGS:0000000000000000
kern  :warn  : [  148.641711] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  148.641714] CR2: 0000000000000000 CR3: 000000008f60a000 CR4: 00000000001006e0
kern  :warn  : [  148.641718] Call Trace:
kern  :warn  : [  148.641752]  pxa2xx_spi_dma_prepare+0x1c/0x70 [spi_pxa2xx_platform]
kern  :warn  : [  148.641766]  pxa2xx_spi_transfer_one+0x725/0x770 [spi_pxa2xx_platform]
kern  :warn  : [  148.641787]  spi_transfer_one_message+0x180/0x530
kern  :warn  : [  148.641802]  __spi_pump_messages+0x317/0x650
kern  :warn  : [  148.641818]  ? _raw_spin_unlock_irqrestore+0x20/0x40
kern  :warn  : [  148.641829]  __spi_sync+0x1f3/0x200
kern  :warn  : [  148.641843]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  148.641852]  spi_sync+0x2c/0x50
kern  :warn  : [  148.641867]  spi_sync_transfer.constprop.0+0x65/0x80 [surface3_spi]
kern  :warn  : [  148.641883]  ? spi_finalize_current_transfer+0x20/0x20
kern  :warn  : [  148.641897]  ? common_interrupt+0xa/0xf
kern  :warn  : [  148.641907]  spi_read.constprop.0+0x40/0x60 [surface3_spi]
kern  :warn  : [  148.641923]  surface3_spi_irq_handler+0x53/0x33b [surface3_spi]
kern  :warn  : [  148.641933]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  148.641941]  irq_thread_fn+0x20/0x60
kern  :warn  : [  148.641954]  irq_thread+0xee/0x180
kern  :warn  : [  148.641966]  ? wake_threads_waitq+0x30/0x30
kern  :warn  : [  148.641977]  kthread+0xfb/0x130
kern  :warn  : [  148.641987]  ? irq_thread_check_affinity+0xd0/0xd0
kern  :warn  : [  148.641995]  ? kthread_park+0x90/0x90
kern  :warn  : [  148.642005]  ret_from_fork+0x35/0x40
kern  :warn  : [  148.642021] Modules linked in: quota_v2 quota_tree fuse usb_storage rfcomm cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth input_leds ecdh_generic ecc cdc_mbim cdc_wdm cdc_ncm hid_multitouch usbnet mii zram hid_sensor_accel_3d hid_sensor_als hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_soc_sst_bytcr_rt5640 intel_powerclamp coretemp mei_hdcp kvm_intel kvm snd_soc_rt5670 joydev snd_soc_rt5651 mousedev hid_sensor_hub nls_iso8859_1 nls_cp437 vfat intel_rapl_msr fat irqbypass gpio_keys crct10dif_pclmul crc32_pclmul iTCO_wdt ofpart iTCO_vendor_support cmdlinepart ghash_clmulni_intel intel_spi_platform intel_spi spi_nor mtd mwifiex_pcie mwifiex aesni_intel cfg80211 crypto_simd cryptd glue_helper snd_intel_sst_acpi snd_soc_rt5645 snd_intel_sst_core intel_cstate pcspkr snd_soc_sst_atom_hifi2_platform snd_soc_rt5640 snd_soc_acpi_intel_match tpm_crb snd_soc_rl6231 snd_soc_acpi
kern  :warn  : [  148.642212]  intel_xhci_usb_role_switch rfkill snd_soc_core tpm_tis roles snd_hdmi_lpe_audio soc_button_array tpm_tis_core snd_compress evdev ac97_bus snd_pcm_dmaengine pwm_lpss_platform tpm surface3_spi pwm_lpss i2c_hid processor_thermal_device mac_hid snd_pcm rng_core mei_txe intel_rapl_common mei wmi dptf_power surface3_button snd_timer snd int3403_thermal int3400_thermal acpi_thermal_rel int340x_thermal_zone surfacepro3_button ac soundcore intel_atomisp2_pm lpc_ich intel_int0002_vgpio intel_soc_dts_iosf 8250_dw spi_pxa2xx_platform(OE-) sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 hid_generic usbhid hid mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  148.642387] CR2: 0000000000000000
kern  :warn  : [  148.642398] ---[ end trace d17b502400ab07f3 ]---
kern  :warn  : [  148.642412] RIP: 0010:pxa2xx_spi_dma_prepare_one+0xa1/0x150 [spi_pxa2xx_platform]
kern  :warn  : [  148.642421] Code: 8b 45 30 41 83 fd 01 0f 84 96 00 00 00 48 89 44 24 08 4d 8b a1 d0 05 00 00 48 8d 5a 38 44 89 44 24 18 41 8b 42 10 89 44 24 20 <49> 8b 04 24 48 8b 80 f0 00 00 00 48 85 c0 0f 84 99 05 00 00 4c 89
kern  :warn  : [  148.642427] RSP: 0018:ffffaf4f4057bb30 EFLAGS: 00010246
kern  :warn  : [  148.642435] RAX: 0000000000000001 RBX: ffffaf4f4057bdf0 RCX: 0000000000000000
kern  :warn  : [  148.642441] RDX: ffffaf4f4057bdc8 RSI: ffffaf4f4057bb30 RDI: ffffaf4f4057bb68
kern  :warn  : [  148.642447] RBP: ffff8c0734a12e00 R08: 0000000000000001 R09: ffff8c0734a12800
kern  :warn  : [  148.642452] R10: ffff8c07359a8540 R11: 0000000000000008 R12: 0000000000000000
kern  :warn  : [  148.642458] R13: 0000000000000001 R14: ffff8c07359a8540 R15: ffff8c0734a12800
kern  :warn  : [  148.642467] FS:  0000000000000000(0000) GS:ffff8c073a980000(0000) knlGS:0000000000000000
kern  :warn  : [  148.642473] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  148.642479] CR2: 0000000000000000 CR3: 000000008f60a000 CR4: 00000000001006e0
kern  :alert : [  148.642516] BUG: kernel NULL pointer dereference, address: 0000000000000027
kern  :alert : [  148.642523] #PF: supervisor read access in kernel mode
kern  :alert : [  148.642529] #PF: error_code(0x0000) - not-present page
kern  :info  : [  148.642534] PGD 0 P4D 0 
kern  :warn  : [  148.642543] Oops: 0000 [#2] PREEMPT SMP PTI
kern  :warn  : [  148.642552] CPU: 3 PID: 327 Comm: irq/77-Surface3 Tainted: G      D    OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  148.642557] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  148.642568] RIP: 0010:do_exit+0x373/0xb30
kern  :warn  : [  148.642576] Code: 83 ce 24 00 48 89 df e8 1b 7c 26 00 45 84 f6 0f 85 72 04 00 00 48 89 df e8 ca 44 02 00 e8 d5 f7 01 00 48 89 df e8 ad 10 fa ff <f6> 43 27 02 0f 85 e5 05 00 00 48 89 df e8 8b 45 16 00 48 89 df e8
kern  :warn  : [  148.642582] RSP: 0018:ffffaf4f4057be90 EFLAGS: 00010286
kern  :warn  : [  148.642589] RAX: 0000000080000000 RBX: 0000000000000000 RCX: 0000000000000000
kern  :warn  : [  148.642595] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000ffffffff
kern  :warn  : [  148.642601] RBP: ffff8c0738aa5e70 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  148.642611] R10: ffffaf4f4057b848 R11: ffffaf4f4057b801 R12: ffff8c0738aa5700
kern  :warn  : [  148.642614] R13: ffffffff8ccd1db0 R14: 0000000000000000 R15: ffff8c0738aa5ea4
kern  :warn  : [  148.642618] FS:  0000000000000000(0000) GS:ffff8c073a980000(0000) knlGS:0000000000000000
kern  :warn  : [  148.642622] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  148.642625] CR2: 0000000000000027 CR3: 000000008f60a000 CR4: 00000000001006e0
kern  :warn  : [  148.642628] Call Trace:
kern  :warn  : [  148.642636]  ? task_work_run+0x93/0xb0
kern  :warn  : [  148.642642]  ? do_exit+0x36b/0xb30
kern  :warn  : [  148.642647]  ? kthread+0xfb/0x130
kern  :warn  : [  148.642654]  ? rewind_stack_do_exit+0x17/0x20
kern  :warn  : [  148.642670] Modules linked in: quota_v2 quota_tree fuse usb_storage rfcomm cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth input_leds ecdh_generic ecc cdc_mbim cdc_wdm cdc_ncm hid_multitouch usbnet mii zram hid_sensor_accel_3d hid_sensor_als hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_soc_sst_bytcr_rt5640 intel_powerclamp coretemp mei_hdcp kvm_intel kvm snd_soc_rt5670 joydev snd_soc_rt5651 mousedev hid_sensor_hub nls_iso8859_1 nls_cp437 vfat intel_rapl_msr fat irqbypass gpio_keys crct10dif_pclmul crc32_pclmul iTCO_wdt ofpart iTCO_vendor_support cmdlinepart ghash_clmulni_intel intel_spi_platform intel_spi spi_nor mtd mwifiex_pcie mwifiex aesni_intel cfg80211 crypto_simd cryptd glue_helper snd_intel_sst_acpi snd_soc_rt5645 snd_intel_sst_core intel_cstate pcspkr snd_soc_sst_atom_hifi2_platform snd_soc_rt5640 snd_soc_acpi_intel_match tpm_crb snd_soc_rl6231 snd_soc_acpi
kern  :warn  : [  148.642753]  intel_xhci_usb_role_switch rfkill snd_soc_core tpm_tis roles snd_hdmi_lpe_audio soc_button_array tpm_tis_core snd_compress evdev ac97_bus snd_pcm_dmaengine pwm_lpss_platform tpm surface3_spi pwm_lpss i2c_hid processor_thermal_device mac_hid snd_pcm rng_core mei_txe intel_rapl_common mei wmi dptf_power surface3_button snd_timer snd int3403_thermal int3400_thermal acpi_thermal_rel int340x_thermal_zone surfacepro3_button ac soundcore intel_atomisp2_pm lpc_ich intel_int0002_vgpio intel_soc_dts_iosf 8250_dw spi_pxa2xx_platform(OE-) sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 hid_generic usbhid hid mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  148.642842] CR2: 0000000000000027
kern  :warn  : [  148.642850] ---[ end trace d17b502400ab07f4 ]---
kern  :warn  : [  148.642862] RIP: 0010:pxa2xx_spi_dma_prepare_one+0xa1/0x150 [spi_pxa2xx_platform]
kern  :warn  : [  148.642870] Code: 8b 45 30 41 83 fd 01 0f 84 96 00 00 00 48 89 44 24 08 4d 8b a1 d0 05 00 00 48 8d 5a 38 44 89 44 24 18 41 8b 42 10 89 44 24 20 <49> 8b 04 24 48 8b 80 f0 00 00 00 48 85 c0 0f 84 99 05 00 00 4c 89
kern  :warn  : [  148.642876] RSP: 0018:ffffaf4f4057bb30 EFLAGS: 00010246
kern  :warn  : [  148.642882] RAX: 0000000000000001 RBX: ffffaf4f4057bdf0 RCX: 0000000000000000
kern  :warn  : [  148.642888] RDX: ffffaf4f4057bdc8 RSI: ffffaf4f4057bb30 RDI: ffffaf4f4057bb68
kern  :warn  : [  148.642893] RBP: ffff8c0734a12e00 R08: 0000000000000001 R09: ffff8c0734a12800
kern  :warn  : [  148.642899] R10: ffff8c07359a8540 R11: 0000000000000008 R12: 0000000000000000
kern  :warn  : [  148.642904] R13: 0000000000000001 R14: ffff8c07359a8540 R15: ffff8c0734a12800
kern  :warn  : [  148.642911] FS:  0000000000000000(0000) GS:ffff8c073a980000(0000) knlGS:0000000000000000
kern  :warn  : [  148.642916] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  148.642922] CR2: 0000000000000027 CR3: 000000008f60a000 CR4: 00000000001006e0
kern  :alert : [  148.642929] Fixing recursive fault but reboot is needed!
kern  :warn  : [  154.210854] spi_master spi1: could not stop message queue
kern  :err   : [  154.210886] spi_master spi1: problem destroying queue
kern  :err   : [  154.210902] spi_master spi1: queue remove failed
kern  :info  : [  154.495326] input: Surface3 SPI Capacitive TouchScreen as /devices/pci0000:00/8086228E:00/spi_master/spi1/spi-MSHW0037:00/input/input30
kern  :info  : [  154.497241] input: Surface3 SPI Pen Input as /devices/pci0000:00/8086228E:00/spi_master/spi1/spi-MSHW0037:00/input/input31

log with color (html)
reload-with-patch-after-touch-input-crash.html.gz

Anyway, this dereference will happen only after the touch input crash happened. It may become no problem after fixing the touch input crash.

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they are two different problems (I know about crash one, but wouldn't be able to reproduce). It's good you may reproduce both.
I'll try to come up with the patch to fix this one, so, we will have one problem less to fix.

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed an attempt to fix crash (as far as I understood its root cause)
https://github.com/andy-shev/linux/tree/topic/spi/reload

P.S. there is a last patch for that.

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work.
By the way, what distro are you using on your Surface 3? Maybe Fedora?
I may need to check on the distro, too.

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and seems that you're working on DMI matching, too.
Have you ever heard of corrupted DMI table?

Some owners of Surface 3 (including me) are affected the corruption and have to add the
corrupted DMI info for quirks: #29

@andy-shev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work.

Does that part work now as expected (disregard DMA issue)?

By the way, what distro are you using on your Surface 3? Maybe Fedora?

I'm using Buildroot in kexec mode.
I even published a branch (https://github.com/andy-shev/buildroot/tree/intel) what we are using in our team.

I may need to check on the distro, too.

It would be hard for mere users.

and seems that you're working on DMI matching, too.
Have you ever heard of corrupted DMI table?

Nope. But I have to monitor from now on since you mentioned it.

Some owners of Surface 3 (including me) are affected the corruption and have to add the
corrupted DMI info for quirks: #29

I commented there my opinion.

@kitakar5525
Copy link
Member Author

@kitakar5525 kitakar5525 commented on 66c8401 Jan 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to apply only this commit (andy-shev/linux@e7b3040)?

I applied the commit. This time, breaks spi_pxa2xx_platform module unloading even when the touch input crash is not happening:

log: WIP-spi-pxa2xx-Try-to-avoid-race-at-shutdown

#
# unload spi_pxa2xx_platform here
#         $ sudo modprobe -r spi_pxa2xx_platform
#         zsh: killed     sudo modprobe -r spi_pxa2xx_platform
# and killed by SIGKILL(9)
#
kern  :warn  : [  238.386069] ------------[ cut here ]------------
kern  :warn  : [  238.386077] kernfs: can not remove 'uevent', no directory
kern  :warn  : [  238.386133] WARNING: CPU: 3 PID: 2515 at fs/kernfs/dir.c:1507 kernfs_remove_by_name_ns+0x83/0x90
kern  :warn  : [  238.386136] Modules linked in: hid_multitouch usbhid quota_v2 quota_tree fuse usb_storage input_leds hidp rfcomm cdc_mbim cdc_wdm cdc_ncm usbnet mii cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc zram hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_als hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio ofpart cmdlinepart intel_powerclamp intel_spi_platform coretemp kvm_intel intel_spi spi_nor mtd snd_soc_sst_bytcr_rt5640 kvm mei_hdcp hid_sensor_hub intel_rapl_msr snd_soc_rt5670 joydev snd_soc_rt5651 iTCO_wdt iTCO_vendor_support mousedev hid_generic nls_iso8859_1 nls_cp437 vfat fat gpio_keys mwifiex_pcie irqbypass mwifiex crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd cfg80211 glue_helper snd_soc_rt5645 intel_cstate pcspkr snd_intel_sst_acpi snd_intel_sst_core processor_thermal_device intel_xhci_usb_role_switch snd_soc_sst_atom_hifi2_platform
kern  :warn  : [  238.386211]  roles intel_rapl_common snd_soc_rt5640 snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231 snd_hdmi_lpe_audio rfkill snd_soc_core mei_txe lpc_ich intel_atomisp2_pm intel_soc_dts_iosf soc_button_array mei snd_compress ac97_bus surface3_spi(OE) tpm_crb snd_pcm_dmaengine snd_pcm evdev tpm_tis mac_hid snd_timer i2c_hid tpm_tis_core hid snd surface3_button soundcore spi_pxa2xx_platform(OE-) pwm_lpss_platform wmi tpm surfacepro3_button 8250_dw pwm_lpss int3400_thermal int3403_thermal acpi_thermal_rel ac rng_core int340x_thermal_zone dptf_power intel_int0002_vgpio sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  238.386286] CPU: 3 PID: 2515 Comm: modprobe Tainted: G           OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  238.386289] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  238.386296] RIP: 0010:kernfs_remove_by_name_ns+0x83/0x90
kern  :warn  : [  238.386302] Code: 68 5e 00 31 c0 5d 41 5c 41 5d c3 48 c7 c7 00 d0 a9 ba e8 e0 68 5e 00 b8 fe ff ff ff eb e7 48 c7 c7 b8 bc 72 ba e8 9f 4f d2 ff <0f> 0b b8 fe ff ff ff eb d2 0f 1f 40 00 0f 1f 44 00 00 41 57 41 56
kern  :warn  : [  238.386304] RSP: 0018:ffffa5b880dbfdb8 EFLAGS: 00010286
kern  :warn  : [  238.386308] RAX: 0000000000000000 RBX: ffffa13cb878c000 RCX: 0000000000000000
kern  :warn  : [  238.386310] RDX: 0000000000000001 RSI: 0000000000000086 RDI: 00000000ffffffff
kern  :warn  : [  238.386312] RBP: ffffa13cb8460410 R08: 00000000000003fd R09: 0000000000000001
kern  :warn  : [  238.386314] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffffba7b1072
kern  :warn  : [  238.386316] R13: 0000000000000005 R14: ffffa13cb87e18c0 R15: 0000000000000000
kern  :warn  : [  238.386319] FS:  00007f11e2e90740(0000) GS:ffffa13cba980000(0000) knlGS:0000000000000000
kern  :warn  : [  238.386321] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  238.386323] CR2: 00005582ecf46039 CR3: 0000000134268000 CR4: 00000000001006e0
kern  :warn  : [  238.386326] Call Trace:
kern  :warn  : [  238.386347]  device_del+0x161/0x400
kern  :warn  : [  238.386354]  device_unregister+0x16/0x60
kern  :warn  : [  238.386360]  spi_unregister_controller+0xad/0x110
kern  :warn  : [  238.386366]  release_nodes+0x19c/0x1e0
kern  :warn  : [  238.386374]  device_release_driver_internal+0xf4/0x1c0
kern  :warn  : [  238.386379]  driver_detach+0x44/0x82
kern  :warn  : [  238.386383]  bus_remove_driver+0x58/0xcc
kern  :warn  : [  238.386390]  __x64_sys_delete_module+0x19c/0x2f0
kern  :warn  : [  238.386400]  do_syscall_64+0x4e/0x150
kern  :warn  : [  238.386409]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern  :warn  : [  238.386415] RIP: 0033:0x7f11e2fbbc3b
kern  :warn  : [  238.386420] Code: 73 01 c3 48 8b 0d 45 02 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 15 02 0c 00 f7 d8 64 89 01 48
kern  :warn  : [  238.386422] RSP: 002b:00007ffc63adb968 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
kern  :warn  : [  238.386426] RAX: ffffffffffffffda RBX: 000055d4b2890f20 RCX: 00007f11e2fbbc3b
kern  :warn  : [  238.386428] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055d4b2890f88
kern  :warn  : [  238.386430] RBP: 000055d4b2890f20 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  238.386432] R10: 00007f11e302fac0 R11: 0000000000000206 R12: 000055d4b2890f88
kern  :warn  : [  238.386434] R13: 0000000000000000 R14: 000055d4b2890f88 R15: 000055d4b2890f20
kern  :warn  : [  238.386444] ---[ end trace 174923fc5affb32a ]---
kern  :warn  : [  238.390306] ------------[ cut here ]------------
kern  :warn  : [  238.390313] kernfs: can not remove 'online', no directory
kern  :warn  : [  238.390367] WARNING: CPU: 3 PID: 2515 at fs/kernfs/dir.c:1507 kernfs_remove_by_name_ns+0x83/0x90
kern  :warn  : [  238.390370] Modules linked in: hid_multitouch usbhid quota_v2 quota_tree fuse usb_storage input_leds hidp rfcomm cdc_mbim cdc_wdm cdc_ncm usbnet mii cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc zram hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_als hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio ofpart cmdlinepart intel_powerclamp intel_spi_platform coretemp kvm_intel intel_spi spi_nor mtd snd_soc_sst_bytcr_rt5640 kvm mei_hdcp hid_sensor_hub intel_rapl_msr snd_soc_rt5670 joydev snd_soc_rt5651 iTCO_wdt iTCO_vendor_support mousedev hid_generic nls_iso8859_1 nls_cp437 vfat fat gpio_keys mwifiex_pcie irqbypass mwifiex crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd cfg80211 glue_helper snd_soc_rt5645 intel_cstate pcspkr snd_intel_sst_acpi snd_intel_sst_core processor_thermal_device intel_xhci_usb_role_switch snd_soc_sst_atom_hifi2_platform
kern  :warn  : [  238.390460]  roles intel_rapl_common snd_soc_rt5640 snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231 snd_hdmi_lpe_audio rfkill snd_soc_core mei_txe lpc_ich intel_atomisp2_pm intel_soc_dts_iosf soc_button_array mei snd_compress ac97_bus surface3_spi(OE) tpm_crb snd_pcm_dmaengine snd_pcm evdev tpm_tis mac_hid snd_timer i2c_hid tpm_tis_core hid snd surface3_button soundcore spi_pxa2xx_platform(OE-) pwm_lpss_platform wmi tpm surfacepro3_button 8250_dw pwm_lpss int3400_thermal int3403_thermal acpi_thermal_rel ac rng_core int340x_thermal_zone dptf_power intel_int0002_vgpio sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  238.390544] CPU: 3 PID: 2515 Comm: modprobe Tainted: G        W  OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  238.390546] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  238.390552] RIP: 0010:kernfs_remove_by_name_ns+0x83/0x90
kern  :warn  : [  238.390557] Code: 68 5e 00 31 c0 5d 41 5c 41 5d c3 48 c7 c7 00 d0 a9 ba e8 e0 68 5e 00 b8 fe ff ff ff eb e7 48 c7 c7 b8 bc 72 ba e8 9f 4f d2 ff <0f> 0b b8 fe ff ff ff eb d2 0f 1f 40 00 0f 1f 44 00 00 41 57 41 56
kern  :warn  : [  238.390567] RSP: 0018:ffffa5b880dbfd98 EFLAGS: 00010282
kern  :warn  : [  238.390570] RAX: 0000000000000000 RBX: ffffffffbaae9440 RCX: 0000000000000000
kern  :warn  : [  238.390572] RDX: 0000000000000001 RSI: 0000000000000082 RDI: 00000000ffffffff
kern  :warn  : [  238.390575] RBP: ffffa13cb878c000 R08: 0000000000000423 R09: 0000000000000001
kern  :warn  : [  238.390577] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffffba78f487
kern  :warn  : [  238.390579] R13: 0000000000000005 R14: ffffa13cb87e18c0 R15: 0000000000000000
kern  :warn  : [  238.390582] FS:  00007f11e2e90740(0000) GS:ffffa13cba980000(0000) knlGS:0000000000000000
kern  :warn  : [  238.390584] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  238.390586] CR2: 00007ff49c162db0 CR3: 0000000134268000 CR4: 00000000001006e0
kern  :warn  : [  238.390589] Call Trace:
kern  :warn  : [  238.390609]  device_remove_attrs+0x2a/0x70
kern  :warn  : [  238.390614]  device_del+0x170/0x400
kern  :warn  : [  238.390620]  device_unregister+0x16/0x60
kern  :warn  : [  238.390626]  spi_unregister_controller+0xad/0x110
kern  :warn  : [  238.390632]  release_nodes+0x19c/0x1e0
kern  :warn  : [  238.390648]  device_release_driver_internal+0xf4/0x1c0
kern  :warn  : [  238.390653]  driver_detach+0x44/0x82
kern  :warn  : [  238.390657]  bus_remove_driver+0x58/0xcc
kern  :warn  : [  238.390665]  __x64_sys_delete_module+0x19c/0x2f0
kern  :warn  : [  238.390676]  do_syscall_64+0x4e/0x150
kern  :warn  : [  238.390686]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern  :warn  : [  238.390692] RIP: 0033:0x7f11e2fbbc3b
kern  :warn  : [  238.390696] Code: 73 01 c3 48 8b 0d 45 02 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 15 02 0c 00 f7 d8 64 89 01 48
kern  :warn  : [  238.390698] RSP: 002b:00007ffc63adb968 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
kern  :warn  : [  238.390702] RAX: ffffffffffffffda RBX: 000055d4b2890f20 RCX: 00007f11e2fbbc3b
kern  :warn  : [  238.390704] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055d4b2890f88
kern  :warn  : [  238.390706] RBP: 000055d4b2890f20 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  238.390709] R10: 00007f11e302fac0 R11: 0000000000000206 R12: 000055d4b2890f88
kern  :warn  : [  238.390711] R13: 0000000000000000 R14: 000055d4b2890f88 R15: 000055d4b2890f20
kern  :warn  : [  238.390721] ---[ end trace 174923fc5affb32b ]---
kern  :alert : [  238.391058] BUG: kernel NULL pointer dereference, address: 0000000000000070
kern  :alert : [  238.391070] #PF: supervisor read access in kernel mode
kern  :alert : [  238.391073] #PF: error_code(0x0000) - not-present page
kern  :info  : [  238.391077] PGD 0 P4D 0 
kern  :warn  : [  238.391085] Oops: 0000 [#1] PREEMPT SMP PTI
kern  :warn  : [  238.391092] CPU: 3 PID: 2515 Comm: modprobe Tainted: G        W  OE     5.5.0-rc6-1-mainline #1
kern  :warn  : [  238.391096] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  238.391109] RIP: 0010:kernfs_find_ns+0x14/0xd0
kern  :warn  : [  238.391122] Code: 0f 0b e9 6d ff ff ff e8 3a 5b d2 ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 48 85 d2 49 89 f5 41 54 0f 95 c1 55 53 <0f> b7 47 70 48 89 d3 66 83 e0 20 0f 95 c2 38 d1 75 56 4c 8b 67 48
kern  :warn  : [  238.391126] RSP: 0018:ffffa5b880dbfd50 EFLAGS: 00010246
kern  :warn  : [  238.391130] RAX: 0000000000000000 RBX: ffffffffba4e9980 RCX: 0000000000000000
kern  :warn  : [  238.391133] RDX: 0000000000000000 RSI: ffffffffba784a28 RDI: 0000000000000000
kern  :warn  : [  238.391136] RBP: ffffffffba784a28 R08: 0000000000000423 R09: 0000000000000001
kern  :warn  : [  238.391139] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
kern  :warn  : [  238.391142] R13: ffffffffba784a28 R14: ffffa13cb87e18c0 R15: 0000000000000000
kern  :warn  : [  238.391147] FS:  00007f11e2e90740(0000) GS:ffffa13cba980000(0000) knlGS:0000000000000000
kern  :warn  : [  238.391150] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  238.391153] CR2: 0000000000000070 CR3: 0000000134268000 CR4: 00000000001006e0
kern  :warn  : [  238.391156] Call Trace:
kern  :warn  : [  238.391171]  kernfs_find_and_get_ns+0x2d/0x50
kern  :warn  : [  238.391179]  sysfs_remove_group+0x25/0x80
kern  :warn  : [  238.391185]  sysfs_remove_groups+0x29/0x40
kern  :warn  : [  238.391195]  device_del+0x170/0x400
kern  :warn  : [  238.391201]  device_unregister+0x16/0x60
kern  :warn  : [  238.391217]  spi_unregister_controller+0xad/0x110
kern  :warn  : [  238.391225]  release_nodes+0x19c/0x1e0
kern  :warn  : [  238.391237]  device_release_driver_internal+0xf4/0x1c0
kern  :warn  : [  238.391243]  driver_detach+0x44/0x82
kern  :warn  : [  238.391249]  bus_remove_driver+0x58/0xcc
kern  :warn  : [  238.391257]  __x64_sys_delete_module+0x19c/0x2f0
kern  :warn  : [  238.391268]  do_syscall_64+0x4e/0x150
kern  :warn  : [  238.391279]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern  :warn  : [  238.391294] RIP: 0033:0x7f11e2fbbc3b
kern  :warn  : [  238.391301] Code: 73 01 c3 48 8b 0d 45 02 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 15 02 0c 00 f7 d8 64 89 01 48
kern  :warn  : [  238.391304] RSP: 002b:00007ffc63adb968 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
kern  :warn  : [  238.391309] RAX: ffffffffffffffda RBX: 000055d4b2890f20 RCX: 00007f11e2fbbc3b
kern  :warn  : [  238.391312] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055d4b2890f88
kern  :warn  : [  238.391315] RBP: 000055d4b2890f20 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  238.391318] R10: 00007f11e302fac0 R11: 0000000000000206 R12: 000055d4b2890f88
kern  :warn  : [  238.391321] R13: 0000000000000000 R14: 000055d4b2890f88 R15: 000055d4b2890f20
kern  :warn  : [  238.391333] Modules linked in: hid_multitouch usbhid quota_v2 quota_tree fuse usb_storage input_leds hidp rfcomm cdc_mbim cdc_wdm cdc_ncm usbnet mii cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc zram hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_als hid_sensor_rotation hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio ofpart cmdlinepart intel_powerclamp intel_spi_platform coretemp kvm_intel intel_spi spi_nor mtd snd_soc_sst_bytcr_rt5640 kvm mei_hdcp hid_sensor_hub intel_rapl_msr snd_soc_rt5670 joydev snd_soc_rt5651 iTCO_wdt iTCO_vendor_support mousedev hid_generic nls_iso8859_1 nls_cp437 vfat fat gpio_keys mwifiex_pcie irqbypass mwifiex crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd cfg80211 glue_helper snd_soc_rt5645 intel_cstate pcspkr snd_intel_sst_acpi snd_intel_sst_core processor_thermal_device intel_xhci_usb_role_switch snd_soc_sst_atom_hifi2_platform
kern  :warn  : [  238.391417]  roles intel_rapl_common snd_soc_rt5640 snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231 snd_hdmi_lpe_audio rfkill snd_soc_core mei_txe lpc_ich intel_atomisp2_pm intel_soc_dts_iosf soc_button_array mei snd_compress ac97_bus surface3_spi(OE) tpm_crb snd_pcm_dmaengine snd_pcm evdev tpm_tis mac_hid snd_timer i2c_hid tpm_tis_core hid snd surface3_button soundcore spi_pxa2xx_platform(OE-) pwm_lpss_platform wmi tpm surfacepro3_button 8250_dw pwm_lpss int3400_thermal int3403_thermal acpi_thermal_rel ac rng_core int340x_thermal_zone dptf_power intel_int0002_vgpio sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  238.391510] CR2: 0000000000000070
kern  :warn  : [  238.391944] ---[ end trace 174923fc5affb32c ]---
kern  :warn  : [  238.391968] RIP: 0010:kernfs_find_ns+0x14/0xd0
kern  :warn  : [  238.391974] Code: 0f 0b e9 6d ff ff ff e8 3a 5b d2 ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 48 85 d2 49 89 f5 41 54 0f 95 c1 55 53 <0f> b7 47 70 48 89 d3 66 83 e0 20 0f 95 c2 38 d1 75 56 4c 8b 67 48
kern  :warn  : [  238.391978] RSP: 0018:ffffa5b880dbfd50 EFLAGS: 00010246
kern  :warn  : [  238.391983] RAX: 0000000000000000 RBX: ffffffffba4e9980 RCX: 0000000000000000
kern  :warn  : [  238.391986] RDX: 0000000000000000 RSI: ffffffffba784a28 RDI: 0000000000000000
kern  :warn  : [  238.391989] RBP: ffffffffba784a28 R08: 0000000000000423 R09: 0000000000000001
kern  :warn  : [  238.391993] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
kern  :warn  : [  238.391996] R13: ffffffffba784a28 R14: ffffa13cb87e18c0 R15: 0000000000000000
kern  :warn  : [  238.392000] FS:  00007f11e2e90740(0000) GS:ffffa13cba980000(0000) knlGS:0000000000000000
kern  :warn  : [  238.392003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  238.392006] CR2: 0000000000000070 CR3: 0000000134268000 CR4: 00000000001006e0

WIP-spi-pxa2xx-Try-to-avoid-race-at-shutdown.html.gz (log with color)

I'm using Buildroot in kexec mode.
I even published a branch (https://github.com/andy-shev/buildroot/tree/intel) what we are using in our team.

It would be hard for mere users.

Understood.

@andy-shev
Copy link
Contributor

@andy-shev andy-shev commented on 66c8401 Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to apply only this commit (andy-shev/linux@e7b3040)?

I applied the commit. This time, breaks spi_pxa2xx_platform module unloading even when the touch input crash is not happening:

Thank you for testing! I have updated it.

P.S. Meanwhile I'm trying to enable necessary options in kernel to have some possibilities to test on MS Surface 3 (Unfortunately due to circumstances it has no touchscreen, it had been broken in order to connect device to be available remotely, Perhaps I may use something else for SPI test)

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry that I can't test the updated patch yet! I can test that in this weekend.
and I'll try to submit bugreport to bugzilla in this weekend, too.)

@kitakar5525
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for waiting!
I submittied a bugreport: https://bugzilla.kernel.org/show_bug.cgi?id=206403

I also tried your new commit: andy-shev/linux@5c1b31e, still causing the kernel NULL pointer dereference:

WIP-spi-pxa2xx-Try-to-avoid-race-at-shutdown-5c1b31e55026eb7987809d5f345cf4e23358c85f

kern  :notice: [    0.000000] Linux version 5.5.1-arch1-1 (linux@archlinux) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Sat, 01 Feb 2020 16:38:40 +0000
kern  :info  : [    0.000000] Command line: \\boot\vmlinuz-linux initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img root=LABEL=Arch_Linux rw quiet fbcon=scrollback:4096k log_buf_len=16M
[...]
#
# First touch with debug output:
#         echo "file drivers/spi/spi-pxa2xx.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#         echo "file drivers/input/touchscreen/surface3_spi.c +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
#
kern  :debug : [   93.499172] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.499983] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 01 00 e7 00 00 07 1b 07 1b 4a 0b 4a 0b 60 01 94 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.501869] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.502347] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 02 00 e7 00 00 07 1b 07 1b 4a 0b 4a 0b 60 01 9e 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.511784] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.512194] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 03 00 e7 00 00 fe 1a fe 1a 7c 0b 7c 0b 60 01 a6 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.521678] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.522388] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 04 00 e7 00 00 e5 1a e5 1a df 0b df 0b 60 01 a5 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.531615] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.532169] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 05 00 e7 00 00 c7 1a c7 1a 6e 0c 6e 0c 69 01 ae 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.541488] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.541986] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 06 00 e7 00 00 a1 1a a1 1a 31 0d 31 0d 69 01 ac 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
kern  :debug : [   93.551269] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :debug : [   93.551809] Surface3-spi spi-MSHW0037:00: surface3_spi_irq_handler received -> ff ff ff ff a5 5a e7 7e 01 d2 00 80 01 03 03 07 00 e4 00 00 a1 1a a1 1a 31 0d 31 0d 69 01 ac 01 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
#
# Second touch then touch input stopped responding
#
kern  :debug : [  100.065859] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.269216] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.269371] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.269764] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.472507] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.472665] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.473112] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.675945] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.676107] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.676443] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  100.879202] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  100.879355] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  100.879479] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.082639] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.082795] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.083129] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.285877] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.286040] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.286461] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.489235] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.489395] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.489986] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.692720] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.692881] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.693010] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  101.895806] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  101.895956] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  101.896077] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.099368] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.099532] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.099655] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.302527] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.302689] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.302817] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.506050] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.506222] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.506364] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.709213] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.709392] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.709529] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  102.912556] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  102.912733] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  102.912872] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.115953] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.116129] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.116262] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.319219] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.319399] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.319550] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.522749] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.522921] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.523234] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.725888] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.726058] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.726213] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  103.929356] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  103.929535] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  103.929671] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.132535] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  104.132715] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  104.132901] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.335887] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  104.336060] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  104.336341] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.539333] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  104.539505] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  104.539694] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.742543] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  104.742722] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  104.742879] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  104.946033] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  104.946211] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  104.946339] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  105.148874] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  105.149008] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  105.149107] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  105.355518] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  105.355643] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  105.355734] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  105.558914] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  105.559245] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  105.559362] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  105.762515] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  105.762657] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  105.762768] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  105.965621] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  105.965804] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  105.965952] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  106.168651] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  106.168820] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  106.169055] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  106.371978] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  106.372156] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  106.372305] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  106.575167] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  106.575316] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  106.575439] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  106.777932] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  106.778100] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  106.778333] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  106.981231] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
kern  :err   : [  106.981361] spi_master spi1: failed to transfer one message from queue
kern  :debug : [  106.981445] Surface3-spi spi-MSHW0037:00: 7692307 Hz actual, DMA
kern  :err   : [  107.184257] Surface3-spi spi-MSHW0037:00: SPI transfer timed out
#
# Unload spi_pxa2xx_platform
#         $ sudo modprobe -r spi_pxa2xx_platform
#         modprobe: FATAL: Module dw_dmac is builtin.
#
kern  :alert : [  107.184314] BUG: kernel NULL pointer dereference, address: 0000000000000000
kern  :alert : [  107.184337] #PF: supervisor read access in kernel mode
kern  :alert : [  107.184348] #PF: error_code(0x0000) - not-present page
kern  :info  : [  107.184363] PGD 0 P4D 0 
kern  :warn  : [  107.184396] Oops: 0000 [#1] PREEMPT SMP PTI
kern  :warn  : [  107.184420] CPU: 3 PID: 337 Comm: irq/77-Surface3 Tainted: G           OE     5.5.1-arch1-1 #1
kern  :warn  : [  107.184430] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  107.184463] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  107.184483] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  107.184496] RSP: 0018:ffffb821c055bbf8 EFLAGS: 00010202
kern  :warn  : [  107.184514] RAX: ffff9ed4b3f40000 RBX: ffffb821c055bdc8 RCX: 0000000000000004
kern  :warn  : [  107.184525] RDX: ffffb821c0389000 RSI: 000000000000000c RDI: ffff9ed4b3f40600
kern  :warn  : [  107.184535] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  107.184548] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9ed4b3f40000
kern  :warn  : [  107.184559] R13: 00000000ffffff92 R14: ffff9ed4b3f404e0 R15: ffff9ed4b3f42b60
kern  :warn  : [  107.184572] FS:  0000000000000000(0000) GS:ffff9ed4ba980000(0000) knlGS:0000000000000000
kern  :warn  : [  107.184584] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  107.184595] CR2: 0000000000000000 CR3: 000000009480a000 CR4: 00000000001006e0
kern  :warn  : [  107.184605] Call Trace:
kern  :warn  : [  107.184646]  spi_transfer_one_message+0x2f5/0x530
kern  :warn  : [  107.184677]  __spi_pump_messages+0x317/0x650
kern  :warn  : [  107.184702]  ? _raw_spin_unlock_irqrestore+0x20/0x40
kern  :warn  : [  107.184719]  __spi_sync+0x1f3/0x200
kern  :warn  : [  107.184743]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  107.184757]  spi_sync+0x2c/0x50
kern  :warn  : [  107.184783]  spi_sync_transfer.constprop.0+0x65/0x80 [surface3_spi]
kern  :warn  : [  107.184813]  ? spi_finalize_current_transfer+0x20/0x20
kern  :warn  : [  107.184835]  ? __switch_to_asm+0x34/0x70
kern  :warn  : [  107.184853]  spi_read.constprop.0+0x40/0x60 [surface3_spi]
kern  :warn  : [  107.184883]  surface3_spi_irq_handler+0x53/0x33b [surface3_spi]
kern  :warn  : [  107.184902]  ? irq_forced_thread_fn+0x80/0x80
kern  :warn  : [  107.184916]  irq_thread_fn+0x20/0x60
kern  :warn  : [  107.184937]  irq_thread+0xee/0x180
kern  :warn  : [  107.184956]  ? wake_threads_waitq+0x30/0x30
kern  :warn  : [  107.184979]  kthread+0xfb/0x130
kern  :warn  : [  107.184996]  ? irq_thread_check_affinity+0xd0/0xd0
kern  :warn  : [  107.185010]  ? kthread_park+0x90/0x90
kern  :warn  : [  107.185028]  ret_from_fork+0x35/0x40
kern  :warn  : [  107.185059] Modules linked in: quota_v2 quota_tree fuse usb_storage input_leds hid_multitouch usbhid rfcomm cdc_mbim cdc_wdm cdc_ncm usbnet mii cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc msr zram hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_als hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio ofpart cmdlinepart intel_spi_platform intel_powerclamp coretemp intel_spi kvm_intel spi_nor snd_soc_sst_bytcr_rt5640 mtd kvm hid_sensor_hub mei_hdcp joydev snd_soc_rt5670 nls_iso8859_1 mousedev snd_soc_rt5651 nls_cp437 iTCO_wdt intel_rapl_msr vfat iTCO_vendor_support hid_generic fat irqbypass crct10dif_pclmul crc32_pclmul gpio_keys ghash_clmulni_intel mwifiex_pcie aesni_intel mwifiex crypto_simd cryptd glue_helper cfg80211 intel_cstate snd_intel_sst_acpi pcspkr snd_intel_sst_core snd_hdmi_lpe_audio snd_soc_rt5645 snd_soc_sst_atom_hifi2_platform snd_soc_rt5640
kern  :warn  : [  107.185407]  snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231 snd_soc_core processor_thermal_device snd_compress intel_rapl_common mei_txe rfkill lpc_ich intel_xhci_usb_role_switch tpm_crb ac97_bus snd_pcm_dmaengine soc_button_array intel_soc_dts_iosf roles mei tpm_tis intel_atomisp2_pm snd_pcm surface3_spi tpm_tis_core i2c_hid snd_timer evdev hid mac_hid pwm_lpss_platform snd tpm spi_pxa2xx_platform(OE-) soundcore pwm_lpss 8250_dw surface3_button wmi surfacepro3_button rng_core ac dptf_power int3400_thermal acpi_thermal_rel int3403_thermal int340x_thermal_zone intel_int0002_vgpio sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  107.185760] CR2: 0000000000000000
kern  :warn  : [  107.185782] ---[ end trace a537cb9522168fdf ]---
kern  :warn  : [  107.185807] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  107.185823] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  107.185835] RSP: 0018:ffffb821c055bbf8 EFLAGS: 00010202
kern  :warn  : [  107.185849] RAX: ffff9ed4b3f40000 RBX: ffffb821c055bdc8 RCX: 0000000000000004
kern  :warn  : [  107.185860] RDX: ffffb821c0389000 RSI: 000000000000000c RDI: ffff9ed4b3f40600
kern  :warn  : [  107.185871] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  107.185882] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9ed4b3f40000
kern  :warn  : [  107.185893] R13: 00000000ffffff92 R14: ffff9ed4b3f404e0 R15: ffff9ed4b3f42b60
kern  :warn  : [  107.185907] FS:  0000000000000000(0000) GS:ffff9ed4ba980000(0000) knlGS:0000000000000000
kern  :warn  : [  107.185919] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  107.185930] CR2: 0000000000000000 CR3: 000000009480a000 CR4: 00000000001006e0
kern  :alert : [  107.185991] BUG: kernel NULL pointer dereference, address: 0000000000000027
kern  :alert : [  107.186005] #PF: supervisor read access in kernel mode
kern  :alert : [  107.186014] #PF: error_code(0x0000) - not-present page
kern  :info  : [  107.186023] PGD 0 P4D 0 
kern  :warn  : [  107.186039] Oops: 0000 [#2] PREEMPT SMP PTI
kern  :warn  : [  107.186055] CPU: 3 PID: 337 Comm: irq/77-Surface3 Tainted: G      D    OE     5.5.1-arch1-1 #1
kern  :warn  : [  107.186065] Hardware name: OEMB OEMB/OEMB, BIOS 1.51116.238 03/09/2015
kern  :warn  : [  107.186085] RIP: 0010:do_exit+0x373/0xb30
kern  :warn  : [  107.186100] Code: c3 cd 24 00 48 89 df e8 5b 7b 26 00 45 84 f6 0f 85 72 04 00 00 48 89 df e8 ea 44 02 00 e8 f5 f7 01 00 48 89 df e8 2d 10 fa ff <f6> 43 27 02 0f 85 e5 05 00 00 48 89 df e8 8b 48 16 00 48 89 df e8
kern  :warn  : [  107.186111] RSP: 0018:ffffb821c055be90 EFLAGS: 00010286
kern  :warn  : [  107.186124] RAX: 0000000080000000 RBX: 0000000000000000 RCX: 0000000000000000
kern  :warn  : [  107.186134] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000ffffffff
kern  :warn  : [  107.186145] RBP: ffff9ed4b561de70 R08: 0000000000000000 R09: 0000000000000000
kern  :warn  : [  107.186156] R10: ffffb821c055b908 R11: ffffb821c055b901 R12: ffff9ed4b561d700
kern  :warn  : [  107.186166] R13: ffffffff94ad3db0 R14: 0000000000000000 R15: ffff9ed4b561dea4
kern  :warn  : [  107.186180] FS:  0000000000000000(0000) GS:ffff9ed4ba980000(0000) knlGS:0000000000000000
kern  :warn  : [  107.186191] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  107.186202] CR2: 0000000000000027 CR3: 000000009480a000 CR4: 00000000001006e0
kern  :warn  : [  107.186211] Call Trace:
kern  :warn  : [  107.186233]  ? task_work_run+0x93/0xb0
kern  :warn  : [  107.186253]  ? do_exit+0x36b/0xb30
kern  :warn  : [  107.186271]  ? kthread+0xfb/0x130
kern  :warn  : [  107.186296]  ? rewind_stack_do_exit+0x17/0x20
kern  :warn  : [  107.186316] Modules linked in: quota_v2 quota_tree fuse usb_storage input_leds hid_multitouch usbhid rfcomm cdc_mbim cdc_wdm cdc_ncm usbnet mii cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc msr zram hid_sensor_gyro_3d hid_sensor_rotation hid_sensor_als hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio ofpart cmdlinepart intel_spi_platform intel_powerclamp coretemp intel_spi kvm_intel spi_nor snd_soc_sst_bytcr_rt5640 mtd kvm hid_sensor_hub mei_hdcp joydev snd_soc_rt5670 nls_iso8859_1 mousedev snd_soc_rt5651 nls_cp437 iTCO_wdt intel_rapl_msr vfat iTCO_vendor_support hid_generic fat irqbypass crct10dif_pclmul crc32_pclmul gpio_keys ghash_clmulni_intel mwifiex_pcie aesni_intel mwifiex crypto_simd cryptd glue_helper cfg80211 intel_cstate snd_intel_sst_acpi pcspkr snd_intel_sst_core snd_hdmi_lpe_audio snd_soc_rt5645 snd_soc_sst_atom_hifi2_platform snd_soc_rt5640
kern  :warn  : [  107.186485]  snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rl6231 snd_soc_core processor_thermal_device snd_compress intel_rapl_common mei_txe rfkill lpc_ich intel_xhci_usb_role_switch tpm_crb ac97_bus snd_pcm_dmaengine soc_button_array intel_soc_dts_iosf roles mei tpm_tis intel_atomisp2_pm snd_pcm surface3_spi tpm_tis_core i2c_hid snd_timer evdev hid mac_hid pwm_lpss_platform snd tpm spi_pxa2xx_platform(OE-) soundcore pwm_lpss 8250_dw surface3_button wmi surfacepro3_button rng_core ac dptf_power int3400_thermal acpi_thermal_rel int3403_thermal int340x_thermal_zone intel_int0002_vgpio sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block crc32c_intel xhci_pci xhci_hcd sdhci_acpi sdhci mmc_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart
kern  :warn  : [  107.186670] CR2: 0000000000000027
kern  :warn  : [  107.186683] ---[ end trace a537cb9522168fe0 ]---
kern  :warn  : [  107.186705] RIP: 0010:pxa2xx_spi_dma_stop+0x19/0xa0 [spi_pxa2xx_platform]
kern  :warn  : [  107.186721] Code: 48 01 00 00 00 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 18 c7 47 48 00 00 00 00 48 8b a8 d0 05 00 00 <48> 8b 55 00 48 8b 92 08 01 00 00 48 85 d2 74 2b 48 89 fb 48 89 ef
kern  :warn  : [  107.186733] RSP: 0018:ffffb821c055bbf8 EFLAGS: 00010202
kern  :warn  : [  107.186746] RAX: ffff9ed4b3f40000 RBX: ffffb821c055bdc8 RCX: 0000000000000004
kern  :warn  : [  107.186758] RDX: ffffb821c0389000 RSI: 000000000000000c RDI: ffff9ed4b3f40600
kern  :warn  : [  107.186768] RBP: 0000000000000000 R08: 0000000000701dc0 R09: 0000000000000001
kern  :warn  : [  107.186779] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9ed4b3f40000
kern  :warn  : [  107.186790] R13: 00000000ffffff92 R14: ffff9ed4b3f404e0 R15: ffff9ed4b3f42b60
kern  :warn  : [  107.186804] FS:  0000000000000000(0000) GS:ffff9ed4ba980000(0000) knlGS:0000000000000000
kern  :warn  : [  107.186816] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  107.186827] CR2: 0000000000000027 CR3: 000000009480a000 CR4: 00000000001006e0
kern  :alert : [  107.186839] Fixing recursive fault but reboot is needed!
kern  :warn  : [  112.698860] spi_master spi1: could not stop message queue
kern  :err   : [  112.698902] spi_master spi1: problem destroying queue
kern  :err   : [  112.698916] spi_master spi1: queue remove failed

WIP-spi-pxa2xx-Try-to-avoid-race-at-shutdown-5c1b31e55026eb7987809d5f345cf4e23358c85f.html.gz

Please sign in to comment.