Patchwork [05/12] pseries: Allow RTAS tokens without a qemu handler

login
register
mail settings
Submitter David Gibson
Date Nov. 13, 2012, 2:46 a.m.
Message ID <1352774820-22804-6-git-send-email-david@gibson.dropbear.id.au>
Download mbox | patch
Permalink /patch/198535/
State New
Headers show

Comments

David Gibson - Nov. 13, 2012, 2:46 a.m.
From: Ben Herrenschmidt <benh@kernel.crashing.org>

Kernel-based RTAS calls will not have a qemu handler, but will
still be registered in qemu in order to be assigned a token
number and appear in the device-tree.

Let's test for the name being NULL rather than the handler
when deciding to skip an entry while building the device-tree

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/spapr_rtas.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c
index 45294e8..e618c2d 100644
--- a/hw/spapr_rtas.c
+++ b/hw/spapr_rtas.c
@@ -301,7 +301,7 @@  int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
     for (i = 0; i < TOKEN_MAX; i++) {
         struct rtas_call *call = &rtas_table[i];
 
-        if (!call->fn) {
+        if (!call->name) {
             continue;
         }