From patchwork Thu Oct 18 05:50:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 192191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B23462C0097 for ; Thu, 18 Oct 2012 17:25:45 +1100 (EST) Received: from localhost ([::1]:36805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOizj-0005lC-QJ for incoming@patchwork.ozlabs.org; Thu, 18 Oct 2012 01:50:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOizH-0005Oq-Qr for qemu-devel@nongnu.org; Thu, 18 Oct 2012 01:49:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOizF-0007dQ-9W for qemu-devel@nongnu.org; Thu, 18 Oct 2012 01:49:43 -0400 Received: from ozlabs.org ([203.10.76.45]:46318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOizE-0007ce-Uv; Thu, 18 Oct 2012 01:49:41 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3EA202C00AC; Thu, 18 Oct 2012 16:49:34 +1100 (EST) From: David Gibson To: agraf@suse.de Date: Thu, 18 Oct 2012 16:50:32 +1100 Message-Id: <1350539437-535-11-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350539437-535-1-git-send-email-david@gibson.dropbear.id.au> References: <1350539437-535-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.10.76.45 Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH 10/15] pseries: Allow RTAS tokens without a qemu handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Ben Herrenschmidt 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 Signed-off-by: David Gibson --- hw/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c index 38c105f..72cad53 100644 --- a/hw/spapr_rtas.c +++ b/hw/spapr_rtas.c @@ -298,7 +298,7 @@ int spapr_rtas_device_tree_setup(void *fdt, target_phys_addr_t rtas_addr, for (i = 0; i < TOKEN_MAX; i++) { struct rtas_call *call = &rtas_table[i]; - if (!call->fn) { + if (!call->name) { continue; }