{"id":856676,"url":"http://patchwork.ozlabs.org/api/patches/856676/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20180108024558.17983-8-f4bug@amsat.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20180108024558.17983-8-f4bug@amsat.org>","list_archive_url":null,"date":"2018-01-08T02:45:36","name":"[07/29] hw/i386/pc: use isa_superio_init()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"f8d8263448ff17c27d0bf354acaa5eda13aa0df3","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20180108024558.17983-8-f4bug@amsat.org/mbox/","series":[{"id":21847,"url":"http://patchwork.ozlabs.org/api/series/21847/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=21847","date":"2018-01-08T02:45:30","name":"remove i386/pc dependency: generic SuperIO, PIIX cleanup","version":1,"mbox":"http://patchwork.ozlabs.org/series/21847/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/856676/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/856676/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"dscQdBiv\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zFKhf1qTxz9ryr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  8 Jan 2018 13:58:10 +1100 (AEDT)","from localhost ([::1]:59426 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1eYNdY-0008HG-8T\n\tfor incoming@patchwork.ozlabs.org; Sun, 07 Jan 2018 21:58:08 -0500","from eggs.gnu.org ([2001:4830:134:3::10]:51322)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSR-0006ms-AP\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:40 -0500","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSO-0002Of-8e\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:39 -0500","from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:41722)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSO-0002OV-3g\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:36 -0500","by mail-qt0-x244.google.com with SMTP id i40so12055850qti.8\n\tfor <qemu-devel@nongnu.org>; Sun, 07 Jan 2018 18:46:35 -0800 (PST)","from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id\n\td10sm7156245qkg.16.2018.01.07.18.46.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 07 Jan 2018 18:46:32 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=OyXBDoIQWzI2frpS1vRP6vtUZc5iSiVS21RSq72TzP4=;\n\tb=dscQdBiv/pGpMuCHAFTTYOX8V09fsHTKRYYyjzPCA8UCbMvE4zg3mMoYbJjeYeeEhl\n\tpeMo/GJGATSbcFb96q6ytuhfRxfRZrhbnN0GV8MMVM+ElbLT8G7bTqurdPk7SSzroBWk\n\tEhm0jq6syvLWnJFftq3I+SgRSeu3gujySTfeqEfISQNUeMFt9hPvAbA1v8H6FEa4xCAT\n\tXlhAcpHNr8nYekmo1Uaa3Gmd8nsAMNdKMmp765beXWtk8wf6MORuRx0uqXKQBjV9riiE\n\tYDk+9gFpfwHvlUZlqb6hhz+KCSzarTIwozuX2I9eO/Q87hd2pGYAhhr5ISEhjM9avZ5/\n\tsGkA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=OyXBDoIQWzI2frpS1vRP6vtUZc5iSiVS21RSq72TzP4=;\n\tb=RbBoVIuTBApl8ryYlfzMo66ioBpaKETMg3vMFDr3l0x9LBLK6/5YmSBdJ9QQzdAYtc\n\t/E0uzPPHPGZ3t9SQZZyP09QA5EAzxwtrw64GYH7mCCyq+GrntWIG8t/CDI9ukHswT+sA\n\tC01CrxONj0jijyUH8K9pjfvpPRrzTQccnI5S3pnzRE1r2zYMa9AAtSducUD6L4884t7e\n\tMXOKe8uyuuaxAoiSfcdWvFJIlsKyMnELGxRO/0gjYGS3bCzEC35zUUVrHu+XnEhVEot/\n\tNKDgkp3QleYV+IBNvNTttyr56Bnwx/gmUZg7gSNXdSPVohZfufZDgudJ/4ScfiOqxdx6\n\tv/cQ==","X-Gm-Message-State":"AKwxytfaH35raiVI2OiSyM7kYMmWcwNk9b6/OWHuuS1vEpl/8CWm/Stn\n\tCaH+J5Xi0l1c+g/Jigr1ueE=","X-Google-Smtp-Source":"ACJfBou5VTLSUKkSBKYngLW+c6tPxBfZkB5HetL0rKoJjuP25D7aUnNW1bn6ofUAy2xgbOf1AUxg3g==","X-Received":"by 10.200.42.196 with SMTP id c4mr14505545qta.208.1515379593394; \n\tSun, 07 Jan 2018 18:46:33 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"Paolo Bonzini <pbonzini@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussinea?=\n\t=?utf-8?q?u?= <hpoussin@reactos.org>,\n\tAurelien Jarno <aurelien@aurel32.net>, Eduardo Habkost\n\t<ehabkost@redhat.com>, Marcel Apfelbaum <marcel@redhat.com>","Date":"Sun,  7 Jan 2018 23:45:36 -0300","Message-Id":"<20180108024558.17983-8-f4bug@amsat.org>","X-Mailer":"git-send-email 2.15.1","In-Reply-To":"<20180108024558.17983-1-f4bug@amsat.org>","References":"<20180108024558.17983-1-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::244","Subject":"[Qemu-devel] [PATCH 07/29] hw/i386/pc: use isa_superio_init()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Igor Mammedov <imammedo@redhat.com>, Richard Henderson <rth@twiddle.net>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\n hw/i386/pc.c | 19 +++----------------\n 1 file changed, 3 insertions(+), 16 deletions(-)","diff":"diff --git a/hw/i386/pc.c b/hw/i386/pc.c\nindex e5c4e48ebb..f9479351f3 100644\n--- a/hw/i386/pc.c\n+++ b/hw/i386/pc.c\n@@ -24,12 +24,9 @@\n #include \"qemu/osdep.h\"\n #include \"hw/hw.h\"\n #include \"hw/i386/pc.h\"\n-#include \"hw/char/serial.h\"\n-#include \"hw/char/parallel.h\"\n #include \"hw/i386/apic.h\"\n #include \"hw/i386/topology.h\"\n #include \"sysemu/cpus.h\"\n-#include \"hw/block/fdc.h\"\n #include \"hw/ide.h\"\n #include \"hw/pci/pci.h\"\n #include \"hw/pci/pci_bus.h\"\n@@ -41,6 +38,7 @@\n #include \"multiboot.h\"\n #include \"hw/timer/mc146818rtc.h\"\n #include \"hw/dma/i8257.h\"\n+#include \"hw/isa/superio.h\"\n #include \"hw/timer/i8254.h\"\n #include \"hw/input/i8042.h\"\n #include \"hw/audio/pcspk.h\"\n@@ -1523,7 +1521,6 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,\n                           uint32_t hpet_irqs)\n {\n     int i;\n-    DriveInfo *fd[MAX_FD];\n     DeviceState *hpet = NULL;\n     int pit_isa_irq = 0;\n     qemu_irq pit_alt_irq = NULL;\n@@ -1586,11 +1583,9 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,\n         pcspk_init(isa_bus, pit);\n     }\n \n-    serial_hds_isa_init(isa_bus, 0, MAX_SERIAL_PORTS);\n-    parallel_hds_isa_init(isa_bus, MAX_PARALLEL_PORTS);\n-\n     a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2);\n-    i8042 = isa_create_simple(isa_bus, \"i8042\");\n+    i8042 = isa_superio_init(isa_bus, MAX_SERIAL_PORTS, 1,\n+                             create_fdctrl ? MAX_FD : 0);\n     i8042_setup_a20_line(i8042, a20_line[0]);\n     if (!no_vmport) {\n         vmport_init(isa_bus);\n@@ -1608,14 +1603,6 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,\n     g_free(a20_line);\n \n     i8257_dma_init(isa_bus, 0);\n-\n-    for(i = 0; i < MAX_FD; i++) {\n-        fd[i] = drive_get(IF_FLOPPY, 0, i);\n-        create_fdctrl |= !!fd[i];\n-    }\n-    if (create_fdctrl) {\n-        fdctrl_init_isa(isa_bus, fd);\n-    }\n }\n \n void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus)\n","prefixes":["07/29"]}