[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 08/15] spapr/rtas: modify spapr_rtas_register() t
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v3 08/15] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers |
Date: |
Thu, 21 Mar 2019 15:49:07 +0100 |
Removing RTAS handlers will become necessary when the new pseries
machine supporting multiple interrupt mode is introduced.
Signed-off-by: Cédric Le Goater <address@hidden>
---
include/hw/ppc/spapr.h | 4 ++++
hw/ppc/spapr_rtas.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 2b4c05a2ec33..6a067db04351 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -671,6 +671,10 @@ typedef void (*spapr_rtas_fn)(PowerPCCPU *cpu,
SpaprMachineState *sm,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets);
void spapr_rtas_register(int token, const char *name, spapr_rtas_fn fn);
+static inline void spapr_rtas_unregister(int token)
+{
+ spapr_rtas_register(token, NULL, NULL);
+}
target_ulong spapr_rtas_call(PowerPCCPU *cpu, SpaprMachineState *sm,
uint32_t token, uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets);
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 24c45b12d46b..ee24212765be 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -404,7 +404,7 @@ void spapr_rtas_register(int token, const char *name,
spapr_rtas_fn fn)
token -= RTAS_TOKEN_BASE;
- assert(!rtas_table[token].name);
+ assert(!name || !rtas_table[token].name);
rtas_table[token].name = name;
rtas_table[token].fn = fn;
--
2.20.1
- Re: [Qemu-devel] [PATCH v3 01/15] linux-headers: update to 5.1-rc1, (continued)
- [Qemu-devel] [PATCH v3 02/15] spapr/xive: add KVM support, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 06/15] spapr/xive: add migration support for KVM, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 04/15] spapr/xive: add state synchronization with KVM, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 05/15] spapr/xive: introduce a VM state change handler, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 03/15] spapr/xive: add hcall support when under KVM, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 08/15] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v3 07/15] spapr/xive: activate KVM support, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 09/15] sysbus: add a sysbus_mmio_unmap() helper, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 10/15] spapr: introduce routines to delete the KVM IRQ device, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 11/15] spapr: check for the activation of the KVM IRQ device, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 12/15] spapr/irq: remove spapr_ics_create(), Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 13/15] spapr/irq: introduce a spapr_irq_init_device() helper, Cédric Le Goater, 2019/03/21
- [Qemu-devel] [PATCH v3 14/15] spapr/irq: initialize the IRQ device only once, Cédric Le Goater, 2019/03/21