android_kernel_xiaomi_sm8450/drivers/bus
Manu Gautam 5be8f883fc mhi: core: add mhi_device_get_sync_atomic() to wait until M0
There is a possibility of client driver's dev_wake request
as part mhi_device_get() racing with M1 state transition
event processing. This can result in a scenario where client
finds MHI state as M0 after mhi_device_get() returns only to
be changed later as M1 event processing is still pending on
different CPU core.
It causes M0 -> M2 -> M0 state transition after mhi_device_get()
has already returned. This isn't expected by client and currently
treats that as fatal error. Also, as per MHI spec host must allow
M1 -> M2 transition for device and it shouldn't abort that.

However, clients can ignore that transition as device is expected
to immediately move from M2 to M0 without entering deep sleep
state. Hence, it must be safe to access their MMIO.
To simplify this logic, introduce mhi_device_get_sync_atomic()
function that can be used by clients to achieve the same and once
it returns success they don't need to have any explicit MHI state
checks.

Change-Id: I0b4a1ad723a0444ee2402bf171fc5ffc46afcdce
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2020-06-17 23:24:02 -07:00
..
fsl-mc bus: fsl-mc: remove explicit device_link_del 2019-08-16 14:17:35 -05:00
mhi mhi: core: add mhi_device_get_sync_atomic() to wait until M0 2020-06-17 23:24:02 -07:00
arm-cci.c bus: arm-cci: remove unnecessary unreachable() 2018-05-14 01:22:49 -07:00
brcmstb_gisb.c This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes 2019-06-17 04:52:52 -07:00
da8xx-mstpri.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hisi_lpc.c bus: hisi_lpc: Add .remove method to avoid driver unbind crash 2019-08-13 14:54:34 +08:00
imx-weim.c bus: imx-weim: remove incorrect __init annotations 2019-09-04 17:59:32 +02:00
Kconfig Merge android-5.4.24 (ce5de62) into msm-5.4 2020-04-14 08:25:29 -07:00
Makefile mhi: add snapshot for MHI driver stack 2019-12-25 21:32:42 -08:00
mips_cdmm.c MIPS/BUS/CDMM: Convert to hotplug state machine 2016-09-06 18:30:25 +02:00
moxtet.c bus: moxtet: fix potential stack buffer overflow 2020-02-19 19:53:04 +01:00
mvebu-mbus.c bus: mvebu-mbus: Convert to using %pOFn instead of device_node.name 2018-09-28 16:41:57 -05:00
omap_l3_noc.c bus: omap: add MODULE_LICENSE tags 2018-01-11 18:02:56 -08:00
omap_l3_noc.h bus: omap_l3_noc: Fix master id address decoding for OMAP5 2015-05-04 10:21:01 -07:00
omap_l3_smx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
omap_l3_smx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
omap-ocp2scp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
qcom-ebi2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
simple-pm-bus.c drivers: bus: Add Simple Power-Managed Bus Driver 2015-02-24 06:36:18 +09:00
sun50i-de2.c bus: add bus driver for accessing Allwinner A64 DE2 2018-06-28 10:20:19 +02:00
sunxi-rsb.c bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq() 2019-08-06 14:15:49 +08:00
tegra-aconnect.c bus: tegra-aconnect: add system sleep callbacks 2019-03-28 17:26:14 +01:00
tegra-gmi.c bus: Add support for Tegra Generic Memory Interface 2016-11-15 17:27:53 +01:00
ti-sysc.c bus: ti-sysc: Fix 1-wire reset quirk 2020-03-12 13:00:31 +01:00
ts-nbus.c gpiolib: Pass array info to get/set array functions 2018-09-13 11:16:54 +02:00
uniphier-system-bus.c bus: uniphier-system-bus: use devm_platform_ioremap_resource() 2019-09-05 17:57:18 +02:00
vexpress-config.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00