From nobody Sat Oct 25 08:57:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520284910669487.6438161638989; Mon, 5 Mar 2018 13:21:50 -0800 (PST) Received: from localhost ([::1]:51593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esxYL-0005fP-Op for importer@patchew.org; Mon, 05 Mar 2018 16:21:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esxWH-0004CA-NT for qemu-devel@nongnu.org; Mon, 05 Mar 2018 16:19:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esxWG-0001Tn-D8 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 16:19:41 -0500 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:38490) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esxWG-0001TP-37; Mon, 05 Mar 2018 16:19:40 -0500 Received: by mail-wr0-x244.google.com with SMTP id n7so18805458wrn.5; Mon, 05 Mar 2018 13:19:40 -0800 (PST) Received: from x1.local (ABayonne-654-1-79-224.w86-222.abo.wanadoo.fr. [86.222.222.224]) by smtp.gmail.com with ESMTPSA id g96sm12904808wrd.73.2018.03.05.13.19.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 13:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WGdaIr4uwsZpaFDn5IINoVSGD+bqXMUs64wkRtsUD2Y=; b=PV9ZgE0CPZjSEf7d0mTFiPy2YvMuGumutFkJhRtoK1p2R2NUpm6VHMBbH6sF6LYlHG ckWKNLY4H+qgnHmboUmYQaKDM6fzxH9lbZC8uYZ12IHIOUP6Uv3Eo/XsgdlGqHVBhqxY QE5sCngINSSWP8vTCmZo6vJLAilX71Bl8sTpwMAiuRdHEEgXOjPYjPM5+0G2GllVS0t/ HsrpEUx0P21K7YwdVL3JUeM6zps3YaROoFqSzZxKvanq6jsom8wGbK4Zsxc4dRTJkKhn Z9+aCPDMAqmxJ6ONkyUSUzmJQImvZ8VE0Oypk0Mv2sFg+hPCDlVq64Ym2R4ZgLhDJXw3 Ptvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=WGdaIr4uwsZpaFDn5IINoVSGD+bqXMUs64wkRtsUD2Y=; b=tumJIug2hW40LvZqLnNp0R01lb9By97gKWp+y8eaQnIJ1E4TO/mjXftpbBKBjeVSW3 zkJMg7bQ63DEq1aQ22kQA5C0SKD2AZtYeobjoW/RSRL4XGcp0gFBpoQd6iHVeRhBkV1q ckV9sW8u/bjOsnM7I0aQxb04QLvWO6/IweACfyYno6K4JcqvQEQ6OzYFhgly3vB1sbiL D+LO/YYbx0VrVgg9rZcNN7uhtYmGKoTpzuZoO+rEOadEZWx8hhdtIF7vOuagng1Jd81f AGp7ezcUgU+ESJDJiWn77dQOd++PHmaooM1aaGKuBq3XENwjsS5dnZVLALwaJuPDfo4z wWuQ== X-Gm-Message-State: APf1xPCQkvL3mvudeS0PZwYfiAuQ/e8nzcct/A5zZ97H1UtRrOjfeP8k 7j/HyhzU5I0yOcg/Ajy8E64= X-Google-Smtp-Source: AG47ELu//+q8d5MPLPVFRt1LW8qmcWUg1fugU/R7evHQBEInsisV2Cw/cCjGcBXoCTQ5xFuNYQ5s6w== X-Received: by 10.223.141.200 with SMTP id o66mr13368938wrb.39.1520284778965; Mon, 05 Mar 2018 13:19:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Aurelien Jarno , Mark Cave-Ayland , Alexey Kardashevskiy , Thomas Huth Date: Mon, 5 Mar 2018 18:19:08 -0300 Message-Id: <20180305211928.466-3-f4bug@amsat.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180305211928.466-1-f4bug@amsat.org> References: <20180305211928.466-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [RFC PATCH v2 02/22] hw/dma/i8257: Rename DMA_init() to i8257_dma_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, "open list:PReP" , Guan Xuetao , Yongbok Kim , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 - Move the header from hw/isa/ to hw/dma/ - Remove the old i386/pc dependency - use a bool type for the high_page_enable argument Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/{isa =3D> dma}/i8257.h | 6 ++++++ include/hw/isa/isa.h | 2 -- hw/dma/i82374.c | 3 ++- hw/dma/i8257.c | 4 ++-- hw/i386/pc.c | 3 ++- hw/mips/mips_fulong2e.c | 3 ++- hw/mips/mips_jazz.c | 3 ++- hw/mips/mips_malta.c | 3 ++- hw/sparc/sun4m.c | 4 ---- hw/sparc64/sun4u.c | 4 ---- MAINTAINERS | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) rename include/hw/{isa =3D> dma}/i8257.h (86%) diff --git a/include/hw/isa/i8257.h b/include/hw/dma/i8257.h similarity index 86% rename from include/hw/isa/i8257.h rename to include/hw/dma/i8257.h index 88a2766a3f..2cab50bb6c 100644 --- a/include/hw/isa/i8257.h +++ b/include/hw/dma/i8257.h @@ -1,6 +1,10 @@ #ifndef HW_I8257_H #define HW_I8257_H =20 +#include "hw/hw.h" +#include "hw/isa/isa.h" +#include "exec/ioport.h" + #define TYPE_I8257 "i8257" =20 typedef struct I8257Regs { @@ -40,4 +44,6 @@ typedef struct I8257State { PortioList portio_pageh; } I8257State; =20 +void i8257_dma_init(ISABus *bus, bool high_page_enable); + #endif diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 95593408ef..b9dbab24b4 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -151,6 +151,4 @@ static inline ISABus *isa_bus_from_device(ISADevice *d) return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); } =20 -/* i8257.c */ -void DMA_init(ISABus *bus, int high_page_enable); #endif diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 6c0f975df0..83c87d92e0 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -24,6 +24,7 @@ =20 #include "qemu/osdep.h" #include "hw/isa/isa.h" +#include "hw/dma/i8257.h" =20 #define TYPE_I82374 "i82374" #define I82374(obj) OBJECT_CHECK(I82374State, (obj), TYPE_I82374) @@ -123,7 +124,7 @@ static void i82374_realize(DeviceState *dev, Error **er= rp) portio_list_add(&s->port_list, isa_address_space_io(&s->parent_obj), s->iobase); =20 - DMA_init(isa_bus_from_device(ISA_DEVICE(dev)), 1); + i8257_dma_init(isa_bus_from_device(ISA_DEVICE(dev)), true); memset(s->commands, 0, sizeof(s->commands)); } =20 diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index bd23e893bf..52675e97c9 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/isa/isa.h" -#include "hw/isa/i8257.h" +#include "hw/dma/i8257.h" #include "qemu/main-loop.h" #include "trace.h" =20 @@ -622,7 +622,7 @@ static void i8257_register_types(void) =20 type_init(i8257_register_types) =20 -void DMA_init(ISABus *bus, int high_page_enable) +void i8257_dma_init(ISABus *bus, bool high_page_enable) { ISADevice *isa1, *isa2; DeviceState *d; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 404bb39ffd..95b3fb3523 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -41,6 +41,7 @@ #include "elf.h" #include "multiboot.h" #include "hw/timer/mc146818rtc.h" +#include "hw/dma/i8257.h" #include "hw/timer/i8254.h" #include "hw/audio/pcspk.h" #include "hw/pci/msi.h" @@ -1609,7 +1610,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *= gsi, port92_init(port92, a20_line[1]); g_free(a20_line); =20 - DMA_init(isa_bus, 0); + i8257_dma_init(isa_bus, 0); =20 for(i =3D 0; i < MAX_FD; i++) { fd[i] =3D drive_get(IF_FLOPPY, 0, i); diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index dc77b55755..0545fcd899 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/block/fdc.h" @@ -360,7 +361,7 @@ static void mips_fulong2e_init(MachineState *machine) =20 /* init other devices */ pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); - DMA_init(isa_bus, 0); + i8257_dma_init(isa_bus, 0); =20 /* Super I/O */ isa_create_simple(isa_bus, "i8042"); diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index b24305b7b4..827ffdcd4a 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -27,6 +27,7 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/isa/isa.h" @@ -220,7 +221,7 @@ static void mips_jazz_init(MachineState *machine, /* ISA devices */ i8259 =3D i8259_init(isa_bus, env->irq[4]); isa_bus_irqs(isa_bus, i8259); - DMA_init(isa_bus, 0); + i8257_dma_init(isa_bus, 0); pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_bus, pit); =20 diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index c74882c7e9..9cb86c432e 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -27,6 +27,7 @@ #include "cpu.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/block/fdc.h" @@ -1209,7 +1210,7 @@ void mips_malta_init(MachineState *machine) smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size); g_free(smbus_eeprom_buf); pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); - DMA_init(isa_bus, 0); + i8257_dma_init(isa_bus, 0); =20 /* Super I/O */ isa_create_simple(isa_bus, "i8042"); diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 61eb424bbc..b6138760e6 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -99,10 +99,6 @@ struct sun4m_hwdef { uint8_t nvram_machine_id; }; =20 -void DMA_init(ISABus *bus, int high_page_enable) -{ -} - static void fw_cfg_boot_set(void *opaque, const char *boot_device, Error **errp) { diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index ceb1ba7eaf..0ca0243821 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -90,10 +90,6 @@ typedef struct EbusState { #define TYPE_EBUS "ebus" #define EBUS(obj) OBJECT_CHECK(EbusState, (obj), TYPE_EBUS) =20 -void DMA_init(ISABus *bus, int high_page_enable) -{ -} - static void fw_cfg_boot_set(void *opaque, const char *boot_device, Error **errp) { diff --git a/MAINTAINERS b/MAINTAINERS index c0f1620f3a..335c6c9f65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -929,8 +929,8 @@ F: hw/timer/mc146818rtc* F: hw/watchdog/wdt_ib700.c F: include/hw/display/vga.h F: include/hw/char/parallel.h +F: include/hw/dma/i8257.h F: include/hw/i2c/pm_smbus.h -F: include/hw/isa/i8257.h F: include/hw/timer/hpet.h F: include/hw/timer/i8254* F: include/hw/timer/mc146818rtc* --=20 2.16.2