linux/drivers
Cristian Marussi bccb966e93 firmware: arm_scmi: Fix SCMI genpd domain probing
[ Upstream commit e0f1a30cf1 ]

When, at probe time, an SCMI communication failure inhibits the capacity
to query power domains states, such domains should be skipped.

Registering partially initialized SCMI power domains with genpd will
causes kernel panic.

 arm-scmi timed out in resp(caller: scmi_power_state_get+0xa4/0xd0)
 scmi-power-domain scmi_dev.2: failed to get state for domain 9
 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
 Mem abort info:
   ESR = 0x96000006
   EC = 0x25: DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
 Data abort info:
   ISV = 0, ISS = 0x00000006
   CM = 0, WnR = 0
 user pgtable: 4k pages, 48-bit VAs, pgdp=00000009f3691000
 [0000000000000000] pgd=00000009f1ca0003, p4d=00000009f1ca0003, pud=00000009f35ea003, pmd=0000000000000000
 Internal error: Oops: 96000006 [#1] PREEMPT SMP
 CPU: 2 PID: 381 Comm: bash Not tainted 5.8.0-rc1-00011-gebd118c2cca8 #2
 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Jan  3 2020
 Internal error: Oops: 96000006 [#1] PREEMPT SMP
 pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--)
 pc : of_genpd_add_provider_onecell+0x98/0x1f8
 lr : of_genpd_add_provider_onecell+0x48/0x1f8
 Call trace:
  of_genpd_add_provider_onecell+0x98/0x1f8
  scmi_pm_domain_probe+0x174/0x1e8
  scmi_dev_probe+0x90/0xe0
  really_probe+0xe4/0x448
  driver_probe_device+0xfc/0x168
  device_driver_attach+0x7c/0x88
  bind_store+0xe8/0x128
  drv_attr_store+0x2c/0x40
  sysfs_kf_write+0x4c/0x60
  kernfs_fop_write+0x114/0x230
  __vfs_write+0x24/0x50
  vfs_write+0xbc/0x1e0
  ksys_write+0x70/0xf8
  __arm64_sys_write+0x24/0x30
  el0_svc_common.constprop.3+0x94/0x160
  do_el0_svc+0x2c/0x98
  el0_sync_handler+0x148/0x1a8
  el0_sync+0x158/0x180

Do not register any power domain that failed to be queried with genpd.

Fixes: 898216c97e ("firmware: arm_scmi: add device power domain support using genpd")
Link: https://lore.kernel.org/r/20200619220330.12217-1-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:14:48 +02:00
..
accessibility
acpi ACPI: video: Use native backlight on Acer TravelMate 5735Z 2020-07-22 09:32:05 +02:00
amba
android binder: Prevent context manager from incrementing ref 0 2020-08-11 15:32:31 +02:00
ata ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function 2020-06-30 23:17:13 -04:00
atm atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent 2020-08-11 15:32:33 +02:00
auxdisplay auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach 2019-09-06 10:21:56 +02:00
base regmap: debugfs: check count when read regmap file 2020-07-31 18:37:49 +02:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-27 14:51:09 +01:00
block Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()" 2020-07-22 09:32:10 +02:00
bluetooth Bluetooth: hci_bcm: fix freeing not-requested IRQ 2020-06-22 09:05:26 +02:00
bus bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-17 10:48:37 +02:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 19:13:12 +01:00
char random32: update the net random state on interrupt and activity 2020-08-07 09:36:20 +02:00
clk clk: sprd: return correct type of value for _sprd_pll_recalc_rate 2020-06-25 15:33:00 +02:00
clocksource clocksource: dw_apb_timer_of: Fix missing clockevent timers 2020-06-22 09:05:11 +02:00
connector
cpufreq cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once 2020-05-20 08:18:40 +02:00
cpuidle cpuidle: Fix three reference count leaks 2020-06-22 09:05:20 +02:00
crypto crypto: ccree - fix resource leak on error path 2020-08-19 08:14:48 +02:00
dax
dca
devfreq Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" 2020-03-05 16:42:18 +01:00
dio
dma dmaengine: ioat setting ioat timeout as module parameter 2020-07-29 10:16:53 +02:00
dma-buf dma-buf: Fix memory leak in sync_file_merge() 2019-12-21 10:57:38 +01:00
edac EDAC: Fix reference count leaks 2020-08-19 08:14:48 +02:00
eisa
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2020-06-25 15:33:01 +02:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:19:09 +01:00
firmware firmware: arm_scmi: Fix SCMI genpd domain probing 2020-08-19 08:14:48 +02:00
fmc
fpga fpga: dfl: fix bug in port reset handshake 2020-07-29 10:16:48 +02:00
fsi fsi: sbefifo: Don't fail operations when in SBE IPL state 2020-01-27 14:51:00 +01:00
gnss gnss: sirf: fix error return code in sirf_probe() 2020-06-22 09:05:28 +02:00
gpio gpio: arizona: put pm_runtime in case of failure 2020-07-29 10:16:44 +02:00
gpu drm/nouveau/fbcon: zero-initialise the mode_cmd2 structure 2020-08-11 15:32:32 +02:00
hid HID: input: Fix devices that return multiple bytes in battery report 2020-08-19 08:14:47 +02:00
hsi
hv Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) 2020-08-11 15:32:33 +02:00
hwmon hwmon: (scmi) Fix potential buffer overflow in scmi_hwmon_probe() 2020-07-29 10:16:54 +02:00
hwspinlock
hwtracing intel_th: Fix a NULL dereference when hub driver is not loaded 2020-07-22 09:32:12 +02:00
i2c i2c: slave: add sanity check when unregistering 2020-08-11 15:32:33 +02:00
ide ide: serverworks: potential overflow in svwks_set_pio_mode() 2020-02-24 08:34:49 +01:00
idle
iio iio: imu: adis16400: fix memory leak 2020-08-05 10:05:59 +02:00
infiniband IB/umem: fix reference count leak in ib_umem_odp_get() 2020-07-29 10:16:47 +02:00
input Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen 2020-07-29 10:16:53 +02:00
iommu irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:16:46 +02:00
ipack ipack: tpci200: fix error return code in tpci200_register() 2020-05-27 17:37:43 +02:00
irqchip irqchip/gic: Atomically update affinity 2020-07-09 09:37:12 +02:00
isdn PCI: add USR vendor id and use it in r8169 and w6692 driver 2020-06-22 09:05:23 +02:00
leds leds: 88pm860x: fix use-after-free on unbind 2020-08-11 15:32:32 +02:00
lightnvm lightnvm: pblk: fix lock order in pblk_rb_tear_down_check 2020-01-27 14:50:45 +01:00
macintosh drivers/macintosh: Fix memleak in windfarm_pm112 driver 2020-06-22 09:05:29 +02:00
mailbox mailbox: qcom-apcs: fix max_register value 2020-01-27 14:51:14 +01:00
mcb
md dm integrity: fix integrity recalculation that is improperly skipped 2020-07-29 10:16:59 +02:00
media media: rc: prevent memory leak in cx23888_ir_probe 2020-08-05 10:05:59 +02:00
memory memory: tegra: Don't invoke Tegra30+ specific memory timing setup on Tegra20 2020-01-27 14:50:13 +01:00
memstick memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' 2019-10-29 09:20:07 +01:00
message scsi: mptscsih: Fix read sense data size 2020-07-16 08:17:23 +02:00
mfd mfd: wm8994: Fix driver operation if loaded as modules 2020-06-25 15:32:50 +02:00
misc misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:32:12 +02:00
mmc mmc: sdhci: do not enable card detect interrupt for gpio cd type 2020-07-22 09:32:04 +02:00
mtd mtd: properly check all write ioctls for permissions 2020-08-11 15:32:32 +02:00
mux
net i40e: Memory leak in i40e_config_iwarp_qvlist 2020-08-11 15:32:36 +02:00
nfc nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame 2020-08-05 10:06:05 +02:00
ntb NTB: perf: Fix race condition when run with ntb_test 2020-06-25 15:33:03 +02:00
nubus
nvdimm libnvdimm: Fix endian conversion issues 2020-06-07 13:17:53 +02:00
nvme nvme-rdma: assign completion vector correctly 2020-07-16 08:17:23 +02:00
nvmem nvmem: qfprom: remove incorrect write support 2020-06-10 21:35:00 +02:00
of of: of_mdio: Correct loop scanning logic 2020-07-22 09:32:03 +02:00
opp OPP: Fix missing debugfs supply directory for OPPs 2020-01-27 14:50:04 +01:00
oprofile
parisc parisc: Disable HP HSC-PCI Cards to prevent kernel crash 2019-10-05 13:10:04 +02:00
parport parport: load lowlevel driver if ports not found 2019-12-31 16:36:01 +01:00
pci PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge 2020-08-05 10:06:00 +02:00
pcmcia
perf drivers/perf: hisi: Fix wrong value for all counters enable 2020-06-25 15:33:04 +02:00
phy phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked 2020-07-22 09:32:05 +02:00
pinctrl pinctrl: amd: fix npins for uart0 in kerncz_groups 2020-07-29 10:16:44 +02:00
platform platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type 2020-06-22 09:05:20 +02:00
pnp
power power: supply: smb347-charger: IRQSTAT_D is volatile 2020-06-25 15:32:55 +02:00
powercap
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-08-04 09:30:56 +02:00
ps3
ptp ptp: free ptp device pin descriptors properly 2020-01-23 08:21:35 +01:00
pwm pwm: img: Call pm_runtime_put() in pm_runtime_get_sync() failed case 2020-06-25 15:32:51 +02:00
rapidio rapidio: fix an error in get_user_pages_fast() error handling 2020-05-27 17:37:43 +02:00
ras RAS/CEC: Fix pfn insertion 2019-07-26 09:14:05 +02:00
regulator regualtor: pfuze100: correct sw1a/sw2 on pfuze3000 2020-06-30 23:17:10 -04:00
remoteproc remoteproc: Fix IDR initialisation in rproc_alloc() 2020-06-25 15:32:47 +02:00
reset reset: uniphier: Add SCSSI reset control for each channel 2020-02-24 08:34:44 +01:00
rpmsg rpmsg: glink: Remove chunk size word align warning 2020-04-13 10:45:16 +02:00
rtc rtc: 88pm860x: fix possible race condition 2020-04-23 10:30:18 +02:00
s390 scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action 2020-06-30 23:17:08 -04:00
sbus
scsi scsi: scsi_transport_spi: Fix function pointer check 2020-07-29 10:16:45 +02:00
sfi
sh
siox
slimbus slimbus: core: Fix mismatch in of_node_get/put 2020-07-22 09:32:07 +02:00
sn
soc soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner 2020-07-29 10:16:44 +02:00
soundwire soundwire: intel: fix PDI/stream mapping for Bulk 2019-12-31 16:35:55 +01:00
spi spi: mediatek: use correct SPI_CFG2_REG MACRO 2020-07-29 10:16:52 +02:00
spmi
ssb
staging staging: android: ashmem: Fix lockdep warning for write operation 2020-08-11 15:32:31 +02:00
target scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd() 2020-06-25 15:32:59 +02:00
tc
tee tee: optee: Fix compilation issue with nommu 2020-02-05 14:43:50 +00:00
thermal thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power 2020-07-22 09:32:12 +02:00
thunderbolt thunderbolt: Drop duplicated get_switch_at_route() 2020-05-27 17:37:40 +02:00
tty vt: Reject zero-sized screen buffer size. 2020-07-29 10:16:56 +02:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:32:11 +02:00
usb usb: xhci: Fix ASMedia ASM1142 DMA addressing 2020-08-11 15:32:30 +02:00
uwb
vfio vfio/mdev: Fix reference count leak in add_mdev_supported_type 2020-06-25 15:33:01 +02:00
vhost vhost/vsock: fix packet delivery order to monitoring devices 2020-05-27 17:37:32 +02:00
video vgacon: Fix for missing check in scrollback handling 2020-08-11 15:32:31 +02:00
virt virt: vbox: Fix guest capabilities mask check 2020-07-22 09:32:10 +02:00
virtio virtio_balloon: prevent pfn array overflow 2020-02-24 08:34:54 +01:00
visorbus visorbus: fix uninitialized variable access 2020-02-24 08:34:47 +01:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-24 08:34:47 +01:00
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2020-06-22 09:05:30 +02:00
watchdog watchdog: da9062: No need to ping manually before setting timeout 2020-06-25 15:32:58 +02:00
xen xen/pvcalls-back: test for errors when calling backend_connect() 2020-06-22 09:05:09 +02:00
zorro
Kconfig
Makefile