[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/36] spapr/rtas: modify spapr_rtas_register() to re
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 03/36] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers |
Date: |
Fri, 26 Apr 2019 16:05:54 +1000 |
From: Cédric Le Goater <address@hidden>
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>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_rtas.c | 2 +-
include/hw/ppc/spapr.h | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 24c45b12d4..ee24212765 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;
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 02b5ce7e40..9331f5e0b9 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -675,6 +675,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);
--
2.20.1
- [Qemu-devel] [PULL 00/36] ppc-for-4.1 queue 20190426, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 03/36] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers,
David Gibson <=
- [Qemu-devel] [PULL 04/36] spapr/irq: remove spapr_ics_create(), David Gibson, 2019/04/26
- [Qemu-devel] [PULL 05/36] target/ppc: Style fixes for ppc-models.[ch], David Gibson, 2019/04/26
- [Qemu-devel] [PULL 02/36] hw/ppc/prep: Drop useless inclusion of "hw/input/i8042.h", David Gibson, 2019/04/26
- [Qemu-devel] [PULL 11/36] target/ppc: Style fixes for gdbstub.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 09/36] target/ppc: Style fixes for dfp_helper.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 12/36] target/ppc: Style fixes for helper_regs.h, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 17/36] target/ppc: Style fixes for misc_helper.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 07/36] target/ppc: Style fixes for int_helper.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 18/36] target/ppc: Style fixes for mmu-hash32.[ch], David Gibson, 2019/04/26
- [Qemu-devel] [PULL 16/36] target/ppc: Style fixes for mfrom_table.inc.c & mfrom_table_gen.c, David Gibson, 2019/04/26