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: 67783 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp259030qge; Fri, 13 May 2016 06:08:38 -0700 (PDT) X-Received: by 10.55.217.89 with SMTP id u86mr6473619qki.167.1463144917132; Fri, 13 May 2016 06:08:37 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f81si12032681qkb.82.2016.05.13.06.08.37 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 May 2016 06:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:34467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1CpY-0004Jy-JR for patch@linaro.org; Fri, 13 May 2016 09:08:36 -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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.7.4 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);