android_kernel_motorola_sm6375/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Conor Dooley 9decec2993 Revert "clocksource/drivers/riscv: Events are stopped during CPU suspend"
[ Upstream commit d9f15a9de44affe733e34f93bc184945ba277e6d ]

This reverts commit 232ccac1bd9b5bfe73895f527c08623e7fa0752d.

On the subject of suspend, the RISC-V SBI spec states:

  This does not cover whether any given events actually reach the hart or
  not, just what the hart will do if it receives an event. On PolarFire
  SoC, and potentially other SiFive based implementations, events from the
  RISC-V timer do reach a hart during suspend. This is not the case for the
  implementation on the Allwinner D1 - there timer events are not received
  during suspend.

To fix this, the CLOCK_EVT_FEAT_C3STOP (mis)feature was enabled for the
timer driver - but this has broken both RCU stall detection and timers
generally on PolarFire SoC and potentially other SiFive based
implementations.

If an AXI read to the PCIe controller on PolarFire SoC times out, the
system will stall, however, with CLOCK_EVT_FEAT_C3STOP active, the system
just locks up without RCU stalling:

	io scheduler mq-deadline registered
	io scheduler kyber registered
	microchip-pcie 2000000000.pcie: host bridge /soc/pcie@2000000000 ranges:
	microchip-pcie 2000000000.pcie:      MEM 0x2008000000..0x2087ffffff -> 0x0008000000
	microchip-pcie 2000000000.pcie: sec error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: ded error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: axi read request error
	microchip-pcie 2000000000.pcie: axi read timeout
	microchip-pcie 2000000000.pcie: sec error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: ded error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: sec error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: ded error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: sec error in pcie2axi buffer
	microchip-pcie 2000000000.pcie: ded error in pcie2axi buffer
	Freeing initrd memory: 7332K

Similarly issues were reported with clock_nanosleep() - with a test app
that sleeps each cpu for 6, 5, 4, 3 ms respectively, HZ=250 & the blamed
commit in place, the sleep times are rounded up to the next jiffy:

== CPU: 1 ==      == CPU: 2 ==      == CPU: 3 ==      == CPU: 4 ==
Mean: 7.974992    Mean: 7.976534    Mean: 7.962591    Mean: 3.952179
Std Dev: 0.154374 Std Dev: 0.156082 Std Dev: 0.171018 Std Dev: 0.076193
Hi: 9.472000      Hi: 10.495000     Hi: 8.864000      Hi: 4.736000
Lo: 6.087000      Lo: 6.380000      Lo: 4.872000      Lo: 3.403000
Samples: 521      Samples: 521      Samples: 521      Samples: 521

Fortunately, the D1 has a second timer, which is "currently used in
preference to the RISC-V/SBI timer driver" so a revert here does not
hurt operation of D1 in its current form.

Ultimately, a DeviceTree property (or node) will be added to encode the
behaviour of the timers, but until then revert the addition of
CLOCK_EVT_FEAT_C3STOP.

Fixes: 232ccac1bd9b ("clocksource/drivers/riscv: Events are stopped during CPU suspend")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/linux-riscv/YzYTNQRxLr7Q9JR0@spud/
Link: https://github.com/riscv-non-isa/riscv-sbi-doc/issues/98/
Link: https://lore.kernel.org/linux-riscv/bf6d3b1f-f703-4a25-833e-972a44a04114@sholland.org/
Link: https://lore.kernel.org/r/20221122121620.3522431-1-conor.dooley@microchip.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:06 +01:00
..
accessibility
acpi ACPI: video: Force backlight native for more TongFang devices 2022-10-29 10:20:36 +02:00
amba
android binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0 2022-12-08 11:23:01 +01:00
ata ata: libata-transport: fix double ata_host_put() in ata_tport_add() 2022-11-25 17:42:15 +01:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-25 11:18:26 +02:00
auxdisplay
base PM: domains: Fix handling of unavailable/disabled idle states 2022-11-03 23:56:56 +09:00
bcma
block drbd: use after free in drbd_create_device() 2022-11-25 17:42:16 +01:00
bluetooth
bus bus: sunxi-rsb: Support atomic transfers 2022-12-08 11:22:57 +01:00
cdrom
char random: use expired timer rather than wq for mixing fast pool 2022-10-15 07:54:40 +02:00
clk clk: bcm2835: Make peripheral PLLC critical 2022-10-26 13:22:59 +02:00
clocksource Revert "clocksource/drivers/riscv: Events are stopped during CPU suspend" 2022-12-08 11:23:06 +01:00
connector
counter
cpufreq x86/devicetable: Move x86 specific macro out of generic code 2022-10-07 09:16:54 +02:00
cpuidle
crypto crypto: cavium - prevent integer overflow loading firmware 2022-10-26 13:22:46 +02:00
dax
dca
devfreq
dio
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-25 17:42:10 +01:00
dma-buf udmabuf: Set the DMA mask for the udmabuf device (v2) 2022-09-05 10:27:45 +02:00
edac
eisa
extcon
firewire
firmware firmware: coreboot: Register bus in module init 2022-12-08 11:23:00 +01:00
fpga
fsi fsi: core: Check error number after calling ida_simple_get 2022-10-26 13:22:41 +02:00
gnss
gpio gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx 2022-09-28 11:03:57 +02:00
gpu drm/amdgpu: Partially revert "drm/amdgpu: update drm_display_info correctly when the edid is read" 2022-12-08 11:23:02 +01:00
greybus
hid HID: hyperv: fix possible memory leak in mousevsc_probe() 2022-11-25 17:42:04 +01:00
hsi HSI: omap_ssi_port: Fix dma_map_sg error check 2022-10-26 13:22:36 +02:00
hv Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-08 11:22:58 +01:00
hwmon hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new() 2022-12-08 11:23:03 +01:00
hwspinlock
hwtracing
i2c i2c: i801: add lis3lv02d's I2C address for Vostro 5568 2022-11-25 17:42:12 +01:00
i3c
ide
idle intel_idle: Disable IBRS during long idle 2022-10-07 09:16:55 +02:00
iio iio: light: rpr0521: add missing Kconfig dependencies 2022-12-08 11:23:02 +01:00
infiniband RDMA/qedr: clean up work queue on failure in qedr_alloc_resources() 2022-11-10 17:57:50 +01:00
input Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode 2022-12-08 11:23:00 +01:00
interconnect
iommu iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init() 2022-12-08 11:23:04 +01:00
ipack
irqchip irqchip/tegra: Fix overflow implicit truncation warnings 2022-08-25 11:18:32 +02:00
isdn mISDN: fix misuse of put_device() in mISDN_register_device() 2022-11-25 17:42:15 +01:00
leds
lightnvm
macintosh
mailbox mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg 2022-10-26 13:22:44 +02:00
mcb
md dm integrity: flush the journal on suspend 2022-12-08 11:23:01 +01:00
media media: dvb-frontends/drxk: initialize err to 0 2022-11-10 17:57:53 +01:00
memory memory: of: Fix refcount leak bug in of_get_ddr_timings() 2022-10-26 13:22:31 +02:00
memstick
message
mfd mfd: sm501: Add check for platform_driver_register() 2022-10-26 13:22:42 +02:00
misc misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-25 17:42:20 +01:00
mmc mmc: sdhci-sprd: Fix no reset data and command after voltage switch 2022-12-08 11:23:04 +01:00
mtd spi: intel: Fix the offset to get the 64K erase opcode 2022-11-25 17:42:11 +01:00
mux
net net/mlx5: DR, Fix uninitialized var warning 2022-12-08 11:23:03 +01:00
nfc nfc: st-nci: fix memory leaks in EVT_TRANSACTION 2022-12-08 11:22:59 +01:00
ntb NTB: ntb_tool: uninitialized heap data in tool_fn_write() 2022-08-25 11:18:26 +02:00
nubus
nvdimm
nvme nvme: ensure subsystem reset is single threaded 2022-12-08 11:23:05 +01:00
nvmem
of of: property: decrement node refcount in of_fwnode_get_reference_args() 2022-12-08 11:23:02 +01:00
opp
oprofile
parisc parisc: Export iosapic_serial_irq() symbol for serial port driver 2022-11-10 17:57:56 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:42:14 +01:00
pci PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-10-26 13:22:16 +02:00
pcmcia
perf perf/arm_pmu_platform: fix tests for platform_get_irq() failure 2022-09-20 12:27:59 +02:00
phy phy: stm32: fix an error code in probe 2022-11-25 17:42:03 +01:00
pinctrl pinctrl: single: Fix potential division by zero 2022-12-08 11:23:04 +01:00
platform platform/x86: hp-wmi: Ignore Smart Experience App event 2022-12-08 11:23:00 +01:00
pnp
power power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type() 2022-10-26 13:22:56 +02:00
powercap powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue 2022-10-26 13:22:47 +02:00
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: twl6030: re-add TWL6032_SUBCLASS 2022-12-08 11:22:59 +01:00
remoteproc
reset
rpmsg rpmsg: qcom: glink: replace strncpy() with strscpy_pad() 2022-10-15 07:54:38 +02:00
rtc
s390 s390/dasd: fix no record found for raw_track_access 2022-12-08 11:22:59 +01:00
sbus
scsi scsi: core: Restrict legal sdev_state transitions via sysfs 2022-11-10 17:57:53 +01:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:42:14 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:42:17 +01:00
soc soc: qcom: smem_state: Add refcounting for the 'state->of_node' 2022-10-26 13:22:32 +02:00
soundwire
spi spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock 2022-12-08 11:23:02 +01:00
spmi spmi: pmic-arb: correct duplicate APID to PPID mapping logic 2022-10-26 13:22:43 +02:00
ssb
staging speakup: fix a segfault caused by switching consoles 2022-11-25 17:42:18 +01:00
target scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() 2022-11-25 17:42:20 +01:00
tc
tee tee: optee: fix possible memory leak in optee_register_device() 2022-12-08 11:22:57 +01:00
thermal thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 13:23:01 +02:00
thunderbolt thunderbolt: Use the actual buffer in tb_async_error() 2022-09-15 12:04:52 +02:00
tty serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() 2022-12-08 11:23:00 +01:00
uio
usb usb: dwc3: exynos: Fix remove() function 2022-12-08 11:22:59 +01:00
vfio vfio: Clear the caps->buf to NULL after free 2022-08-25 11:18:36 +02:00
vhost vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 13:22:25 +02:00
video fbdev: smscufx: Fix several use-after-free bugs 2022-11-03 23:56:53 +09:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:18:33 +02:00
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen/platform-pci: add missing free_irq() in error path 2022-12-08 11:23:00 +01:00
zorro
Kconfig
Makefile