pseries: Allow RTAS tokens without a qemu handler
authorBen Herrenschmidt <benh@kernel.crashing.org>
Mon, 12 Nov 2012 16:46:53 +0000 (16:46 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 14 Dec 2012 12:12:54 +0000 (13:12 +0100)
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr_rtas.c

index 45294e83056f5af7b9839d9b0945e3b555e4230d..e618c2db53a7b1f113afb47d4e1f36971aa1df48 100644 (file)
@@ -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;
         }