From patchwork Fri May 13 13:07:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 9091391 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8B062BF29F for ; Fri, 13 May 2016 13:07:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DEC2420251 for ; Fri, 13 May 2016 13:07:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31EC22021A for ; Fri, 13 May 2016 13:07:50 +0000 (UTC) Received: from localhost ([::1]:34463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1Con-00038f-9p for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 May 2016 09:07:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1CoX-0002zn-EJ for qemu-devel@nongnu.org; Fri, 13 May 2016 09:07:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1CoO-0006Zy-V2 for qemu-devel@nongnu.org; Fri, 13 May 2016 09:07:32 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:34922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1CoO-0006Zn-Qm for qemu-devel@nongnu.org; Fri, 13 May 2016 09:07:24 -0400 Received: by mail-oi0-x244.google.com with SMTP id w198so17275189oiw.2 for ; Fri, 13 May 2016 06:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=l6SFvJFZoz1y5aZmgpJNwSy8hcVhL6TWf8uCLweamtg=; b=d43pflH3usH6Wmjo67vLQfVKwjmJ/NjTWadKhb/lML2bFVO9d4VmzCK1B1AeJyPaZe Qrg5C7/0ZGfrO38JJ0Pt7LIYZLfLJ4JmHRKfONDAbyenv6k/8qo+nTnxOJan3G/8UHL8 s+Wp3Cb6s2rheDJIlIwB3SYPBwNZqsbuNx9UWGebMERPkdhHB+dqTAfjxXDXiDfvBbtW ZOoNdfJ2laWVaancrIDBRTaWNk1sb5DQ4f7efEeuyjvHxAMgT3GKjaXxHJl+9Ui9UCkA Rh8HWYkYs9o4cEIZM28hSQ00+8S4Z6Np+Nt9JiAuY0nlKB5oVC05+mDChbesQmUk/kwW eefQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=l6SFvJFZoz1y5aZmgpJNwSy8hcVhL6TWf8uCLweamtg=; b=ijQdwwWEF+EwlD+sqPuEJMDDq9/HY2FFtDrMLvuXoYE+zC0LHKEmhTiPIH9Jr//Y5B rmEzctvire557EBgBiS9mcbI7xubTz1lalcxf3B/t0c3ox74OvW/AU7RIkcE9CP5LrLp FthBJc6uofKgBx7TejAP9jfYG1TnP6Y4wqIuyDWRz7SdPKnE94L1cweSJToJ26C/Qs0K /SfW+4Df/hwDbQeZWkuKXF4dT7nbXRINVVKhBwhDBV8619kxUNHT9BYS1wHSrIvhMD1O isjDK27JJMbX3k0o5aLOOQFE+UoA3DgGQXg0M9bRG2Wacvg/xiKIhaEDmcPSEO06YYXN QxPg== X-Gm-Message-State: AOPr4FVjoIvi4YBnb2EDJ5Rjm3Zb80BU0EIFNgLeiI7keN0SH2P67lEDspXoV8fQIWh37w== X-Received: by 10.157.19.6 with SMTP id f6mr1888278ote.188.1463144844525; Fri, 13 May 2016 06:07:24 -0700 (PDT) Received: from serve.minyard.net ([108.19.215.157]) by smtp.gmail.com with ESMTPSA id 78sm5337675otd.12.2016.05.13.06.07.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 May 2016 06:07:23 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 7E1F91D45; Fri, 13 May 2016 08:07:21 -0500 (CDT) Received: by t430.minyard.net (Postfix, from userid 1000) id 4641E300549; Fri, 13 May 2016 08:07:18 -0500 (CDT) From: minyard@acm.org To: Igor Mammedov , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org Date: Fri, 13 May 2016 08:07:06 -0500 Message-Id: <1463144831-4502-2-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1463144831-4502-1-git-send-email-minyard@acm.org> References: <1463144831-4502-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::244 Subject: [Qemu-devel] [PATCH v3 1/6] ipmi fwinfo: Remove ACPI parent, add the device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Corey Minyard Instead of storing the ACPI parent, store the device in the fwinfo structure for IPMI. This way a future change that scans the IPMI devices for firmware can select the devices on a particular bus. This will let the ACPI scope be defined by the calling code so the IPMI code doesn't have to know the scope. Signed-off-by: Corey Minyard --- hw/ipmi/isa_ipmi_bt.c | 2 +- hw/ipmi/isa_ipmi_kcs.c | 2 +- include/hw/ipmi/ipmi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c index aaea12e..9ee3979 100644 --- a/hw/ipmi/isa_ipmi_bt.c +++ b/hw/ipmi/isa_ipmi_bt.c @@ -449,8 +449,8 @@ static void isa_ipmi_bt_realize(DeviceState *dev, Error **errp) iib->fwinfo.memspace = IPMI_MEMSPACE_IO; iib->fwinfo.irq_type = IPMI_LEVEL_IRQ; iib->fwinfo.interrupt_number = iib->isairq; - iib->fwinfo.acpi_parent = "\\_SB.PCI0.ISA"; iib->fwinfo.i2c_slave_address = iib->bt.bmc->slave_addr; + iib->fwinfo.dev = dev; ipmi_add_fwinfo(&iib->fwinfo, errp); } diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c index 2742ce0..09ba92d 100644 --- a/hw/ipmi/isa_ipmi_kcs.c +++ b/hw/ipmi/isa_ipmi_kcs.c @@ -413,7 +413,7 @@ static void ipmi_isa_realize(DeviceState *dev, Error **errp) iik->fwinfo.memspace = IPMI_MEMSPACE_IO; iik->fwinfo.irq_type = IPMI_LEVEL_IRQ; iik->fwinfo.interrupt_number = iik->isairq; - iik->fwinfo.acpi_parent = "\\_SB.PCI0.ISA"; + iik->fwinfo.dev = dev; ipmi_add_fwinfo(&iik->fwinfo, errp); } diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h index 74a2b5a..1874c55 100644 --- a/include/hw/ipmi/ipmi.h +++ b/include/hw/ipmi/ipmi.h @@ -196,7 +196,7 @@ typedef struct IPMIFwInfo { IPMI_EDGE_IRQ } irq_type; - const char *acpi_parent; + DeviceState *dev; } IPMIFwInfo; void ipmi_add_fwinfo(IPMIFwInfo *info, Error **errp);