linux_dsm_epyc7002/arch/powerpc/platforms/pseries
Tyrel Datwyler c5e76fa05b powerpc/pseries: Fix of_read_drc_info_cell() to point at next record
The expectation is that when calling of_read_drc_info_cell()
repeatedly to parse multiple drc-info records that the in/out curval
parameter points at the start of the next record on return. However,
the current behavior has curval still pointing at the final value of
the record just parsed. The result of which is that if the
ibm,drc-info property contains multiple properties the parsed value
of the drc_type for any record after the first has the power_domain
value of the previous record appended to the type string.

eg: observed the following 0xffffffff prepended to PHB

  drc-info: type: \xff\xff\xff\xffPHB, prefix: PHB , index_start: 0x20000001
  drc-info: suffix_start: 1, sequential_elems: 3072, sequential_inc: 1
  drc-info: power-domain: 0xffffffff, last_index: 0x20000c00

In practice PHBs are the only type of connector in the ibm,drc-info
property that has multiple records. So, it breaks PHB hotplug, but by
chance not PCI, CPU, slot, or memory because they happen to only ever
be a single record.

Fix by incrementing curval past the power_domain value to point at
drc_type string of next record.

Fixes: e83636ac33 ("pseries/drc-info: Search DRC properties for CPU indexes")
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Acked-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200307024547.5748-1-tyreld@linux.ibm.com
2020-03-25 12:06:43 +11:00
..
cmm.c powerpc/pseries/cmm: fix managed page counts when migrating pages between zones 2019-12-16 23:15:16 +11:00
dlpar.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
dtl.c powerpc: pseries: no need to check return value of debugfs_create functions 2019-11-02 18:09:10 +01:00
eeh_pseries.c powerpc/eeh: Convert log messages to eeh_edev_* macros 2019-08-22 23:12:47 +10:00
event_sources.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
firmware.c powerpc/pseries/svm: Allow IOMMU to work in SVM 2020-01-06 16:25:30 +11:00
hotplug-cpu.c powerpc/pseries: Add cpu DLPAR support for drc-info property 2019-11-13 16:57:57 +11:00
hotplug-memory.c powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable 2020-02-19 22:46:11 +11:00
hvCall_inst.c powerpc: pseries: no need to check return value of debugfs_create functions 2019-11-02 18:09:10 +01:00
hvCall.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hvconsole.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
hvcserver.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ibmebus.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
io_event_irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
iommu.c powerpc/pseries/iommu: Separate FW_FEATURE_MULTITCE to put/stuff features 2020-01-06 16:25:30 +11:00
Kconfig powerpc/pseries: Remove redundant select of PPC_DOORBELL 2020-01-06 16:25:29 +11:00
kexec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
lpar.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
lparcfg.c powerpc updates for 5.6 2020-02-04 13:06:46 +00:00
Makefile powerpc/pseries/Makefile: Remove CONFIG_PPC_PSERIES check 2020-02-19 21:07:08 +11:00
mobility.c powerpc/pseries/mobility: use cond_resched when updating device tree 2019-08-20 21:22:28 +10:00
msi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
nvram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
of_helpers.c powerpc/pseries: Fix of_read_drc_info_cell() to point at next record 2020-03-25 12:06:43 +11:00
of_helpers.h
offline_states.h
papr_scm.c powerpc/papr_scm: Mark papr_scm_ndctl() as static 2020-02-19 21:07:09 +11:00
pci_dlpar.c powerpc: Replace GPL boilerplate with SPDX identifiers 2019-11-13 16:58:07 +11:00
pci.c powerpc/pcidn: Make VF pci_dn management CONFIG_PCI_IOV specific 2020-01-23 21:31:19 +11:00
pmem.c powerpc/pseries/pmem: Fix a set but not used value 2019-04-20 22:02:26 +10:00
power.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
pseries_energy.c powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index 2019-11-13 16:57:57 +11:00
pseries.h powerpc/pseries: Read TLB Block Invalidate Characteristics 2019-09-24 19:58:42 +10:00
ras.c powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog() 2019-11-13 16:58:04 +11:00
reconfig.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
rng.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rtas-fadump.c powerpc/fadump: support holes in kernel boot memory area 2019-09-14 00:04:46 +10:00
rtas-fadump.h powerpc/fadump: support holes in kernel boot memory area 2019-09-14 00:04:46 +10:00
scanlog.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
setup.c powerpc/vcpu: Assume dedicated processors as non-preempt 2019-12-13 21:06:57 +11:00
smp.c powerpc/pseries/svm: Disable doorbells in SVM guests 2019-08-30 09:55:41 +10:00
suspend.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
svm.c powerpc/pseries/svm: Force SWIOTLB for secure guests 2019-08-30 09:55:41 +10:00
vio.c powerpc/pseries/vio: Remove stray #ifdef CONFIG_PPC_PSERIES 2020-02-19 21:07:08 +11:00
vphn.c powerpc/vphn: Check for error from hcall_vphn 2020-03-04 22:44:30 +11:00