[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/40] pseries: Return the token when we register an
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 03/40] pseries: Return the token when we register an RTAS call |
Date: |
Fri, 14 Dec 2012 13:13:19 +0100 |
From: Michael Ellerman <address@hidden>
The kernel will soon be able to service some RTAS calls. However the
choice of tokens will still be up to userspace. To support this have
spapr_rtas_register() return the token that is allocated for an
RTAS call, that allows the calling code to tell the kernel what the
token value is.
Signed-off-by: Michael Ellerman <address@hidden>
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr.h | 2 +-
hw/spapr_rtas.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/spapr.h b/hw/spapr.h
index efe7f57..971a50a 100644
--- a/hw/spapr.h
+++ b/hw/spapr.h
@@ -320,7 +320,7 @@ static inline void rtas_st(target_ulong phys, int n,
uint32_t val)
typedef void (*spapr_rtas_fn)(sPAPREnvironment *spapr, uint32_t token,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets);
-void spapr_rtas_register(const char *name, spapr_rtas_fn fn);
+int spapr_rtas_register(const char *name, spapr_rtas_fn fn);
target_ulong spapr_rtas_call(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets);
diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c
index 6d5c48a..45294e8 100644
--- a/hw/spapr_rtas.c
+++ b/hw/spapr_rtas.c
@@ -242,7 +242,7 @@ target_ulong spapr_rtas_call(sPAPREnvironment *spapr,
return H_PARAMETER;
}
-void spapr_rtas_register(const char *name, spapr_rtas_fn fn)
+int spapr_rtas_register(const char *name, spapr_rtas_fn fn)
{
int i;
@@ -258,7 +258,7 @@ void spapr_rtas_register(const char *name, spapr_rtas_fn fn)
rtas_next->name = name;
rtas_next->fn = fn;
- rtas_next++;
+ return (rtas_next++ - rtas_table) + TOKEN_BASE;
}
int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
--
1.6.0.2
- [Qemu-devel] [PATCH 01/40] pseries: Fix incorrect initialization of interrupt controller, (continued)
- [Qemu-devel] [PATCH 01/40] pseries: Fix incorrect initialization of interrupt controller, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 07/40] pseries: Implement PAPR NVRAM, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 12/40] openpic: Remove unused code, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 06/40] pseries: Split xics irq configuration from state information, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 15/40] openpic: combine mpic and openpic src handlers, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 09/40] e500: Adding CCSR memory region, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 16/40] openpic: Convert subregions to memory api, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 14/40] openpic: update to proper memory api, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 20/40] openpic: unify memory api subregions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 03/40] pseries: Return the token when we register an RTAS call,
Alexander Graf <=
- [Qemu-devel] [PATCH 21/40] openpic: remove unused type variable, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 17/40] openpic: combine mpic and openpic irq raise functions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 18/40] openpic: merge mpic and openpic timer handling, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 37/40] PPC: E500plat: Make a lot of PCI slots available, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 19/40] openpic: combine openpic and mpic reset functions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 11/40] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 27/40] openpic: add Shared MSI support, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 33/40] PPC: E500: PCI: Make first slot qdev settable, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 25/40] openpic: convert to qdev, Alexander Graf, 2012/12/14