From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884511; cv=none; d=zohomail.com; s=zohoarc; b=d2WUg0SZcmlyo2K0pSOYlsgZGEklHZo0u6yzr8WZn7wmLj/eMgcZ3a8siPU5vw0y7U3EjlPXQ5sx2BF9J1Eyoij014YImRefYWkRyTQlT/U0z3DnAyy2G9EV9vuduWzxPx42E991LG/rhZAOdIf+tkzcmkiUueorhZWkX14u2f4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884511; 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=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=f1L5rVPCVA9kqNJOQ1CcfYWeFeW934IRmuTTNBrFx/KWzay37a8Wz87LlVrS8Z1aoF10nSyBx/v9cuFFri01KhfaS9QSXARq0oIMxr34S/LLkKQrE6pGjWL0V5/vTwv2ECirlXQDrlj94C9240ToOrhGtc05z7L7bEus6k3i1gI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884511816635.5104423311544; Mon, 20 Feb 2023 01:15:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fb-0005fl-LH; Mon, 20 Feb 2023 04:14:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FP-0005Xi-Rk for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:13 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FL-0003ja-NR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:10 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg28so401451wmb.0 for ; Mon, 20 Feb 2023 01:14:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b13-20020adff90d000000b002c3f50228afsm2765498wrr.3.2023.02.20.01.14.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=WyFW55FBx+SX8Sfu9PUlqVniIPHXR4bFEAKvxqiyXg5bbhj14tXeRvguO3HNwrERsi C48k05vsddw/0PNtFfSih+OjUqy7rX0yfXsLrasMrbKzU4l7VIPkJPiP7nQGRe8gu10X umJsRUtK0zd/A3J1GdClHcjeHirMzykf48gui0h+PNt9qFiilo/+uNtVEejiDBwHhqtQ V9uYhuxGPFK0k3OSVy+WnipyWXbDzZYTYR3y/5tsmwC9xf06OsedLvJLrzPUTFQ72Yna CC4VArW3RBB5+QU/ToN4Zi6xbPByAy3TK3xV7NfVCk+m9tVUrT0U0OvPqnKON55Su9o7 w/2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=hpAXV5MGsIvYxye2GN+obaf/nRg19mg77nBD/wMK1E2Ft9d/i3ZFI8X9UaNfhNLjff 8C7zuMt9nSjvGLjqciSm4+pyyqLLAxTgW0IiLt208qE0zNHjkD4YRQBKGoVtQ6E348eZ afHdinK2vEYIL1E/qgt7CFluYkePqYSgLXoXvRaJhZ5IWEW1Me5c4MeZx38sSV+eFH+/ /AJv/bQdGZYc93GavE3igCbBsVFAX1Dn6IxImgHjxQpc5uOieYEODU4qhjSjMn37fnze GqY3H337kf5sErCh6OVRzh4N8l+gJh9dHwELapwgWjy+DV93SNV0c3xyWoROmHjYiJEg KfxA== X-Gm-Message-State: AO0yUKXEBcvQXHuEiWg1NAGCXr6DF1NToAp9HCcs8WUoHidn5Ax0POqj 3DNLvpgG6K28CLeO0OBteGCurvTpE6mmpeVU X-Google-Smtp-Source: AK7set+ttxMO8CM69nAYXXOVx/A4xcnaQbgnUl2oWnaNoITFoBw+2NIP/RoGkKo/FECmgO8G2vJFlA== X-Received: by 2002:a05:600c:1d0b:b0:3d2:2d2a:d581 with SMTP id l11-20020a05600c1d0b00b003d22d2ad581mr245290wms.30.1676884445575; Mon, 20 Feb 2023 01:14:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 01/24] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Date: Mon, 20 Feb 2023 10:13:35 +0100 Message-Id: <20230220091358.17038-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884513000100003 From: John Snow I have not been able to give these devices the love they need for a while now. Update the maintainers file to reflect the truth of the matter. Signed-off-by: John Snow Message-Id: <20230206182544.711117-1-jsnow@redhat.com> Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fd54c1f140..0612fff63b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1791,7 +1791,7 @@ F: hw/misc/edu.c IDE M: John Snow L: qemu-block@nongnu.org -S: Supported +S: Odd Fixes F: include/hw/ide.h F: include/hw/ide/ F: hw/ide/ @@ -1816,7 +1816,7 @@ T: git https://github.com/cminyard/qemu.git master-ip= mi-rebase Floppy M: John Snow L: qemu-block@nongnu.org -S: Supported +S: Odd Fixes F: hw/block/fdc.c F: hw/block/fdc-internal.h F: hw/block/fdc-isa.c --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885400; cv=none; d=zohomail.com; s=zohoarc; b=EoLccnuLgI/xf/DgQ7fmgjLG46klicJjVYoBreqJAVQ4pwkXfl28Q6Ar+ZCtivd2we9iVwL8ifZIf1DxDxiga+c6pJfPSnA8uSAzEe+xnSQwRlmVC64sQPTEfXAQYn9smvIUtZEm1wduekrQ05Pr2CzGIWiaLnUA4az7g+F4dIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885400; 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=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=krMxQ/d7rvXQJhixNF8qMWYgAG1m/8MDCFHnISV6oMWcJQTBYdtTZJMrdw39t3bHabSTYhBt+3y9N3cEF6M3hP2i8lPY05ZFLoH7YpSHDR5I/MngeeI2bPpzz2n2kGs3QA1MzkywZ5KpXBWrlEFU27U5ovdCvTVUgsotlP1pPIQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885400587661.447733073298; Mon, 20 Feb 2023 01:30:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2FZ-0005al-Ld; Mon, 20 Feb 2023 04:14:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FT-0005Yg-7F for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:16 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FQ-0003kM-3N for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:13 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1924009wrd.3 for ; Mon, 20 Feb 2023 01:14:11 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n3-20020a5d67c3000000b002c59f186739sm1919995wrw.23.2023.02.20.01.14.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=ixQoK3vRNaLvZtGNYpq6vHbDKkGj/0dNxU6uYwWZvItEbg6p9W3FTZXmoDwwoAFFUn jtbbkgjQRIcynPUQSdZT8oN8QzGxTuamy9z37kOpC8+iHtgNpRqvXlxFG77Hl+lITss2 p330O5RlMIKwt6Akg0Y08+gtBaDn6TxtoyjqadVVA++h50YytsfFCXITKc4mWbpuJ5fj UrwXJcLt/DFwk0Zg1SqwaQ7CIkTWfUIE4pPMpwGYhX7l4EqxdSiay8MAAv4MT7fSLVOa 0/je56tDs4DBt6hvjrabCPxE8W1Ub6O26DiHD7Ppfkxt0TLjqPWuHw/lz/GRCaqKo964 WTwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=QHiODLg57Z3xpGNVpRg9X389QCWeoRSG/2pvB00IFWndX4n6w7R5Hul7QltHBfAfOY 5XG56DrtijWGFCiGhIlcPUMUdN9/+XzOiG6QIXvYJi7vDAN6yfuYU8LMi1PRNWC8PP9x jqfkgMCwrkkU2TVnE7ks2nfbcSlVDdlOU1snGQX1HUDHqH90bTeP/Zp4M6zS/+6Wx8Zr OhJgU9U4g8ZF0czlK/T28Id54AEom0TzynH6KM4UJ3B9anXGlrdFQw8MscPdDhMSlITY FEWzSbS7mhVJG27cFU+FkzmPdpV6FFZimgvb9hcyOZBX2yqvHiCKO6CsmBFkfNWHciqe GCSg== X-Gm-Message-State: AO0yUKXHkV52nF/CRNdyVjGBMY/6go1JsAPT7qccSRbg0lBeHh8dwEG1 mV1m7wndFTl+NFLj+ZRD6c7DtvEORxj3/dgB X-Google-Smtp-Source: AK7set/z5aT1cKNFWuZwZhqQPPoMCy4H4EZtUMttfpcYX5au4pVioT1jHAAQ4kzAT3nMbhEXXCPi9w== X-Received: by 2002:adf:dd86:0:b0:2c5:a370:df65 with SMTP id x6-20020adfdd86000000b002c5a370df65mr528344wrl.10.1676884450408; Mon, 20 Feb 2023 01:14:10 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/24] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Date: Mon, 20 Feb 2023 10:13:36 +0100 Message-Id: <20230220091358.17038-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885402444100001 Following docs/devel/style.rst guidelines, rename MMIOIDEState as MmioIdeState. Having the structure name and its typedef named equally, we can manually convert from the old DECLARE_INSTANCE_CHECKER() macro to the more recent OBJECT_DECLARE_SIMPLE_TYPE(). Note, due to that name mismatch, this macro wasn't automatically converted during commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e --- hw/ide/mmio.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index fb2ebd4847..c33d42437f 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -40,11 +40,9 @@ */ =20 #define TYPE_MMIO_IDE "mmio-ide" -typedef struct MMIOIDEState MMIOState; -DECLARE_INSTANCE_CHECKER(MMIOState, MMIO_IDE, - TYPE_MMIO_IDE) +OBJECT_DECLARE_SIMPLE_TYPE(MmioIdeState, MMIO_IDE) =20 -struct MMIOIDEState { +struct MmioIdeState { /*< private >*/ SysBusDevice parent_obj; /*< public >*/ @@ -58,7 +56,7 @@ struct MMIOIDEState { =20 static void mmio_ide_reset(DeviceState *dev) { - MMIOState *s =3D MMIO_IDE(dev); + MmioIdeState *s =3D MMIO_IDE(dev); =20 ide_bus_reset(&s->bus); } @@ -66,7 +64,7 @@ static void mmio_ide_reset(DeviceState *dev) static uint64_t mmio_ide_read(void *opaque, hwaddr addr, unsigned size) { - MMIOState *s =3D opaque; + MmioIdeState *s =3D opaque; addr >>=3D s->shift; if (addr & 7) return ide_ioport_read(&s->bus, addr); @@ -77,7 +75,7 @@ static uint64_t mmio_ide_read(void *opaque, hwaddr addr, static void mmio_ide_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - MMIOState *s =3D opaque; + MmioIdeState *s =3D opaque; addr >>=3D s->shift; if (addr & 7) ide_ioport_write(&s->bus, addr, val); @@ -94,14 +92,14 @@ static const MemoryRegionOps mmio_ide_ops =3D { static uint64_t mmio_ide_status_read(void *opaque, hwaddr addr, unsigned size) { - MMIOState *s=3D opaque; + MmioIdeState *s=3D opaque; return ide_status_read(&s->bus, 0); } =20 static void mmio_ide_ctrl_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - MMIOState *s =3D opaque; + MmioIdeState *s =3D opaque; ide_ctrl_write(&s->bus, 0, val); } =20 @@ -116,8 +114,8 @@ static const VMStateDescription vmstate_ide_mmio =3D { .version_id =3D 3, .minimum_version_id =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_IDE_BUS(bus, MMIOState), - VMSTATE_IDE_DRIVES(bus.ifs, MMIOState), + VMSTATE_IDE_BUS(bus, MmioIdeState), + VMSTATE_IDE_DRIVES(bus.ifs, MmioIdeState), VMSTATE_END_OF_LIST() } }; @@ -125,7 +123,7 @@ static const VMStateDescription vmstate_ide_mmio =3D { static void mmio_ide_realizefn(DeviceState *dev, Error **errp) { SysBusDevice *d =3D SYS_BUS_DEVICE(dev); - MMIOState *s =3D MMIO_IDE(dev); + MmioIdeState *s =3D MMIO_IDE(dev); =20 ide_init2(&s->bus, s->irq); =20 @@ -140,14 +138,14 @@ static void mmio_ide_realizefn(DeviceState *dev, Erro= r **errp) static void mmio_ide_initfn(Object *obj) { SysBusDevice *d =3D SYS_BUS_DEVICE(obj); - MMIOState *s =3D MMIO_IDE(obj); + MmioIdeState *s =3D MMIO_IDE(obj); =20 ide_bus_init(&s->bus, sizeof(s->bus), DEVICE(obj), 0, 2); sysbus_init_irq(d, &s->irq); } =20 static Property mmio_ide_properties[] =3D { - DEFINE_PROP_UINT32("shift", MMIOState, shift, 0), + DEFINE_PROP_UINT32("shift", MmioIdeState, shift, 0), DEFINE_PROP_END_OF_LIST() }; =20 @@ -164,7 +162,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *= data) static const TypeInfo mmio_ide_type_info =3D { .name =3D TYPE_MMIO_IDE, .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(MMIOState), + .instance_size =3D sizeof(MmioIdeState), .instance_init =3D mmio_ide_initfn, .class_init =3D mmio_ide_class_init, }; @@ -176,7 +174,7 @@ static void mmio_ide_register_types(void) =20 void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1) { - MMIOState *s =3D MMIO_IDE(dev); + MmioIdeState *s =3D MMIO_IDE(dev); =20 if (hd0 !=3D NULL) { ide_create_drive(&s->bus, 0, hd0); --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884502; cv=none; d=zohomail.com; s=zohoarc; b=dpOzqR9SyUhFP+EKIr8fzu4vt4NRpQ7hKj5/dab35t9ofIgMnn+Ter6V33yxXb5EOnxATYfCr+KzD2z24+Ps1XwHRqvqqq1ppWxshQjIoIp3T8udEj2NJkaFQNZkANVpLLYBQjq9JnXIuEnmPkVwrpDDhm03NmohApZvF5Z+F4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884502; 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=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=DvEyS9YS86u+kvP2SERe06fLfdBOGjT0raf3xUgAiKf1YAy96VEaDNNunhaI6eUeYbIr+pv9ey/LwkUfUbGUStK4emkyje8iNv/KI+frZ5zl7+u6B422yF0a6jid3vIu4BusE8sw8AfuqLZ/mtUjR3pe4xrjp83neyHva+QznQQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884502946993.847909822275; Mon, 20 Feb 2023 01:15:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fb-0005g5-UF; Mon, 20 Feb 2023 04:14:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FX-0005ab-QR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:20 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FV-0003ly-8l for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:19 -0500 Received: by mail-wr1-x42c.google.com with SMTP id t13so254682wrv.13 for ; Mon, 20 Feb 2023 01:14:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b11-20020adfe30b000000b002c573a6216fsm11911601wrj.37.2023.02.20.01.14.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=E4kzdFZElZdBHc1j5MrlE89N7qaa4yexo/AxhYkWB593YndVBY+dsR0H0jYdvViQOA SROuqjlQY/pHYRp7d954cKLIl7KF/qBOvzSWb5cvo2De2gUcFDt4c9aRLaUp4ZozpNkP KZaStCdzw2+9LqrQuuH8fOk6AlTsk1PH+/8h2Z3Aom6PA2oJQkxnN/rhqThOe46jMce8 pqxEAp/6ruXfFnL01b21RBvMTfKwYS7IFdFrxBBWaflDKgf/oO8Ifj6uoMJK/+0FT0Ui 5OgRWucFcEzSolEtoyszDecoq90jAJIbVAllf77SWPvMRYUY4q2Dr881f0BZYaZ7yuZk weIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=llgDR1QoL3hcHNWoK27TOMuRRJVXeTP86L9MK6mI7olJflPNvnh4PqpPh1x/UpDUfH O9W3zPqtjEDPeb9SDbZ93NuzCsyyumoJNz1GMI7Va9v3mjnJWkQwuzwArUvBjXq4cd5q S4ZdWSWoADLL3p/ygOCiMKSpDoV0wYayOotjhAQyyAZGrwpp9g/ELH/HEVAOJtJFvkwX rPiN7X3S9jHY4014OpjjDYoG/SpsFXISb2GiCXfomUZplJmddgbDGi+7ENSrmlivTTH/ S2Trfbnau3dn+/LgK+kYG6tSWce3efcr/lQn0i2WUyPWiAf7L0/YQCmP9tw3EtOKGcdw goVA== X-Gm-Message-State: AO0yUKUnWNTgLU2CQXlzGZpqavFYuwxK5OWT1E+Cf96GUm1TpH8T4EEI hTJlkFF9ttOPam5UbkX3PlbRB7NDSC/W4f8J X-Google-Smtp-Source: AK7set/tmrcSRyxp53OiIqFH0gWMA28qGaCvciLvxUnS99dokxSCCh1iO4+PJzJsj9i/PwZeHlrNMA== X-Received: by 2002:a5d:4e49:0:b0:2c3:e4f5:18c with SMTP id r9-20020a5d4e49000000b002c3e4f5018cmr302337wrt.30.1676884455709; Mon, 20 Feb 2023 01:14:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Yoshinori Sato , Magnus Damm Subject: [PATCH v2 03/24] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Date: Mon, 20 Feb 2023 10:13:37 +0100 Message-Id: <20230220091358.17038-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884504973100003 "hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Message-Id: <20230215112712.23110-4-philmd@linaro.org> Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/mmio.c | 5 +---- hw/sh4/r2d.c | 4 ++-- include/hw/ide.h | 3 --- include/hw/ide/mmio.h | 26 ++++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 include/hw/ide/mmio.h diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index c33d42437f..8b2ba604c5 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -29,9 +29,9 @@ #include "qemu/module.h" #include "sysemu/dma.h" =20 +#include "hw/ide/mmio.h" #include "hw/ide/internal.h" #include "hw/qdev-properties.h" -#include "qom/object.h" =20 /***********************************************************/ /* MMIO based ide port @@ -39,9 +39,6 @@ * dedicated ide controller, which is often seen on embedded boards. */ =20 -#define TYPE_MMIO_IDE "mmio-ide" -OBJECT_DECLARE_SIMPLE_TYPE(MmioIdeState, MMIO_IDE) - struct MmioIdeState { /*< private >*/ SysBusDevice parent_obj; diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 39fc4f19d9..7aaa11b748 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -38,7 +38,7 @@ #include "hw/qdev-properties.h" #include "net/net.h" #include "sh7750_regs.h" -#include "hw/ide.h" +#include "hw/ide/mmio.h" #include "hw/irq.h" #include "hw/loader.h" #include "hw/usb.h" @@ -283,7 +283,7 @@ static void r2d_init(MachineState *machine) =20 /* onboard CF (True IDE mode, Master only). */ dinfo =3D drive_get(IF_IDE, 0, 0); - dev =3D qdev_new("mmio-ide"); + dev =3D qdev_new(TYPE_MMIO_IDE); busdev =3D SYS_BUS_DEVICE(dev); sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); diff --git a/include/hw/ide.h b/include/hw/ide.h index 60f1f4f714..5f8c36b2aa 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -8,9 +8,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 -/* ide-mmio.c */ -void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1= ); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/mmio.h b/include/hw/ide/mmio.h new file mode 100644 index 0000000000..fccfd17c79 --- /dev/null +++ b/include/hw/ide/mmio.h @@ -0,0 +1,26 @@ +/* + * QEMU IDE Emulation: mmio support (for embedded). + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ + +#ifndef HW_IDE_MMIO_H +#define HW_IDE_MMIO_H + +#include "qom/object.h" + +/* + * QEMU interface: + * + sysbus IRQ 0: asserted by the IDE channel + * + sysbus MMIO region 0: data registers + * + sysbus MMIO region 1: status & control registers + */ +#define TYPE_MMIO_IDE "mmio-ide" +OBJECT_DECLARE_SIMPLE_TYPE(MmioIdeState, MMIO_IDE) + +void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1= ); + +#endif --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884951; cv=none; d=zohomail.com; s=zohoarc; b=kOpPmWtkPBm2Syuh7BLYGrrSUS9nNNOPn5HRzyXqDMiQwPi1H2D6pjPsWOBS3mG5YMtl5tTrAt9ASY0IZAJdPJ35SYLrduoJzISXUTaBnQguXPba1mIs3MQCBIfF6uJfOzJgK8h2/fi2Ush+1HH89XSOSjPiVZIAkNQOrs4V8tY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884951; 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=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=c51V3B++QvgaB9s39BawIDJQkqAWkKlUI+8I+w+1FOOF0q3jaX80kWa4h5geJ51iL5974bAKvqGo9vbXdB233JZt3Gj7XQu7TjTXwS5smr9lfYVfcAL6v4jx01WWsVRVWiNe06hrAIEFx5R8AnNpGH+Ga1N+2VstjVjSpqG7tsU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884951789590.1792429240153; Mon, 20 Feb 2023 01:22:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fe-0005iT-TX; Mon, 20 Feb 2023 04:14:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fc-0005gA-E1 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:24 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FZ-0003jX-ID for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:24 -0500 Received: by mail-wm1-x330.google.com with SMTP id p26so401013wmc.4 for ; Mon, 20 Feb 2023 01:14:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id iz7-20020a05600c554700b003e203681b26sm12951069wmb.29.2023.02.20.01.14.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=Oi9fRADPm4mQ8QrjNJxO44msZ0Sf8oIfHEOgcSvoLovJY7fbrdgwbniIRpeg0WNopY VpTGpueMEbNCTXm/EjH/pxTc5O944Nw6i2NKvh/wGYAa022smOtlET9sJcnhOyukGff8 ltAWS61M8D9QAcdanizxg7Msc2FRj86hJaDeVpjQKL0v8+ICH9NAsT9YO3MA6OsFoHCX RqXG8ITslUay9WNEc9tsWxMYQxmZc4buxdEOI0ozWKMwZky5ulHwNKO+2+2YtDXmrnMO 6gfMGO0OANcsXmELhHCMuxF2pgBlN/onmRGKpxf09TxmX466I/KcBo63XqaPjkrXVnXr 6Mzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=j42toklmWM6BSHeiPaTv5BengbjLKbLZ0qSYiG6q4q5LoemvV17eAIprjYZjEMIuAO nm0+4PEuRDzxH+/0gobbBzCASC99kDDiBVCFOe1VEpYEXXNX2EoqsP8rMq0pPfwP66G8 YYd85XRZ12MKP5Fqt+wrcQ5SoMO/b374WL6ZNaQWe4655TMf9OGI0CDHxSFrfJNEDO6f 5oOOAr0uoxq9NsQ07FZA1birLbAzGQjA+9lPJZytkW9ld+VDXMrQq48N3kucy2z0qCu+ ftVVXbQQJNXmn24GZg4tf/bVq7LtyEy1XGca97lcia57Y7jvqfMXf4SM9OaUosw2uTdp a4VA== X-Gm-Message-State: AO0yUKWX/VOuyOaLege9QUJTpZthAj9lfq/6cn4+opZmT1xSKtXHHt6D ARf6r0OiHycSIFUcLxh3tJkj/26llb0zGmEI X-Google-Smtp-Source: AK7set9Baa/3uU++PA7fRqyFz/kUcqS8U84vDPhkQokXp64nwnX/y6i3QN7mznin3SgeUIDrFJKwDA== X-Received: by 2002:a05:600c:4487:b0:3e2:1ddf:7452 with SMTP id e7-20020a05600c448700b003e21ddf7452mr7877108wmo.5.1676884460618; Mon, 20 Feb 2023 01:14:20 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Bernhard Beschow Subject: [PATCH v2 04/24] hw/ide/isa: Rename isairq -> irqnum Date: Mon, 20 Feb 2023 10:13:38 +0100 Message-Id: <20230220091358.17038-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884952503100001 Rename ISAIDEState::isairq as 'irqnum' to emphasize this is not a qemu_irq object but the number (index) of an ISA IRQ. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow --- hw/ide/isa.c | 10 +++++----- include/hw/ide.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 8bedbd13f1..b434cbd0e9 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -46,7 +46,7 @@ struct ISAIDEState { IDEBus bus; uint32_t iobase; uint32_t iobase2; - uint32_t isairq; + uint32_t irqnum; qemu_irq irq; }; =20 @@ -75,13 +75,13 @@ static void isa_ide_realizefn(DeviceState *dev, Error *= *errp) =20 ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq =3D isa_get_irq(isadev, s->isairq); + s->irq =3D isa_get_irq(isadev, s->irqnum); ide_init2(&s->bus, s->irq); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_register_restart_cb(&s->bus); } =20 -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1) { DeviceState *dev; @@ -92,7 +92,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, dev =3D DEVICE(isadev); qdev_prop_set_uint32(dev, "iobase", iobase); qdev_prop_set_uint32(dev, "iobase2", iobase2); - qdev_prop_set_uint32(dev, "irq", isairq); + qdev_prop_set_uint32(dev, "irq", irqnum); isa_realize_and_unref(isadev, bus, &error_fatal); =20 s =3D ISA_IDE(dev); @@ -108,7 +108,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int io= base2, int isairq, static Property isa_ide_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0), DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6), - DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14), + DEFINE_PROP_UINT32("irq", ISAIDEState, irqnum, 14), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/include/hw/ide.h b/include/hw/ide.h index 5f8c36b2aa..09fe169ebb 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -5,7 +5,7 @@ #include "exec/memory.h" =20 /* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1); =20 int ide_get_geometry(BusState *bus, int unit, --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885026; cv=none; d=zohomail.com; s=zohoarc; b=PD6jkC5wz7AbRLhPVXTVNIlQ9dQsvw2uANql9bMehZ6dwVPBBiS9sLIE/rijhLoeavTlvtNESdpPyzf4hcA6scUVd3WLAAmOvf9eQ+LTxGeT8+EeclyKyiKytBFqVEA4D+MXspe+spaJBBiRsJpQakXXYQhjwCMMKr8ITlphJJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885026; 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=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=JAJJFlVqz/JLfVef1jQV3l4t0Fm2zzgRCFw8sibczHJJdV+wHjP1UNmfIAK4+WEYam+4wib8Z0eJZc88jN6bhAsVBdSeqXqsMBsTR5VyKLYtY+37jZ3PR+cDCzxoKeNlZ5NEf/qu/UwZTFj3WbRrYi1jW2fKMS+oi5fBk9N+Ikk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885026103919.9008355146714; Mon, 20 Feb 2023 01:23:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fk-0005kr-CZ; Mon, 20 Feb 2023 04:14:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fi-0005jR-3P for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:30 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Ff-0003kI-GP for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:29 -0500 Received: by mail-wr1-x434.google.com with SMTP id c12so335618wrw.1 for ; Mon, 20 Feb 2023 01:14:27 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t18-20020a5d42d2000000b002c6e84cadcbsm3269545wrr.72.2023.02.20.01.14.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=XCDUjcHuEbgCSljkHsgBVm/zGTIHWv+GsfReiRoxG6rvFyhyPO083Lj0aEEvaLeBcA Xn9jtHnoqxEaN4H5qsKzqpS+oVWMfuxmL7b+jnhciZn7OQrPCFpQ5u1UfGsG26GGgCKS TQo2NrXbnSeS26JG5oTxfury4UNvl7tIU56ulgq3IUJ3uTbmSYOC85htlTYtub8ZdDuN 2TzVRNyIuyX5NKGILlPxJZoi85Mck7ETDYSIe4+VElDscQxV0G8tt/6nXIKBPiL9S9/x svJbnmJDU2CoSOkCwyCnvTNzzA6rW/W4TaGpSw0+i/YNlyppuevuAWMObVk517f1bzxd RV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=s2sxemjZM4xP/xDQ3/uH0RZYbF5oN1qPX+6UffbyO6rkZrviUIsH9fi541VyHK0eJG K+DPqVPCwipDw0lU6LePVUJ+hhbI4el/TD3aWF9e8zyh4qnT340lFo/kgalOYSOqa4ey A1GV1aqOLYRtbQFfOsXkWtMqmd36iuxxq1jmdX7joqP47nAyiBL9kyrIYlhGM+uQhfnj mTbOA3GqMwBuSTAQ75d+f9nwhi697fvX6DH29RSAgXvXiHHEqV3dTNPlC3bkEdjSTcUz WTKlXu19q18JxyIjuSBObBUwW6HpVQOx6RbVnO1bcsiwISQD7hBtWsMm2m7LVd6zSeav McDg== X-Gm-Message-State: AO0yUKWveSY2HzfhJXBRYczR3vmLSa98YfyyNbmMRjsgYfJPDXqRy9HO ae22QkJkVphriN5t1TNDlm12iJKe9fvCzOVa X-Google-Smtp-Source: AK7set+Rr191RGPP8LzegFiawE0/F6gJSgqZ+k1S5eBA/dddEZL/wVFA7wjJ96v26OJ2HQUMnZhzHw== X-Received: by 2002:a5d:66cf:0:b0:2c6:e824:7a5e with SMTP id k15-20020a5d66cf000000b002c6e8247a5emr2183303wrw.34.1676884466560; Mon, 20 Feb 2023 01:14:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Bernhard Beschow , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v2 05/24] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Date: Mon, 20 Feb 2023 10:13:39 +0100 Message-Id: <20230220091358.17038-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885026850100002 "hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/pc_piix.c | 1 + hw/ide/isa.c | 4 +--- include/hw/ide.h | 5 ----- include/hw/ide/isa.h | 20 ++++++++++++++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 include/hw/ide/isa.h diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df64dd8dcc..7085b4bc58 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" +#include "hw/ide/isa.h" #include "hw/ide/pci.h" #include "hw/ide/piix.h" #include "hw/irq.h" diff --git a/hw/ide/isa.c b/hw/ide/isa.c index b434cbd0e9..5c3e83a0fc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -31,15 +31,13 @@ #include "qemu/module.h" #include "sysemu/dma.h" =20 +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "qom/object.h" =20 /***********************************************************/ /* ISA IDE definitions */ =20 -#define TYPE_ISA_IDE "isa-ide" -OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) - struct ISAIDEState { ISADevice parent_obj; =20 diff --git a/include/hw/ide.h b/include/hw/ide.h index 09fe169ebb..24a7aa2925 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -1,13 +1,8 @@ #ifndef HW_IDE_H #define HW_IDE_H =20 -#include "hw/isa/isa.h" #include "exec/memory.h" =20 -/* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, - DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h new file mode 100644 index 0000000000..1cd0ff1fa6 --- /dev/null +++ b/include/hw/ide/isa.h @@ -0,0 +1,20 @@ +/* + * QEMU IDE Emulation: ISA Bus support. + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ +#ifndef HW_IDE_ISA_H +#define HW_IDE_ISA_H + +#include "qom/object.h" + +#define TYPE_ISA_IDE "isa-ide" +OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) + +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, + DriveInfo *hd0, DriveInfo *hd1); + +#endif --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885272; cv=none; d=zohomail.com; s=zohoarc; b=BqJvuhSgMmAF+Zm+2Ew9L1gxaXRC72JmY9idJTiLv58BTa07dmrWNZ5j1rN9InQ8Ze4dIB7vFA43Vam3Evtw9Y/VX3mtrSz4kDxyXRXnXrYMdHQ9pKD6rPhMrjJEoWZm7tz/NiiDBXTK0pueDzAa2QQluZZQgPvOWIWKopyLj2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885272; 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=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=YP+fIbYugpRPWCqVVowBxRYS/Hj0RxhpYwVphYBGbO6+kOjZBrnSMASv1zvDp4bxoKxwBPVkoaLbG0QiejES4Aed1EIdxaAmpCsxRAONBK0WLm1JriKBItOBkxgDP44LQ/oaJQTT2m0Ml3pLqw9CUeqeZ64ufTKp8ochJ2MqG6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885272458591.6994741858921; Mon, 20 Feb 2023 01:27:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fp-0005n0-1a; Mon, 20 Feb 2023 04:14:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fn-0005lU-9q for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:35 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fk-0003id-L9 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:34 -0500 Received: by mail-wr1-x435.google.com with SMTP id r7so163386wrz.6 for ; Mon, 20 Feb 2023 01:14:32 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a17-20020adffad1000000b002c54e26bca5sm4973762wrs.49.2023.02.20.01.14.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=BEYq2SwcM7Ko/Qtg515nOgnqfSctUE4pkYwordb0fLF6n6vhWQcfA8GoLMftdYevkC 3LSdCAvnyeXfjBUnN+RFKQutgg/jwrIyuxweJxPmiRUB0qUsRqMHcTJcfZyx/OpxXfyp o7sqTjqMZ2uLMbJcL0L782wvcSJtlREKpwTKBWvYQaCvU8dcPBtMp07P3NzELHT8jIA/ a4+8pyxxxuGEUe5L8O3fnbl+L144XTEsnGLOb+xBc/uWJiPyg9EV4btsqkYJyXIkgz4Z +baqrve1pKbRsiPMWJbtSc4TaZCbZz9IgB8pqWCyE69HPXzsdNBAK0yqb079lh4e9Y8W gOqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=UElhwZXG6Nd5x4xztqMWp7gG7aNGPtzlR7FUcuZMVHzwD8e3gtnIkwob8yoyxyVgKj ikt/Mgai7kWtL4pxXkAAsxyu91t4daAGZLoOPHN9XW/UV8Zr8gHZFxBZeUZnjNvCqE9a iuG+hUKtwI4Gh9Pfx672ZxKS71CHJqT7fhcfH3nEPBO1lP7wepaqNxidhvG8GbCr/uMw nBY94K1SREnv3rkBwPZjGqM8XMw94OHdM2v5qQKw7c1zisRgRlNU0D5VtJnlJSQsphI6 E9WG6uSehpqzA7n0kKKdz/d2AmN29pYmRbrdTVqpbkrIgdMBt12JO2bOrhf5TRRf7jyM wFiQ== X-Gm-Message-State: AO0yUKUKkN9i44gmhCnIc4pwaInWMpdtV8g8iNC+H//sYWQskJ6RVF7v EMCMmfJb6LkeafQFDKvyJrcC9EA7Us3Ith8t X-Google-Smtp-Source: AK7set+Nvgv/LG5W2gmS43y1+mKRxTbC1Z7E9G1pm0S8UyZ1hY4+pdcrMK3K7OEgGYjQ/NV/JLOraQ== X-Received: by 2002:a5d:6b83:0:b0:2c5:77de:426b with SMTP id n3-20020a5d6b83000000b002c577de426bmr51913wrx.60.1676884471696; Mon, 20 Feb 2023 01:14:31 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , Richard Henderson Subject: [PATCH v2 06/24] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Date: Mon, 20 Feb 2023 10:13:40 +0100 Message-Id: <20230220091358.17038-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885274007100001 The intermediate ISAIDEState::irq variable just add noise, remove it. Message-Id: <20230215112712.23110-6-philmd@linaro.org> Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 5c3e83a0fc..ad47e0899e 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -45,7 +45,6 @@ struct ISAIDEState { uint32_t iobase; uint32_t iobase2; uint32_t irqnum; - qemu_irq irq; }; =20 static void isa_ide_reset(DeviceState *d) @@ -73,8 +72,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **e= rrp) =20 ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq =3D isa_get_irq(isadev, s->irqnum); - ide_init2(&s->bus, s->irq); + ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_register_restart_cb(&s->bus); } --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885436; cv=none; d=zohomail.com; s=zohoarc; b=hn7VLe4aD0Uwd8zb2fctULs3WSOT1lYNkGMehblfJ0TcjyHGoryWUFTLDe2K1GuAT1ndg08d/ZlqIU+tt9P3tY5HMX6H6TkkVDe+S+LTfXcHUCFlP0faTts22zJw2bvsshsK0AyxpEtaEfL2PGdI2xBoWAXddbxuXWonfsrWPf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885436; 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=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=kjoqzg2seVLoYZxAji3bqv0yJGU1gPeoKWCx6+14ugM0GrupEWf69ifXV7NTi0fjrtvyMPe4y+0fmAhwwrz+Nn6PmGyf766bMZzWhd3gACSJJfzew7p9EgccMqddoEMg8IbZfjWYKH30Hxh3ZR/wZn+jLLz/02w+80YCSftS6P8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167688543629584.64505386612439; Mon, 20 Feb 2023 01:30:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Ft-0005oc-CH; Mon, 20 Feb 2023 04:14:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fr-0005na-0e for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:39 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fp-0003nx-Ft for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:38 -0500 Received: by mail-wr1-x432.google.com with SMTP id p8so467435wrt.12 for ; Mon, 20 Feb 2023 01:14:37 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w15-20020adfec4f000000b002c54241b4fesm5428562wrn.80.2023.02.20.01.14.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=VMMF68IfCFBiDNEPh2dFsd5bYegYPyfqkTAd6Wm+uAcTN42e87fDZX7tljlFHKUz0r nCjsFJ42bcvyhzqmbdvKRRqjFWLeStLnTwoXMLZW/Df1KPOfunFVQazS/XZzPWoBt812 wCh6metLi+npgDYELGFsfAKpKaPfO/WwqZLpXr8KOznKfl/pKXogh1NPNX0sqgM8hRsz cio9jLxRR12hIfD3eCgkEHoOnGO9HmRYxSmVoBVv7mRCa4nyiHT+U913l4hhDnXiKMTA 3FWtqdenLKc0TBxDWiiEMCyH6ZvQ7UQUKA4Di0tDsaEDba+2rMRIanbahdFYTQTr6QSV c2+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=P5mItirDn6hHGeMN2si2lCGfYN1EwrNjVhIYETjppyahOhwcl6uuCJ/6gafmhBkraW leV4UPQ+diIFdaPOKnGyCDsfUtjscZhZUCIvGpSvXASgwQzTa0HUWqyUrZNGAfnCer/7 xH+YecyCvrHnNAavBYcsU224CkqurI8zsVjL9i6MnFqS8JBRE84Q3B0QzQGHwuuqJ3W6 rPtZVG7zL7ZsUGZy7mCwI00ekFq+bW3s3brcId6CWC+VqG52jLDjRt2oJL8GlB4p+GlJ iUDznKUFMnFVPkg/68R8H1n8+Tz11eo46ll/62ki8nwNE2cSjzgrTL/X4Y1eJ/AMThdP W/7w== X-Gm-Message-State: AO0yUKVIGnFHtqA2ggZuEnL7orvwYet+ZCj3Wl9WgmxKZVIaRJW0HwMp U1K48jV7qzgAjd9JvQ1z4U6glphVj1u2PexM X-Google-Smtp-Source: AK7set+DqnVCp6r34paNc3EB7u3lBl1uk3qnFaofMI4Pt9jycEDbc1to+tcUudwi65nxFddVPascWg== X-Received: by 2002:a5d:5e93:0:b0:2c5:5297:24ae with SMTP id ck19-20020a5d5e93000000b002c5529724aemr1418808wrb.2.1676884476580; Mon, 20 Feb 2023 01:14:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 07/24] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Date: Mon, 20 Feb 2023 10:13:41 +0100 Message-Id: <20230220091358.17038-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885436925100007 Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-7-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- hw/ide/atapi.c | 1 + include/hw/ide/internal.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 0a9aa6f009..0c36bd0afd 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -27,6 +27,7 @@ #include "hw/ide/internal.h" #include "hw/scsi/scsi.h" #include "sysemu/block-backend.h" +#include "scsi/constants.h" #include "trace.h" =20 #define ATAPI_SECTOR_BITS (2 + BDRV_SECTOR_BITS) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index fc0aa81a88..29a8e79817 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -13,7 +13,6 @@ #include "hw/isa/isa.h" #include "sysemu/dma.h" #include "hw/block/block.h" -#include "scsi/constants.h" =20 /* debug IDE devices */ #define USE_DMA_CDROM --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885228; cv=none; d=zohomail.com; s=zohoarc; b=XzZyv2YLzLCy3xW/h9at8YMvoGcqv+9+e8oa1WyQxLv6+7Bb6tevBoH4KYVNfnFWGG8xqSBbhI9F6H10MyK8VofDzELY2vPDos6BiQbGXem9L0OcTnJFsiHYz/C2PTiUajTRL2BuK80lvlaO04LCctHMMx4xSQ6tsHAJIoNEBL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885228; 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=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=fb2WmRfMqRGFEnmNnZ7svoog7z3Zqi8ysE4LZ8uiFp9ezSg9Q8Qrwj1gUhtGF4LN3fdsXPkNwi1lk86LYds1WTCjAXUrKm/YqI5KuRz+7hHbHYL0+dwEiqS98CR2MB7tGYla470a8rsFyZg6t4kRzGPO7tQz88sxwj72w1WQJtU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885228563313.62916795553554; Mon, 20 Feb 2023 01:27:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2G0-0005y0-1Y; Mon, 20 Feb 2023 04:14:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fw-0005qh-Tg for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:44 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fu-0003kM-Ab for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:44 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1925643wrd.3 for ; Mon, 20 Feb 2023 01:14:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j1-20020a05600c410100b003dec22de1b1sm13328503wmi.10.2023.02.20.01.14.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=e6MUYLMqWdLWeqQZMf2Hw3csPi3Px7nSr8ih0whFq60tzAMtGHRUyodHL8wHXicFOV bKYGQRAAGCNMxPxIjBhVSPDrfQ/M1FA8qpG/ntTPviYpvZTk79xzeCgSfWBywi8ygDNu AUMvrirJJ3ZtmOZXW4EvGXG1DV9zz113BIL7Wb0NE8CGT1QIPlx98MlV9X/P2Gs/wHjo 1LQcULiZ12JQSkKT3bSwAMkVEimTyo1qQu5AVBoUaFZUgnvFq+7JpVcibM64+XshDO/H VXQ/ckZZbzlmd4YQK/im3Q+pwlXKGImTlQRgKUTWNZrIwb4ar0+Ymm56CSJWTRxUqUaI 8/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=d5KoV7wnCKuG4VZOjo5lJOH0XnGXBZAkGo78O8wFFdICYya7Pl7Gr9ApkSR+64fDov fnHc59J6RI7fvli0iTA8W218P6lMw1Mq6CSlnQjtlAjl5lG2wZ6hRI3fCAyvWNM6wBfv 48C2Cku7CQ2kjXQneUelCTy8d4s+5uyrmEsH1kpNbi489zF9awuJ5udSFakAufuKJyEB HlzS+uu4facH5vHVz/rYI6tG/AI6+cHLWJL4G0iiij4+1vIQfmfjAO8nszkYpac+QDpY QwdXuJD3EHA7MmcbuIucstJAKq5rvztBR8Mfr13A6jbv6JAKO0bl3Ch+xAgEN9EXynfF Kqtg== X-Gm-Message-State: AO0yUKXbdlip1nkNVe4QpAfW7zITwC2fpA/yJLAfd+EkVXerHoj7otds 1MYFDw0xpQL7Pc0BIKi4RgCvPwZ2pOKttE5z X-Google-Smtp-Source: AK7set+F0wK3a0aycMvtdXQ+Qqus7J4+1YeJAddQmyouY+cX0bfUyQryF9/VbSl8CNNRuCLM12snxA== X-Received: by 2002:a5d:6548:0:b0:2c5:54fd:265e with SMTP id z8-20020a5d6548000000b002c554fd265emr974190wrv.70.1676884481451; Mon, 20 Feb 2023 01:14:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 08/24] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Date: Mon, 20 Feb 2023 10:13:42 +0100 Message-Id: <20230220091358.17038-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885229820100003 Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-8-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 29a8e79817..e6deb1c5dc 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -7,7 +7,6 @@ * non-internal declarations are in hw/ide.h */ =20 -#include "qapi/qapi-types-run-state.h" #include "hw/ide.h" #include "hw/irq.h" #include "hw/isa/isa.h" --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884713; cv=none; d=zohomail.com; s=zohoarc; b=AOtZKPvdH3AkMqgxU/WlbmnJ790w1XSf1V7nQEbE1C/6IUKhhHKvm1hlbbf8FD75kpZYZRApbZ9DNQSXWpHkgNlu87a9x8c7VcgYhawbxnnnP9k979SEDamh08vxRFTUP7VSeCmrJl0u8FopouBebYg/hd76QT5B5WNyT6hG2g0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884713; 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=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=XlUk3Gu4DUi33vt84z6OXUHJkoSo8TojJ3yUZlX5FGqaL1xrJGLH8p6Ij4EywHCq//+DDRu8SKUDbIj5xWP0Qw0HaZWoNW8F41G4ae/8etsnviaWVHhbH7t57crwamt9Eatc1A0joEGYLh+50+FozVIV7K0VRgXl6W+wEfubDwM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884713187607.7354913262078; Mon, 20 Feb 2023 01:18:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2G8-0006AD-SS; Mon, 20 Feb 2023 04:14:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2G2-00067g-Mc for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:50 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fz-0003pI-P2 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:50 -0500 Received: by mail-wr1-x42d.google.com with SMTP id l1so57006wry.10 for ; Mon, 20 Feb 2023 01:14:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b15-20020a5d4b8f000000b002c561805a4csm3096438wrt.45.2023.02.20.01.14.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=XUYBeljvgh3q1R3oaieUKzDYpey0axCv2ZuZVQEDUz0dafL+FauEShaqdnxFqj9ytB SzsMNIbDRo137M2qEkkWROt+SgkCu6Fa+fxEQjmxfDlX+2JPRagg/L8G46VgsE6N4xtt V+oeyIXlD9UD7eGJiOe1bazyLLqhzpNv1YXAyOwIzHMpe5wpIi8NkSudPJ3IXxhL7Alh XJ/0kCCaTuzVbc3nkuxzYbeGyi/oscV6S0w0entZsTRNiF4ObQOM8pj19qtkP4kqtznV y5NBj+4ALmzxYqxvHu8gfJ70TuZVhA9QDXZKXvlGA/vNEtGbjxpKN8RNxubxx2CJqzTh 0jCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=UkjAMsq4CsuuLMLnXKupDz9FhL4oxKg3EXIZrG5qeVR5OlVDXfEbeGavF4M1PKfEvJ 1l3HmZ38//cPZFiE4EsL7fcZAYEbTUDGSt1wqutLNwmMGtWoJq49uJMXGIfUbCiW+kKc c5jqBlK3eWU9dOJoQ9y7j+1S9XdPkZT/4IjTY/Qi/XTfOhMzM28oN26XoWrSPpvnyeL6 t6WI+gBjRmWP72n3bBGYt9fNR2Ou6uy9ssBI7NCiaMevRXmrspxf14RAQkN4wwBoTpKC rAJ3AR9EnImn7NxR5lDcyQqcsLH7KbE+9Gulz5TOQGvT3GDpYOVo589G4P/utqLc1Kq+ /omQ== X-Gm-Message-State: AO0yUKW/lW4U0QK8Qw5LoL0ImhvDtu6/TyjGCl2Xgn5iJNUTQeFEGlNO Zx0+ZxL+loCgG3H00fFnRksLjAjS3+iUNxic X-Google-Smtp-Source: AK7set9aCOobBztU81ODWPbX1hlkZU+slrJ5YJ243d9krvrqFkQvitv4gSIk/+7ZIXQTJCZia97Vog== X-Received: by 2002:adf:e54e:0:b0:2c6:e7b9:a4a0 with SMTP id z14-20020adfe54e000000b002c6e7b9a4a0mr1821220wrm.71.1676884486438; Mon, 20 Feb 2023 01:14:46 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 09/24] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Date: Mon, 20 Feb 2023 10:13:43 +0100 Message-Id: <20230220091358.17038-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884714126100001 The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-9-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- include/hw/ide/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index e6deb1c5dc..84d3722d67 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -9,9 +9,9 @@ =20 #include "hw/ide.h" #include "hw/irq.h" -#include "hw/isa/isa.h" #include "sysemu/dma.h" #include "hw/block/block.h" +#include "exec/ioport.h" =20 /* debug IDE devices */ #define USE_DMA_CDROM --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884613; cv=none; d=zohomail.com; s=zohoarc; b=ZZ7lva+RSiWIEEXVaEIJR9frnILRrCUfJ4WzDCR8UjaMmPw89i97lPNtk8XrGvfKZ/q5qg0Z1BtC15yr3w7skzmh5AdSP5ZS1pLAihUuOKSTsI40vbs9HGdQxC+Mzm8SvIFDaSvxiOjlpFtWZSCP9o7VZ7bz+cgLf11df0o8YnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884613; 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=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=nqy90OLiXYP6jxRaHvWihTLsjT20gaNNMTEy7W/rMq/RPBBJmok+nyH2lQJuChm8MTErTIyVef8XF29D1XMw/pvO/8qJXqjAAWHMmqKAaMDsIGvm/P/1KCT77V9WiniWxGuMTga65e6j8AMYAY8xfKccFMA16rfJ8yujcYcrgwc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884613174731.8351111679351; Mon, 20 Feb 2023 01:16:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GB-0006H7-8H; Mon, 20 Feb 2023 04:14:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2G7-0006Ae-PG for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:56 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2G4-0003oX-Nj for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:55 -0500 Received: by mail-wr1-x431.google.com with SMTP id v3so256351wrp.2 for ; Mon, 20 Feb 2023 01:14:52 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k22-20020a05600c0b5600b003e21ba8684dsm11808758wmr.26.2023.02.20.01.14.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=SZMmpFIE3LLMs9Dvfftvm+3Jf52QEbVRb0i6UzQFwK5X0xVraceBByvQj0Ig2WgnFY ymMghBACAjtBddhQwAxY+RmHxAicvK/YlufuXNKzPW9G6ONIw40nOdXnWXCjLF8C7NOb geFxFvS4hbBSBYhRCHLnS2IGKT7uQNGkmr0ti1GLEOUJmBjycyhVe0IMpT2v9yDkwR8b ePuwR5KCJCB12NEh95nfDasa3/VcWuKow5Vztf1RHuiIL4F8LSTGO+QjJcgsTWSd9wye Im/8RZrD8p6pyUVpyG8/Oqk0ivjehufZ7Ryss8wx7atMLKLi7SVZkGRP/vwXctxpCkJO M4PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=vvb9s/uAhnDeV41+r6OVHys2lOILMolXX9Raa1+HBpXeO7wZNO8Lh3CyLbdT5he1xh 0N/YlcTG+DpGHVntjkctPThx39t3Cw/+AbVvRSVgUXcqXMLpr9f1wtIWNKMtnSbMQ1Ba cyXaonzU+wXYIrw6xhaVZKoE1qlOlcMUy+fw7NI7jX4XVcfHx7U/M0GIoP+NfjYhl4EO rAOZuRD6KnqDWOfxU0qIpoICTBcLD5R4N45a1kT5QQGz+7o0ktDnm3TyB3yLfMiUFeEt UFB8+2M5TVOyMQGf5JbC4Aeu/iWIyRvhlS9LuWuQL4HUz30970NI1dDZ1a08PJW60Oy6 ER2g== X-Gm-Message-State: AO0yUKW5YGtIx2UmjRCHiMVVw70Z7APAoiczhvYxWPI6chhXSOkZm0Wu cMGdBrmXu6afHrWEKgmIglCCv+ZFdQlMED3i X-Google-Smtp-Source: AK7set/+a1RO8UvjsEjZ3VN0III+r3aQqKWNzFC6jOtBhn4oYv2lTGd4gNGuU3AygZb4WtZ1BcpMOw== X-Received: by 2002:a05:6000:14e:b0:2bf:dcdc:afb8 with SMTP id r14-20020a056000014e00b002bfdcdcafb8mr1032450wrx.64.1676884491518; Mon, 20 Feb 2023 01:14:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH v2 10/24] hw/ide: Un-inline ide_set_irq() Date: Mon, 20 Feb 2023 10:13:44 +0100 Message-Id: <20230220091358.17038-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884613596100001 Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 ++++++++ hw/ide/ich.c | 1 + hw/ide/macio.c | 1 + hw/ide/microdrive.c | 1 + hw/ide/pci.c | 1 + hw/misc/macio/gpio.c | 1 + hw/sparc64/sun4u.c | 1 + include/hw/ide/internal.h | 9 +-------- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7ce001cacd..3e21f607fe 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -22,6 +22,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" diff --git a/hw/ide/core.c b/hw/ide/core.c index 5d1039378f..1473b6057f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -24,6 +24,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" #include "qemu/error-report.h" @@ -2782,6 +2783,13 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma =3D &ide_dma_nop; } =20 +void ide_set_irq(IDEBus *bus) +{ + if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { + qemu_irq_raise(bus->irq); + } +} + void ide_exit(IDEState *s) { timer_free(s->sector_write_timer); diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 1007a51fcb..d61faab532 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -61,6 +61,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" diff --git a/hw/ide/macio.c b/hw/ide/macio.c index e604466acb..15fd934831 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -24,6 +24,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/ppc/mac_dbdma.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 56c5be3655..b9822b939b 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -29,6 +29,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/irq.h" =20 #include "hw/ide/internal.h" #include "qom/object.h" diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 84ba733548..ae638dee0d 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -24,6 +24,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" #include "sysemu/dma.h" diff --git a/hw/misc/macio/gpio.c b/hw/misc/macio/gpio.c index c8ac5633b2..4deb330471 100644 --- a/hw/misc/macio/gpio.c +++ b/hw/misc/macio/gpio.c @@ -28,6 +28,7 @@ #include "migration/vmstate.h" #include "hw/misc/macio/macio.h" #include "hw/misc/macio/gpio.h" +#include "hw/irq.h" #include "hw/nmi.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 387181ff77..cb2d0fbbe7 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qemu/datadir.h" #include "cpu.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bus.h" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 84d3722d67..57a6278327 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -8,7 +8,6 @@ */ =20 #include "hw/ide.h" -#include "hw/irq.h" #include "sysemu/dma.h" #include "hw/block/block.h" #include "exec/ioport.h" @@ -572,13 +571,6 @@ static inline IDEState *idebus_active_if(IDEBus *bus) return bus->ifs + bus->unit; } =20 -static inline void ide_set_irq(IDEBus *bus) -{ - if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { - qemu_irq_raise(bus->irq); - } -} - /* hw/ide/core.c */ extern const VMStateDescription vmstate_ide_bus; =20 @@ -627,6 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDED= riveKind kind, void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); +void ide_set_irq(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus); =20 void ide_exec_cmd(IDEBus *bus, uint32_t val); --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884565; cv=none; d=zohomail.com; s=zohoarc; b=J6M6g163Be2DSN4mbm3/oTwBHizBTn20UkQxm1TaS5spvl+29EsEB/vQOyd95JDVqzozdEtGf4VWIOq69MofIx71iZp9Qjd+fW9O1BX7HozCpqFrZYE0lTs5DI1pXbk/aR9eiyayrV749kPWf4NzxMC09I6kpwF1jqPu8QpaVVc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884565; 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=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=BGdjQ1UzVHZ6FmVJcpE7gCUe/NzwGKJgdgA9EUJ0JADseI8NzuLLZdDo3snvlaWBDeuO5f4fMGh2xBUary5LqWBx0XxSUMNCLywHiuw7sQuEOUIaTaXu47JM4vb+PA6hpzbMz1qcnr7oegLYjI5Ncv6Zb0uqQihL3Hla8lbo9L0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884565198916.1268520428616; Mon, 20 Feb 2023 01:16:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GE-0006SI-Te; Mon, 20 Feb 2023 04:15:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GD-0006Oe-9p for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:01 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2G9-0003kM-By for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:00 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1926382wrd.3 for ; Mon, 20 Feb 2023 01:14:56 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j27-20020a5d453b000000b002c577e2fc87sm2793691wra.15.2023.02.20.01.14.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=RzZ5P0hZbxyU2e1SxthfpXLSlowUSyBwv90pSxMMRMN30aynzmkaq914ll7VIZmoN5 ZwxTRsXgNVlmk073h2o/xQP3YKEymdV5Q4lc/Eit7VdrYLgS4WsaXxeSOeZZSW/zGe3y Jz9KxPvRghZJdTSfYaWUXycxWX4cTk+t9o09hEkWHxKqfojFDQL0bzhTfGmonO+nF5V1 wcI+uc+2cCe/06lVzfcoCWe+V44NF28jsG7hZ5Ce9WhKahaEqRX7pbonJvCnc3tqeKoA Ah9INPodZGqtQqu8AcST+5M7xJXE6aA8vvfTdq8IE/RNRaQby4khVDAUkqaznbibsE6f igHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=QZEooqL72Zd6Rc/h6I94zvQUxKMP4WuxrbBlYm1u8yfMY1qadqe02Z/+Lw3l+/P+Q7 csb2ShF0RRS/Frjs8x3Jq4qVfZuicw6uLd6IEa5AGi5ctrJzhUlxRK892CtQ5yVsUr+A QDbo3uhyEhuW/o2cNVhL+Y1nD8KAXizXRYE/N6N11ZakXMmXbkLJu7hIwHbi8p2PeZNz uhfWEM0WpVE+rzxzDWOQcvka0foZSlTWhKBqZGJYFHIrqa4fbmtSUU9uQEdJXqvv6WUf /sP2dWuycvFMmV9ldFl4G9oMGN5unnq3ya4HUOqo4nPA4ib0EAv72v06OPa8h8IDetOJ ACIw== X-Gm-Message-State: AO0yUKW0ziXPyuPcVEf1ELzfz7TZh4SEnSyqc+POgiYOmyK3xO1tDUIc zIoE5VqIIW5OMBiaAAPpHozG9qlFW4k5AX/5 X-Google-Smtp-Source: AK7set8zQ3ht9Al+mzs+FnY0bK7PNdbnxlMidaSMllxBYetpME1IIXR18ArrFjHzba4N1Gi1/w8YHg== X-Received: by 2002:a05:6000:85:b0:2c5:534d:eebb with SMTP id m5-20020a056000008500b002c5534deebbmr1392356wrx.13.1676884496365; Mon, 20 Feb 2023 01:14:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 11/24] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Date: Mon, 20 Feb 2023 10:13:45 +0100 Message-Id: <20230220091358.17038-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884567250100003 ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-11-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/atapi.c | 12 +++++------ hw/ide/core.c | 44 +++++++++++++++++++-------------------- hw/ide/macio.c | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 0c36bd0afd..dcc39df9a4 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -179,7 +179,7 @@ void ide_atapi_cmd_ok(IDEState *s) s->status =3D READY_STAT | SEEK_STAT; s->nsector =3D (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REA= SON_CD; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 void ide_atapi_cmd_error(IDEState *s, int sense_key, int asc) @@ -191,7 +191,7 @@ void ide_atapi_cmd_error(IDEState *s, int sense_key, in= t asc) s->sense_key =3D sense_key; s->asc =3D asc; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 void ide_atapi_io_error(IDEState *s, int ret) @@ -254,7 +254,7 @@ void ide_atapi_cmd_reply_end(IDEState *s) } else { /* a new transfer is needed */ s->nsector =3D (s->nsector & ~7) | ATAPI_INT_REASON_IO; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); byte_count_limit =3D atapi_byte_count_limit(s); trace_ide_atapi_cmd_reply_end_bcl(s, byte_count_limit); size =3D s->packet_transfer_size; @@ -294,7 +294,7 @@ void ide_atapi_cmd_reply_end(IDEState *s) /* end of transfer */ trace_ide_atapi_cmd_reply_end_eot(s, s->status); ide_atapi_cmd_ok(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 /* send a reply of 'size' bytes in s->io_buffer to an ATAPI command */ @@ -340,7 +340,7 @@ static void ide_atapi_cmd_check_status(IDEState *s) s->error =3D MC_ERR | (UNIT_ATTENTION << 4); s->status =3D ERR_STAT; s->nsector =3D 0; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } /* ATAPI DMA support */ =20 @@ -384,7 +384,7 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int= ret) if (s->packet_transfer_size <=3D 0) { s->status =3D READY_STAT | SEEK_STAT; s->nsector =3D (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT= _REASON_CD; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } =20 diff --git a/hw/ide/core.c b/hw/ide/core.c index 1473b6057f..117e26cef1 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -654,7 +654,7 @@ void ide_set_sector(IDEState *s, int64_t sector_num) =20 static void ide_rw_error(IDEState *s) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_buffered_readv_cb(void *opaque, int ret) @@ -773,7 +773,7 @@ static void ide_sector_read_cb(void *opaque, int ret) s->nsector -=3D n; /* Allow the guest to read the io_buffer */ ide_transfer_start(s, s->io_buffer, n * BDRV_SECTOR_SIZE, ide_sector_r= ead); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_sector_read(IDEState *s) @@ -837,7 +837,7 @@ void ide_dma_error(IDEState *s) dma_buf_commit(s, 0); ide_abort_command(s); ide_set_inactive(s, false); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 int ide_handle_rw_error(IDEState *s, int error, int op) @@ -907,7 +907,7 @@ static void ide_dma_cb(void *opaque, int ret) /* end of transfer ? */ if (s->nsector =3D=3D 0) { s->status =3D READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } =20 @@ -1007,7 +1007,7 @@ static void ide_sector_write(IDEState *s); static void ide_sector_write_timer_cb(void *opaque) { IDEState *s =3D opaque; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_sector_write_cb(void *opaque, int ret) @@ -1055,7 +1055,7 @@ static void ide_sector_write_cb(void *opaque, int ret) timer_mod(s->sector_write_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRT= UAL) + (NANOSECONDS_PER_SECOND / 1000)); } else { - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } =20 @@ -1106,7 +1106,7 @@ static void ide_flush_cb(void *opaque, int ret) } s->status =3D READY_STAT | SEEK_STAT; ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_flush_cache(IDEState *s) @@ -1195,7 +1195,7 @@ static void ide_cd_change_cb(void *opaque, bool load,= Error **errp) s->cdrom_changed =3D 1; s->events.new_media =3D true; s->events.eject_request =3D false; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_cd_eject_request_cb(void *opaque, bool force) @@ -1206,7 +1206,7 @@ static void ide_cd_eject_request_cb(void *opaque, boo= l force) if (force) { s->tray_locked =3D false; } - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 static void ide_cmd_lba48_transform(IDEState *s, int lba48) @@ -1440,7 +1440,7 @@ static bool cmd_identify(IDEState *s, uint8_t cmd) } s->status =3D READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } else { if (s->drive_kind =3D=3D IDE_CD) { @@ -1630,7 +1630,7 @@ static bool cmd_specify(IDEState *s, uint8_t cmd) if (s->blk && s->drive_kind !=3D IDE_CD) { s->heads =3D (s->select & (ATA_DEV_HS)) + 1; s->sectors =3D s->nsector; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } else { ide_abort_command(s); } @@ -1731,7 +1731,7 @@ static bool cmd_identify_packet(IDEState *s, uint8_t = cmd) ide_atapi_identify(s); s->status =3D READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } =20 @@ -1756,7 +1756,7 @@ static bool cmd_exec_dev_diagnostic(IDEState *s, uint= 8_t cmd) * They are part of the regular output (this is why ERR_STAT isn't= set) * Device 0 passed, Device 1 passed or not present. */ s->error =3D 0x01; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } =20 return false; @@ -1788,7 +1788,7 @@ static bool cmd_cfa_req_ext_error_code(IDEState *s, u= int8_t cmd) { s->error =3D 0x09; /* miscellaneous error */ s->status =3D READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); =20 return false; } @@ -1827,7 +1827,7 @@ static bool cmd_cfa_translate_sector(IDEState *s, uin= t8_t cmd) s->io_buffer[0x1a] =3D 0x01; /* Hot count */ =20 ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); =20 return false; } @@ -1851,7 +1851,7 @@ static bool cmd_cfa_access_metadata_storage(IDEState = *s, uint8_t cmd) =20 ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); s->status =3D 0x00; /* NOTE: READY is _not_ set */ - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); =20 return false; } @@ -1934,7 +1934,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) =20 s->status =3D READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; =20 case SMART_READ_DATA: @@ -1975,7 +1975,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) =20 s->status =3D READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; =20 case SMART_READ_LOG: @@ -2014,7 +2014,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) } s->status =3D READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; =20 case SMART_EXECUTE_OFFLINE: @@ -2146,7 +2146,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) =20 if (!ide_cmd_permitted(s, val)) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return; } =20 @@ -2164,7 +2164,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) } =20 ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } =20 @@ -2783,7 +2783,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma =3D &ide_dma_nop; } =20 -void ide_set_irq(IDEBus *bus) +void ide_bus_set_irq(IDEBus *bus) { if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { qemu_irq_raise(bus->irq); diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 15fd934831..24fb7a3f9d 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -160,7 +160,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) MACIO_DPRINTF("End of IDE transfer\n"); qemu_sglist_destroy(&s->sg); s->status =3D READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); m->dma_active =3D false; goto done; } diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 57a6278327..7b4b71d0b0 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -619,7 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDED= riveKind kind, void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); -void ide_set_irq(IDEBus *bus); +void ide_bus_set_irq(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus); =20 void ide_exec_cmd(IDEBus *bus, uint32_t val); --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884606; cv=none; d=zohomail.com; s=zohoarc; b=Nl/29XzOEc4k1zhmv+X6fzcokV7mdzWqzGspU3GNHs8XsKeEPb7bd+X8///nftIgfm5rtOgyqlmBVxIysGFSbZGNTopvNFV74f5faT/cL03HU9PiInAh1mWTIo2IrkKAAcgbyerUO0++EWdkq6xfGLP5eb4srr9m+KpgOFGCZiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884606; 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=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=EemoSovL7H7SGC56h2OHiIjhqm5XQoQi5Q3emnboEbGQQ6urw3ni/BbNXFROlIBkZQwQUXI1LxxL9UQe1jlmnTbJd5+vvzYlgGzrlUqG4OVxmk1AHRWduJWMemC5ofdmDMybuPMQkM/5+P0a7ODjL6Tphu6Mzifuqb7bh15AEk4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884606872347.40023013205916; Mon, 20 Feb 2023 01:16:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GP-0006co-2q; Mon, 20 Feb 2023 04:15:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GI-0006ZY-Gn for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:07 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GF-0003ur-Rv for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:06 -0500 Received: by mail-wm1-x329.google.com with SMTP id l2-20020a05600c1d0200b003e1f6dff952so376544wms.1 for ; Mon, 20 Feb 2023 01:15:03 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w18-20020a05600c475200b003e220998b6bsm1013732wmo.17.2023.02.20.01.15.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=pgpHNnMbA+dBPOgBLlntf5WYgXAiAB0Zsmb1Z1/L6PVQwhc+qR1XI3esNvMxOcYL8G 6oA7p0kAL2h3Sf7OQcB3F3JPPATVs7TbScehmgjShJqYYQYDZRW6tZ9hkpY+pZqKMPBK NuXtP5pSXUP4qxE31orF2KkJ164G2fZ9KMkiYu9talOlaMy9JWirY2Ja3bEDemcR2S7/ Hg6XwIDnYr2aSg7Fyoq9+pX5NkEzesMezLy58Ah1l75K9d7Lkr0pi6C+jHpjfhXgx9to YLAPcZe0JDpOTzCBFdaLUWw4UbxHcFHGAqlZJHIyGBO43HVvkSutWFBM7IkFO/ev/8/i 42aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=1OvzhjRI8TzxOhWSN8XQcGYHpMVK2qh2tszd6I0PeohT9OvezpPg05kgha6cwKyilY U5T/Swg1zgr9/bJr3sJNDb/upBm0v7BI7iW+0tjfncjqjFAyF7Tl1cyelFFaTq+AZfLs vZRAXiZ6aFODZlhkwKJ6KRTSX57f1F5Kummlgqz3mg910gVLP2F3Yp2AmC6NbL9NOM+p TyJ9KYa9ofyXMOeY/aUrGeF5p9qHQ/tqIy4g4VaVaLsob+Gkc92SmKUBJnU+XTh5CVYN dBFZbUQDp+X9h6ERWPMsUwKq5htMLybY7RmX0gtPiyxJ69/z2fcc5EvmoJHA5pNty9L0 WTwg== X-Gm-Message-State: AO0yUKXbLsQhx3bCJKC553bJU5DUKECpQrrh2STlQarUw6JANdqG2YhO 6/lNdAs8aDZati+D8mBZxvbi2JB7bYCUUeTl X-Google-Smtp-Source: AK7set9t0XFt4U65zVPQiFXGLJx7BwjGu0K29TDVPeRXCN0qRNBbQqLvbL4S4NHuxl777rLOPqs1pQ== X-Received: by 2002:a05:600c:32a7:b0:3db:15b1:fb28 with SMTP id t39-20020a05600c32a700b003db15b1fb28mr40296wmp.19.1676884501502; Mon, 20 Feb 2023 01:15:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Radoslaw Biernacki , Peter Maydell , Leif Lindholm Subject: [PATCH v2 12/24] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Date: Mon, 20 Feb 2023 10:13:46 +0100 Message-Id: <20230220091358.17038-13-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884607580100001 ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_drive) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-12-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/arm/sbsa-ref.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/isa.c | 4 ++-- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 4 ++-- hw/ide/pci.c | 2 +- hw/ide/qdev.c | 2 +- include/hw/ide/internal.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index f778cb6d09..0b93558dde 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -554,7 +554,7 @@ static void create_ahci(const SBSAMachineState *sms) if (hd[i] =3D=3D NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } } =20 diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 3e21f607fe..90fea5d059 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1842,7 +1842,7 @@ void ahci_ide_create_devs(PCIDevice *dev, DriveInfo *= *hd) if (hd[i] =3D=3D NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } =20 } diff --git a/hw/ide/isa.c b/hw/ide/isa.c index ad47e0899e..74f7b43137 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -93,10 +93,10 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int io= base2, int irqnum, =20 s =3D ISA_IDE(dev); if (hd0) { - ide_create_drive(&s->bus, 0, hd0); + ide_bus_create_drive(&s->bus, 0, hd0); } if (hd1) { - ide_create_drive(&s->bus, 1, hd1); + ide_bus_create_drive(&s->bus, 1, hd1); } return isadev; } diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 24fb7a3f9d..7efbbc720a 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -501,7 +501,7 @@ void macio_ide_init_drives(MACIOIDEState *s, DriveInfo = **hd_table) =20 for (i =3D 0; i < 2; i++) { if (hd_table[i]) { - ide_create_drive(&s->bus, i, hd_table[i]); + ide_bus_create_drive(&s->bus, i, hd_table[i]); } } } diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index b9822b939b..08504b499f 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -566,7 +566,7 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo) qdev_realize(DEVICE(md), NULL, &error_fatal); =20 if (dinfo !=3D NULL) { - ide_create_drive(&md->bus, 0, dinfo); + ide_bus_create_drive(&md->bus, 0, dinfo); } md->bus.ifs[0].drive_kind =3D IDE_CFATA; md->bus.ifs[0].mdata_size =3D METADATA_SIZE; diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 8b2ba604c5..d650dcee4d 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -174,10 +174,10 @@ void mmio_ide_init_drives(DeviceState *dev, DriveInfo= *hd0, DriveInfo *hd1) MmioIdeState *s =3D MMIO_IDE(dev); =20 if (hd0 !=3D NULL) { - ide_create_drive(&s->bus, 0, hd0); + ide_bus_create_drive(&s->bus, 0, hd0); } if (hd1 !=3D NULL) { - ide_create_drive(&s->bus, 1, hd1); + ide_bus_create_drive(&s->bus, 1, hd1); } } =20 diff --git a/hw/ide/pci.c b/hw/ide/pci.c index ae638dee0d..4223f5e64d 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -489,7 +489,7 @@ void pci_ide_create_devs(PCIDevice *dev) 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]); + ide_bus_create_drive(d->bus + bus[i], unit[i], hd_table[i]); } } } diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 6f6c7462f3..1b3b4da01d 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -124,7 +124,7 @@ static void ide_qdev_realize(DeviceState *qdev, Error *= *errp) dc->realize(dev, errp); } =20 -IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive) +IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive) { DeviceState *dev; =20 diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 7b4b71d0b0..ccfe064643 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -645,7 +645,7 @@ void ide_atapi_cmd_reply_end(IDEState *s); /* hw/ide/qdev.c */ void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev, int bus_id, int max_units); -IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive); +IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive); =20 int ide_handle_rw_error(IDEState *s, int error, int op); =20 --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885500; cv=none; d=zohomail.com; s=zohoarc; b=N3NHSo84sL2qd4Y1Pr8oPWF0FPzAZMCdQ78RpVuP1uL1AJVEOOkx8aw5Oqq7Z+1dBefhqXUNWRek1cRl/y8A3dN7crv1GySB7gNBPfEGDS6GXDcbSZHvzT2yzRaWlFFgJaTLgdDn8KCne94PNwEE0wWdmbCIfII4mfMjZpWUCdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885500; 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=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=layCQNhNc9TYy7k2Gq3Vl6GccTFMY/CBa4RzchH3gJhYJKEP7ZyF10QRCG3FSvfsyMHS+64EU9zwYM8hr2F6q+rkAn6SOtbCaStJCGGO4R8o6bHFHXQTDeEwVVHBxJV/CRgQM7p03Pr6w2tXqTBtbpRJnZ/Qzx/A/8TFQ7Dgpps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167688550021739.66471748332276; Mon, 20 Feb 2023 01:31:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GX-0006nX-IE; Mon, 20 Feb 2023 04:15:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GN-0006cn-OR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:12 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GK-0003lt-FG for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:11 -0500 Received: by mail-wr1-x430.google.com with SMTP id t15so437059wrz.7 for ; Mon, 20 Feb 2023 01:15:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d9-20020a5d5389000000b002c6eb1fc07asm1262627wrv.31.2023.02.20.01.15.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=mAf4yQ1EFe4goLXMf3Kt0pImswORQT+N+ywdHHMHH0eDdUsdtIB0r02y2H1OiOdvnV D6EHUXd8JSc2UEL9yq7M2qSLOZMVtQfN4MjdQ41nyZ1/KNFQWKQMNfqctbKe2kpS9hvH AgBDxfymYk2J+GPjDrMqkcOP+ebIeYX2D6SKSLwskB0IDObxrBYkQyh60HuK3fu4QkvO LeBAGp0vXk3XaGNy/SukF6c9xR5liehR4fE6VquP7qZqZp28leAzTFOjFZjpnOsf7+3C 7aD/+vpcyqTNiheBgWonIwUhTMTgvAEuFdAcFJB9sTQw+nnKUdNJ8POk3eAT1VtKZuZf Tyjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=R9qT6w1Wz24Y1QhCvu40auMXPaBXCf/lZ2tzxLe2dTdI5CPZOkcI3R+vWkduXu+hUI ovKt5dcnWot/i3WiX6/mr/m1AzvAkbLey6qIP+z47qLRI5Hhv7C5ogbNA4UARQwcSA7X qENEvQzsmearYjXEAKxbqzygO20EDwgtV3ZDy+Vt5gRDbu0HQkaEm557PsLnA1fCWyya P2evb5qGWqAdaU1/W1IWP1bF0eIx99bvKKujU/DRQP52zTt1Qb7uNT77mXBvKf3As/zL x0R9YJ/WNuNtwphyRAHVMp/lIFJhMB1ieMbIGqJVpxQ2p2e69k7A3J1OpfLgIFjYAoDt dZxA== X-Gm-Message-State: AO0yUKVo2VyipNV3mUMpArfe0ZFQDMkYuiysDwCvROqhKKUDPmwjNRLm tJdDPRTFRMh/qN9bdi0GMHvDRtjmrJyiU717 X-Google-Smtp-Source: AK7set9MAmCkLHmfSvcJflFEw8MkOmgDAVarz+3KhDXAftO1WBQaKsMFclFrttRg0c3D7Uibt/BlrA== X-Received: by 2002:adf:e811:0:b0:2c5:61ef:7b37 with SMTP id o17-20020adfe811000000b002c561ef7b37mr1251045wrm.10.1676884506582; Mon, 20 Feb 2023 01:15:06 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , BALATON Zoltan Subject: [PATCH v2 13/24] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Date: Mon, 20 Feb 2023 10:13:47 +0100 Message-Id: <20230220091358.17038-14-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885501279100001 ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git grep -l ide_register_restart_cb) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-13-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 90fea5d059..430961d73b 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1560,7 +1560,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, Ad= dressSpace *as, int ports) ad->port_no =3D i; ad->port.dma =3D &ad->dma; ad->port.dma->ops =3D &ahci_dma_ops; - ide_register_restart_cb(&ad->port); + ide_bus_register_restart_cb(&ad->port); } g_free(irqs); } diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 94c576262c..2865bc25fc 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -298,7 +298,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Erro= r **errp) =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } =20 diff --git a/hw/ide/core.c b/hw/ide/core.c index 117e26cef1..5897411b95 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2759,7 +2759,7 @@ static void ide_restart_cb(void *opaque, bool running= , RunState state) } } =20 -void ide_register_restart_cb(IDEBus *bus) +void ide_bus_register_restart_cb(IDEBus *bus) { if (bus->dma->ops->restart_dma) { bus->vmstate =3D qemu_add_vm_change_state_handler(ide_restart_cb, = bus); diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 74f7b43137..f8ed26b587 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -74,7 +74,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **e= rrp) ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); - ide_register_restart_cb(&s->bus); + ide_bus_register_restart_cb(&s->bus); } =20 ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 267dbf37db..daeb9b605d 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -149,7 +149,7 @@ static int pci_piix_init_ports(PCIIDEState *d) =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } =20 return 0; diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 46204f10d7..c918370220 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -288,7 +288,7 @@ static void sii3112_pci_realize(PCIDevice *dev, Error *= *errp) =20 bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus =3D &s->bus[i]; - ide_register_restart_cb(&s->bus[i]); + ide_bus_register_restart_cb(&s->bus[i]); } } =20 diff --git a/hw/ide/via.c b/hw/ide/via.c index e1a429405d..fd398226d4 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -195,7 +195,7 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } =20 diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index ccfe064643..cc95cd47a0 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -620,7 +620,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); -void ide_register_restart_cb(IDEBus *bus); +void ide_bus_register_restart_cb(IDEBus *bus); =20 void ide_exec_cmd(IDEBus *bus, uint32_t val); =20 --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885098; cv=none; d=zohomail.com; s=zohoarc; b=h147qpV9aIO8gikheqjEI33lNZvVkwZz9iwblBaz01IbADnWF2HMX0NQfX4meuW6JZf4aGFMbKyf+OdHsvxxpSsLwtnUF/gg8hmE7whNfuQIZWxlJanUtKXzgCFex+2FlOiJOGX420WJtB4ZWAdT1YbWrbQ4RbaexkbIFZV8/E0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885098; 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=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=Qma28PJBFzic/AwlYH028dYqDx+x6zOaZwP08U0hB77DAHBV73cVbqXbbvLb9nJadDRg7BHB/ziEF1aQ6LMZq8/UbM0GN9+mj3zPIhFv8WMTx8ugiagVqGd2zHqms4jZk5kGMnrEAAk7xGxZTFLdDFtOgrauHJ1kEBa4o/9G3bw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885098548257.60827300142705; Mon, 20 Feb 2023 01:24:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2H5-0007LX-DU; Mon, 20 Feb 2023 04:15:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GR-0006fM-LA for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GP-00048C-Bm for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: by mail-wm1-x32f.google.com with SMTP id j2-20020a05600c1c0200b003e1e754657aso449056wms.2 for ; Mon, 20 Feb 2023 01:15:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b003dc3f3d77e3sm507650wmi.7.2023.02.20.01.15.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=cP2VdLnyazYynhs8JhILPzR/RjhnqJ45T5QWbihxAeY4iHAfYFLgYN59+R+7J6sLha g/2tiWt6UGdjk2t7J5NQ5IDTRo1OM5au8swo4svbLJfF9i8uhMSOP8uqkeS1VLe4+OQ3 kFxkQN2sSfN8mOX2U+NMPwdLNSfKJlJjkqTTHZ4b75jxQT6OCbA7TxyuIVfoCAQQ0CyF jJQrJozvV22PzQfsblNUCNbXvMtQvmPfYc0fqvcBb/0zQZu0TQHIYFhfdAKxkQCYaSum 1ZJOCkT14TUUerI/fClO/BTxiomfzed7j7mKCaYGLyaWUHWyVbjDxrvyleHTUHsIuJSz QZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=uqKYBL9QVFdHb9WDPy4qcyEhZQk42e1MIBrKPN9wrf1MNTdTVk2Zd3T+ID5wp0mxe2 +hXgP0s8J/uuncRKRogK/KQJmuDPSl2LPZ47LzJFURdMCnyVrhfxdv9A4r7Zq1BeKUKj 3ihE9Oi0uwPr1pBIr3r3DOcIFi1JtfPt1Ix61PTKDfn13LzR1dF4mAe3+SnLkK2vofax EhJwl1eVIN/DeUvuKN3MKXYNHZE8KiBGmwsKGjhC3h7W20SuVqX05cI56x0kW+tqH3/+ ktqsW9osgtQrOypuC3aHSb5RKJ1ffrJ7gcoxou7T+B5wWqI4HcfiwCWdeThRptxpkCZn X0+g== X-Gm-Message-State: AO0yUKWTZ8hGQI5xwlqufys7EO83bszC73HY0NMlgVgpjnh0G8hvPWIc lF00jDNs1YrkjTsYbgjvUBxBkXk5CjrayMDm X-Google-Smtp-Source: AK7set+daUq3Te3R8g+LsgnDff8XTo463rbG3kjhCqvJQFwxInOrcc0KHrrzY5Sx/kl5rvhZ83K61A== X-Received: by 2002:a05:600c:4393:b0:3e2:8f1:7684 with SMTP id e19-20020a05600c439300b003e208f17684mr11281360wmn.33.1676884511504; Mon, 20 Feb 2023 01:15:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 14/24] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Mon, 20 Feb 2023 10:13:48 +0100 Message-Id: <20230220091358.17038-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885099011100001 ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/core.c | 6 +++--- hw/ide/trace-events | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 430961d73b..7f67fb3119 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port, cmd->status =3D 0; =20 /* We're ready to process the command in FIS byte 2. */ - ide_exec_cmd(&s->dev[port].port, cmd_fis[2]); + ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]); } =20 static int handle_cmd(AHCIState *s, int port, uint8_t slot) diff --git a/hw/ide/core.c b/hw/ide/core.c index 5897411b95..1be0731d1a 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1327,7 +1327,7 @@ void ide_ioport_write(void *opaque, uint32_t addr, ui= nt32_t val) case ATA_IOPORT_WR_COMMAND: ide_clear_hob(bus); qemu_irq_lower(bus->irq); - ide_exec_cmd(bus, val); + ide_bus_exec_cmd(bus, val); break; } } @@ -2123,13 +2123,13 @@ static bool ide_cmd_permitted(IDEState *s, uint32_t= cmd) && (ide_cmd_table[cmd].flags & (1u << s->drive_kind)); } =20 -void ide_exec_cmd(IDEBus *bus, uint32_t val) +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) { IDEState *s; bool complete; =20 s =3D idebus_active_if(bus); - trace_ide_exec_cmd(bus, s, val); + trace_ide_bus_exec_cmd(bus, s, val); =20 /* ignore commands to non existent slave */ if (s !=3D bus->ifs && !s->blk) { diff --git a/hw/ide/trace-events b/hw/ide/trace-events index 15d7921f15..a394c05710 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -12,7 +12,7 @@ ide_data_writew(uint32_t addr, uint32_t val, void *bus, v= oid *s) ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s) = "IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p;= IDEState %p" ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s) = "IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p;= IDEState %p" # misc -ide_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; = state %p; cmd 0x%02x" +ide_bus_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus = %p; state %p; cmd 0x%02x" ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffe= red request %p with -ECANCELED" ide_cancel_dma_sync_remaining(void) "draining all remaining requests" ide_sector_read(int64_t sector_num, int nsectors) "sector=3D%"PRId64" nsec= tors=3D%d" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index cc95cd47a0..11a4931ef9 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -622,7 +622,7 @@ int ide_init_ioport(IDEBus *bus, ISADevice *isa, int io= base, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); =20 -void ide_exec_cmd(IDEBus *bus, uint32_t val); +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val); =20 void ide_transfer_start(IDEState *s, uint8_t *buf, int size, EndTransferFunc *end_transfer_func); --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885127; cv=none; d=zohomail.com; s=zohoarc; b=kWW2U7KwZJfikIM7Fe10yXjv1PQaphkuSAf6kPJvHaQCqbWxImbrbH0/+dyLu2DcfeR8Eh3ppnfDCoGsG87SdfYPiQo6ISLvQQ4GskDTbnRWFa98AdOZ5Y5FC5WDXF550Yr6MUuJXCBUY/8R6GdCPgHDQKFPnYKRfj19gMfRgyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885127; 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=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=QRup9ETtdr5zJFwtJdTA1NrgdvkZseCM1CabPwrFjY4ePMUgQgukQn82fLT2bkQMpVnre7NeOiHToEmCdtjnBxG6kV4D4X1KbdDYlIJzn91MmtIIM2ZduyT9NmYbiE9aAbE+ARDSXPEZ8ro5gSYj6Y7PD3+cm6FOXz6O2SfnTWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885127678790.0480800524668; Mon, 20 Feb 2023 01:25:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2H3-0007Ec-T3; Mon, 20 Feb 2023 04:15:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GW-0006ni-9y for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:20 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GT-000491-Tl for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:19 -0500 Received: by mail-wr1-x433.google.com with SMTP id t13so257895wrv.13 for ; Mon, 20 Feb 2023 01:15:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l11-20020adff48b000000b002c592535839sm969827wro.17.2023.02.20.01.15.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=GxK6YJbEZ1JjfE46GsK2VgA9UW52U2FneaJhnmVFtFckgtxnA8hFncNQDCiu6d/0Pl 9OrcMgBqXZ32Gemm54vY/Nx2uUAFmFl/UefDgPSev1wP+Y7oSG1JWZzauPEC1ffxVaaO kRckiKd/FDVSYsj1EXSQMBDo7tS1fiac5g432u5xYn+Pf59BGMYPMSeGmb82mhoHijwr dRmZnmmqG/GFgvM9ELeEhnkQEs5Tv2ffMXb87O6EdqiaqGyQVzUeGHp5FfFYGJK77cb2 kSBuazw8cbKhxhEdwUJZ8eLmZ/ngUPMCs7SoQu3z/Xd2Zcxza0+guNwuaGvtUScxkKRx 0GtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=rGgl8tPlg4LKXszKRVnOe3DhAqmUgT+QBCdMEGAKY5qVOitbBaxspAaiJsXsRoKpDR k992pbl0nkJWSMdGqImJYm1oTvbYWCJFGZ6EjSgzpvB9SiFqeL7GYW0cLa1OF7eJ6qA0 IuyFdIajYhcRCehOMoJFgV7vOSX1v7JDgR6Pyf4ytbrpVLtxQ2jSU6X/LOwsOVkz+3Iu JuzceL6y5WZtkdHG98IXMaBwYvKEpVgKbRvyi1QNjGuhGEWFWPbN5+qYRxP8Z7CCYIk4 uAg1XPv1H6ROQAyfewOsIrZanTqCflKA5x+b6t6qToiXTasFJEB6C1mEpBVCUBIDSFR0 69+A== X-Gm-Message-State: AO0yUKVuRe1t0mbr41T1IUS1Et996sdIKRkXQFuvCNFcV8fBc4YiRxsq ocDwWSjoK9xWX+0H/19UBUZwKKdnTO+wn8nd X-Google-Smtp-Source: AK7set+bSKfzS/4cMG9zdc7MuxheuFOd+Sft0tQfAPXHzsDFk6/KMdAJJl6McjLleo4Lq/XOikOPHw== X-Received: by 2002:a05:6000:1f10:b0:2c5:512c:f499 with SMTP id bv16-20020a0560001f1000b002c5512cf499mr500362wrb.27.1676884516402; Mon, 20 Feb 2023 01:15:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , BALATON Zoltan Subject: [PATCH v2 15/24] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Date: Mon, 20 Feb 2023 10:13:49 +0100 Message-Id: <20230220091358.17038-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885129335100003 ide_init2() initializes an IDEBus, and sets its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq(). Mechanical change using: $ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-15-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 4 ++-- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 3 ++- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 4 ++-- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7f67fb3119..d79b70d8c5 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1554,7 +1554,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, Ad= dressSpace *as, int ports) AHCIDevice *ad =3D &s->dev[i]; =20 ide_bus_init(&ad->port, sizeof(ad->port), qdev, i, 1); - ide_init2(&ad->port, irqs[i]); + ide_bus_init_output_irq(&ad->port, irqs[i]); =20 ad->hba =3D s; ad->port_no =3D i; diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 2865bc25fc..26a90ed45f 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -294,7 +294,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Erro= r **errp) qdev_init_gpio_in(ds, cmd646_set_irq, 2); for (i =3D 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, 2); - ide_init2(&d->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&d->bus[i], qdev_get_gpio_in(ds, i)); =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; diff --git a/hw/ide/core.c b/hw/ide/core.c index 1be0731d1a..fd2215c506 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2771,7 +2771,7 @@ static IDEDMA ide_dma_nop =3D { .aiocb =3D NULL, }; =20 -void ide_init2(IDEBus *bus, qemu_irq irq) +void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out) { int i; =20 @@ -2779,7 +2779,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) ide_init1(bus, i); ide_reset(&bus->ifs[i]); } - bus->irq =3D irq; + bus->irq =3D irq_out; bus->dma =3D &ide_dma_nop; } =20 diff --git a/hw/ide/isa.c b/hw/ide/isa.c index f8ed26b587..95053e026f 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -72,7 +72,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **e= rrp) =20 ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); + ide_bus_init_output_irq(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_bus_register_restart_cb(&s->bus); } diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 7efbbc720a..6be29e44bc 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -420,7 +420,7 @@ static void macio_ide_realizefn(DeviceState *dev, Error= **errp) { MACIOIDEState *s =3D MACIO_IDE(dev); =20 - ide_init2(&s->bus, s->ide_irq); + ide_bus_init_output_irq(&s->bus, s->ide_irq); =20 /* Register DMA callbacks */ s->dma.ops =3D &dbdma_ops; diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 08504b499f..84452ae4ef 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -599,7 +599,7 @@ static void microdrive_realize(DeviceState *dev, Error = **errp) { MicroDriveState *md =3D MICRODRIVE(dev); =20 - ide_init2(&md->bus, qemu_allocate_irq(md_set_irq, md, 0)); + ide_bus_init_output_irq(&md->bus, qemu_allocate_irq(md_set_irq, md, 0)= ); } =20 static void microdrive_init(Object *obj) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index d650dcee4d..c6c0299c53 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -122,7 +122,7 @@ static void mmio_ide_realizefn(DeviceState *dev, Error = **errp) SysBusDevice *d =3D SYS_BUS_DEVICE(dev); MmioIdeState *s =3D MMIO_IDE(dev); =20 - ide_init2(&s->bus, s->irq); + ide_bus_init_output_irq(&s->bus, s->irq); =20 memory_region_init_io(&s->iomem1, OBJECT(s), &mmio_ide_ops, s, "ide-mmio.1", 16 << s->shift); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index daeb9b605d..2f71376b93 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -145,7 +145,8 @@ static int pci_piix_init_ports(PCIIDEState *d) if (ret) { return ret; } - ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); + ide_bus_init_output_irq(&d->bus[i], + isa_get_irq(NULL, port_info[i].isairq)); =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index c918370220..f9becdff8e 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -284,7 +284,7 @@ static void sii3112_pci_realize(PCIDevice *dev, Error *= *errp) qdev_init_gpio_in(ds, sii3112_set_irq, 2); for (i =3D 0; i < 2; i++) { ide_bus_init(&s->bus[i], sizeof(s->bus[i]), ds, i, 1); - ide_init2(&s->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&s->bus[i], qdev_get_gpio_in(ds, i)); =20 bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus =3D &s->bus[i]; diff --git a/hw/ide/via.c b/hw/ide/via.c index fd398226d4..ab9e43e244 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -191,7 +191,7 @@ static void via_ide_realize(PCIDevice *dev, Error **err= p) qdev_init_gpio_in(ds, via_ide_set_irq, 2); for (i =3D 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, 2); - ide_init2(&d->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&d->bus[i], qdev_get_gpio_in(ds, i)); =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 11a4931ef9..c687282a78 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -488,7 +488,7 @@ struct IDEBus { IDEDMA *dma; uint8_t unit; uint8_t cmd; - qemu_irq irq; + qemu_irq irq; /* bus output */ =20 int error_status; uint8_t retry_unit; @@ -616,8 +616,8 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDED= riveKind kind, uint64_t wwn, uint32_t cylinders, uint32_t heads, uint32_t secs, int chs_trans, Error **errp); -void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); +void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884649; cv=none; d=zohomail.com; s=zohoarc; b=BtQL6djASHcAY/jrwxEHs+oDdG8iCfLnoPBwdP+fMZSkF+e1Csf22hbINEIqXdCumRnPQFB8YBo0innEdekWSF+PsNOjn/WC2X/oZ6KXCdez8qNRYzR/8XSWUS7D6b5vitYsCJxa6btqI8w5QTVJ9viYMc3Q6OsKjBlZlxvw7PU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884649; 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=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=LCKTnLLOXdiqbirmVidVeZhmNTyt1+lIZolcQQULMKSNFgTU6/fGoaX5r8hL440gD35dHi6iwDxEjvbOIE37/Yv3rc16EPHsMGtwAZdCNy6tncD5Pthaaecl3WnXV8vLPMF5Fbjm3N+jlR70Y9RfVgml+VrXP1HEMy5KOAx6B14= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884649511602.892341000791; Mon, 20 Feb 2023 01:17:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HN-00086y-Dk; Mon, 20 Feb 2023 04:16:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Ga-0006rJ-PV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:25 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GY-0003uk-DJ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:24 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg37-20020a05600c3ca500b003e21e018039so1198492wmb.3 for ; Mon, 20 Feb 2023 01:15:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n21-20020a1c7215000000b003df7b40f99fsm8152060wmc.11.2023.02.20.01.15.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=uxV3NkPgzWR3OQk197UP9a8Jm0cd0Qu8tV4e65IeXsa0ZLY69qO9Zz0lH/dhZeSicL AgDsrlYPtGm5MpiER0jzg3AVBuglYvG5002GjTP3CMyQedT7VkMGXLdrfe989oFYliTY P1xv82A87ca8aFxYH+e0lbvZ+u8cXFs+aBEebxfXQuTk2zgKvEC6hQ+qmWn4NyzZH3vO KfRYAtkZKunZ6mp3bp836zr0s33j8s7Vm4WDVJXi2dWRMOEwbRMSi+lw86FU82NqXqq6 BYixRaSrvMu8YlIwit9cd3zy9xQyJyFE0du1r8Gk4YO4rhHeqh9YOO5EvzYSsmclCnjz 1ouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=LKAR8cDHltRQQzvJjv9lBScaicO5c2B5Ip0wjmwdO52SK3OrSfbE+mKkSnYbK3orjq QVbYL9j2HNtbh6wc8gyWDR/xE695YKJVOdgG7P0qXG/EiOg9jTpvd8tJdI3xxBtHwiTq p0F7GnFYPUyDmBAicNuUZ0la7dZUO5s4qrO97VtgNm4AwMsQusNoOi1xKvR8iAUUCXix 3T6cG/Xa6/8nrEOqDapx8AG85dyPut0EsbYxCBSIMoc7pia1aLWQEjMkntzpZPqJ9wgW acOqXfLwZBcPSp55dy9treuj5m4Q1Dhnw1tyNUtgmayPcsV4MAfFjwt2+hfUaUUWoZ/T JXzg== X-Gm-Message-State: AO0yUKVlRTJC19Mm0gjwhNsopd1+gwr5l9PoF6QGUz68upVUIgwaMPPX ckVicOohhs5IB8t1T8fQRBWXnfyrRqtMmUpN X-Google-Smtp-Source: AK7set+O3mEywEVMA8FdSkBDLTdczojVjK8S+P9O4Whdj2flflBC2oMtz8mYPnBSFDrwGDtMAj7iGA== X-Received: by 2002:a05:600c:2b46:b0:3e0:1ab:cf2a with SMTP id e6-20020a05600c2b4600b003e001abcf2amr226474wmf.39.1676884521495; Mon, 20 Feb 2023 01:15:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 16/24] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Date: Mon, 20 Feb 2023 10:13:50 +0100 Message-Id: <20230220091358.17038-17-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884649972100001 idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/idebus_active_if/ide_bus_active_if/g' \ $(git grep -l idebus_active_if) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-16-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/core.c | 18 +++++++++--------- hw/ide/macio.c | 8 ++++---- hw/ide/microdrive.c | 4 ++-- hw/ide/pci.c | 2 +- include/hw/ide/internal.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index fd2215c506..2d034731cf 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1265,7 +1265,7 @@ const char *ATA_IOPORT_WR_lookup[ATA_IOPORT_WR_NUM_RE= GISTERS] =3D { void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); int reg_num =3D addr & 7; =20 trace_ide_ioport_write(addr, ATA_IOPORT_WR_lookup[reg_num], val, bus, = s); @@ -2128,7 +2128,7 @@ void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) IDEState *s; bool complete; =20 - s =3D idebus_active_if(bus); + s =3D ide_bus_active_if(bus); trace_ide_bus_exec_cmd(bus, s, val); =20 /* ignore commands to non existent slave */ @@ -2195,7 +2195,7 @@ const char *ATA_IOPORT_RR_lookup[ATA_IOPORT_RR_NUM_RE= GISTERS] =3D { uint32_t ide_ioport_read(void *opaque, uint32_t addr) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); uint32_t reg_num; int ret, hob; =20 @@ -2281,7 +2281,7 @@ uint32_t ide_ioport_read(void *opaque, uint32_t addr) uint32_t ide_status_read(void *opaque, uint32_t addr) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); int ret; =20 if ((!bus->ifs[0].blk && !bus->ifs[1].blk) || @@ -2370,7 +2370,7 @@ static bool ide_is_pio_out(IDEState *s) void ide_data_writew(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); uint8_t *p; =20 trace_ide_data_writew(addr, val, bus, s); @@ -2406,7 +2406,7 @@ void ide_data_writew(void *opaque, uint32_t addr, uin= t32_t val) uint32_t ide_data_readw(void *opaque, uint32_t addr) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); uint8_t *p; int ret; =20 @@ -2444,7 +2444,7 @@ uint32_t ide_data_readw(void *opaque, uint32_t addr) void ide_data_writel(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); uint8_t *p; =20 trace_ide_data_writel(addr, val, bus, s); @@ -2472,7 +2472,7 @@ void ide_data_writel(void *opaque, uint32_t addr, uin= t32_t val) uint32_t ide_data_readl(void *opaque, uint32_t addr) { IDEBus *bus =3D opaque; - IDEState *s =3D idebus_active_if(bus); + IDEState *s =3D ide_bus_active_if(bus); uint8_t *p; int ret; =20 @@ -2711,7 +2711,7 @@ static void ide_restart_bh(void *opaque) return; } =20 - s =3D idebus_active_if(bus); + s =3D ide_bus_active_if(bus); is_read =3D (bus->error_status & IDE_RETRY_READ) !=3D 0; =20 /* The error status must be cleared before resubmitting the request: T= he diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 6be29e44bc..dca1cc9efc 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -60,7 +60,7 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int = ret) { DBDMA_io *io =3D opaque; MACIOIDEState *m =3D io->opaque; - IDEState *s =3D idebus_active_if(&m->bus); + IDEState *s =3D ide_bus_active_if(&m->bus); int64_t offset; =20 MACIO_DPRINTF("pmac_ide_atapi_transfer_cb\n"); @@ -136,7 +136,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) { DBDMA_io *io =3D opaque; MACIOIDEState *m =3D io->opaque; - IDEState *s =3D idebus_active_if(&m->bus); + IDEState *s =3D ide_bus_active_if(&m->bus); int64_t offset; =20 MACIO_DPRINTF("pmac_ide_transfer_cb\n"); @@ -220,7 +220,7 @@ done: static void pmac_ide_transfer(DBDMA_io *io) { MACIOIDEState *m =3D io->opaque; - IDEState *s =3D idebus_active_if(&m->bus); + IDEState *s =3D ide_bus_active_if(&m->bus); =20 MACIO_DPRINTF("\n"); =20 @@ -251,7 +251,7 @@ static void pmac_ide_transfer(DBDMA_io *io) static void pmac_ide_flush(DBDMA_io *io) { MACIOIDEState *m =3D io->opaque; - IDEState *s =3D idebus_active_if(&m->bus); + IDEState *s =3D ide_bus_active_if(&m->bus); =20 if (s->bus->dma->aiocb) { blk_drain(s->blk); diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 84452ae4ef..f1017f7333 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -250,14 +250,14 @@ static uint16_t md_common_read(PCMCIACardState *card,= uint32_t at) case 0xd: /* Error */ return ide_ioport_read(&s->bus, 0x1); case 0xe: /* Alternate Status */ - ifs =3D idebus_active_if(&s->bus); + ifs =3D ide_bus_active_if(&s->bus); if (ifs->blk) { return ifs->status; } else { return 0; } case 0xf: /* Device Address */ - ifs =3D idebus_active_if(&s->bus); + ifs =3D ide_bus_active_if(&s->bus); return 0xc2 | ((~ifs->select << 2) & 0x3c); default: return ide_ioport_read(&s->bus, at); diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 4223f5e64d..2ddcb49b27 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -296,7 +296,7 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val) /* Ignore writes to SSBM if it keeps the old value */ if ((val & BM_CMD_START) !=3D (bm->cmd & BM_CMD_START)) { if (!(val & BM_CMD_START)) { - ide_cancel_dma_sync(idebus_active_if(bm->bus)); + ide_cancel_dma_sync(ide_bus_active_if(bm->bus)); bm->status &=3D ~BM_STATUS_DMAING; } else { bm->cur_addr =3D bm->addr; diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index c687282a78..c2b794150f 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -566,7 +566,7 @@ static inline uint8_t ide_dma_cmd_to_retry(uint8_t dma_= cmd) return 0; } =20 -static inline IDEState *idebus_active_if(IDEBus *bus) +static inline IDEState *ide_bus_active_if(IDEBus *bus) { return bus->ifs + bus->unit; } --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884642; cv=none; d=zohomail.com; s=zohoarc; b=BL5flXsP3vaI9w5oyP8hGjf7n132hy0DGs9YgphQuWjpJkEEusOqCkVjENSMBC1pqpDjKLolGtG4SFHqz+Q0eoXmrT3Gzo+iqp0r+jQ4NV6bswfI5G3D8U4wYFDB/0TPPHgRZGe/bhQZUPjjYRNAa9IdgpFis7prpa3KtlNj04c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884642; 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=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=FYd9kNwv/dK72aPJZlz/fpzhsbSpRE2JPycl5Nzn1W0VnW2v2F+aa79Aa2Kfoz8G8ICq0RcgHhByhlhp4DdhA5OEeA9lEas8/SrN8uR3+UWE5qgW0FfU77+LaaMtf9R3Jcu8b2OMtTkub0TaxYUs5Gq/bJr4lOUstdfuHkFHRp4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884642352103.40143053207498; Mon, 20 Feb 2023 01:17:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HR-0008F8-Aq; Mon, 20 Feb 2023 04:16:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gg-00071P-2K for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:34 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gd-0003kI-CN for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:29 -0500 Received: by mail-wr1-x434.google.com with SMTP id c12so338853wrw.1 for ; Mon, 20 Feb 2023 01:15:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m6-20020a05600c4f4600b003df245cd853sm1048184wmq.44.2023.02.20.01.15.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=wj2U1p9MxWJrb5KdACVC1CO7lBVcGMa/jKfn4/kdF4CVhh2IgYRbk+IqQL9KQuxJ4R liYRI9rU4um1J38EVAeI+a6CAsVww73tuD6rY/qzigXqTFHUpL9XEPprikbm0gHT/jvf 6wjMWVC4t+7l7yE1LpMkbBz5o3aVcwK95XsYp3zAQ914d5Ugh6739RX8fFITV3Iluzq4 nCz5Wi46gqluryzoiQeX1ff7X/OpNsAmboAtCFU9JLOyZpNB+WHOng9S5FsqFoG0i6ME ZMa3oXQi7p5YLKIgSiM3JwuPErwRXZ4jr38J+dFwPH1jFET9STHj+KP/+u65uKReLcA4 7wkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=TCFbC03/vwXlKjPLgyJIeHORr9BfIMjbI5TmDqBBxc6ieqc79G1CIEcvthaRRAOEQH 2YmU3RpBpBLPnAa/CJRWuQ8eXx7Br3GK96z0JgaOTfz+PDF8B+5OFYzjeCgdlH6nFwd4 LGX+DtFY5P96On6I+oIh2qHzAwhFObaQeE7LMjE1OB5uoR5hUfhDC8TifYctNjpclSvO BKtTq8Vm2rvUrL/4YtBgiOAGDxIZQboufe7vByGHf5w1xjD9AMqnaD5MvF+c6eCk4OTJ dklJoVlTcFs1ORomL+y28ErxPJth5JrhXSbsiOiDt6Hgkwej9/PXhd9XNfyMKDNZ6qko 8BZg== X-Gm-Message-State: AO0yUKXs7ZAKEnFs1ZXuON91XoAxZ7wxqP1kTg/cT2qyknmz60SYMXgy 9KofFSVs3NXJjEb+q/yC5RITu4wyDdMuuUal X-Google-Smtp-Source: AK7set/iV3J8GNu8Fj854/l/eVlPvijg1cbe4p2CIuLZdUzEt4ARxQC1A1fb7QcZ2as1RYT++dnNAg== X-Received: by 2002:adf:e255:0:b0:2c5:52ef:61c5 with SMTP id bl21-20020adfe255000000b002c552ef61c5mr136594wrb.41.1676884526496; Mon, 20 Feb 2023 01:15:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v2 17/24] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' Date: Mon, 20 Feb 2023 10:13:51 +0100 Message-Id: <20230220091358.17038-18-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884643816100001 ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e --- hw/i386/pc.c | 3 ++- include/hw/ide.h | 4 ---- include/hw/ide/internal.h | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6e592bd969..79297a6ecd 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -34,7 +34,8 @@ #include "hw/i386/vmport.h" #include "sysemu/cpus.h" #include "hw/block/fdc.h" -#include "hw/ide.h" +#include "hw/ide/internal.h" +#include "hw/ide/isa.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" #include "hw/pci-bridge/pci_expander_bridge.h" diff --git a/include/hw/ide.h b/include/hw/ide.h index 24a7aa2925..db963bdb77 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -3,10 +3,6 @@ =20 #include "exec/memory.h" =20 -int ide_get_geometry(BusState *bus, int unit, - int16_t *cyls, int8_t *heads, int8_t *secs); -int ide_get_bios_chs_trans(BusState *bus, int unit); - /* ide/core.c */ void ide_drive_get(DriveInfo **hd, int max_bus); =20 diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index c2b794150f..d9f1f77dd5 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -647,6 +647,10 @@ void ide_bus_init(IDEBus *idebus, size_t idebus_size, = DeviceState *dev, int bus_id, int max_units); IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive); =20 +int ide_get_geometry(BusState *bus, int unit, + int16_t *cyls, int8_t *heads, int8_t *secs); +int ide_get_bios_chs_trans(BusState *bus, int unit); + int ide_handle_rw_error(IDEState *s, int error, int op); =20 #endif /* HW_IDE_INTERNAL_H */ --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884700; cv=none; d=zohomail.com; s=zohoarc; b=LRpybVKpIRqvKlf/cfFNeotbPLFavsIe2SX1RZxEahfAkGdnQEkRPz2aBGh670++qLrvVrmGv+mFAFbl3YJHLW3jl4dYJq4p1tzJEaBfYfJ7MTXCB/mrzcFB3JFB1a3/4/LEZexLDfO8xUVMBLXfCFqIpBPlQ+gfhBU+AJSr7r8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884700; 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=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=ZU3qsQafBHGhi2AmcNl09ZYBAf+uqv9UxEm2zVDtmyPdeYDUA92cHQktKTK7SXJodKlPt39qq8UtGeAx8mBcWWXDuUXLWXE0okWGk9gH++gsrRA4vWeitMc1guhkmhDkzo2z+xOwPJqF1lbosDY0L08bAQ09Trbvh91LCvsjZPQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884700115388.78724626925566; Mon, 20 Feb 2023 01:18:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HF-0007dG-DK; Mon, 20 Feb 2023 04:16:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gl-00072t-Ke for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:40 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gi-0004Ge-TV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:35 -0500 Received: by mail-wm1-x32f.google.com with SMTP id m14-20020a7bce0e000000b003e00c739ce4so313774wmc.5 for ; Mon, 20 Feb 2023 01:15:32 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c4fc600b003dd8feea827sm10216609wmq.4.2023.02.20.01.15.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=kkMjx7GgkkZi3BsfS4ITbV34M7i21b/ozd5L/2r+vsRBOg25IxsFkW5K52pdeGhDbE CzbL6pdQSOaJiRYvMEJsSieuuCB8qPjHjya7Wbz82+ZEezhYEY5ToCmD02ZfeaeC8uXy R4uOg9UzGgutypzYE23m5pGzkw9+l5AmNBFScFKI2K49VQfGzGtJVgf9AlT31UyiUhno ufUmwNSkL2C5NIQqMSVdSsG80TMNBFFpbXNLt2Oemyq/5Dxi45SJ4Urb0pVD+bRaBR2t VonQzmL8X12rCmjt9wdIEE8ClwQsfCa87HVBEbdxJ+WdWXl+2sL+RI5sU1B7j9BpTWmc yJaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=wOy+uSQ48FNb84L0BAaEksET2wLfScqM3UPFUDEUOKDJ8NekA9vQtO4n/z5QCZX1fI 8w/h67wCyw9MxBgon5uIygorqZlswOrnpYpZzbrkkY462THxJ/TShPz/WPpYnZQ/aY7l IOT+35ZaBhi6jH7VaJVar/YLPEDclx9dVJkZhwz2mT+7O2FdMYCdoa5SJPuw6Eerdjsc NIIQYyET7SVC5KhFYU/lfyfDKGHtIU8zNZVHt8wCm6tJ1EMGRDWWWfdiAyj2WhPLLKrq spgMKc2gOE7HlBNquU+NChNOGPGGYWOnfPXHQrv0BUycTW1NWsQOEQAhN7vvxiVnT3tI tOjw== X-Gm-Message-State: AO0yUKXHxDGa0u0n6tib8T9g4PKUtIDs0xZIDpHG86i2GBSresPFvVnO tiZzUzYPsUhTzT3vibg+fMjDPr9XCYCs3Qlf X-Google-Smtp-Source: AK7set8jmAK1WUVHcqSvF+p5H+miBbAUXqM+ngXfqZzbMnr+cO0+hJc13XZUbyOhLkF2x+d29D40Nw== X-Received: by 2002:a05:600c:3316:b0:3dc:42e7:f626 with SMTP id q22-20020a05600c331600b003dc42e7f626mr6301754wmp.26.1676884531368; Mon, 20 Feb 2023 01:15:31 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 18/24] hw/ide: Rename ISA specific ide_init_ioport -> ide_bus_init_ioport_isa Date: Mon, 20 Feb 2023 10:13:52 +0100 Message-Id: <20230220091358.17038-19-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884702045100003 Rename ide_init_ioport() as ide_bus_init_ioport_isa() to make explicit it expects an ISA device. Move the declaration to "hw/ide/isa.h" where it belongs. Message-Id: <20230215161641.32663-13-philmd@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/ioport.c | 4 +++- hw/ide/isa.c | 2 +- hw/ide/piix.c | 5 +++-- include/hw/ide/internal.h | 1 - include/hw/ide/isa.h | 3 +++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index e6caa537fa..7156c465da 100644 --- a/hw/ide/ioport.c +++ b/hw/ide/ioport.c @@ -35,6 +35,7 @@ #include "qemu/cutils.h" #include "sysemu/replay.h" =20 +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "trace.h" =20 @@ -50,7 +51,8 @@ static const MemoryRegionPortio ide_portio2_list[] =3D { PORTIO_END_OF_LIST(), }; =20 -int ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2) +int ide_bus_init_ioport_isa(IDEBus *bus, ISADevice *dev, + int iobase, int iobase2) { int ret; =20 diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 95053e026f..6eed16bf87 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -71,7 +71,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **e= rrp) ISAIDEState *s =3D ISA_IDE(dev); =20 ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); - ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); + ide_bus_init_ioport_isa(&s->bus, isadev, s->iobase, s->iobase2); ide_bus_init_output_irq(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_bus_register_restart_cb(&s->bus); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 2f71376b93..fc44c261cc 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -38,6 +38,7 @@ =20 #include "hw/ide/piix.h" #include "hw/ide/pci.h" +#include "hw/ide/isa.h" #include "trace.h" =20 static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size) @@ -140,8 +141,8 @@ static int pci_piix_init_ports(PCIIDEState *d) =20 for (i =3D 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); - ret =3D ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, - port_info[i].iobase2); + ret =3D ide_bus_init_ioport_isa(&d->bus[i], NULL, port_info[i].iob= ase, + port_info[i].iobase2); if (ret) { return ret; } diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index d9f1f77dd5..d3b7fdc504 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -618,7 +618,6 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDED= riveKind kind, int chs_trans, Error **errp); void ide_exit(IDEState *s); void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out); -int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); =20 diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h index 1cd0ff1fa6..7f7a850265 100644 --- a/include/hw/ide/isa.h +++ b/include/hw/ide/isa.h @@ -10,11 +10,14 @@ #define HW_IDE_ISA_H =20 #include "qom/object.h" +#include "hw/ide/internal.h" =20 #define TYPE_ISA_IDE "isa-ide" OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) =20 ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1); +int ide_bus_init_ioport_isa(IDEBus *bus, ISADevice *isa, + int iobase, int iobase2); =20 #endif --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885026; cv=none; d=zohomail.com; s=zohoarc; b=Q0hbSro5w6PKWzzhEa/+fLWzWNfGHpoooULcZ5fI0RmhRCocdEU1Sq9xNVzwvcExu+pYwWdblUG1McgD/yP3/6stmExJYFg8a/qZqRiMhlQQRzLzsPyLE5bpaxEyXmLkFyhBh1XPBItFo8xdK5WhnMLRvSmczIrFsMQTQXsqTqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885026; 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=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=lvJOs/nTaWVOGeq4jSCKQeqfQyhDZqy03nbWGggl6+MneRdBPtxc043ogMNBLSeqod0IUAaSNDyV67NAwRl9yVtjeuDhaOs9IXxaXi3jucYduED2tEOGxs7B+kpg1jGHYnKlSTaFB4XGZWXYwbvLphWXUIOGOOs5tkoXkZ+Av60= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885026252372.1475253018642; Mon, 20 Feb 2023 01:23:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HS-0008Ii-CK; Mon, 20 Feb 2023 04:16:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gq-00073W-Rx for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:43 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Go-000491-A8 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:39 -0500 Received: by mail-wr1-x433.google.com with SMTP id t13so258863wrv.13 for ; Mon, 20 Feb 2023 01:15:36 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v17-20020a5d6111000000b002c559def236sm4013038wrt.57.2023.02.20.01.15.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=y40nzJTu9YqYn48V52PzwvKykjR4DTUGi4ggJGcN2sgTXDOAjXkcRKvnblnjA91Ybl xWqRYLABhjv34K8fIZch8l63qnDN7qnYaCKWFMkKnYfKbv2Y5+xIZEImCPBeRAAOUTQY TNfaRnD9uMSvtUzzKdTdPj/pKiBT1NIWPMDypUQtyhv9tioSfbeyTE5J9Qs8TbMrzrw9 pxNByejeorB88qFLv3irmLl9QmlHrCa9RJ/xyZ6PA5zicby3nbbTPb4yNZB8/RpU1ZJ4 yRHHlXZWCnuBpsJ6ENrqGAsFxe/ygPmSqlr0XeBCDnDi7jxB9zPQCzEcowVnFuSA5sd0 8zuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=gVKS4j0e0aAteZ6s9dC/PIWARd+iWU3a520/JYF5mfZhEyyMHa1b6rhFdM95FLLG+T w+0wWASOSfFke3hp+KKtxb0cdE8ABb8+zXo8XbJSrtDnvXZg/rT4XmyNXBUHnj2C5Lj/ 3S6KT1I/+w2BDv/BMckwm5o+XaLJ8pgjUbrBFCOCNcwEvv73iWC4vaIBihJ/fQVMrDGu /mlVfhLN0d6/3JTE7GRUcOKY6zjWhyXsG01pp6rx3zo6wRFnbyrAmwya08TQUNfnZoyo WpBHq4CT8Q/3v+tDAWoWuT/TbUc2HX86IBF4SrH3E4kC89FfyviWsmULG8XWs4EMwY5p 0Zjw== X-Gm-Message-State: AO0yUKVBmxzY46aOIWdzVi5Snl9ASvoMt9evd0oUeq/zJW6QhDkntTDD XVkhyI1Ibg4c9opjOCY9BvvyXUEptgXHT6fB X-Google-Smtp-Source: AK7set/q23fnBqPAoEBvBrMr6BpCyhTuezndWx6q9dSuC1sBrVLhdAiM6FPcGYjveZ7xv64QCsHL6A== X-Received: by 2002:a5d:66d2:0:b0:2c5:9cb8:d314 with SMTP id k18-20020a5d66d2000000b002c59cb8d314mr2155152wrw.56.1676884536405; Mon, 20 Feb 2023 01:15:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 19/24] hw/ide/ioport: Remove unnecessary includes Date: Mon, 20 Feb 2023 10:13:53 +0100 Message-Id: <20230220091358.17038-20-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885026840100001 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-17-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ioport.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index 7156c465da..d869f8018a 100644 --- a/hw/ide/ioport.c +++ b/hw/ide/ioport.c @@ -25,16 +25,6 @@ =20 #include "qemu/osdep.h" #include "hw/isa/isa.h" -#include "qemu/error-report.h" -#include "qemu/timer.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" -#include "hw/block/block.h" -#include "sysemu/block-backend.h" -#include "qapi/error.h" -#include "qemu/cutils.h" -#include "sysemu/replay.h" - #include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "trace.h" --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885112; cv=none; d=zohomail.com; s=zohoarc; b=d/2+SSvulRnmGKYl/15+1LHMCqylM/VV2Y9DdSywFznCw+kz9hwIQQH/NYoqYdxHx5KscuTHm6tJbWdbVkrx+/iHfWeWxvHI14ADrnm4lJwcWtvY5742QVmQktdPthqXdm0pQVY2AnuBCXUSU5at8OKk4xgQr4r7YrzQpzhM6Zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885112; 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=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=jxiFGxjCREf31FKLKq02qQTQX1x4G0ErPIIfjP73Z4tKjRKRIuIAXCTflhAvGM4bAOunwmdA9vxIGnN02jpIeOLVZndU+jfwgfeNAEqzxLlCb/JEQrz/oW2FD3tqLyLFtDJdfO/6JPW1IaDya9sPR5lcppEZOw0ZzBkOMNOQeMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885112093556.5258757805481; Mon, 20 Feb 2023 01:25:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2IU-0001aS-LZ; Mon, 20 Feb 2023 04:17:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gt-0007AR-Vp for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:44 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gs-0003t0-6p for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:43 -0500 Received: by mail-wr1-x436.google.com with SMTP id b10so1930649wrx.11 for ; Mon, 20 Feb 2023 01:15:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x17-20020adff651000000b002c563b124basm1028706wrp.103.2023.02.20.01.15.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=iMKuljpnZBJ7a/EDsmZR4NisF1RKjfx4bI6aAVBclwO6/ZEGdJ2XasXkRfdhlE3Tmi TWWM4iXx96COyPQZLyTeMeVj5R35MlqIgPGc3S68NtjLqUrEiCk0/A5af9w+51UWlHwl jO45PJK99CbH5QdiMz3GDKxHXMlyFOg+hzK6rk+O3FOlOR3hLbz3h6SX0oh1aygo8HE7 cLhFpqSypDd8KPG38NXtCtvm5fIJ2eOqcRC8BLltwCHokiaTaqH5cMxPLTtJqWEYXeIN Vf1MRk57fSsr5wxDGKPwJc6/6pjM+TfxrPx05v+P/rg5PoxhQMOG5/73ryeOmze3gXG7 s2Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=f/xq8+WIaWZQZW4DXFWiXTNgrboJCtThn7kVb1peZTW4a/RpBpk0lxgt8hbWbMHfK8 7SUAtU92pFhsgEEWrvrFXQNH7JTAim0NqSJV8Ny4/XtS0omYARltIVyK8jftckpBQeIf 45KeinHP9V/BflFoMf7b2LjuP7FA4pvCI8gjULwhDm23qBAV+qf6WchFQEnoT+bSYbSt kaK1pzcOXxaPOBCB+yHo3bhRQojV2Irh7idZxJh25iX37aKiW4oMxuhND+iZDYFPOISZ fws9ZrC9WNp/imgd3CUS+S9fcreIyrF90o/jOizwqDxsqFEuSRs4ZKzdjq1HfKJ/0TEY J1XA== X-Gm-Message-State: AO0yUKUIx/MpdnU1TZU4GoQFAVR8BfzvISYX//i+vO8om4xXrFgDvrZ+ vJ3IsonRBC6vTTIcbTu+K7A/fPLZMFBcfXLY X-Google-Smtp-Source: AK7set9mffl4AElI25q2Zmv9NyHyyTEK4xfsh4uy/WFpw8CSHS2gqdY2Whz8cjZ7rr/Y1T6mPFmZQQ== X-Received: by 2002:adf:e255:0:b0:2c5:52ef:61c5 with SMTP id bl21-20020adfe255000000b002c552ef61c5mr137090wrb.41.1676884541203; Mon, 20 Feb 2023 01:15:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 20/24] hw/ide/pci: Unexport bmdma_active_if() Date: Mon, 20 Feb 2023 10:13:54 +0100 Message-Id: <20230220091358.17038-21-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885113124100003 From: Bernhard Beschow The function is only used inside ide/pci.c, so doesn't need to be exported. Signed-off-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/pci.c | 6 ++++++ include/hw/ide/pci.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 2ddcb49b27..fc9224bbc9 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -104,6 +104,12 @@ const MemoryRegionOps pci_ide_data_le_ops =3D { .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 +static IDEState *bmdma_active_if(BMDMAState *bmdma) +{ + assert(bmdma->bus->retry_unit !=3D (uint8_t)-1); + return bmdma->bus->ifs + bmdma->bus->retry_unit; +} + static void bmdma_start_dma(const IDEDMA *dma, IDEState *s, BlockCompletionFunc *dma_cb) { diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index 2a6284acac..7b5e3f6e1c 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -55,12 +55,6 @@ struct PCIIDEState { MemoryRegion data_bar[2]; }; =20 -static inline IDEState *bmdma_active_if(BMDMAState *bmdma) -{ - assert(bmdma->bus->retry_unit !=3D (uint8_t)-1); - return bmdma->bus->ifs + bmdma->bus->retry_unit; -} - void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d); void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val); extern MemoryRegionOps bmdma_addr_ioport_ops; --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676884775; cv=none; d=zohomail.com; s=zohoarc; b=MJLtlHhsQJ3WYNW5eAEIKSePOJ5nfyDHCHL9N+ex3o/L6dr83DZl41fpPtyLNPhKHCS/kWRg2zZ/eV8QAFWtvaARRWCRCWrHIivQ2xZryxq/ksa5AHdcya3D7h8Hk3YZJ+xJTqbEV8hupe1RI72bge8JKGxaA++J8yKfUR9sNNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676884775; 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=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=X0tqbTBy5kugqG0jLKgmcv/mq3rqbSo5Plxf0dqmvfJCLBbjU3utCQlDL7mZlGXHri9PvA/OEUSACi1asIyv0v4/6+eIovKetOv2JauD49u29++poh6hSL2IPmpqPYjXBaTgjBX3u7Sk7UMONn54yVvQMtBNL3727F97gRsBHRY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676884775158515.8622791513134; Mon, 20 Feb 2023 01:19:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2JO-0002ez-70; Mon, 20 Feb 2023 04:18:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H0-0007Fg-5R for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:52 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gx-0004HM-0u for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:49 -0500 Received: by mail-wr1-x430.google.com with SMTP id v3so259152wrp.2 for ; Mon, 20 Feb 2023 01:15:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w18-20020a5d6092000000b002c6d0462163sm3253711wrt.100.2023.02.20.01.15.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=tbSyiQnYW7uyyr1xu3zTSDiwzYz+kA5vEvAMfnRm3+slVutvwEMeB7+UvXA0Q8YWxm JH6q0PhP9bQOnn4P9qBMgVJulIlV5DGK/Gqg+36Sq+bn4Gd1uqfURpKVojvxj9WVPoae lnhhnjEGRKX17U1Kvl/+wo2zImfXchxgW8jueRl3t8cZ8M+Tup3YehRe9Zba9ExlX1sa W4dI7mPknbSFYOehIjNbH9JAyh7Z+O7UmyxOP1i501BnyXvyHRhRan6dimdGl2Ei360/ N7mmY+SDOl8LgHcmV8skuv8pFKp9WDWwSt762CCeR/QLjjmswTxxlfZCEtLOaeSQ7Zbt zoTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=XH7mTDravODAofeqL5S5sJCjCZt54IbqZ/XE4OCbXMruQNd4P01urfMBQBxezISzK9 a38hRw9lh9W3+wns2/HWJVtl3RNUMD7CV/A1gRLz5rpwit3kKNTAzFk1Su/nsze0p4I9 YEjVUPyWjuPgmVA1zVB6IWT5cqYWUt2HYBidWF+MBipaWH0fhLE3D20heF9h/j6UY9ly KSqL/iYSUL10crvX4aC/3EJN5GYGyQp4lJKvs1PxNndegIXEk8gvGKVvKMVau8c9bM3f qguWJJM4gAZjXZ/gGo0yQ6PSC4IQ9dNMizRqRu/zckicDQeifLrO/Cyb32n1VTUykmdt OAdA== X-Gm-Message-State: AO0yUKWn403XhDACqxBAXp5AdgCUptdMV4tyRvrU3lE24iiBmZhq/n5H Yg+AXxOk4A5T5Y+LKHlPc6xoa2LZUsLoPf2C X-Google-Smtp-Source: AK7set9OXhQAb8b8AMCyILxvRdbPjGrxHzsWvCWmQGKg4DHGbs/bU6wEBM877A9tzDafMczBoNEjZg== X-Received: by 2002:a5d:66c5:0:b0:2bf:ee7d:5369 with SMTP id k5-20020a5d66c5000000b002bfee7d5369mr949275wrw.59.1676884546169; Mon, 20 Feb 2023 01:15:46 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 21/24] hw/ide/piix: Remove unused includes Date: Mon, 20 Feb 2023 10:13:55 +0100 Message-Id: <20230220091358.17038-22-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676884777177100001 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-19-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index fc44c261cc..5b1455e232 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -28,14 +28,9 @@ */ =20 #include "qemu/osdep.h" -#include "hw/pci/pci.h" #include "migration/vmstate.h" #include "qapi/error.h" -#include "qemu/module.h" -#include "sysemu/block-backend.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" - +#include "hw/pci/pci.h" #include "hw/ide/piix.h" #include "hw/ide/pci.h" #include "hw/ide/isa.h" --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885080; cv=none; d=zohomail.com; s=zohoarc; b=YvpWks2qkovORz6EHQYpcmhWZ7HyXs3XKiWpC+STrDvVurlaGfqcie2MojtQy5fEymVR8Ylg4wLOF7um6lgm6rAWH3q3zJEig0mI0S1g+oNnsaEDnb7yYd6spXZ3XbptE9xIS2pPw+s8IeZKe4R8S0oB69LEWiHMmiyRRdrEKig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885080; 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=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=FyFc7ovL4wyF/vHYW9uxYkSJrgZmelL+HgtRGvX8GarQvqY4/bZOpEdxZdr7mROqLfcbHOjR8PtKWJGHi9qigDLyT5nNoi4zuDjgFSu1QLLZSyLtiBS960wgWQCgoELePEsc4WU35avhUqjv85QtBIZpdpp7bz0w1+A8PUwvSPY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885080977122.99600486666532; Mon, 20 Feb 2023 01:24:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Hn-0000SZ-BY; Mon, 20 Feb 2023 04:16:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H3-0007K0-QL for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:54 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2H1-0003s6-UQ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:53 -0500 Received: by mail-wr1-x434.google.com with SMTP id c5so1027793wrr.5 for ; Mon, 20 Feb 2023 01:15:51 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t14-20020adfe10e000000b002c56af32e8csm3265644wrz.35.2023.02.20.01.15.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=fd/O7waEqStVVMsRHrOf5+NtZVlvPNKiHVweW33qIRYx30+9GnXhs90IGgj9YsE5yF k0hYsmUsLENpZhfeBJTAGLy2K1u/PJ6dEjBz6TWvfRjg/7L7xey3VVMfdME6UhEo3RHY HCheWGrEdA8gdTw2BADuJ95qPjrRUbxRKY+ced1XHRDUPE+2iTrAP5jrebl/JEKX6Qdg g28X2/sFCpJ/8OGhc5+6qQcGWW7m504f2+kZf6Z6lbpK0vL2Tz1Z6WzbOat7rbr+z4Zl stYrF0ByRDAtt5Uo4e7uxembIVpvhYkiYHIgfZKKrFog8nqGnErbBm1PHRSqouh7dM/0 q4Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=tiSp0au9fpPvC4TFhgAsgQ8Cm/mtlEir6XSxr9TqhyGjl2aUus3V/4gkSu+TBdo377 nlKxjS2EM96RMM9coUtKVpe8B65L1FJG/WVNW9m2wb/UL9NXWpkk8aCnBTO3z/XPf4Si pZt4GQw2huHhtB1Wf/3k7FQs7MKQTgQNPGcDDJAngkQ+Hh9upKlh+bq8Ow3nlBnmB9LN j1HLqdXVasHA7JgawzxPAJON74hYdHyez9esY2ouGQkwcOVWvDzpwJFuZJAxBgRsOzc3 ETjnQ0nA6DFbojVOjCHTVbw0uvv8IfXPDKBPhmFj/A5O2HkN769Thl4+bArPTJvttkZ1 uwgA== X-Gm-Message-State: AO0yUKURvVWgg1mVGggLuPnSAvDwC95t9dgwM9Ud65d2xFUTtJW4Q7I3 ZvouZuh6nKZnWCyczCdkQ3Cde5E0HKXhgr+2 X-Google-Smtp-Source: AK7set9X0Fa2Jcj5jVD1aTrX1rzCaeAQO3qULnLJfDbxcUXcvBqlOBKFG+FeLYrzQpTmb9ihkbBGCw== X-Received: by 2002:a5d:5607:0:b0:2c3:dc42:525d with SMTP id l7-20020a5d5607000000b002c3dc42525dmr1841452wrv.36.1676884551066; Mon, 20 Feb 2023 01:15:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 22/24] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Date: Mon, 20 Feb 2023 10:13:56 +0100 Message-Id: <20230220091358.17038-23-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885082928100003 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-20-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 5b1455e232..b74f1c77c4 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -122,7 +122,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } =20 -static int pci_piix_init_ports(PCIIDEState *d) +static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) { static const struct { int iobase; @@ -139,7 +139,9 @@ static int pci_piix_init_ports(PCIIDEState *d) ret =3D ide_bus_init_ioport_isa(&d->bus[i], NULL, port_info[i].iob= ase, port_info[i].iobase2); if (ret) { - return ret; + error_setg_errno(errp, -ret, "Failed to realize %s port %u", + object_get_typename(OBJECT(d)), i); + return false; } ide_bus_init_output_irq(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); @@ -149,14 +151,13 @@ static int pci_piix_init_ports(PCIIDEState *d) ide_bus_register_restart_cb(&d->bus[i]); } =20 - return 0; + return true; } =20 static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) { PCIIDEState *d =3D PCI_IDE(dev); uint8_t *pci_conf =3D dev->config; - int rc; =20 pci_conf[PCI_CLASS_PROG] =3D 0x80; // legacy ATA mode =20 @@ -165,10 +166,8 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error= **errp) =20 vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); =20 - rc =3D pci_piix_init_ports(d); - if (rc) { - error_setg_errno(errp, -rc, "Failed to realize %s", - object_get_typename(OBJECT(dev))); + if (!pci_piix_init_ports(d, errp)) { + return; } } =20 --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885390; cv=none; d=zohomail.com; s=zohoarc; b=WKt0DwWVc8ktZ9R7X46S9mGg/h3L45/7YII4rTUDKpTPTQ0T9LFhskip9oy6dbTEcJlLIrCZhScfKP7L3AGYgnAmMNWaOcS728URHhpYsHl2/W4NCoNYt+9VpGugM0US4icMI7ZQr0Crdkq0nz8Fz7je74QuPUmbc6VZxVhEblc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885390; 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=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=DZRs7QH7JuJKvMeOmkObzk3YXyRYrpsSlLckBJfz0Gy2OB0nb7YU5zUJkCTevUmVudGqbPBlJ3b4LsipThKAZGcJVvjHDscwHF9OJtM/sJGFJCUks+P/+T5eYfS3l/uO8ja9BL05MpNSXFGt0AfPryZLX473Xc9vfTLJzfQCQG8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676885390642991.8457892721145; Mon, 20 Feb 2023 01:29:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Ir-00020F-IV; Mon, 20 Feb 2023 04:17:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H9-0007Y6-Bg for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:00 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2H7-0004MI-HV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:59 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg28so405092wmb.0 for ; Mon, 20 Feb 2023 01:15:57 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a12-20020a05600c224c00b003dc53217e07sm13119110wmm.16.2023.02.20.01.15.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=PfUnD/IrABYau0XaQ92dv/4sRwiEfhCSs655lVSoDxgLHNT7XuxW50lHhSloPVQAtv 1fr80LwL0vJF0J8LuhkP1fPHzoIjiJ1yobgJMG6dEWVib21CiwKZaMe70RgXkuHxeDpt azQBqMKr8HauYTc5jsgx7neLwjcz9qQYokzmb24LcZZpu/KAGsHMQ+p1xnTAXy3csIml 4w5t13Y/eRzHzB98ZC+M4fSKRDYWLQpXx5owL7M3QrUyuhG2HkmF61VHVR5v8fopvOSc 3XylvJJkjgT3byPWzRxAovoGSHn+niHN9rvxn1iXAcpFGVVFoK0/a8I2vX/M01ulBe+c YlUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=rpQWMYUQZ1QeeQnlzkfjT15hSMquFXlIDWGTlSKktcNLYdhnKxDQevNYoevWJNwTgT Wy68N2ppXNI1HbA0+KqrByIjR4pKnDMPs2eIalX81MZ2id2pv2qWZEP43DGXtBB3Fg+n vA/pwUcN/xS/IXc/PmTbknHjEatV2zqQgZwGp9jyhLsvTruY+Y9StUqR3xW4/T0n4Ju2 7CE/PTT2O29dA2ariFvV5oYYuYHbWr/lrkVBGL3/WOpxfFQdG1j9Ddp5SXTezrkC3ZCe rSlcIJmqwyfP3EN0gTWJnigXLcCKZoev9CdogOYnzMQLumBFA3dk5oS9C7wZuxd3mIc5 +3aQ== X-Gm-Message-State: AO0yUKVqpKC5Q/K8bL3VCYk+U/upytjgEMEwKFfiN1nHmlJp6W3eHdvC T6m0MTtQpDE1hxsik6P3hoOUzprWnjuIk6mB X-Google-Smtp-Source: AK7set+qH/8OynNfj6+l2DjUrptr6WCi3Aoyd2lV5wItY3eK4QPWG9YtWSW0dC9GpvaErTxWDP/qOg== X-Received: by 2002:a05:600c:706:b0:3e2:1368:e3a0 with SMTP id i6-20020a05600c070600b003e21368e3a0mr9518224wmn.18.1676884555970; Mon, 20 Feb 2023 01:15:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 23/24] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Date: Mon, 20 Feb 2023 10:13:57 +0100 Message-Id: <20230220091358.17038-24-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885392496100003 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215112712.23110-21-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b74f1c77c4..acb4eaa27f 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -122,7 +122,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } =20 -static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) +static bool pci_piix_init_bus(PCIIDEState *d, unsigned i, Error **errp) { static const struct { int iobase; @@ -132,24 +132,21 @@ static bool pci_piix_init_ports(PCIIDEState *d, Error= **errp) {0x1f0, 0x3f6, 14}, {0x170, 0x376, 15}, }; - int i, ret; + int ret; =20 - for (i =3D 0; i < 2; i++) { - ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); - ret =3D ide_bus_init_ioport_isa(&d->bus[i], NULL, port_info[i].iob= ase, - port_info[i].iobase2); - if (ret) { - error_setg_errno(errp, -ret, "Failed to realize %s port %u", - object_get_typename(OBJECT(d)), i); - return false; - } - ide_bus_init_output_irq(&d->bus[i], - isa_get_irq(NULL, port_info[i].isairq)); - - bmdma_init(&d->bus[i], &d->bmdma[i], d); - d->bmdma[i].bus =3D &d->bus[i]; - ide_bus_register_restart_cb(&d->bus[i]); + ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); + ret =3D ide_bus_init_ioport_isa(&d->bus[i], NULL, + port_info[i].iobase, port_info[i].iobase= 2); + if (ret) { + error_setg_errno(errp, -ret, "Failed to realize %s port %u", + object_get_typename(OBJECT(d)), i); + return false; } + ide_bus_init_output_irq(&d->bus[i], isa_get_irq(NULL, port_info[i].isa= irq)); + + bmdma_init(&d->bus[i], &d->bmdma[i], d); + d->bmdma[i].bus =3D &d->bus[i]; + ide_bus_register_restart_cb(&d->bus[i]); =20 return true; } @@ -166,8 +163,10 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error= **errp) =20 vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); =20 - if (!pci_piix_init_ports(d, errp)) { - return; + for (unsigned i =3D 0; i < 2; i++) { + if (!pci_piix_init_bus(d, i, errp)) { + return; + } } } =20 --=20 2.38.1 From nobody Wed May 15 04:10:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676885062; cv=none; d=zohomail.com; s=zohoarc; b=QCSM6C7E9Bo7uWwvVJ2tFKH/scPxEan71CdJjaj5WfRkvIiAfYJm+6KgcXTBoTJLC/osfPvKG5d6uusjIA2LxXuq2GcTkh/cwLH5k5IV6CtrGUFoCJyHYhDb8cH08SsgaH1DffNZ39lQsopP86AB5U2F+lJE28iHMK/N+Ps5hUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676885062; 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=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=BfgjfIMVw4GHHJgf0yaeJ4OBYS0lhEg4WB+9LaxmKCkXKCH4hkbYnYO8VvZe69Q8z+P6C37tWqLiZ2EYnnpXdPQA/1TsV/0V8ecniYTGcitk6bNuyLa/s4jgxCTXdlREsphzig7JSI8zEikVqOZ9ifx2pIviVG+9Q+yZbWR6eiY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167688506233650.02325495506591; Mon, 20 Feb 2023 01:24:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Js-00046m-Cn; Mon, 20 Feb 2023 04:18:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2HF-0007hB-2H for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:05 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2HC-0004NF-Ia for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:04 -0500 Received: by mail-wm1-x32d.google.com with SMTP id k14-20020a05600c1c8e00b003e22107b7ccso511826wms.0 for ; Mon, 20 Feb 2023 01:16:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n9-20020a05600c500900b003daffc2ecdesm9573572wmr.13.2023.02.20.01.15.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=X9HI8cuKVoc6cu7Gy/gd0haTMRShy2N0X6gMidIQHR+XvCNefLGAOjD2DoeYj6tURQ SuH5B2BqI9h3Yncex8mygXrjRLxzVGKJK1uaxwS3C+/EOAQZntxDApkjaBy2+kFm3zuY 6tgr8/NeeTG8RfYV4LD+hUK/EvRctLyFUj6w2dICzyrce0LbbrF/IJ57iHPdjR+4b+gk SGFuFwSj6x5YmUW3yKsojCUJt3F4bwIxuvY2Sg1O7AYGqSgFEBN3oqCrM+8FCrar7Z1Z vJGM2kOTRw1Xmkun6xa+K3Hxdo7VqSAZJicduCAxIq9p6H8+B+jkuiuBijw50TEAIZBq lvjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=bQvUQPikuSoy+vh+r3tbYEP6sBKYhu6PDNcKm5hId6RdWi5op0aUiCbsSisIMYuSn9 kjDDymrOO7SX3NzXeWIdEuex8oPPtAXJ/b65V/8vg2deHES6UPmZjZCjQs6zmlSh31bV gAju1AdbYsOZzVv9ASG/Kyf7xNa+3F1cSyXaBjSP/tJXKZwM8SS3a/Ec7zgnwfUoc+F5 bMb1EI7c2xXlekL+dSLv38RKXVfRT7v12SSMX5PYq+UQfw50xWTyKbHhgC7IW/UOL4Vp WJX0C63UVfd9A1g1fHE6L5NRKJM6ebmAzOiW0kUhOkmglCOzJhW+5RRYR58bpfKa5JH4 Q/iQ== X-Gm-Message-State: AO0yUKX4E/fjCWeqqgYVsHx6tyZXEflUinwdAbWv28OzeVB2L/XTe0Za xiuAwn2BNUIqN2uV7uWDbH4Wy4Gp2x80eU3T X-Google-Smtp-Source: AK7set+EGk4RIxEK3u8rvk4rYNXk/VvC9GfsIIBZ07UHPXuFDZWcrs2zIi6feXHhDMfzIvBHlcM67Q== X-Received: by 2002:a05:600c:984:b0:3e1:fff7:e970 with SMTP id w4-20020a05600c098400b003e1fff7e970mr82721wmp.30.1676884560915; Mon, 20 Feb 2023 01:16:00 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, Fiona Ebner , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 24/24] hw/ide/ahci: trace ncq write command as write instead of read Date: Mon, 20 Feb 2023 10:13:58 +0100 Message-Id: <20230220091358.17038-25-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676885063179100001 From: Fiona Ebner Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: Fiona Ebner Reviewed-by: Alex Benn=C3=A9e Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230217103130.42077-1-f.ebner@proxmox.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/ahci.c | 4 ++-- hw/ide/trace-events | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d79b70d8c5..55902e1df7 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1086,8 +1086,8 @@ static void execute_ncq_command(NCQTransferState *ncq= _tfs) ncq_cb, ncq_tfs); break; case WRITE_FPDMA_QUEUED: - trace_execute_ncq_command_read(ad->hba, port, ncq_tfs->tag, - ncq_tfs->sector_count, ncq_tfs->lba= ); + trace_execute_ncq_command_write(ad->hba, port, ncq_tfs->tag, + ncq_tfs->sector_count, ncq_tfs->lb= a); dma_acct_start(ide_state->blk, &ncq_tfs->acct, &ncq_tfs->sglist, BLOCK_ACCT_WRITE); ncq_tfs->aiocb =3D dma_blk_write(ide_state->blk, &ncq_tfs->sglist, diff --git a/hw/ide/trace-events b/hw/ide/trace-events index a394c05710..57042cafdd 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -91,6 +91,7 @@ ahci_populate_sglist_short_map(void *s, int port) "ahci(%= p)[%d]: mapped less tha ahci_populate_sglist_bad_offset(void *s, int port, int off_idx, int64_t of= f_pos) "ahci(%p)[%d]: Incorrect offset! off_idx: %d, off_pos: %"PRId64 ncq_finish(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:%d]: NCQ tran= sfer finished" execute_ncq_command_read(void *s, int port, uint8_t tag, int count, int64_= t lba) "ahci(%p)[%d][tag:%d]: NCQ reading %d sectors from LBA %"PRId64 +execute_ncq_command_write(void *s, int port, uint8_t tag, int count, int64= _t lba) "ahci(%p)[%d][tag:%d]: NCQ writing %d sectors to LBA %"PRId64 execute_ncq_command_unsup(void *s, int port, uint8_t tag, uint8_t cmd) "ah= ci(%p)[%d][tag:%d]: error: unsupported NCQ command (0x%02x) received" process_ncq_command_mismatch(void *s, int port, uint8_t tag, uint8_t slot)= "ahci(%p)[%d][tag:%d]: Warning: NCQ slot (%d) did not match the given tag" process_ncq_command_aux(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:= %d]: Warn: Attempt to use NCQ auxiliary fields" --=20 2.38.1