WSL2-Linux-Kernel/arch/powerpc/platforms
Haren Myneni 8484023b57 powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL
[ Upstream commit f3e5d9e53e ]

Generally the hypervisor decides to allocate a window on different
VAS instances. But if user space wishes to allocate on the current VAS
instance where the process is executing, the kernel has to pass
associativity domain IDs to allocate VAS window HCALL.

To determine the associativity domain IDs for the current CPU,
smp_processor_id() is passed to node associativity HCALL which may
return H_P2 (-55) error during DLPAR CPU event. This is because Linux
CPU numbers (smp_processor_id()) are not the same as the hypervisor's
view of CPU numbers.

Fix the issue by passing hard_smp_processor_id() with
VPHN_FLAG_VCPU flag (PAPR 14.11.6.1 H_HOME_NODE_ASSOCIATIVITY).

Fixes: b22f2d88e4 ("powerpc/pseries/vas: Integrate API with open/close windows")
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
[mpe: Update change log to mention Linux vs HV CPU numbers]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/55380253ea0c11341824cd4c0fc6bbcfc5752689.camel@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 12:35:23 +02:00
..
4xx powerpc/4xx/cpm: Fix return value of __setup() handler 2022-06-09 10:23:10 +02:00
8xx powerpc/8xx: export 'cpm_setbrg' for modules 2022-06-09 10:23:09 +02:00
40x powerpc: Remove IBM405 Erratum #77 2020-05-28 23:24:36 +10:00
44x powerpc/44x/fsp2: add missing of_node_put 2021-11-18 19:16:57 +01:00
52xx powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
82xx powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
83xx powerpc/83xx: Fix build error when CONFIG_PCI=n 2021-02-11 23:28:51 +11:00
85xx powerpc/85xx: Fix oops when CONFIG_FSL_PMC=n 2021-12-22 09:32:45 +01:00
86xx powerpc: retire sbc8641d board support 2021-08-27 00:48:18 +10:00
512x powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
amigaone powerpc/amigaone: Make amigaone_discover_phbs() static 2021-02-11 23:28:51 +11:00
book3s powerpc/vas: Fix potential NULL pointer dereference 2021-11-18 19:17:19 +01:00
cell powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address 2022-08-17 14:24:13 +02:00
chrp powerpc/chrp: Make hydra_init() static 2021-03-24 14:09:29 +11:00
embedded6xx powerpc/6xx: add missing of_node_put 2022-01-27 11:04:56 +01:00
maple powerpc/pci: fix warning comparing pointer to 0 2021-03-29 13:22:13 +11:00
microwatt powerpc/microwatt: wire up rng during setup_arch() 2022-06-29 09:03:30 +02:00
pasemi powerpc updates for 5.15 2021-09-03 11:22:50 -07:00
powermac powerpc/mm: Switch obsolete dssall to .long 2022-06-14 18:36:27 +02:00
powernv powerpc/powernv: add missing of_node_put() in opal_export_attrs() 2022-10-26 12:35:22 +02:00
ps3 powerpc updates for 5.15 2021-09-03 11:22:50 -07:00
pseries powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL 2022-10-26 12:35:23 +02:00
Kconfig powerpc/64s: Make prom_init require RELOCATABLE 2021-06-25 14:47:19 +10:00
Kconfig.cputype powerpc/32: Don't always pass -mcpu=powerpc to the compiler 2022-08-25 11:40:43 +02:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00
fsl_uli1575.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00