From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487532; cv=none; d=zohomail.com; s=zohoarc; b=GwR3dMwO0jB8Wx0SeghCF5uth6s8n0JhMznCFzdDLREZ6PG3VXLCs/nGSWtUzh/1N6tbv41w7UHCQcf78KjYa+F2w2m9qhffqBn0tPrWHJUwonD+ZWfrKucgJGJVuvipRrdZuVZfGg066uD76bKhIenndylM0A+wbdqaMKmddC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487532; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i6OhLvRnONmfPlM0KOWLPzOcZgZstYjnSkF7/d4ZNRM=; b=GMNgn3/hojpoUi98yEXisg+65hlegdB3Ad0CSMotfkJTIPex6pSo5wfTo/VDKsG6C42855OeMsifawtK+ZXsOR/ekuQnQtfXI4DNArwkzmmSszkZOtV2PyR+EEyFgE79ke5Hal61F7TDJ7/NDJC0TVxt9jJOluSCcMNnrYs01TM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487532488251.72395613212643; Tue, 17 Mar 2020 16:25:32 -0700 (PDT) Received: from localhost ([::1]:42896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaV-0001Sn-CE for importer@patchew.org; Tue, 17 Mar 2020 19:25:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELYw-0007hf-W8 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELYv-00089t-Ro for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:54 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:22547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELYv-00083B-MU for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:53 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-466-dB0VtiV2OduyZk3xVtxbVg-1; Tue, 17 Mar 2020 19:23:49 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BC18DB60; Tue, 17 Mar 2020 23:23:47 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E9AA60BF3; Tue, 17 Mar 2020 23:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i6OhLvRnONmfPlM0KOWLPzOcZgZstYjnSkF7/d4ZNRM=; b=Nl2sfdY69nMaujrBfcCpmy2aEIz0MgunqUbiAI/h4LtqELPiwciXl6yjNpzP5nDGNbVrzo xa9M4knkR18UypNVKePHhd8gHOV0NlMcR8yD8NymAOTkAH57c1xOYgVltR4u+ILNmFpJFc 0F1Vy6ngVwCoW8MxFLUe8zr6BadEBO8= X-MC-Unique: dB0VtiV2OduyZk3xVtxbVg-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass Date: Tue, 17 Mar 2020 19:23:10 -0400 Message-Id: <20200317232329.22362-2-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Helge Deller , Mark Cave-Ayland , Max Reitz , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Artyom Tarasenko , Aleksandar Markovic , Paolo Bonzini , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , John Snow , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200307151536.32709-2-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/cmd646.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 335c060673..2f11d8de24 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -207,9 +207,9 @@ static void cmd646_set_irq(void *opaque, int channel, i= nt level) cmd646_update_irq(pd); } =20 -static void cmd646_reset(void *opaque) +static void cmd646_reset(DeviceState *dev) { - PCIIDEState *d =3D opaque; + PCIIDEState *d =3D PCI_IDE(dev); unsigned int i; =20 for (i =3D 0; i < 2; i++) { @@ -303,7 +303,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Erro= r **errp) g_free(irq); =20 vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - qemu_register_reset(cmd646_reset, d); } =20 static void pci_cmd646_ide_exitfn(PCIDevice *dev) @@ -339,6 +338,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, v= oid *data) DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 + dc->reset =3D cmd646_reset; k->realize =3D pci_cmd646_ide_realize; k->exit =3D pci_cmd646_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_CMD; --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487524; cv=none; d=zohomail.com; s=zohoarc; b=LTagYcAJxrRzOuigTiI2b7CXiGO6dyGNWZq7DexJ8cZ4Xqg+7KT9zR4kNxHBhPrmfCIsBh3Vfe7LbeWD/PjsNz5r++2BZKqeuWvFRm71yjWCZgJGRXaTI7z2hmXOWpYdfA9F/mh5+SgbND+tBiB6GLmt7xNE13IXMPDmjKic60k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487524; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7dLqdiEes8H33sS8Bqku5/hNy1COftaI3m/4oCVcdlM=; b=JkVAzABtacPGp6QxvNppEspmV/nMuxo1xkIcOvJT0WzqVJaxNLBpfOlrrrSkBZJTWFtXUwjUqyagn+m9b4ujWL6Z/De0rG1lQVLQcQSkBt6p0CJwAiiyuaK7dNJGPdLRBTRKm1Sbv2AsQmxMyMWCUVxJNiyJa1+4BVTe71ISYDI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487524975351.6779499400328; Tue, 17 Mar 2020 16:25:24 -0700 (PDT) Received: from localhost ([::1]:42890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaN-0001GO-TI for importer@patchew.org; Tue, 17 Mar 2020 19:25:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZ1-0007rM-Kv for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZ0-0000c3-Hm for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:59 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:60711) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZ0-0000WL-C0 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:58 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-483-60kKBKIoPda8_xJP4XHmXg-1; Tue, 17 Mar 2020 19:23:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2B1F9801E5C; Tue, 17 Mar 2020 23:23:51 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 815DF60BE0; Tue, 17 Mar 2020 23:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7dLqdiEes8H33sS8Bqku5/hNy1COftaI3m/4oCVcdlM=; b=iy435T67jxNp3sr8mh2/d2EPJjH/bieVbS20AL42rKWvU3SzvhEj2ZNrsGWXQNrdDZlKwJ j1EK52rZAM9Z2nb8qmxLi8U7kZ7pLZvl7WMJPHgmYl9I35dhzjJT7KbWjKr0nfeYkh4Ytl /kwn2fjyx8UbrH2QbAJRRyG380VsS5E= X-MC-Unique: 60kKBKIoPda8_xJP4XHmXg-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass Date: Tue, 17 Mar 2020 19:23:11 -0400 Message-Id: <20200317232329.22362-3-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Helge Deller , Mark Cave-Ayland , Max Reitz , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Artyom Tarasenko , Aleksandar Markovic , Paolo Bonzini , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , John Snow , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200307151536.32709-3-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/cmd646.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 2f11d8de24..3c4f765bd6 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -301,8 +301,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Erro= r **errp) ide_register_restart_cb(&d->bus[i]); } g_free(irq); - - vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); } =20 static void pci_cmd646_ide_exitfn(PCIDevice *dev) @@ -339,6 +337,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, v= oid *data) PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 dc->reset =3D cmd646_reset; + dc->vmsd =3D &vmstate_ide_pci; k->realize =3D pci_cmd646_ide_realize; k->exit =3D pci_cmd646_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_CMD; --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487528; cv=none; d=zohomail.com; s=zohoarc; b=gKxaJqOXwxnAef/5edC+kAU6G2PITQ7tOt7h1m8B8NSOTTe+VkmrNndbKq+kp+9DOy5dXcOQa087rwxoO73j96bUT3UKEHWO9HwCUHzr5SP++OzYqgmdEzdDQoRj5q3tECtYXjpAFalEBCs09yjeKyR5YZaBBMEBbZKgvaOhpkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487528; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+UZ8FByt5+RSoyescxnZG3nj5fi4dBjqEbnSTh+hW7o=; b=MDRkOhl4klTsXuXfLr8JejLnkrx6XfF7OKT36kGzUpVk4R5ZWQi9C84IzFrFjxAsu+9BUntgv2pwXx8LZe5VGF/LCI1kivABPOB6BAtMjciIRlDXvDgQwhY0Pl5CGO44QbTTPwx6RC88RtuXeKZgF1+p83F0Es2xpQIfPhlXa7I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487528717913.6016126401586; Tue, 17 Mar 2020 16:25:28 -0700 (PDT) Received: from localhost ([::1]:42895 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaR-0001Kq-KR for importer@patchew.org; Tue, 17 Mar 2020 19:25:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52337) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZ2-0007tm-Qk for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZ1-0000lx-MJ for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:00 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:20942) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZ1-0000jc-Hk for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:23:59 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-TTW-PHrVNSi5H3Cc5zY4ag-1; Tue, 17 Mar 2020 19:23:57 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9E0918A6EC1; Tue, 17 Mar 2020 23:23:54 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 612C660BE0; Tue, 17 Mar 2020 23:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+UZ8FByt5+RSoyescxnZG3nj5fi4dBjqEbnSTh+hW7o=; b=VWuTG5O6nMPbnT1qkjhrJ/WGFmPUUmGcP7HdPwNffRvntwWV9BoWcoza7OV0bxdzjerQOL BK9GB02Zq9UL4KvxhgMwposT8RI2VjB0O7taAE3ZDwaqahkf/OH0Z+4MQA0y2zvcphyoKi mfsqf16co4Quh+RNa7TspxiEtAIXlH0= X-MC-Unique: TTW-PHrVNSi5H3Cc5zY4ag-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device Date: Tue, 17 Mar 2020 19:23:12 -0400 Message-Id: <20200317232329.22362-4-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Remove the call to pci_cmd646_ide_init() since global device init functions are deprecated in preference of using qdev directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200307091313.24190-2-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/alpha/dp264.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index e5350a287f..27595767e5 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -16,6 +16,7 @@ #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" #include "hw/dma/i8257.h" @@ -101,9 +102,12 @@ static void clipper_init(MachineState *machine) /* IDE disk setup. */ { DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; + PCIDevice *pci_dev; + ide_drive_get(hd, ARRAY_SIZE(hd)); =20 - pci_cmd646_ide_init(pci_bus, hd, 0); + pci_dev =3D pci_create_simple(pci_bus, -1, "cmd646-ide"); + pci_ide_create_devs(pci_dev, hd); } =20 /* Load PALcode. Given that this is not "real" cpu palcode, --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487677; cv=none; d=zohomail.com; s=zohoarc; b=R42HFzsNjNAqLFRmsAU6T+atUgCp+P3fjB9wqSdXr6No44iGod7YLRVSWa8FVDqPYvS6kPd3FkJh3Y8Gymdcq03/3HqqERYY61IieUblnlfRgS8XDjmZ/fy9jqFaWXKwELxpYa9yyCudA1z/ybt/nZtyRXny2q7iMRFtvBRud1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487677; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FoFgopLAB+y1Kafxr406tQHOxCuRauEC8WkTDOoEQZg=; b=RvVhZqUwHo6uuEHJ1YiSVDRvKnOxpN65d7slFmVOBz1TOKxXVkQVAOZpubLqjfjGvO79LnNK1aV1aZvOR5SJRexuoEBoGG9i5zr4wASfElKC9rXlaZdx46AsfvTkCYGg02JVe38Maeu3Fs7heQTTCJEjkiPY+KAK7foc2kuSTcQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487677883676.7379625319224; Tue, 17 Mar 2020 16:27:57 -0700 (PDT) Received: from localhost ([::1]:43000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELcq-0005OE-Ew for importer@patchew.org; Tue, 17 Mar 2020 19:27:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52528) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZA-00086v-1z for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZ8-0001j6-UK for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:07 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:47223) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZ8-0001fP-NB for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:06 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-J8fsZo4cMUut_8bloKzKrg-1; Tue, 17 Mar 2020 19:24:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E18218A6EC1; Tue, 17 Mar 2020 23:24:01 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE9F460BE0; Tue, 17 Mar 2020 23:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FoFgopLAB+y1Kafxr406tQHOxCuRauEC8WkTDOoEQZg=; b=LPaibMfvJgLPct//yGPxH9zksVmaZZAa+VPOHnwRlErPYfpLpbYd6Nkx7G6YK0lIKScmvU kggPdQ6EX4T7j0mNMO/deFWV9KxG+2JpBNZIgp6C2F5atiBbY8twh4LXSumFLRfBI5KLaz fyjSizAiADjGw/0WaB8VyupSMvG8hQw= X-MC-Unique: J8fsZo4cMUut_8bloKzKrg-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function Date: Tue, 17 Mar 2020 19:23:13 -0400 Message-Id: <20200317232329.22362-5-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200307091313.24190-3-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- include/hw/ide.h | 2 -- hw/ide/cmd646.c | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index 28d8a06439..0c7080ed92 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 /* ide-pci.c */ -void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, - int secondary_ide_enabled); PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int d= evfn); PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 3c4f765bd6..699f25824d 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -314,18 +314,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev) } } =20 -void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, - int secondary_ide_enabled) -{ - PCIDevice *dev; - - dev =3D pci_create(bus, -1, "cmd646-ide"); - qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled); - qdev_init_nofail(&dev->qdev); - - pci_ide_create_devs(dev, hd_table); -} - static Property cmd646_ide_properties[] =3D { DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0), DEFINE_PROP_END_OF_LIST(), --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487704; cv=none; d=zohomail.com; s=zohoarc; b=PFHy7as59eTWRAsA9uAtbMdYUw6OnNsRNXfWJ0MqvsLLqzugCD6DhVhapz1QvEU+smVTmtKNL1Q+G6sS/suvgC4BhCH9yCT5GT7/5YAjlcQSz2tKX0ieHvIeBGZAb1bbuJMHZsOAubti/sejwFo7/I4FNn78vGvwpt3FUM1h1GE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AxPPYQlKjDe83YjabJntkZwaKw5Sd3QGdqivkrdy3aA=; b=K1KoY0IgaG8IhIRwOZHtutYiqXg3M6Iyo2RNo1VIOOegE3y6FIYef3Xleev9YGqr6D59u4L2n/cbbwTsbCju2qnJe220gepJISR87QSG08jXc1C2Z9vkuDi8Xcpzr6btpySZP97/ravHvTnHQYCdiGw9nXBHVDIPoiHGipSy0s8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487704362435.0177680194647; Tue, 17 Mar 2020 16:28:24 -0700 (PDT) Received: from localhost ([::1]:43012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELdH-0006VU-94 for importer@patchew.org; Tue, 17 Mar 2020 19:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52637) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZF-0008FH-V2 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZE-00028s-R8 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:13 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:49278) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZE-00024R-N0 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:12 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-wPv4bS9YOmGNoQbN9R6UXw-1; Tue, 17 Mar 2020 19:24:10 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B873800D50; Tue, 17 Mar 2020 23:24:08 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BF6B60BE0; Tue, 17 Mar 2020 23:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AxPPYQlKjDe83YjabJntkZwaKw5Sd3QGdqivkrdy3aA=; b=b1BjrVaORKZ7DDKJPcmTear5qN+otzOGwwKNcRkk+yDz471zUS4u/B2bMI1UCdZOwukVXv g5fgHImvsb5YfyY8gzgYRPSr4rmobYMUMiVGqi9Ce7FomqxbqeIsOLj2dBQ5rLGfO8Ds+x 0IzLPsMtub4I4seRNxe/DVhca9x4u9s= X-MC-Unique: wPv4bS9YOmGNoQbN9R6UXw-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass Date: Tue, 17 Mar 2020 19:23:14 -0400 Message-Id: <20200317232329.22362-6-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: BALATON Zoltan Message-id: 20200313082444.2439-2-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/via.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 096de8dba0..84f0efff94 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -190,8 +190,6 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) bmdma_setup_bar(d); pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar); =20 - vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - for (i =3D 0; i < 2; i++) { ide_bus_new(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); ide_init2(&d->bus[i], qemu_allocate_irq(via_ide_set_irq, d, i)); @@ -227,6 +225,7 @@ static void via_ide_class_init(ObjectClass *klass, void= *data) PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 dc->reset =3D via_ide_reset; + dc->vmsd =3D &vmstate_ide_pci; k->realize =3D via_ide_realize; k->exit =3D via_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_VIA; --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487777; cv=none; d=zohomail.com; s=zohoarc; b=gq3Cg7D+ndOKkjmRqiz2y8XPBzP0vdxz+9S46oLA5Da4wTBKpguXWLiQF8mzFDDLszXOjc8dfJ+ywTFlYS1OAMHVdOEx5JTWcQ9HfYZckTLSBwTtPWbkdqj1pa7AUyTse6vPY7OLfiVdTGk4jA9EQQCEmdIZlwKZ896qs1TMIKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487777; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Sw7irWBODFAOA5JA5Jo4Sw7IdxZM3hhTMVPInNO4y68=; b=b+AQDI5qozkIuChJU9ws6iZAxQWfwjfTeBsA9ZwHv6jCtGE794rYI3LPG3AKmH+Z+s5C21cZiUtbUAu8FOtiDqT1DINI+BLeSe5cwmD0WaylYCNN9l1O+j2PW2W6EdefYAItsf7NUHoZyTv87PEMAovNJv9bEEmuWcnzrG+RRLA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487777729992.1171714780721; Tue, 17 Mar 2020 16:29:37 -0700 (PDT) Received: from localhost ([::1]:43034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELeS-0000ZY-Nq for importer@patchew.org; Tue, 17 Mar 2020 19:29:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52764) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZK-0008RL-FC for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZJ-0002nP-5s for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:18 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:45277) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZJ-0002l4-10 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-Vb1vI6djP46TKt2WcO9yUw-1; Tue, 17 Mar 2020 19:24:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D75AC1005514; Tue, 17 Mar 2020 23:24:12 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id C746C60BE0; Tue, 17 Mar 2020 23:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sw7irWBODFAOA5JA5Jo4Sw7IdxZM3hhTMVPInNO4y68=; b=N/p0PXedLhImXCsRAoGU8SEHSUWXjN/BC+g2iGe5yweEnL/rqKr70tSIuqw4dcyRNJ1Q/3 714gOwb6/+nSxnoJIr315QCuyn/XLqE0sibRXTFpCcOVsBzMMnyi/eXzWIKyq9HICOpbQF pzqC0Mn1XVT8WQVrcrQINmP1RslF/BY= X-MC-Unique: Vb1vI6djP46TKt2WcO9yUw-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 06/20] ide/via: Get rid of via_ide_init() Date: Tue, 17 Mar 2020 19:23:15 -0400 Message-Id: <20200317232329.22362-7-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Follow example of CMD646 and remove via_ide_init function and do it directly in board code instead. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: Mark Cave-Ayland Message-id: 20200313082444.2439-3-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- include/hw/ide.h | 1 - hw/ide/via.c | 8 -------- hw/mips/mips_fulong2e.c | 5 ++++- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index 0c7080ed92..dea0ecf5be 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -16,7 +16,6 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo = **hd_table, int devfn); PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); -void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); =20 /* ide-mmio.c */ void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1= ); diff --git a/hw/ide/via.c b/hw/ide/via.c index 84f0efff94..3153be8862 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -211,14 +211,6 @@ static void via_ide_exitfn(PCIDevice *dev) } } =20 -void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "via-ide"); - pci_ide_create_devs(dev, hd_table); -} - static void via_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 4727b1d3a4..639ba2a091 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -37,6 +37,7 @@ #include "qemu/log.h" #include "hw/loader.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "elf.h" #include "hw/isa/vt82c686.h" #include "hw/rtc/mc146818rtc.h" @@ -239,6 +240,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, qemu_irq *i8259; ISABus *isa_bus; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; + PCIDevice *dev; =20 isa_bus =3D vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0)); if (!isa_bus) { @@ -256,8 +258,9 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, /* Super I/O */ isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); =20 + dev =3D pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide"); ide_drive_get(hd, ARRAY_SIZE(hd)); - via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1)); + pci_ide_create_devs(dev, hd); =20 pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487803; cv=none; d=zohomail.com; s=zohoarc; b=jWoj/Lfs25uUSCowyKV88klIIxCfsWmWgYyeKJXt2W8vCy4PcgOJrsMWnWHpiOlSNNmIiTCfMO99PHkHQJONxM7ucmXKllrZAWgEOJs88chkvXmp3NQA7cNlYEb0+pBsM4aqoJq3en7G/zkC4Egfzc6+pJ9REkhBKGRoCZ58Za8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487803; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GnwRsDX6VExlAm3qYZrwhrxhhISuBQagwjpeLuR/TMk=; b=TgSriRjMczv2WtlsGThJPZOKQnOvNZ/NHXMgJZlv7DGljOmzP28tmnT2JPSoMUa15VuybQyMCbL15ZZm3OQ2BbgyqiEf/WeWV+pf7lQZrmYR+GmNNK1Mqt8/ewennloq+IXjp6gu/ndfMsgjo3wJBqoIYBh24p8VP6cBf9MzWjs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487803542852.0954864632959; Tue, 17 Mar 2020 16:30:03 -0700 (PDT) Received: from localhost ([::1]:43042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELes-0001gH-Fy for importer@patchew.org; Tue, 17 Mar 2020 19:30:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52975) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZR-0000Ix-Oo for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZQ-0003qb-Mj for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:25 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:49855) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZQ-0003m9-Hi for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:24 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-310-LZDidgCQMlSsSsbeIYTDFQ-1; Tue, 17 Mar 2020 19:24:22 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 42210100550D; Tue, 17 Mar 2020 23:24:20 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1ACA660BE0; Tue, 17 Mar 2020 23:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GnwRsDX6VExlAm3qYZrwhrxhhISuBQagwjpeLuR/TMk=; b=UmZjzwyO7nSgzi3g2oCm2czRqTU5LK8vTiWg2450WD3Xtwvc58+4Jp+LG32V8EEX3UZC+J X4NocQp2bGd9eyflvhwOnpNuEPMO3mfm2dK4MOvVWEj/7+1oFl3AW18detAhyHfqkTKebD dMmVuZwjPF+EqyB14qrm7PEM+o0Ocy8= X-MC-Unique: LZDidgCQMlSsSsbeIYTDFQ-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE Date: Tue, 17 Mar 2020 19:23:16 -0400 Message-Id: <20200317232329.22362-8-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan The pci_do_device_reset() function (called from pci_device_reset) clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did this without taking wmask into account. We'll have a device model now that needs to set a constant value for this reg and this patch allows to do that without additional workaround in device emulation to reverse the effect of this PCI bus reset function. Suggested-by: Mark Cave-Ayland Signed-off-by: BALATON Zoltan Reviewed-by: Michael S. Tsirkin Reviewed-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: Mark Cave-Ayland Message-id: 20200313082444.2439-4-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/pci/pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e1ed6677e1..b5bc842fac 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -302,8 +302,11 @@ static void pci_do_device_reset(PCIDevice *dev) pci_word_test_and_clear_mask(dev->config + PCI_STATUS, pci_get_word(dev->wmask + PCI_STATUS) | pci_get_word(dev->w1cmask + PCI_STATUS)); + /* Some devices make bits of PCI_INTERRUPT_LINE read only */ + pci_byte_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE, + pci_get_word(dev->wmask + PCI_INTERRUPT_LINE= ) | + pci_get_word(dev->w1cmask + PCI_INTERRUPT_LI= NE)); dev->config[PCI_CACHE_LINE_SIZE] =3D 0x0; - dev->config[PCI_INTERRUPT_LINE] =3D 0x0; for (r =3D 0; r < PCI_NUM_REGIONS; ++r) { PCIIORegion *region =3D &dev->io_regions[r]; if (!region->size) { --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487685; cv=none; d=zohomail.com; s=zohoarc; b=OKx1tsM+s0LFAsXcIT8mpABscLk6fQnEW0hTub7AoJfIyU9HsXzROURK1fCqoQx5EJC8hgQSCCfhpu++037/2R5tr4Axi68xAjwvnJxGeC43SESl2V/K6kGRgBtIFlwY/o+diG+4nPVy5eHF+wO52nu8DVmvCSunHdXP08aP9Hc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rvAt1CSPjqW2q4HvtdiK4wixwpQOtmzZV7FR/w/lqw8=; b=BUOVIaAPYVu61ajArHDt9Zqvopx81+pwCzKvgzTkta8hxU0utQdDrTKte3ww3SwsQF0dcO0nM5NkTxE17OiwTKhk+SY0xHOe9AHcI+lw/6B/75GEnQdGq9E49rHL5OEWdWHO1ZfIPf8NlNP/7gCsc2Vq6oyuDO2nM9gKDxfYBNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487685712786.0089165498158; Tue, 17 Mar 2020 16:28:05 -0700 (PDT) Received: from localhost ([::1]:43004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELcy-0005j6-Li for importer@patchew.org; Tue, 17 Mar 2020 19:28:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53191) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZY-0000bi-UH for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZX-0004mj-ND for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:32 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:48327) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZX-0004k5-J6 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:31 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-102-pxbscp3kNcujnvuK9h5-SQ-1; Tue, 17 Mar 2020 19:24:27 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 364FC100550D; Tue, 17 Mar 2020 23:24:25 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8934760BE0; Tue, 17 Mar 2020 23:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rvAt1CSPjqW2q4HvtdiK4wixwpQOtmzZV7FR/w/lqw8=; b=JlmGwgyWnE7tsIBJkMQtXFw1i/+eRgOvaa5O3MTIN7W3t8SqiiNRegV0BIB1jvcJuQz69P zwHKGyF1YbgtqJOlR2FBjs0DJzbN9Rb9OxHiNl0yMn2CkdLeexzSZhj69241k10a+rbDgs rzKzZMc6ue7/594wvfp8ViYuCNhghJo= X-MC-Unique: pxbscp3kNcujnvuK9h5-SQ-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value Date: Tue, 17 Mar 2020 19:23:17 -0400 Message-Id: <20200317232329.22362-9-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Some firmwares accidentally write to PCI_INTERRUPT_LINE on startup which has no effect on real hardware since it is hard-wired to its default value, but causes the guest OS to become confused trying to initialise IDE devices when running under QEMU. Signed-off-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: BALATON Zoltan Message-id: 20200313082444.2439-5-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 3153be8862..8363bd4802 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -169,7 +169,7 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) =20 pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode = */ pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); - dev->wmask[PCI_INTERRUPT_LINE] =3D 0xf; + dev->wmask[PCI_INTERRUPT_LINE] =3D 0; =20 memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops, &d->bus[0], "via-ide0-data", 8); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487961; cv=none; d=zohomail.com; s=zohoarc; b=fdmOJBecxpm+65KCD6NE72B+AORy/2vp5aYHtlIlzJkwbrrYTmCPp0OqP0M+ogVeaK6nXlyubZnJwob7y9rZGtm0PMfiXYJ/mLi8mwjFFkcxAlzAr37I0Dof5A/Ia56FohxQCA+U1WYvvrCnG2wxhTtNV2YxtEcg9n1mZSuXPaw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hav4nkUHBnBpOmQjjncPxXw7xtu0T2JmJhQ14ZDoJo8=; b=c/QYF3/2HlUNyILYlkGKAps/9/p5BhDJogD2eGTc+ji8Vm4rqLfc4qy71GyjGa2/vK7/9zJQbyJa2xFvOReVypslywHcZ5FtE0FbQJApaU3dkw46EoCzs1jLy1QahkBDGwBZ8D3jPgsgO3CfCc0BMdPw6zaKmElChGrgjnEdFLg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487961117255.48531893062136; Tue, 17 Mar 2020 16:32:41 -0700 (PDT) Received: from localhost ([::1]:43100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELhQ-00058n-0f for importer@patchew.org; Tue, 17 Mar 2020 19:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53345) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZe-0000oz-0i for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZc-0005PC-Qk for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:37 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:35046) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZc-0005MW-NJ for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-zALfh3zzPPCyxJofTIVa5w-1; Tue, 17 Mar 2020 19:24:32 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CBC621005514; Tue, 17 Mar 2020 23:24:29 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96D7960BE0; Tue, 17 Mar 2020 23:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hav4nkUHBnBpOmQjjncPxXw7xtu0T2JmJhQ14ZDoJo8=; b=VfJduzrN4iWZ5SjDqn6MGzIaq1accctDVBvNQziimq+Wgzv2o5PxLS5d+xZgyf9fy7/EYn Lg7fcMlN9HcENoFi7yr/fySsZqK1BCI/9ITtKRfFbBuTwONZo2ieM7un7z94isQOv+WQCZ YlePh6SrQGZ68Nl19yUNnUR2zy5+dk0= X-MC-Unique: zALfh3zzPPCyxJofTIVa5w-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 09/20] via-ide: initialise IDE controller in legacy mode Date: Tue, 17 Mar 2020 19:23:18 -0400 Message-Id: <20200317232329.22362-10-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland According to both the VT82C686B and VT8231 datasheets the VIA Southbridge I= DE controller is initialised in legacy mode. This allows Linux to correctly determine that legacy rather than PCI IRQ ro= uting should be used since the boot console text in the fulong2e test image chang= es from: scsi0 : pata_via scsi1 : pata_via ata1: PATA max UDMA/100 cmd 0xffffffffbfd04050 ctl 0xffffffffbfd04062 \ bmdma 0xffffffffbfd04040 irq 14 ata2: PATA max UDMA/100 cmd 0xffffffffbfd04058 ctl 0xffffffffbfd04066 \ bmdma 0xffffffffbfd04048 irq 14 to: scsi0 : pata_via scsi1 : pata_via ata1: PATA max UDMA/100 cmd 0xffffffffbfd001f0 ctl 0xffffffffbfd003f6 \ bmdma 0xffffffffbfd04040 irq 14 ata2: PATA max UDMA/100 cmd 0xffffffffbfd00170 ctl 0xffffffffbfd00376 \ bmdma 0xffffffffbfd04048 irq 15 Signed-off-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: BALATON Zoltan Message-id: 20200313082444.2439-6-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 8363bd4802..c8835de01b 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -167,7 +167,7 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) uint8_t *pci_conf =3D dev->config; int i; =20 - pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode = */ + pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy mode */ pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); dev->wmask[PCI_INTERRUPT_LINE] =3D 0; =20 --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487785; cv=none; d=zohomail.com; s=zohoarc; b=IuWqds+aVpiAPeRklGJaTSCyuCpjrOqkWUDQcFSX+om+nEq22qeTYxy5G2iZgmS9YapqdouIQdQVlNCu3f46XFmUGGO7Jdy86xuPgHmvEX/6x8odmPqoXKmJcY985+5kUFCPzJwMGSgqqtr4Ag5HgOU3oxEFdH7F2zQKYGj4/1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487785; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sKeIG4CmpLF/eu2UZ+illruMr++EhTIuEcgMzvui7tk=; b=aT9n21ne9xSQqE6HnQC6H4wV62PapQcO8xKlj/l1SD2P5XnPTU9hZZKfo21KLZ1COCjbRlBuISQOzDWw8UYX1MOaor6UBA+7ouLeSrhJeo860ZD1zIQYkh0AjUqhCgSoumgfF8kJ6rjXQl3nM1jkLjYUDN903yaNGA1TYCpLar8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487785090430.7587071567534; Tue, 17 Mar 2020 16:29:45 -0700 (PDT) Received: from localhost ([::1]:43036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELeZ-0000sY-U7 for importer@patchew.org; Tue, 17 Mar 2020 19:29:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53504) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZo-00012B-0e for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZm-0006Ec-Eu for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:47 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:44212) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZm-0006BM-B6 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:46 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-D5oAyquCOYeso2VARtF5ng-1; Tue, 17 Mar 2020 19:24:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 21A4C107ACC4; Tue, 17 Mar 2020 23:24:40 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0462260BE0; Tue, 17 Mar 2020 23:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sKeIG4CmpLF/eu2UZ+illruMr++EhTIuEcgMzvui7tk=; b=N0tG+YncPOil/gTirYsSf/hmc2ER+KGxhS1CJndOFFN0A420C1bw7i700jfM0odloVCQ+Y b8x7hc7ZdJ8UWNSHKWVm7HUmPgCzYHHB/BoDV2/XeBwngm7v2TYS8zaT5z+B6Tro92bpZP xAAOVGETaxcZElckEW1GlWBWy2GtYhg= X-MC-Unique: D5oAyquCOYeso2VARtF5ng-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG Date: Tue, 17 Mar 2020 19:23:19 -0400 Message-Id: <20200317232329.22362-11-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland MorphOS writes to PCI_CLASS_PROG during IDE initialisation to place the controller in native mode, but thinks the initialisation has failed because the native mode bits aren't set when reading the register back. Signed-off-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: BALATON Zoltan Message-id: 20200313082444.2439-7-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/via.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/via.c b/hw/ide/via.c index c8835de01b..3c4d474e48 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -170,6 +170,7 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy mode */ pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); dev->wmask[PCI_INTERRUPT_LINE] =3D 0; + dev->wmask[PCI_CLASS_PROG] =3D 5; =20 memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops, &d->bus[0], "via-ide0-data", 8); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487750; cv=none; d=zohomail.com; s=zohoarc; b=b+bTHHuI9mBnwLlJv2yHVdJbx5leK2+Wxh6O6MEqmD+Sbty0k6XLAfE953nQhN+GpahI+2Wc17sWnXgdK3NwXgO0+crSFZgS+avDWWjWSz4/Ez/BH4IzwtbARGC4V7OcjakmvspC3Zv04MG1LfBLKk+mFnxpAkN6wLzGBg/LDQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487750; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O6iT68Lg4RO56izpImDKjMBNXLzZ5xjsOSs3ryKfwOs=; b=Vugg0TMs+7Vztqbdui5a5UdFJF+gfcUv6CaOzHJTA6zOE0WbLFxcb8D2agdiBdNs/BULlhipPpCn59Zf2XX+PeKk+NE4vJ8aoTVAEYk2i2Ui5ieRqedx2OSKAox41TwmGubVvr2f1PC54g7eiL3jloyvr63DFFgyUuOqLbvbhVY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487750527603.6047828491129; Tue, 17 Mar 2020 16:29:10 -0700 (PDT) Received: from localhost ([::1]:43026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELe1-0007z6-A3 for importer@patchew.org; Tue, 17 Mar 2020 19:29:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53617) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZs-00019m-C8 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZr-0006Y1-5o for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:52 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:40112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZr-0006Uh-01 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:51 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-geXhksw2PvKjFOBbc3iawg-1; Tue, 17 Mar 2020 19:24:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43AAA801E7E; Tue, 17 Mar 2020 23:24:44 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 564CF60BE0; Tue, 17 Mar 2020 23:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O6iT68Lg4RO56izpImDKjMBNXLzZ5xjsOSs3ryKfwOs=; b=K06URMp+DI7hJarSLfmNnBlR5buI0thrBTQWaRtueVK+ScIX5xjqd2WAhj4N+uEe/pc2ts 2GThDd/1YlhKwQHKCoujiOvncuflUTdPvcBMoVNstGhJvQ7zw5aejSCGRSV0JULjj0h7Lm 05Nbsre4jQlcYEgDWaHcHrB4YeltzAE= X-MC-Unique: geXhksw2PvKjFOBbc3iawg-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing Date: Tue, 17 Mar 2020 19:23:20 -0400 Message-Id: <20200317232329.22362-12-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland The existing code uses fixed PCI IRQ routing on IRQ 14 rather than legacy I= RQ 14/15 routing as documented in the datasheet. With the changes in this patchset guest OSs now correctly detect and config= ure the VIA controller in legacy IRQ routing mode, allowing the incorrect fixed PCI IRQ routing to be removed. Note that this fixed legacy IRQ 14/15 routing is identical to similar behav= iour in the early PIIX IDE controllers. Signed-off-by: Mark Cave-Ayland Tested-by: BALATON Zoltan Signed-off-by: BALATON Zoltan Message-id: 20200313082444.2439-8-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow --- hw/ide/via.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 3c4d474e48..8de4945cc1 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -113,10 +113,7 @@ static void via_ide_set_irq(void *opaque, int n, int l= evel) } =20 level =3D (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80); - n =3D pci_get_byte(d->config + PCI_INTERRUPT_LINE); - if (n) { - qemu_set_irq(isa_get_irq(NULL, n), level); - } + qemu_set_irq(isa_get_irq(NULL, 14 + n), level); } =20 static void via_ide_reset(DeviceState *dev) --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584487866; cv=none; d=zohomail.com; s=zohoarc; b=nkeMKhYwQcCxZd30txPuTtjj7TR41bV6DuCLNfIVv8sb9i5KZMXh+OuCGg3uzxzRNyl09cP5qzbXrrki0tQtvg0e02yLENG4hZuiDffV+hGc2jvGbJ+BNLrmR2ioStJtCQ13zHC72ddjPv0Hz97yXz4WZRQf7P5w/rOisWCBJV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584487866; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iTUxrqKd3xkC2/IG1RLkQg78Qagv6McRiF9KJC8aCZU=; b=jv1UUqWh38FlKWkQUkixKLr5Rk1P6xzH7vmcBOy6S9j2EPFMv3KzptJWNaLM850WH9ZUHwY0X1jhIfbFoYBh9IEkg8qvB0xPmNotun327Ak38BtUHRBQpnYDr8RGKvRxe9rDAbHRb+uOJJazu4Un3URj+FwdYjbq3LtDYx/iN/4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584487866274208.194207333706; Tue, 17 Mar 2020 16:31:06 -0700 (PDT) Received: from localhost ([::1]:43062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELft-0002vN-3F for importer@patchew.org; Tue, 17 Mar 2020 19:31:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53762) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELZv-0001JC-Qd for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZu-0006vC-Lj for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:55 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:41646) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZu-0006su-Hd for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-121-bhdk7CDsOGKtL-pVIdqu2g-1; Tue, 17 Mar 2020 19:24:50 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2FC1B10CE782; Tue, 17 Mar 2020 23:24:48 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85CAE60BE0; Tue, 17 Mar 2020 23:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iTUxrqKd3xkC2/IG1RLkQg78Qagv6McRiF9KJC8aCZU=; b=fgzAOnrfcNXvGWvsyPwV949lrYx+dWQgBgDd5vvg+gpokT3cNr+xWTh6LQJsbMWycg+2OP CpbH7YLkSLfG7MCanNjPDKF+5uBdz2HxDH0o3/eIIYaPEK7bexKQnd5pay5MJcLJhvoHRR +/OnPkFktyxwOTedF6D3GJZCgXYSP5k= X-MC-Unique: bhdk7CDsOGKtL-pVIdqu2g-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr() Date: Tue, 17 Mar 2020 19:23:21 -0400 Message-Id: <20200317232329.22362-13-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , Sam Eiderman , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Markus Armbruster valgrind reports write unitialized bytes from buf[]. Clear them. ASan reports we store to misaligned address in buf[]. Use stl_le_p() for that. Cc: Sam Eiderman Cc: John Snow Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200317092354.31831-1-armbru@redhat.com Signed-off-by: John Snow --- tests/qtest/hd-geo-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index a249800544..48e8e02d6e 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -421,7 +421,7 @@ static char *create_qcow2_with_mbr(MBRpartitions mbr, u= int64_t sectors) char *raw_path =3D strdup(template); char *qcow2_path =3D strdup(template); char cmd[100 + 2 * PATH_MAX]; - uint8_t buf[512]; + uint8_t buf[512] =3D {}; int i, ret, fd, offset; uint64_t qcow2_size =3D sectors * 512; uint8_t status, parttype, head, sector, cyl; @@ -457,8 +457,8 @@ static char *create_qcow2_with_mbr(MBRpartitions mbr, u= int64_t sectors) buf[offset + 0x6] =3D sector; buf[offset + 0x7] =3D cyl; =20 - (*(uint32_t *)&buf[offset + 0x8]) =3D cpu_to_le32(mbr[i].start_sec= t); - (*(uint32_t *)&buf[offset + 0xc]) =3D cpu_to_le32(mbr[i].nr_sects); + stl_le_p(&buf[offset + 0x8], mbr[i].start_sect); + stl_le_p(&buf[offset + 0xc], mbr[i].nr_sects); =20 offset +=3D 0x10; } --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488110; cv=none; d=zohomail.com; s=zohoarc; b=FOMZmn6M3Ry8O2tuC9vJEE4oBpBphw14Z2dYcaha2QxqMKZ1zrJ0rXr5twlAvXRbkOFuTg8AL5Kbb2UOU0pTZKGgI6/NL7neDV0eOVnbZfzXBdf6Z9uasnHhpjfnxpgmpNV+OtEK/lFwORd6zv5vX7W8TVu4hkyTRcV3fD/uHRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488110; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0QY5+hc49S9hLmpXXwo6c6oOn06ahgVT49z1PA5oCsM=; b=UzlUkrrDdgDYTTZ8Rog94KMwC7yeazma2qCufOLgKoxfLWdUHMoW01Vkw41ITlgSdsO2ppyrRDZq/vLNH6XV6YlWWuNdYR38HNVMWRbEYQSyDdSpTqA5j5sBIsBYeqWTXjLeGeVbBabd9g0bflXgvRmepDUR9e5ZO6fms4dzEoM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488110768185.5685912469395; Tue, 17 Mar 2020 16:35:10 -0700 (PDT) Received: from localhost ([::1]:43142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELjp-0000Q9-JD for importer@patchew.org; Tue, 17 Mar 2020 19:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53931) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELa2-0001WW-FQ for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELZz-0007WJ-V7 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:02 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:39773) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELZz-0007TB-Q1 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:24:59 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-XG4GTmhHP7aH6dRIHgE1Lw-1; Tue, 17 Mar 2020 19:24:55 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CAC618A6EC1; Tue, 17 Mar 2020 23:24:53 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B67160BE0; Tue, 17 Mar 2020 23:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0QY5+hc49S9hLmpXXwo6c6oOn06ahgVT49z1PA5oCsM=; b=XCvEn/94UGQwsOAP6qcEPcHier99gP4dgSI7dX+7dVMRdaVffUeRLEDXYSALShzh+WA+T/ SErbed5q1lEDOtW6+wfeYoCieIMB/PQV1POQY+6AbSQRLpdWclbO4wh7MJw/+DvHUDIcuY KMl3DUrsweDEqGcPkgyz5YADSm8Nw6c= X-MC-Unique: XG4GTmhHP7aH6dRIHgE1Lw-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 13/20] hw/ide: Get rid of piix3_init functions Date: Tue, 17 Mar 2020 19:23:22 -0400 Message-Id: <20200317232329.22362-14-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan This removes pci_piix3_ide_init() and pci_piix3_xen_ide_init() functions similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Message-id: adddfa21552783020d64e1314318cab6d24362c3.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- include/hw/ide.h | 2 -- hw/i386/pc_piix.c | 10 +++++----- hw/ide/pci.c | 1 + hw/ide/piix.c | 21 +-------------------- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index dea0ecf5be..883bbaeb9b 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 /* ide-pci.c */ -PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int d= evfn); -PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); =20 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e2d98243bc..c399398739 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/usb.h" #include "net/net.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "hw/irq.h" #include "sysemu/kvm.h" #include "hw/kvm/clock.h" @@ -242,11 +243,10 @@ static void pc_init1(MachineState *machine, ide_drive_get(hd, ARRAY_SIZE(hd)); if (pcmc->pci_enabled) { PCIDevice *dev; - if (xen_enabled()) { - dev =3D pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1); - } else { - dev =3D pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1); - } + + dev =3D pci_create_simple(pci_bus, piix3_devfn + 1, + xen_enabled() ? "piix3-ide-xen" : "piix3-i= de"); + pci_ide_create_devs(dev, hd); idebus[0] =3D qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] =3D qdev_get_child_bus(&dev->qdev, "ide.1"); pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 1a6a287e76..4fc76c5225 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -476,6 +476,7 @@ const VMStateDescription vmstate_ide_pci =3D { } }; =20 +/* hd_table must contain 4 block drivers */ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table) { PCIIDEState *d =3D PCI_IDE(dev); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index bc575b4d70..8bcd6b72c2 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -197,15 +197,6 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev, bool au= x) return 0; } =20 -PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int d= evfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix3-ide-xen"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - static void pci_piix_ide_exitfn(PCIDevice *dev) { PCIIDEState *d =3D PCI_IDE(dev); @@ -217,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev) } } =20 -/* hd_table must contain 4 block drivers */ -/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ -PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix3-ide"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - /* hd_table must contain 4 block drivers */ /* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) @@ -239,6 +219,7 @@ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **= hd_table, int devfn) return dev; } =20 +/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ static void piix3_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488040; cv=none; d=zohomail.com; s=zohoarc; b=ARflQog7oyb0WKIRiUQ6bQbnssGsmXpCrOK2W2eka0C3/69f+4eAx/rDOYIzSuxMs7OfC4pDKClFrcaeYAInReGGEGWC/pdb72lrl324DXRQta/QqSL9xyR6xrmO1Mob9gxQp1FetzcPDvEEhwDFdsgwwrs7chlt3NxFCXKcbHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488040; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YQM0UB9If7Xg4g9za/6nNer7pYMGCLAddpBFGqJQ8wM=; b=lMxKrxw2jBOKa+RhO19Ysk2rdQlWZvZIVef64CpNG/rhsyeGwFZreddCX2bLCSto6bKwA8HE1Q3BF9sDrG8h0QVURzzlEwamx97dBHKSLnjkrMcoNk8bW8j7dy3rifbasfumAjN35illIVr26f6iK8QYjIbt0sjtHhfepDmJSts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488040225819.6432566601845; Tue, 17 Mar 2020 16:34:00 -0700 (PDT) Received: from localhost ([::1]:43132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELig-0007Cn-VO for importer@patchew.org; Tue, 17 Mar 2020 19:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54122) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaE-0001j3-87 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELaC-0008P9-Ca for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:13 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:45952) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELaC-0008Hj-8h for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:12 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-wER0LIegMkKk25wdS13xjA-1; Tue, 17 Mar 2020 19:25:08 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47AD81005516; Tue, 17 Mar 2020 23:25:06 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC21C60BE0; Tue, 17 Mar 2020 23:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YQM0UB9If7Xg4g9za/6nNer7pYMGCLAddpBFGqJQ8wM=; b=Z8PlMbFEg7HqiBtgmYjXC4tVaJ+sHjq4AvNxL8g7X9b1ryj7SwdnagAVeJHFXxJfF0ub8C qPiQgf1udnUoPy4qHss55444Dz+B5uaSCk/L+XpJIazZlEg79oUyuBhnUcqI6LvWmlCYrq pQAZvRIiwaMsLeXXNAKo07GJt7WjcFA= X-MC-Unique: wER0LIegMkKk25wdS13xjA-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn Date: Tue, 17 Mar 2020 19:23:23 -0400 Message-Id: <20200317232329.22362-15-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan To avoid any problem with reassigning pci variable store devfn in a variable instead of acessing it from the PCIDevice. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 1020e0bfcfc6e364f967ccb2a9a3778ac174ccbe.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- hw/isa/piix4.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 7edec5e149..2cbdcd7700 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -247,9 +247,10 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, DriveInfo **hd; PCIDevice *pci; DeviceState *dev; + int devfn =3D PCI_DEVFN(10, 0); =20 - pci =3D pci_create_simple_multifunction(pci_bus, PCI_DEVFN(10, 0), - true, TYPE_PIIX4_PCI_DEVICE); + pci =3D pci_create_simple_multifunction(pci_bus, devfn, true, + TYPE_PIIX4_PCI_DEVICE); dev =3D DEVICE(pci); if (isa_bus) { *isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); @@ -257,11 +258,12 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **i= sa_bus, =20 hd =3D g_new(DriveInfo *, ide_drives); ide_drive_get(hd, ide_drives); - pci_piix4_ide_init(pci_bus, hd, pci->devfn + 1); + pci_piix4_ide_init(pci_bus, hd, devfn + 1); g_free(hd); - pci_create_simple(pci_bus, pci->devfn + 2, "piix4-usb-uhci"); + + pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci"); if (smbus) { - *smbus =3D piix4_pm_init(pci_bus, pci->devfn + 3, 0x1100, + *smbus =3D piix4_pm_init(pci_bus, devfn + 3, 0x1100, isa_get_irq(NULL, 9), NULL, 0, NULL); } =20 --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488176; cv=none; d=zohomail.com; s=zohoarc; b=cRkAWZhmaiTs0JU+IRfzSFx6wJRSVQ9b57AkLk274zpBG51QkA6K1LByG0xvhnDyfA3cQ+OICJ0PsdzDhLuM2rHkO8eQrjXHpPnyhS3eFkIjBuLdJorgEtsMOiafpI2meA96rse9ji1xCgJ1btbqvHfKgH5JwmIXT6QxVNyzgBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488176; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iF0+/Pdzy8HgdQpvJErGs69taSaLcsxlEw81wFyJFpQ=; b=OawiUOERbUQR2Ws9LEIIUk51dALVRQP/vIt8aK3Miu3t843BsXIuj9W+tWNDis36e2ovIRxhbQia/IENADzrqEohlboE9hcs6+JpmGoiKCLsr5NL9Lxx4cRKHbwB1f0EuxERGf/wSYnzJugsh9LYez+EHjtG9codOUSi/pnMp7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488176944207.59244497697478; Tue, 17 Mar 2020 16:36:16 -0700 (PDT) Received: from localhost ([::1]:43176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELkt-0002Pd-TN for importer@patchew.org; Tue, 17 Mar 2020 19:36:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54261) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaH-0001qK-NO for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELaG-0000FU-D8 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:17 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:59799) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELaG-0000Cj-8r for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:16 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-126-kBAdC_BFOSGOAj8R4QWQcg-1; Tue, 17 Mar 2020 19:25:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B2FA9DB60; Tue, 17 Mar 2020 23:25:11 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B4A660BE0; Tue, 17 Mar 2020 23:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iF0+/Pdzy8HgdQpvJErGs69taSaLcsxlEw81wFyJFpQ=; b=X9vablU7jG4ESbHMP2PUfssYKmX4P8rw+3isv0ztXpDo3j9ckgpfaKpUDbFYxuv5WBSTpV SdCaOFzSRDactdEt5MrNyd8eBmpR9vUSAniaIhxp/IhozSI9MR+5uJ/vQhNXsYJ8qQ70d4 p2k97ZpTfkXXrPhs93STFujW1wC1TK0= X-MC-Unique: kBAdC_BFOSGOAj8R4QWQcg-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 15/20] hw/ide: Get rid of piix4_init function Date: Tue, 17 Mar 2020 19:23:24 -0400 Message-Id: <20200317232329.22362-16-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan This removes pci_piix4_ide_init() function similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Message-id: fe46b6536abbae77695f6d1c711a04a3f4b5481d.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- include/hw/ide.h | 1 - hw/ide/piix.c | 12 +----------- hw/isa/piix4.c | 4 +++- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index 883bbaeb9b..21bd8f23f1 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -12,7 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 /* ide-pci.c */ -PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); =20 /* ide-mmio.c */ diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 8bcd6b72c2..3b2de4c312 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -208,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev) } } =20 -/* hd_table must contain 4 block drivers */ -/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ -PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix4-ide"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ static void piix3_ide_class_init(ObjectClass *klass, void *data) { @@ -247,6 +236,7 @@ static const TypeInfo piix3_ide_xen_info =3D { .class_init =3D piix3_ide_class_init, }; =20 +/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ static void piix4_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 2cbdcd7700..706eb5be69 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -35,6 +35,7 @@ #include "hw/timer/i8254.h" #include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "migration/vmstate.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" @@ -256,9 +257,10 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, *isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); } =20 + pci =3D pci_create_simple(pci_bus, devfn + 1, "piix4-ide"); hd =3D g_new(DriveInfo *, ide_drives); ide_drive_get(hd, ide_drives); - pci_piix4_ide_init(pci_bus, hd, devfn + 1); + pci_ide_create_devs(pci, hd); g_free(hd); =20 pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci"); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488048; cv=none; d=zohomail.com; s=zohoarc; b=CMKR7YAz8vWDV9LLCnnP4NQNmaZmC6H7NAButBE8abppmTGp5dj5NAr5ilZmaQGvNF5sMfqglaKdaxCFdsDuKgXIh9yuqXsQOUoKKdMUHjqNcQkGizDQyUBD9LJoBKdrJvVDZn97dXI1db63JjBk/XWLU/zfk30x4d3IwNkPYf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488048; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qVcbRFfRi8J5PAMXWOGMjOOSCw5AkybzeTOriUoBA2Q=; b=eCfhBHSaXdNVEaRGUv6nePty4ILWgxXaeWAscmdXIP/pgKwxdrdCitsGvkrF/a8hf3Trss7i2BxiwDvc+Dc7c/GjCs5jIxwTCPga5mAzP0dIa6gUg0Mm5OvDujpROqNXuQZPSOAP9g0o1DbyxJyWKwIkkgMUN1hPTgxTebAhpZo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488048862230.98460353276448; Tue, 17 Mar 2020 16:34:08 -0700 (PDT) Received: from localhost ([::1]:43136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELip-0007LS-MM for importer@patchew.org; Tue, 17 Mar 2020 19:34:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54536) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELaR-0002C6-PJ for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELaO-0001Jz-Kv for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:27 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:57086) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELaO-0001I9-Gu for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:24 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-Iv0F6AWWNcyWQ_YVxWeTeA-1; Tue, 17 Mar 2020 19:25:20 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE0B5100550D; Tue, 17 Mar 2020 23:25:17 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BE8160BE0; Tue, 17 Mar 2020 23:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qVcbRFfRi8J5PAMXWOGMjOOSCw5AkybzeTOriUoBA2Q=; b=faoR57YOgDCwabXyzPQr0gI3YBqtQVTXxBXw7OnyD3KOu+LviNZEho1yxRjGkzUmCfPgi7 gZEQam6rYaW6DcE3JuISXMr85t9rl3kcjAW+X+Xv65RaWIe9yogmfkwwtpN1YY3n6hS3ym /qyKhsFepYhvpIXh9uiR0emkDlJ5YYs= X-MC-Unique: Iv0F6AWWNcyWQ_YVxWeTeA-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h Date: Tue, 17 Mar 2020 19:23:25 -0400 Message-Id: <20200317232329.22362-17-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan After previous patches we don't need hw/pci/pci.h any more in hw/ide.h. Some files depended on implicit inclusion by this header which are also fixed up here. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Message-id: 444a5e34331bf1f7880541b8d46e0353f470f5a6.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- hw/ide/ahci_internal.h | 1 + include/hw/ide.h | 1 - include/hw/ide/pci.h | 1 + include/hw/misc/macio/macio.h | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index 73424516da..bab0459774 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -27,6 +27,7 @@ #include "hw/ide/ahci.h" #include "hw/ide/internal.h" #include "hw/sysbus.h" +#include "hw/pci/pci.h" =20 #define AHCI_MEM_BAR_SIZE 0x1000 #define AHCI_MAX_PORTS 32 diff --git a/include/hw/ide.h b/include/hw/ide.h index 21bd8f23f1..d52c211f32 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -2,7 +2,6 @@ #define HW_IDE_H =20 #include "hw/isa/isa.h" -#include "hw/pci/pci.h" #include "exec/memory.h" =20 #define MAX_IDE_DEVS 2 diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index a9f2c33e68..98ffa7dfcd 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -2,6 +2,7 @@ #define HW_IDE_PCI_H =20 #include "hw/ide/internal.h" +#include "hw/pci/pci.h" =20 #define BM_STATUS_DMAING 0x01 #define BM_STATUS_ERROR 0x02 diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index 070a694eb5..87335a991c 100644 --- a/include/hw/misc/macio/macio.h +++ b/include/hw/misc/macio/macio.h @@ -27,6 +27,7 @@ #define MACIO_H =20 #include "hw/char/escc.h" +#include "hw/pci/pci.h" #include "hw/ide/internal.h" #include "hw/intc/heathrow_pic.h" #include "hw/misc/macio/cuda.h" --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488183; cv=none; d=zohomail.com; s=zohoarc; b=a0LqR/7w8HE2X7urFiE+xMniX2IF3hhUxdWRtKXkcraFbt1Uxh6dMug9Cv9PZY6VNjpZlOw9ZV2DiJAZ3eXhgH6T2qJ69dcY4lToeVavhfvocdZPrEesB8vloOad1jq9ChKgLgkvUS1KIpnyouShle1VYVZDCJ5xrcw+5730dhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qdeFAM6x9SD6qY2ZcCKAngQF5k3SDotf+6TE0F1uUh4=; b=aHkdgVX1Y+mwqgEjl8gROfnVVCEdf92hK9ymGzTbIo4fdCxFdwOPBZ4z/T4xQ+C0LKt/VT4KoZrtLGKsevw5NhAFEGFFP0NuyHQEJxqQTT+yyUekLXRrCF2/kMPJEP58eKIxos6McBSYOx4C8LkGqOCA1AXd1wJQ6+Dny/SOf2k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158448818360338.901446225009295; Tue, 17 Mar 2020 16:36:23 -0700 (PDT) Received: from localhost ([::1]:43182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELl0-0002YR-IN for importer@patchew.org; Tue, 17 Mar 2020 19:36:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54802) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELab-0002Uj-HI for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELaa-0002Ul-BY for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:37 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:29097) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELaa-0002Rl-6R for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-RFSAdMHcO2en35qpLXKCMA-1; Tue, 17 Mar 2020 19:25:32 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92E4D180455E; Tue, 17 Mar 2020 23:25:29 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49B5060BE0; Tue, 17 Mar 2020 23:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qdeFAM6x9SD6qY2ZcCKAngQF5k3SDotf+6TE0F1uUh4=; b=edXQqhbNF8hjgm7lKP6qg02md9rJX62l/kjq/F/02n0qwogpSkOimv2MxlBpJNODiOwak+ hXKxycpSlFBSt8kKZMU8M2uCbSZUqIX3EuQFgZdCoj2v6V02U1v2m5TgyLxVVwdssRKfeR 51pc8IWE0GmchahLIlCd1EuiEw5V6Vc= X-MC-Unique: RFSAdMHcO2en35qpLXKCMA-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors Date: Tue, 17 Mar 2020 19:23:26 -0400 Message-Id: <20200317232329.22362-18-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Spaces are required around a + operator and if statements should have braces even for single line. Also make it simpler by reversing the condition instead of breaking the loop. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Message-id: 0d50336ab26a56240c8c17ca1ec6135a4092fcc9.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- hw/ide/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 4fc76c5225..e0c84392e2 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -485,9 +485,9 @@ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd= _table) int i; =20 for (i =3D 0; i < 4; i++) { - if (hd_table[i] =3D=3D NULL) - continue; - ide_create_drive(d->bus+bus[i], unit[i], hd_table[i]); + if (hd_table[i]) { + ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]); + } } } =20 --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488389; cv=none; d=zohomail.com; s=zohoarc; b=aW8JTs9aj5hKV36f/BJIRxZ3hu7OIXPDIhW0NoZ8TKV5IQ+SZSVP+RGlaZDzs0EPmDtztw6adeElUPN4Dw6y3vexW/+ogABbu8PLTOXV2H2j+S8juwLVipnDnKxx7TpukYhs5QoXoKlPWjYsmTfODprmWr3i9meIb/D4zcRN/f4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488389; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=s9FJywFBqem12AIhvlt34sK1ph0aw1jFx1iGScvNM38=; b=TXRl/r+Ubb9B5seuL7NBGfsm9+xf34QJXkDNdVipZh4lfm9QEstqxs1j2VBl85smOY4q7y6mTOnEKNNpl/SiWPARe1Uz77P74cJ0IpZMmrDJrq38Bq+cQFvc5LZ6PVoFzUrVpLcGTl9VIA5t40amllTR1q0mCxzy/wV57GpS5cs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488389197688.061691281743; Tue, 17 Mar 2020 16:39:49 -0700 (PDT) Received: from localhost ([::1]:43249 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELoJ-0007qb-Vw for importer@patchew.org; Tue, 17 Mar 2020 19:39:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELak-0002hl-89 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELai-000370-9m for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:46 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:26022) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELag-00032S-7W for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:42 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-hkB0LRk2NbSJd2sxJb_UoA-1; Tue, 17 Mar 2020 19:25:37 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 132C81804560; Tue, 17 Mar 2020 23:25:35 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF89960BE0; Tue, 17 Mar 2020 23:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9FJywFBqem12AIhvlt34sK1ph0aw1jFx1iGScvNM38=; b=PJn/U66LugJlfnTT8R4AqVe4daseZa2C0eKzEidOGfBawtrJ198S7O/f8t186PY1iswmi9 fPvasCYlmLArrU1Tb591E6fk04rh3LZMLkdLBSd8Kk3G1K6ssf1TP9SlKLfAlCdr7l+XYF QLpxv55CZGolA/t4ksl5z/Li11rpaRg= X-MC-Unique: hkB0LRk2NbSJd2sxJb_UoA-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs() Date: Tue, 17 Mar 2020 19:23:27 -0400 Message-Id: <20200317232329.22362-19-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Message-id: e9713fdded4d212fa68ed03b844e531934226a6f.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- include/hw/ide/pci.h | 2 +- include/hw/southbridge/piix.h | 3 +-- hw/alpha/dp264.c | 13 +++---------- hw/i386/pc_piix.c | 9 +++++---- hw/ide/pci.c | 4 +++- hw/isa/piix4.c | 10 ++-------- hw/mips/mips_fulong2e.c | 4 +--- hw/mips/mips_malta.c | 2 +- hw/sparc64/sun4u.c | 6 +----- 9 files changed, 18 insertions(+), 35 deletions(-) diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index 98ffa7dfcd..dd504e5a0b 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -63,7 +63,7 @@ static inline IDEState *bmdma_active_if(BMDMAState *bmdma) void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d); void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val); extern MemoryRegionOps bmdma_addr_ioport_ops; -void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table); +void pci_ide_create_devs(PCIDevice *dev); =20 extern const VMStateDescription vmstate_ide_pci; extern const MemoryRegionOps pci_ide_cmd_le_ops; diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index 152628c6d9..02bd741209 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -68,7 +68,6 @@ extern PCIDevice *piix4_dev; =20 PIIX3State *piix3_create(PCIBus *pci_bus, ISABus **isa_bus); =20 -DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, - I2CBus **smbus, size_t ide_buses); +DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s); =20 #endif diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 27595767e5..f7751b18f6 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -15,7 +15,6 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" @@ -58,6 +57,7 @@ static void clipper_init(MachineState *machine) const char *initrd_filename =3D machine->initrd_filename; AlphaCPU *cpus[4]; PCIBus *pci_bus; + PCIDevice *pci_dev; ISABus *isa_bus; qemu_irq rtc_irq; long size, i; @@ -100,15 +100,8 @@ static void clipper_init(MachineState *machine) isa_create_simple(isa_bus, TYPE_SMC37C669_SUPERIO); =20 /* IDE disk setup. */ - { - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; - PCIDevice *pci_dev; - - ide_drive_get(hd, ARRAY_SIZE(hd)); - - pci_dev =3D pci_create_simple(pci_bus, -1, "cmd646-ide"); - pci_ide_create_devs(pci_dev, hd); - } + pci_dev =3D pci_create_simple(pci_bus, -1, "cmd646-ide"); + pci_ide_create_devs(pci_dev); =20 /* Load PALcode. Given that this is not "real" cpu palcode, but one explicitly written for the emulation, we might as diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c399398739..9216596ec6 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -86,7 +86,6 @@ static void pc_init1(MachineState *machine, int piix3_devfn =3D -1; qemu_irq smi_irq; GSIState *gsi_state; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; BusState *idebus[MAX_IDE_BUS]; ISADevice *rtc_state; MemoryRegion *ram_memory; @@ -240,20 +239,22 @@ static void pc_init1(MachineState *machine, =20 pc_nic_init(pcmc, isa_bus, pci_bus); =20 - ide_drive_get(hd, ARRAY_SIZE(hd)); if (pcmc->pci_enabled) { PCIDevice *dev; =20 dev =3D pci_create_simple(pci_bus, piix3_devfn + 1, xen_enabled() ? "piix3-ide-xen" : "piix3-i= de"); - pci_ide_create_devs(dev, hd); + pci_ide_create_devs(dev); idebus[0] =3D qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] =3D qdev_get_child_bus(&dev->qdev, "ide.1"); pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); } #ifdef CONFIG_IDE_ISA -else { + else { + DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; int i; + + ide_drive_get(hd, ARRAY_SIZE(hd)); for (i =3D 0; i < MAX_IDE_BUS; i++) { ISADevice *dev; char busname[] =3D "ide.0"; diff --git a/hw/ide/pci.c b/hw/ide/pci.c index e0c84392e2..97347f07f1 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -477,13 +477,15 @@ const VMStateDescription vmstate_ide_pci =3D { }; =20 /* hd_table must contain 4 block drivers */ -void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table) +void pci_ide_create_devs(PCIDevice *dev) { PCIIDEState *d =3D PCI_IDE(dev); + DriveInfo *hd_table[2 * MAX_IDE_DEVS]; static const int bus[4] =3D { 0, 0, 1, 1 }; static const int unit[4] =3D { 0, 1, 0, 1 }; int i; =20 + ide_drive_get(hd_table, ARRAY_SIZE(hd_table)); for (i =3D 0; i < 4; i++) { if (hd_table[i]) { ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]); diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 706eb5be69..cc3e5cef8c 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -241,11 +241,8 @@ static void piix4_register_types(void) =20 type_init(piix4_register_types) =20 -DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, - I2CBus **smbus, size_t ide_buses) +DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s) { - size_t ide_drives =3D ide_buses * MAX_IDE_DEVS; - DriveInfo **hd; PCIDevice *pci; DeviceState *dev; int devfn =3D PCI_DEVFN(10, 0); @@ -258,10 +255,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, } =20 pci =3D pci_create_simple(pci_bus, devfn + 1, "piix4-ide"); - hd =3D g_new(DriveInfo *, ide_drives); - ide_drive_get(hd, ide_drives); - pci_ide_create_devs(pci, hd); - g_free(hd); + pci_ide_create_devs(pci); =20 pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci"); if (smbus) { diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 639ba2a091..0f312b5a35 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -239,7 +239,6 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, { qemu_irq *i8259; ISABus *isa_bus; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; PCIDevice *dev; =20 isa_bus =3D vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0)); @@ -259,8 +258,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); =20 dev =3D pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide"); - ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_ide_create_devs(dev, hd); + pci_ide_create_devs(dev); =20 pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index d380f73d7b..e4c4de1b4e 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1403,7 +1403,7 @@ void mips_malta_init(MachineState *machine) pci_bus =3D gt64120_register(s->i8259); =20 /* Southbridge */ - dev =3D piix4_create(pci_bus, &isa_bus, &smbus, MAX_IDE_BUS); + dev =3D piix4_create(pci_bus, &isa_bus, &smbus); =20 /* Interrupt controller */ qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq); diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d33e84f831..6abfcb30f8 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -50,7 +50,6 @@ #include "hw/sparc/sparc64.h" #include "hw/nvram/fw_cfg.h" #include "hw/sysbus.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" @@ -563,7 +562,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem, PCIBus *pci_bus, *pci_busA, *pci_busB; PCIDevice *ebus, *pci_dev; SysBusDevice *s; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DeviceState *iommu, *dev; FWCfgState *fw_cfg; NICInfo *nd; @@ -663,12 +661,10 @@ static void sun4uv_init(MemoryRegion *address_space_m= em, qemu_macaddr_default_if_unset(&macaddr); } =20 - ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_dev =3D pci_create(pci_busA, PCI_DEVFN(3, 0), "cmd646-ide"); qdev_prop_set_uint32(&pci_dev->qdev, "secondary", 1); qdev_init_nofail(&pci_dev->qdev); - pci_ide_create_devs(pci_dev, hd); + pci_ide_create_devs(pci_dev); =20 /* Map NVRAM into I/O (ebus) space */ nvram =3D m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59); --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488049; cv=none; d=zohomail.com; s=zohoarc; b=h8GiA3VsXX4T3VjIuqKRQUEy7jxPKkwdMfrEZbSaU6kwK+GxbI0Zv8R7kap5Vx0G/pixcHvx85XL00gVZAKlxfwv0JmcERXFZ6VVRoifJ4Gvxb6NZO9oy8Sgsns44CWTxZHs7BQ/3m7aHX9CuKNEKcLjhj//OBNUAmIk8n/yFHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488049; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pCCSGLhwJCGa6fW/xmoL2oVSV5CWJA33+UBKKk99HzE=; b=iubXJgV9xnaORLlQXQek3PqkV7SyxlWyw5DxJh4bY9rGnOSSKvVGC3N98sw+hmziqHgOnzVZvn3pdn3AMf7fYscEQrea5BAw6JRjFuFkYSDnt0YOgNGGYp7l+Hx321/G/l/3fbdfos43NyRTZKeIkvnCPeWGfb5se1NgzULwJlE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488049356485.99370545204056; Tue, 17 Mar 2020 16:34:09 -0700 (PDT) Received: from localhost ([::1]:43138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELiq-0007Lm-72 for importer@patchew.org; Tue, 17 Mar 2020 19:34:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55035) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELan-0002lj-LS for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELal-0003KP-AQ for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:49 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:53700) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELak-0003Hi-Pi for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:47 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-174-5I3DhKzKNEaRFtnLm1G8zw-1; Tue, 17 Mar 2020 19:25:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 463A3DB60; Tue, 17 Mar 2020 23:25:40 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A4E260BE0; Tue, 17 Mar 2020 23:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pCCSGLhwJCGa6fW/xmoL2oVSV5CWJA33+UBKKk99HzE=; b=GcR3eNv2EHkCgoISlg0zvopNxjwCBTSBGWcVmpw23VI1+bphZJsZkXoli3/zrK+3BMlVo9 RRiC8VBQe6dAKqtbVBv0hVWT+1PjRajS4+JTJsUOslqZEhWimhckz9Gd278eBLhYlHtMNf Cm4z7ReKOnIb610qqMS0BBr2Q/5QW2s= X-MC-Unique: 5I3DhKzKNEaRFtnLm1G8zw-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h Date: Tue, 17 Mar 2020 19:23:28 -0400 Message-Id: <20200317232329.22362-20-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan We can move this define now that less files use it to internal.h to further reduce dependency on hw/ide.h. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Message-id: e68675d2f6252f229cf788b7cd163bb76fa3e26b.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- include/hw/ide.h | 2 -- include/hw/ide/internal.h | 2 ++ hw/mips/mips_r4k.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index d52c211f32..c5ce5da4f4 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -4,8 +4,6 @@ #include "hw/isa/isa.h" #include "exec/memory.h" =20 -#define MAX_IDE_DEVS 2 - /* ide-isa.c */ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, DriveInfo *hd0, DriveInfo *hd1); diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 1bc1fc73e5..55da35d768 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -27,6 +27,8 @@ typedef struct IDEDMAOps IDEDMAOps; #define TYPE_IDE_BUS "IDE" #define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) =20 +#define MAX_IDE_DEVS 2 + /* Bits of HD_STATUS */ #define ERR_STAT 0x01 #define INDEX_STAT 0x02 diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index ad8b75e286..3487013a4a 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -26,6 +26,7 @@ #include "qemu/log.h" #include "hw/mips/bios.h" #include "hw/ide.h" +#include "hw/ide/internal.h" #include "hw/loader.h" #include "elf.h" #include "hw/rtc/mc146818rtc.h" --=20 2.21.1 From nobody Fri Nov 14 02:13:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488206; cv=none; d=zohomail.com; s=zohoarc; b=g+jU7I+3lKi3C96GowcmG5407IgSdnfaAtQLP7FuvL8CLLrRIwI7QR8gQXr2yz3hQuvkCftENdhC7UpLFJQVRl7EQ8EHpFVLUqfsAI0dH3MxR9uO36tg0C+LE78m3VsShGuqab0+/YALTcigCejoF/r+BMTY+q4UFvk+4nk95NU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488206; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3Pg9K4ABElv75k8A0SNVDAxOarrMkfzrJc6UIc1GqFY=; b=LF8lKzp+anjLZTDkFUAik5tXWGZ6J7dOIitrXsTgGAQ9bGKLEvt9+UKahrWAGbONemyXdnpxJNEENEjPaZQO5ozavPu4th6eb3TrX2nG9S7h0D4/4e4ru1Xf/g6yVXLjUlCbdJAPqGO3Xw7MHcIoWR3/ESapBmkUT2+OoqsfCi0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584488206273588.693196893242; Tue, 17 Mar 2020 16:36:46 -0700 (PDT) Received: from localhost ([::1]:43184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELlN-0003Iq-6i for importer@patchew.org; Tue, 17 Mar 2020 19:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55220) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELat-00030P-QX for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELas-00047O-Bm for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:55 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:35615) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELas-00043y-7p for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-2eOh29oNPj2RWWSHv3GRHw-1; Tue, 17 Mar 2020 19:25:49 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6B353180456C; Tue, 17 Mar 2020 23:25:47 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8866260BE0; Tue, 17 Mar 2020 23:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3Pg9K4ABElv75k8A0SNVDAxOarrMkfzrJc6UIc1GqFY=; b=KUpXWUuBwP2TnTbwTZjbsJdv8pPDy668XeZ0lvapQ1dRdjE/UzORsOjcQKdVeGZQoHFA5L 7Ij/dmI2qRaAAsWdfzWKXba2p+M68ldPmBCfKMTj/TVbkjQERPRzKASNbVLQBI03N0dMys SFSqfHZj4AnwFatjzHSMilJOAvm8Okw= X-MC-Unique: 2eOh29oNPj2RWWSHv3GRHw-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h Date: Tue, 17 Mar 2020 19:23:29 -0400 Message-Id: <20200317232329.22362-21-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan After previous clean ups we can drop direct inclusion of hw/ide.h from several places. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Message-id: a3f72b663e537701c63cec5fc9cb8ed4f4249f28.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- hw/hppa/hppa_sys.h | 1 - hw/hppa/machine.c | 1 - hw/i386/pc_piix.c | 1 - hw/isa/piix4.c | 1 - hw/mips/mips_fulong2e.c | 1 - hw/ppc/mac_newworld.c | 1 - hw/ppc/mac_oldworld.c | 1 - hw/ppc/prep.c | 1 - 8 files changed, 8 deletions(-) diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h index 4d08501464..0b18271cc9 100644 --- a/hw/hppa/hppa_sys.h +++ b/hw/hppa/hppa_sys.h @@ -5,7 +5,6 @@ =20 #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/boards.h" #include "hw/intc/i8259.h" =20 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 9175f4b790..00dd9f58d6 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -13,7 +13,6 @@ #include "sysemu/reset.h" #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/char/serial.h" #include "hw/net/lasi_82596.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 9216596ec6..e6756216f9 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -38,7 +38,6 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/irq.h" #include "sysemu/kvm.h" diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index cc3e5cef8c..9a10fb9b3c 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -34,7 +34,6 @@ #include "hw/dma/i8257.h" #include "hw/timer/i8254.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "migration/vmstate.h" #include "sysemu/reset.h" diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 0f312b5a35..5040afd581 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -36,7 +36,6 @@ #include "audio/audio.h" #include "qemu/log.h" #include "hw/loader.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "elf.h" #include "hw/isa/vt82c686.h" diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index b8189bf7a4..13164ee9d7 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -62,7 +62,6 @@ #include "hw/char/escc.h" #include "hw/misc/macio/macio.h" #include "hw/ppc/openpic.h" -#include "hw/ide.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" #include "elf.h" diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 440c406eb4..2d419d82fa 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -41,7 +41,6 @@ #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" #include "hw/misc/macio/macio.h" -#include "hw/ide.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" #include "elf.h" diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 111cc80867..44be9d25a2 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -37,7 +37,6 @@ #include "hw/boards.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "hw/ide.h" #include "hw/irq.h" #include "hw/loader.h" #include "hw/rtc/mc146818rtc.h" --=20 2.21.1