linux-stable/drivers
Dafna Hirschfeld b34ea31fe0 iommu/mediatek: Always enable the clk on resume
In mtk_iommu_runtime_resume always enable the clk, even
if m4u_dom is null. Otherwise the 'suspend' cb might
disable the clk which is already disabled causing the warning:

[    1.586104] infra_m4u already disabled
[    1.586133] WARNING: CPU: 0 PID: 121 at drivers/clk/clk.c:952 clk_core_disable+0xb0/0xb8
[    1.594391] mtk-iommu 10205000.iommu: bound 18001000.larb (ops mtk_smi_larb_component_ops)
[    1.598108] Modules linked in:
[    1.598114] CPU: 0 PID: 121 Comm: kworker/0:2 Not tainted 5.12.0-rc5 #69
[    1.609246] mtk-iommu 10205000.iommu: bound 14027000.larb (ops mtk_smi_larb_component_ops)
[    1.617487] Hardware name: Google Elm (DT)
[    1.617491] Workqueue: pm pm_runtime_work
[    1.620545] mtk-iommu 10205000.iommu: bound 19001000.larb (ops mtk_smi_larb_component_ops)

[    1.627229] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--)
[    1.659297] pc : clk_core_disable+0xb0/0xb8
[    1.663475] lr : clk_core_disable+0xb0/0xb8
[    1.667652] sp : ffff800011b9bbe0
[    1.670959] x29: ffff800011b9bbe0 x28: 0000000000000000
[    1.676267] x27: ffff800011448000 x26: ffff8000100cfd98
[    1.681574] x25: ffff800011b9bd48 x24: 0000000000000000
[    1.686882] x23: 0000000000000000 x22: ffff8000106fad90
[    1.692189] x21: 000000000000000a x20: ffff0000c0048500
[    1.697496] x19: ffff0000c0048500 x18: ffffffffffffffff
[    1.702804] x17: 0000000000000000 x16: 0000000000000000
[    1.708112] x15: ffff800011460300 x14: fffffffffffe0000
[    1.713420] x13: ffff8000114602d8 x12: 0720072007200720
[    1.718727] x11: 0720072007200720 x10: 0720072007200720
[    1.724035] x9 : ffff800011b9bbe0 x8 : ffff800011b9bbe0
[    1.729342] x7 : 0000000000000009 x6 : ffff8000114b8328
[    1.734649] x5 : 0000000000000000 x4 : 0000000000000000
[    1.739956] x3 : 00000000ffffffff x2 : ffff800011460298
[    1.745263] x1 : 1af1d7de276f4500 x0 : 0000000000000000
[    1.750572] Call trace:
[    1.753010]  clk_core_disable+0xb0/0xb8
[    1.756840]  clk_core_disable_lock+0x24/0x40
[    1.761105]  clk_disable+0x20/0x30
[    1.764501]  mtk_iommu_runtime_suspend+0x88/0xa8
[    1.769114]  pm_generic_runtime_suspend+0x2c/0x48
[    1.773815]  __rpm_callback+0xe0/0x178
[    1.777559]  rpm_callback+0x24/0x88
[    1.781041]  rpm_suspend+0xdc/0x470
[    1.784523]  rpm_idle+0x12c/0x170
[    1.787831]  pm_runtime_work+0xa8/0xc0
[    1.791573]  process_one_work+0x1e8/0x360
[    1.795580]  worker_thread+0x44/0x478
[    1.799237]  kthread+0x150/0x158
[    1.802460]  ret_from_fork+0x10/0x30
[    1.806034] ---[ end trace 82402920ef64573b ]---
[    1.810728] ------------[ cut here ]------------

In addition, we now don't need to enable the clock from the
function mtk_iommu_hw_init since it is already enabled by the resume.

Fixes: c0b57581b7 ("iommu/mediatek: Add power-domain operation")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210416105449.4744-1-dafna.hirschfeld@collabora.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2021-04-16 17:14:51 +02:00
..
accessibility Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
acpi Additional ACPI updates for v5.12-rc1 2021-02-25 12:03:13 -08:00
amba
android
ata
atm atm: idt77252: fix null-ptr-dereference 2021-03-08 15:16:30 -08:00
auxdisplay treewide: Miguel has moved 2021-02-26 09:41:03 -08:00
base software node: Fix device_add_software_node() 2021-03-10 15:25:02 +01:00
bcma
block Merge branch 'akpm' (patches from Andrew) 2021-03-14 12:23:34 -07:00
bluetooth TTY/Serial driver changes for 5.12-rc1 2021-02-20 21:28:04 -08:00
bus Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
cdrom
char powerpc fixes for 5.12 #2 2021-03-07 13:24:44 -08:00
clk RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
clocksource A small set of clockevent fixes which fell through the cracks 2021-02-22 14:11:36 -08:00
connector
counter
cpufreq cpufreq: blacklist Arm Vexpress platforms in cpufreq-dt-platdev 2021-03-08 16:20:07 +05:30
cpuidle
crypto vio: make remove callback return void 2021-03-02 22:41:23 +11:00
cxl cxl/mem: Fix potential memory leak 2021-02-22 14:44:39 -08:00
dax Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-02-27 08:07:12 -08:00
dca
devfreq Merge branches 'pm-devfreq' and 'pm-tools' 2021-02-15 17:02:04 +01:00
dio
dma dmaengine updates for v5.12-rc1 2021-02-23 15:05:10 -08:00
dma-buf dma-fence: allow signaling drivers to set fence timestamp 2021-02-24 21:05:28 +05:30
edac Merge branch 'edac-misc' into edac-updates-for-v5.12 2021-02-15 10:06:58 +01:00
eisa
extcon
firewire firewire: replace tricky statement by two simple ones 2021-02-09 12:16:20 +01:00
firmware EFI fix for 5.12-rc2 2021-03-14 12:54:56 -07:00
fpga
fsi
gnss
gpio gpiolib: Read "gpio-line-names" from a firmware node 2021-03-08 11:59:17 +01:00
gpu mm: use is_cow_mapping() across tree where proper 2021-03-13 11:27:30 -08:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2021-02-23 14:52:22 -08:00
hsi
hv mm/memory_hotplug: MEMHP_MERGE_RESOURCE -> MHP_MERGE_RESOURCE 2021-02-26 09:41:00 -08:00
hwmon Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
hwspinlock hwspinlock: omap: Add support for K3 AM64x SoCs 2021-02-09 11:36:50 -06:00
hwtracing ARM updates for 5.12-rc1: 2021-02-22 14:27:07 -08:00
i2c i2c: exynos5: Preserve high speed master code 2021-02-26 11:47:42 +01:00
i3c I3C for 5.12 2021-02-22 09:52:55 -08:00
ide ide-5.11-2021-02-28 2021-02-28 15:48:25 -08:00
idle
iio - Use the newly introduced 'hot' and 'critical' ops for the acpi 2021-02-22 09:39:11 -08:00
infiniband RDMA/rxe: Fix errant WARN_ONCE in rxe_completer() 2021-03-05 14:15:22 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2021-02-23 14:56:23 -08:00
interconnect
iommu iommu/mediatek: Always enable the clk on resume 2021-04-16 17:14:51 +02:00
ipack ipack: Handle a driver without remove callback 2021-02-09 09:48:23 +01:00
irqchip irqchip/ingenic: Add support for the JZ4760 2021-03-09 08:45:17 +00:00
isdn
leds leds: trigger/tty: Use led_set_brightness_sync() from workqueue 2021-03-10 09:27:56 +01:00
lightnvm lightnvm: pblk: Replace guid_copy() with export_guid()/import_guid() 2021-02-14 21:27:24 -07:00
macintosh
mailbox mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer 2021-02-22 13:34:27 -06:00
mcb
md block-5.12-2021-03-12-v2 2021-03-12 13:25:49 -08:00
media media: rkisp1: params: fix wrong bits settings 2021-03-11 11:40:29 +01:00
memory Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
memstick
message
mfd Simple Firmware Interface (SFI) support removal for v5.12-rc1 2021-02-24 10:35:29 -08:00
misc Char/misc driver fixes for 5.12-rc3 2021-03-13 12:38:44 -08:00
mmc mmc: cqhci: Fix random crash when remove mmc module/card 2021-03-09 10:00:52 +01:00
most
mtd This pull request contains changes (actually just fixes) for UBIFS 2021-02-21 13:57:08 -08:00
mux
net Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
nfc Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
ntb NTB: Add support for EPF PCI Non-Transparent Bridge 2021-02-23 14:12:53 -06:00
nubus
nvdimm libnvdimm + device-dax for 5.12 2021-02-24 09:35:54 -08:00
nvme nvme: fix the nsid value to print in nvme_validate_or_alloc_ns 2021-03-12 13:17:45 -07:00
nvmem nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer 2021-02-05 11:25:52 +01:00
of Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
opp opp: Don't drop extra references to OPPs accidentally 2021-03-12 09:26:52 +05:30
parisc
parport
pci xen: branch for v5.12-rc3 2021-03-12 11:34:36 -08:00
pcmcia Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux 2021-02-26 13:54:43 -08:00
perf perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() 2021-03-12 11:30:31 +00:00
phy phy: second round of phy fixes for v5.11 2021-02-10 10:39:23 +01:00
pinctrl RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
platform Additional ACPI updates for v5.12-rc1 2021-02-25 12:03:13 -08:00
pnp
power
powercap powercap/drivers/dtpm: Add the experimental label to the option description 2021-03-01 17:43:29 +01:00
pps
ps3
ptp ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are unnecessary 2021-02-17 13:49:26 -08:00
pwm pwm: Changes for v5.12-rc1 2021-02-25 12:23:49 -08:00
rapidio
ras
regulator regulator: mt6315: Fix off-by-one for .n_voltages 2021-03-11 13:23:21 +00:00
remoteproc remoteproc: qcom: pas: Add SM8350 PAS remoteprocs 2021-02-11 12:52:18 -06:00
reset RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
rpmsg
rtc Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-02-27 08:07:12 -08:00
s390 block-5.12-2021-03-12-v2 2021-03-12 13:25:49 -08:00
sbus
scsi SCSI fixes on 20210312 2021-03-12 13:37:18 -08:00
sh
siox
slimbus
soc OpenRISC updates for 5.12 2021-02-26 14:16:06 -08:00
soundwire ALSA: hda: move Intel SoundWire ACPI scan to dedicated module 2021-03-02 15:33:00 +01:00
spi powerpc updates for 5.12 2021-02-22 14:34:00 -08:00
spmi spmi: spmi-pmic-arb: Fix hw_irq overflow 2021-02-12 12:26:46 +01:00
ssb
staging Revert "staging: wfx: remove unused included header files" 2021-03-10 09:23:30 +01:00
target SCSI misc on 20210228 2021-02-28 11:51:20 -08:00
tc
tee Simplify i2c acess in OP-TEE driver 2021-02-09 16:10:49 +01:00
thermal - Use the newly introduced 'hot' and 'critical' ops for the acpi 2021-02-22 09:39:11 -08:00
thunderbolt thunderbolt: Changes for v5.12 merge window 2021-02-09 13:00:07 +01:00
tty TTY/Serial fixes for 5.12-rc3 2021-03-13 12:34:29 -08:00
uio uio: uio_pci_generic: don't fail probe if pdev->irq equals to IRQ_NOTCONNECTED 2021-02-09 12:25:32 +01:00
usb USB fixes for 5.12-rc3 2021-03-13 12:32:57 -08:00
vdpa vdpa/mlx5: fix param validation in mlx5_vdpa_get_config() 2021-02-23 07:52:59 -05:00
vfio VFIO updates for v5.12-rc1 2021-02-24 10:43:40 -08:00
vhost virtio: features, fixes 2021-02-25 12:21:08 -08:00
video fbdev: atyfb: use LCD management functions for PPC_PMAC also 2021-03-11 11:11:32 +01:00
virt virt: acrn: Correct type casting of argument of copy_from_user() 2021-03-10 16:59:50 +01:00
virtio Merge branch 'akpm' (patches from Andrew) 2021-02-26 09:50:09 -08:00
visorbus
vlynq
vme vme: make remove callback return void 2021-02-09 12:15:07 +01:00
w1
watchdog Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
xen xen: branch for v5.12-rc3 2021-03-12 11:34:36 -08:00
zorro
Kconfig cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints 2021-02-16 20:36:38 -08:00
Makefile Simple Firmware Interface (SFI) support removal for v5.12-rc1 2021-02-24 10:35:29 -08:00