aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/xive/xive-internal.h
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-04-13 15:03:52 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-04-17 10:40:51 +1000
commite9e16917bc388846163b8566a298a291d71e44c9 (patch)
tree76d570b6aa17f0579c6076cb9d314e51f3919fcb /arch/powerpc/sysdev/xive/xive-internal.h
parent38d0b1c9cec71e6d0f3bddef0bbce41d05a3e796 (diff)
downloadlinux-e9e16917bc388846163b8566a298a291d71e44c9.tar.gz
powerpc/xive: Use the "ibm, chip-id" property only under PowerNV
The 'chip_id' field of the XIVE CPU structure is used to choose a target for a source located on the same chip. For that, the XIVE driver queries the chip identifier from the "ibm,chip-id" property and compares it to a 'src_chip' field identifying the chip of a source. This information is only available on the PowerNV platform, 'src_chip' being assigned to XIVE_INVALID_CHIP_ID under pSeries. The "ibm,chip-id" property is also not available on all platforms. It was first introduced on PowerNV and later, under QEMU for pSeries/KVM. However, the property is not part of PAPR and does not exist under pSeries/PowerVM. Assign 'chip_id' to XIVE_INVALID_CHIP_ID by default and let the PowerNV platform override the value with the "ibm,chip-id" property. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210413130352.1183267-1-clg@kaod.org
Diffstat (limited to 'arch/powerpc/sysdev/xive/xive-internal.h')
-rw-r--r--arch/powerpc/sysdev/xive/xive-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xive/xive-internal.h b/arch/powerpc/sysdev/xive/xive-internal.h
index b3a456fdd3a5..504e7edce358 100644
--- a/arch/powerpc/sysdev/xive/xive-internal.h
+++ b/arch/powerpc/sysdev/xive/xive-internal.h
@@ -44,6 +44,7 @@ struct xive_ops {
u32 *sw_irq);
int (*setup_queue)(unsigned int cpu, struct xive_cpu *xc, u8 prio);
void (*cleanup_queue)(unsigned int cpu, struct xive_cpu *xc, u8 prio);
+ void (*prepare_cpu)(unsigned int cpu, struct xive_cpu *xc);
void (*setup_cpu)(unsigned int cpu, struct xive_cpu *xc);
void (*teardown_cpu)(unsigned int cpu, struct xive_cpu *xc);
bool (*match)(struct device_node *np);