mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
pseries: Return the token when we register an RTAS call
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 <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
bf3bc4c4e9
commit
4aac82c346
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue