From nobody Sat May 18 05:04:59 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=1676460500; cv=none; d=zohomail.com; s=zohoarc; b=dokSFex/oIGaAq54eTe4vWrow6D6URJWuSqhL4HlR4UaTyJHSlvZLp0SvYOFipTWuvXgK77ToS6Q6NB2L0iWxrZNJYBImqF+pRaf7fFVDymn4FZV3uoavEL868QaHpIfBqiBdgT+raBUN1ojhFTWB3X/evGqFSjZd7CbRzFzAyM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460500; 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=oAlRb5D5HBtC4JvtfWGwx5/vkyW1pHlcw9uhauLqWDU=; b=E3oLKGmrRSrHhxCyG1zDuC6ik0ooSQkP2/bIvLfqhXKi/zyjd2RlSoylbF8g51ayZduCdpKzisai30vN5+epYdP/kKSOmYNxkyCHSbFcXMNKJFV9Sf2eFjbSYMEwVf/X0aBOdyLud4PtF/NmHqeY7OLjdQ0QQsGuTUQZfFja9d4= 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 167646050094966.22434463869206; Wed, 15 Feb 2023 03:28:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFwa-0008Bv-HC; Wed, 15 Feb 2023 06:27:24 -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 1pSFwY-0008BG-Ed for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:22 -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 1pSFwW-0003Ou-Lu for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:22 -0500 Received: by mail-wm1-x332.google.com with SMTP id s13-20020a05600c45cd00b003ddca7a2bcbso1290313wmo.3 for ; Wed, 15 Feb 2023 03:27:20 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m22-20020a05600c3b1600b003daf6e3bc2fsm6415973wms.1.2023.02.15.03.27.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:18 -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=oAlRb5D5HBtC4JvtfWGwx5/vkyW1pHlcw9uhauLqWDU=; b=aNBUuTMAB71wuFpy7Ag0CBbC1a3ea9pqd9Mx76ae79RFCvplgkUdASnt1tyylkyMGF rg3uii2G85NmkLzCyxy1ud+csOlO54nhsiMKpiea3Mg30rKadIQBF15hXb/wKjR/6VVJ 1o3RLCVWjCe0cRyEHBh/rzwKnJbcHxT9ayFaQaOZ5vZf/AFxxl1MfnUD+d/CeuKh+ri8 fHbRVJIA7N6t93LY451aX9ST9J/SJfF+tyIINtV1FBQQ6jLLuT5JrQNWdRQ+ZI68GZ6C u3WHzvR60lE0SFcWs7byCSgorJatALD8N4k4qzyeeFmpFG8DMjbWlzTwszX9RykO9C1t 2ZCA== 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=oAlRb5D5HBtC4JvtfWGwx5/vkyW1pHlcw9uhauLqWDU=; b=u+totsfaGabVNwoWpq2OHEWLOULzL19x0HXG3J4XQxfwBosz/mMrlHtckBWrcuUopu GSiz/gZOmJcGPv/cHwFrF4b+Zbjd/Mbt3/rKShFsSulmVPbuwH7zBJTdOW72yz5fgHRK PXPR7/xaaYYh1Fp/MWAMfcDPAfDXPs+KTuCX9MtwgX324fp+u5JsovcCDBZeYVLP/pVM mPSbfF2zG5V84OCFQ2+gB9rTjzd8ewISYF9LSiZpgw7p0YTKuGCyTWUWEFN+d1cPE8Og bpmPvAsZe/Ns8+mYjzVAzpBxVjGx/WqaUIDKVrgmHY2+R1lklB1Yf9kIVB7jLavwYy1B O7Uw== X-Gm-Message-State: AO0yUKWG1vfS9BXKcR9UruAZrVsi/93vpySEILusXXpQYC9ee2CrUdBn 7yIhd/qCmn502uEOWF9P1U3kD6ztNxb99097 X-Google-Smtp-Source: AK7set+l95Njuf/ZzeWN/yWLhVRFQWNJyYQQKS/YAGOJ7BLy3Rrtr93I1GoJffULQXouvjvLUI/MnQ== X-Received: by 2002:a05:600c:2a08:b0:3e1:f8af:896c with SMTP id w8-20020a05600c2a0800b003e1f8af896cmr1729992wme.3.1676460439252; Wed, 15 Feb 2023 03:27:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 01/20] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Date: Wed, 15 Feb 2023 12:26:53 +0100 Message-Id: <20230215112712.23110-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460502475100003 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> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 96e25f62ac..841aa3e021 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1792,7 +1792,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/ @@ -1817,7 +1817,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 Sat May 18 05:04:59 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=1676460468; cv=none; d=zohomail.com; s=zohoarc; b=Dv/VhefVeVCs9Td9gEWdTz/KiniZNzx8rfwutfSXgQlR4Cm/XyBRTDF9PwIFeuQ/rZmwMdjCexhwNN4N6fQPORILv1f35X/t5BF2BCYaOehOcwTtpvXuMn2wwpF+8qSQJoNVXd68wJDceIud2qwXxL3BJ1/H9wD0R0J43T3KPo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460468; 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=P0Um24g3S+MBssc7B7utkfO2I7iu2ZNyFey2RuTCvjU=; b=NJUXeIu7K5OjdzR+nYtQ/Y7MVGkFVhFKMmC81oFBpBBmtTqVypbl2BnsjbibFmwuj2FstKev9QdNn5+bRK8I30VvozjlTBnHwDFtCoraRExwFNDSgmfxhAWJcghrYt9NsjnqaqUdKQUFRewYSpIEZ4jLdWOY47eAXx62LWcCgEg= 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 1676460468383975.2076433462624; Wed, 15 Feb 2023 03:27:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFwe-0008Ej-Ke; Wed, 15 Feb 2023 06:27:28 -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 1pSFwd-0008EN-EQ for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:27 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFwb-0003Pu-Pz for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:27 -0500 Received: by mail-wr1-x429.google.com with SMTP id s13so1064241wrw.3 for ; Wed, 15 Feb 2023 03:27:25 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c13-20020adffb4d000000b002c573a6216fsm411908wrs.37.2023.02.15.03.27.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:23 -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=P0Um24g3S+MBssc7B7utkfO2I7iu2ZNyFey2RuTCvjU=; b=WH23tS9m3JqyYupEg4Ee4+MUZY6fR+DpeaMRHmG6hHWCyPec1v010Rpnb4rLsraLFG 1eKTlnhCe/gn3ae1qgSufryNBnTm2SDRcJZQ4VDLJWWp4ASFqKctZWCHJcxJs2kl8x93 kEsi2H1sdRgolmQZxOc5uuJuVnl2yeQF6N7U0J849aNcOy//cFHQj8mCAFQaZSqu+Jbf ksfUbYUmG+cZy/JKubXx2KF4wZFn8J7SDgvKYugnW3uhn3ffhp2gnQuTvAJML/YPlg8q 7wNXo/IZuValWOXF+JIf6Y6ANTJ8MoLb4OGju48dBYovfMWzA+F1tg4G16eEJfkUMyEx Fs0w== 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=P0Um24g3S+MBssc7B7utkfO2I7iu2ZNyFey2RuTCvjU=; b=2j3gORuzB+i1QCoAuWfEC0Ja5g00+go/3HV7nAgJurwNb1nQv/a9sgRiLIKn8JDEpH M8oRsoqCP+NXb26AgVKS+TPUHnNOTENzXh32jG+I1KWGi74Dkd/BYAX8jw57GktfRsS0 a7NVsveBlKw2MhFwxUq08pvS8OKfUvO6Bus5H5WEqIC12nJXc9VEy2aAGRpjEfkTorf6 E9eueELRanWICDaWVZXUKNT2JwRDFBx0ywdaAshqi696Ineqj9ZcUEzJj2sgt+a/cNy0 qXf94MZyf/d/h11UkRhmVOOaBS79md/FBzG0VfBaYHINcL38jee48N7y55fN/F1vca1T 3Njw== X-Gm-Message-State: AO0yUKVeukuXCCqL4+ExCnbFaXzPOW9URwesGugaijHH5w0u+enjIycj GYuakR3E1vON8SFfYO5Sb1MrRYHqV8uelaTl X-Google-Smtp-Source: AK7set9ianFy+YSawy84axfaXwSlFgqzuAihHvjOl3JqE08GTelsTB+kV+K7Me4xjcyUDSa70VPhYw== X-Received: by 2002:adf:e60d:0:b0:2c5:5308:859c with SMTP id p13-20020adfe60d000000b002c55308859cmr1261935wrm.18.1676460443945; Wed, 15 Feb 2023 03:27:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 02/20] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Date: Wed, 15 Feb 2023 12:26:54 +0100 Message-Id: <20230215112712.23110-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: 1676460469709100001 Following docs/devel/style.rst guidelines, rename MMIOIDEState as IdeMmioState. 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 --- hw/ide/mmio.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index fb2ebd4847..f1c6e1479b 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -40,9 +40,7 @@ */ =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 { /*< private >*/ @@ -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 Sat May 18 05:04:59 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=1676460557; cv=none; d=zohomail.com; s=zohoarc; b=FmY3kHw/TsNUZjJxgNnhe9Ld3V7tmbWTZCadwifVGCr5YGHo0vZD/9s79woS/EBQZneeyzgR3k+vm+i6zRgfgt6S/+BuReFUV0Zvev19HQuQRUCMORoky3jY05lMEyTdDnC/DwsWlCmS/rsKxCHH4tsGT63jisRuix37bmZYIEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460557; 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=pcrpa0k2mjPFukLVl7InavLwINVAMgzkQbQIjjMzSco=; b=m5vjQIyKceZHvneP3PW71UGCLS+Qg4neOJ6X4OTG2tadLdW0lHK1asMRK9SmCl8XmaZK3O7LQagjp9es416nQ8OcjbLv/x7CSLqssYO06jaaENJUXj0zr0RTwSTdieINvlolB1kyQhytHB6lHKkKqDg8JKB45hltfauxF2f33sM= 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 1676460557307510.44500079704255; Wed, 15 Feb 2023 03:29:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFwj-0008Lv-SA; Wed, 15 Feb 2023 06:27:33 -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 1pSFwi-0008Jh-43 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:32 -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 1pSFwg-0003SW-Fk for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:31 -0500 Received: by mail-wr1-x42d.google.com with SMTP id m14so18767070wrg.13 for ; Wed, 15 Feb 2023 03:27:30 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y16-20020adff6d0000000b002c55521903bsm8458306wrp.51.2023.02.15.03.27.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:28 -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=pcrpa0k2mjPFukLVl7InavLwINVAMgzkQbQIjjMzSco=; b=kkYM04WefneLGecV8N0yC6T/4+FE+sx95nO+tVIfg5M3mv9i/uhehUV2aNPHWC7utr /uxkkuPORN2LClCbG19ADd/nSH4mGeTpPLG0p2eUQB3oG0WYYAYyHN+HfZ+KavUEzlyL aOypXRWPMA+8EPmGOa13ag8MHPEmq2hRwFNKgq1PZVeWCEfGzFgClK6U0cXSyD/wdYTJ kBjT+Rgaqajy4Fu6tN7U7ddA9ot6npnDEqI7zbBxZjV/A54vDE0h31//EEuPfx0owj8O O0+O4B7S4mg6TnK6s2Bc6udsEoDc440HIpSyrKsZPm/kftmAFYrTQ+K32TiiC8BwkE5b Pddg== 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=pcrpa0k2mjPFukLVl7InavLwINVAMgzkQbQIjjMzSco=; b=fYfqqypyucBknoQ3wIBhy6wNURdo/QznzJDt+vLhHldp3Ahkjn/L7IHrKT9cxrBOJP m88G9qhdVLZXaPRvuTFtM4OpvA7BioRnFeZRHA7Am6e1Qto6ArMQ7ih2l4MAW0HfhhzH GHalW/TjLjQ51i2u0WJNY5XwHXc0VETrKBQHQlU5nT0MrgZbE3T2m1bYEEGv6vSWGsoQ L716/yuQJRNVMwxHbm9Eykq7hAFg4uayvQp+4wQZti2HIweraVI/Oxy8dT7HInDIWK+i 8d3J/sX/dNI7NuxZdh0Miax1DQfAcswcOyQ2Ry38ZLG9nfqFFNJHMSSCFYpTLwnmxVpW L82g== X-Gm-Message-State: AO0yUKVf8daZuabwHLIiJjrftZYcczJqd2KJJ59OaWDc8QCQTJ7SnZOH BX8lC13DUzI10sovj0lK5EjRNtGqutw84XF2 X-Google-Smtp-Source: AK7set9Vylf0n8W2Iy9ybJ8wuWaRzy2ef3r2ryvboxVYCcIieQezbVB4oxLOpBSU/ie+CXsg0/NXrA== X-Received: by 2002:adf:fec1:0:b0:2c5:6336:4bad with SMTP id q1-20020adffec1000000b002c563364badmr1214200wrs.15.1676460448740; Wed, 15 Feb 2023 03:27:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato , Magnus Damm Subject: [PATCH 03/20] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Date: Wed, 15 Feb 2023 12:26:55 +0100 Message-Id: <20230215112712.23110-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460558619100003 "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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- hw/ide/mmio.c | 5 +---- hw/sh4/r2d.c | 2 +- include/hw/ide.h | 3 --- include/hw/ide/mmio.h | 26 ++++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 include/hw/ide/mmio.h diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index f1c6e1479b..5153d19ac6 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..b96c6a939a 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" 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..d726a49848 --- /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 Sat May 18 05:04:59 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=1676460546; cv=none; d=zohomail.com; s=zohoarc; b=DvTbJGRHCMeEyRWfZHMtucbuI1A/wTKDIn8VDxOwSTamJ5mCJMCqZadoUCh4H3dmiPFJbbbzfdsElCpKtbatNU1YpPS89/aWi0CRtSEmT3BqbUg/LfTVJUsQQpljavgG/Voa6M51tCLbkpcoJ4Vxe0H/b5mWZMWOwXYzLrUQqUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460546; 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=8xKvZhVnGK46sZaCWWOj4E0Pe48nX53AIxJFLus3xXA=; b=AuD6XqXm6+g1Paxef5YEy7+QYlkVNlgl4UMdPC0vZfpcIUyEuQzLSurVgW2KpbBa6AhYhrswIp9TVu6VPtxIqrwoKqJCh+cZqLeMPdJMsQlqHRb6NiDXn4qX8wwI9P8KKBTUszx0eK1pXDQJoARTiXVXaiM7Q5vl3h7e75SzQs4= 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 1676460546826766.9454199568552; Wed, 15 Feb 2023 03:29:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFwp-00005G-7k; Wed, 15 Feb 2023 06:27: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 1pSFwo-00004s-9c for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:38 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFwl-0003TX-6a for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:38 -0500 Received: by mail-wr1-x429.google.com with SMTP id bu23so18771081wrb.8 for ; Wed, 15 Feb 2023 03:27:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n27-20020a05600c3b9b00b003e206cc7237sm29089wms.24.2023.02.15.03.27.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:33 -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=8xKvZhVnGK46sZaCWWOj4E0Pe48nX53AIxJFLus3xXA=; b=NugSdeMVxhOGx7UOJzRhCE0f2UuKuazwNJGytt7dH+tl/g8GHFglXKIhe95WwwVOVk rRj5LblhWC9gJaCxvhOqxXHXLdEEI7QR6kg/cNJmFuDinEu8n93EW6G33+mgiLT5njwu Jjwb24/EIMIHGwLhsNSsTK/hONHSWZcQ9H7M2m3+zC1q4ZZhQzYEavK8Hj1rQKVImEiv MPNljNzmKn+1ocu/PgaByyPn9ValTsbSVlt6T0f72EjfaZxs96Ja8GVrNt323fACfeIZ YvTygmafxTErbQFwyh/SWH8Sjc5lSHUnHOXQJ+hvRhkyRniU56+T+6aG1vf6LxQDXyHS ABog== 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=8xKvZhVnGK46sZaCWWOj4E0Pe48nX53AIxJFLus3xXA=; b=GdeJ9LpjiRzHil36X0iHCBfqe44hd3kviB7s5xHTC8Jf+rIjzs/Anf0vJPaGPyEh+R YLDgNJzV7NEUEw6367hRyPW9JSFZtQaUycpog8rIEu0VfwomKgVQKoJN6IpdFhabJUw2 drRtvzD4/ilKkymX8xEF1QY5tfnl0s29OOqYiBb/O23+Vx2sT2vZmiNVq0QZ8eK8SivD 2tbUefqJcmO1gzEmTVpPKJ3EPx7LNmAnVTiSoy7vQONuMutwQDFBQeMPGWZfye5vSViZ StadBuKdbvBpbLK2aTn4j+ycKRySU53UH5iFRh7SqD3XBzbUkXgbxhCVSvZqv5SIwE/t HYpQ== X-Gm-Message-State: AO0yUKUSmnAZQfq0dF027j8u3xQPzBMtUwnzI9NmEdzPwoTz/iIq5YE2 hThiQqfvbOcDZ/XIoepheRmDC0fCA2GmRXaO X-Google-Smtp-Source: AK7set8lLn65hY7bsTG5YtvMTnUD/SaPeBTaG5YGusbHku8tOWcv98GGWTut90HPphlZOs16Tvtd1w== X-Received: by 2002:adf:f40b:0:b0:2c5:5ff8:93e5 with SMTP id g11-20020adff40b000000b002c55ff893e5mr1209167wro.44.1676460453690; Wed, 15 Feb 2023 03:27:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH 04/20] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Date: Wed, 15 Feb 2023 12:26:56 +0100 Message-Id: <20230215112712.23110-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: 1676460548499100001 "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. 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 Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson --- hw/i386/pc_piix.c | 1 + hw/ide/isa.c | 14 ++++++-------- include/hw/ide.h | 5 ----- include/hw/ide/isa.h | 20 ++++++++++++++++++++ 4 files changed, 27 insertions(+), 13 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 8bedbd13f1..5c3e83a0fc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -31,22 +31,20 @@ #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 IDEBus bus; uint32_t iobase; uint32_t iobase2; - uint32_t isairq; + uint32_t irqnum; qemu_irq irq; }; =20 @@ -75,13 +73,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 +90,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 +106,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..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 isairq, - 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 Sat May 18 05:04:59 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=1676460501; cv=none; d=zohomail.com; s=zohoarc; b=C47Y2uymXTEu61xRD+evQdCIhcGDfBKZ72oQ0Ag1AqKCNI4Ycuh8PHmE3VwIBy+DhWM+AH4q8ZKXzFW2I+h/G7L1TMJc6ORysDlLFL6iXnxdwqSbNbI+caHRl+/QtLdq5z7g1Dpml2HGzOV0gVAk3y/kuARygrLq0boH1c7+rJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460501; 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=KWBMTPBOXVEPBtL+jKysUaPYg0aeu32TIgmDoExenEI=; b=Pb/SwlTNTX2rjQqbV49RUO2OTr9xwysVJcofFGBMKb+iHQLylxoRKR1s2n0V3vi1U8RC7A9M/WFhwYPuEWw04lUcwSgsOwtjom8onXY9+7EOfmzMMgUUUrpYLO7EKCDa66cxxXstZOYj8kpWt0h6i3zad/VkbN72QB6vt+DyU0A= 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 1676460501917618.3457052465009; Wed, 15 Feb 2023 03:28:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFwu-0000Ji-4Q; Wed, 15 Feb 2023 06:27:44 -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 1pSFwr-0000CW-Kt for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:41 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFwp-0003Un-VE for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:41 -0500 Received: by mail-wr1-x42f.google.com with SMTP id r2so18779984wrv.7 for ; Wed, 15 Feb 2023 03:27:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t15-20020a5d534f000000b002c55306f6edsm9388712wrv.54.2023.02.15.03.27.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:38 -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=KWBMTPBOXVEPBtL+jKysUaPYg0aeu32TIgmDoExenEI=; b=TKP16wvAMif3HO7BeuBC2yNApYdP09tbUWagscNS3w6/9ugaogdAKUu6DLERK8nGtk EI2rja5zxSvRdhkOuPtvkcbr6AWQ86fxv7pc+yTFBiiRqhapcGLseLUSs2zBezxkUjC+ ctEdHOVtEtRTcimVFMLxF+eyTSUimIxTMMM2an4npjGOVkVxLeuNFAHXdgzHJosMDUJr iRKcUPlpTNHNblkQg+RdtjoOjlJQTQxdJCXkw9DVomNHh69u1qe++h6HDUP3Tl/k/H7u VKMRrMMis3TxWTr9RZw+PZohq/rrdO3BhRkLkAAg7QYhVmGsQXxqu5uyhn3SxSSSpcpx rR8Q== 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=KWBMTPBOXVEPBtL+jKysUaPYg0aeu32TIgmDoExenEI=; b=bB9eqly+gZbv/c6EqOec7ev8xWH6sDP1vLKOSHvbZlncJBFKWd7kkWAKpyr/b9SjaB Rzmpe+4jn40UA1clMTEWjHHDVO/HH+xMQKvrLdvgEzGXBgYgKdCHe1zGmPBNPrhEp/XV DwUl2p79DB6WUUXZKBtt+/aUQb0KYXjhOfsgCBvjcI2ui5vW0N6Y8rlN+566P0l4EqPj b0Y2L1UPkLMvWMfnASJ0mDeZtavz3AACDQ0AseGchTxKRNDFdTXihAwDfb26sws7bK4o miBO/4GV/TiceAPo3o7bjFihBBI49bq05GDozkTbgr5C2VSyzOMpcOBIGlYBn6FWbSyA 1ygQ== X-Gm-Message-State: AO0yUKWzgiBkRFxQzq/c2h9mw6dzGNXJLQASpoPuQSQGmDdQKRi+FP8C fxlj1lLrgMPKRRgtpfN7LrJe9GSovCN5rDt0 X-Google-Smtp-Source: AK7set8DtVyd6eS4Oa/xCdRE1Ak78IiiSO2St5A78PqgiBFdPc3YCINSdmtpEcufpMDouUW6kiwv3w== X-Received: by 2002:adf:de04:0:b0:2c5:5954:cb7b with SMTP id b4-20020adfde04000000b002c55954cb7bmr1148358wrm.34.1676460458519; Wed, 15 Feb 2023 03:27:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/20] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Date: Wed, 15 Feb 2023 12:26:57 +0100 Message-Id: <20230215112712.23110-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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: 1676460502402100001 The intermediate ISAIDEState::irq variable just add noise, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson --- 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 Sat May 18 05:04:59 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=1676460569; cv=none; d=zohomail.com; s=zohoarc; b=Mq4Iw5jgrBBdB1J/Dxx7fkEVMG6fnhxpwbGwy4bKlDmTS/zH5UEaVYfZ1NSp8IFA4/+ic61UYnS1zXAh5NWIaCsXllhJbsO3sBU2NBxd5HN91Xc0kv60HXTueGJh8Fo8kPHKCJzJ2jDmMyuyWRzrirmTPAofhapkhX7KMzAJfjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460569; 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=HDxlxVOZMpWrGXNGMddy/NkpJei0Gesyel8wOOF9FHI=; b=IK1zMGtS/fNGAmdw/RcCGxA0mbih9+8X1Xv7hCTV6Q00iBQpL0G+axqGuOWd/FEPYRv4SBee+Xf6BLr793/H+eiTU22hs1s8tFbYpO7ywE+8J4J0v4EMUFeXxTGJWAGHjw/IT5jsxNTigSLqxzTgLJRk9wkUDumm+cGKfDcY/1w= 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 1676460569504667.4214669378673; Wed, 15 Feb 2023 03:29:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFx0-0000So-Pb; Wed, 15 Feb 2023 06:27:50 -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 1pSFww-0000Np-Uu for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:48 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFwv-0003Vy-Cu for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:46 -0500 Received: by mail-wm1-x336.google.com with SMTP id p5so678439wmg.4 for ; Wed, 15 Feb 2023 03:27:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o3-20020a05600c510300b003e2052bad94sm1395593wms.33.2023.02.15.03.27.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:43 -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=HDxlxVOZMpWrGXNGMddy/NkpJei0Gesyel8wOOF9FHI=; b=E3EG9HjGmp9f876gATkgg5yilXE0k3C+5ZI6BYww/sUBcfHLiRxhLrPn08LbI2orX6 Xz3KMPwEo7bQIjboWeP/OdgQemsycJa/sW6CtItEL1J1YdmoLg2156jpWZ5yr82/Wcxl Sme/UzZBJC/0n/Cpvnjz7j+6v7VMUKk7Mxtss7nAI6BFHpoq7NlkScnyVd/MV8WMdyiW caPhVLl9pRz/TG5N1smivJzWVAF5vdNSck/w5/VQPSiEOn+MOh/KJwGclI+bClulPfSb lf06Dlnhkc2vlb7XJBiWBu2lemwwyBB2WlkFRebRsJ+2OTEanaPn9mtcxrRdTlpL/adW WGQQ== 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=HDxlxVOZMpWrGXNGMddy/NkpJei0Gesyel8wOOF9FHI=; b=QIA9PKTeioHFkX3LYuhnQDXahgPUsk95HsxdJxcxp7cqNUMZr+8lMPxGlI+RPIWI/O p3LCUtEJ9+giImfyyCeXmgSoHc2Q2hRiZGBUxWSs54X2eKFNkReBca+hy+GPYfQT1bfp I8Cm3kvSfeouEUkVlQ2mmUimYQLrqcthvBTm+1xIYZoBL8s4MXa43nNdDZzyIJSrTr9F +fT4fR3FkAqmToYWeHAI8ekduqqxBnPY4mWQtba/1FZoyenKz9YxiG3jSk07dltZo8vG J3t25aE82mPcaiZPkgp498iCNEAqomh+DyxdC7G91vYgmJ5aQHwslWfAvawDFbVa12YB y6aA== X-Gm-Message-State: AO0yUKXnDCtypT3oiGOBdC8N25DWwLideaHXi3vFT/LJsMw1E9Ti5GKy tX4XFzGQTZ0hLO7d+i3N3nVb0ACXfdfojsFl X-Google-Smtp-Source: AK7set+DQqrY1mlyt81HsMQaSmZekqtb/AwEgpxW+ij41O6IwjhNmcCY/oYkXWmK45xdawPp8A2isQ== X-Received: by 2002:a05:600c:318f:b0:3df:e468:17dc with SMTP id s15-20020a05600c318f00b003dfe46817dcmr1679731wmp.40.1676460463380; Wed, 15 Feb 2023 03:27:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 06/20] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Date: Wed, 15 Feb 2023 12:26:58 +0100 Message-Id: <20230215112712.23110-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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: 1676460570599100001 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 Reviewed-by: Richard Henderson --- 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 Sat May 18 05:04:59 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=1676460596; cv=none; d=zohomail.com; s=zohoarc; b=duZAX2OTkzKLfbYQ+l+3s20bV9VOpLJlfEoDukONGIfwectDrpL+Ayf3PutU9rr9QQAqYYEr7eV44N/Lbbid9lNszyrZVvUyGYbTz3yXG7akGikkoD+0JQ+S7Y7TCxzaBSj+eMa9WOfpVW9J/C+oDLhixR9kUyfvM/smUzRFl3Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460596; 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=M23gg0YigFnxbpUVzAASU/zs2NVYx0tOCbHI90Qobfg=; b=aa0palMELnWxXEZHBfbJ7oUF4t3e9KR6OP2y2XGHf3ubXUkvK3GHFNdq3ILH6cN13xTkcCLKVSzLluzcc33sQAlVwTD7fYASAn/0fn5ts3cITk75u3EAmBvZOdF1v4C6yEnF4xy4twcaoYSCzVfCI4bjyIzUsGzAIc8DgPPDLok= 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 167646059619624.279521586466444; Wed, 15 Feb 2023 03:29:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFx5-0000Ve-K8; Wed, 15 Feb 2023 06:27: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 1pSFx1-0000Tl-7m for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:52 -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 1pSFwz-0003X4-No for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:50 -0500 Received: by mail-wr1-x42c.google.com with SMTP id m10so9869520wrn.4 for ; Wed, 15 Feb 2023 03:27:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k1-20020adff5c1000000b002bff574a250sm15524326wrp.2.2023.02.15.03.27.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:47 -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=M23gg0YigFnxbpUVzAASU/zs2NVYx0tOCbHI90Qobfg=; b=sztDv0y8JLAfErwm8VMIfL+bLQPwoenJZLmrl1nYpmAsN8Tp2rg5fdtYPIzoJqy+xr KjmtFNpeC76HqdeyZ87Hs/qwsF09+MEX3ZPGOcfXnF6MZfw0QQFoH0cX8iBD8d5WoATU 3NT74Qd0HrUmDjuxudNwf9DFUOtALJEyEZULUg2uzK80+37zT9ES3FZ7gYcEIcNTcu0V 2k5CMo0xiMgu2mys6gJuFa2N2oABy/NVqNq8e0Qx6vhtBIP1LlNk0kIYKxrfFlkbxhNE FwdwjxRm7dmgLe0cKFV/7OtgQI62OPWjBRgVdQG7d6xV39JKhrd70lNpx/iTMI5XULBT JziA== 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=M23gg0YigFnxbpUVzAASU/zs2NVYx0tOCbHI90Qobfg=; b=kci5UArG1ZNURKJSu0Sfj65F89iZbsN6Up4T3JxzvkLdDYN4Fgv3u6OUqN9Xyk13dx +NUNKxVA3OGB4WBY4HUeAzAMevOPkzSNHEBhtIpUyvnu8hUgXF6pw/Iaj1aiAEBF1P2L owFCfdVtpTNi5Z+6dD4nwvZ1XKykV0hAGnoAngXWvtBSBinkA0qXviDY8n9fqxv84eUg VC4yQwaE4Ftsnar42q7RwYJSgPu6p0wZ6H+ydTL4oz9P8I8Ld4G7+bk/r9WbnznwkS1U mtc6rRLVqj0kxn3wA4lst+tAE4Eo+jEDsmU+4GSS0G8lLRCailh3A/DyUc/uUWak006g 0OSA== X-Gm-Message-State: AO0yUKVzmn1lTxaI04H+CPcHyaYof5djsk1920I8LiKIrWLIyQHiBVaX ni7qadeCLhwlLZKNsjbW+kfbzl4Pu6rgUyfU X-Google-Smtp-Source: AK7set8yck9E+zDiaNE7UZYk5ik+DdTYgs/vylNi8+FKqpKk+4V7YwWKHJJ4GKVzrwB+kGIjMByAWA== X-Received: by 2002:adf:cf10:0:b0:2c3:dd9e:8ccc with SMTP id o16-20020adfcf10000000b002c3dd9e8cccmr1501226wrj.64.1676460468191; Wed, 15 Feb 2023 03:27:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/20] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Date: Wed, 15 Feb 2023 12:26:59 +0100 Message-Id: <20230215112712.23110-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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=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: 1676460596766100001 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 Reviewed-by: Richard Henderson --- 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 Sat May 18 05:04:59 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=1676460616; cv=none; d=zohomail.com; s=zohoarc; b=OV7pTtaTuaaF7LsySEvYRrdKA8Ka56Lfy56UmbziJpskZcf1Cmjki2OrMPXke9JtIe32iq0WYzPTBXqw+4GgtpEXCJWnS+MeafztBRySgpLGs5JcnbBQGscQqsymsk8ch/fdb2my8dgV6F7OGwnfVx81EoSTn3BT9bo/43DbT0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460616; 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=Y67tixTvt/tYOnbC1oMiSzkMJPDPGSkjTOTNexreHBE=; b=fFvLGyQCHmVdIjewdF6yqikcBtS6u+MzGQoPXMxj93eyk5WEkk9zIuHPa3jU9z2FED5WBww++gjXQBwYwysdXbyJzSU8WxHA6eRYdiSGNxiwd5lCYMlZ/8TZV28kYj/gXJdha3J9ha5lrLnt4cxZwd3dFrUa5jj/ue15YSGVxVs= 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 16764606164344.118823405952526; Wed, 15 Feb 2023 03:30:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFx8-0000Ws-CT; Wed, 15 Feb 2023 06:27:58 -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 1pSFx6-0000WK-Ng for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:56 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFx4-0003TT-6o for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:27:56 -0500 Received: by mail-wr1-x42a.google.com with SMTP id o15so15475763wrc.9 for ; Wed, 15 Feb 2023 03:27:53 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h8-20020a5d5048000000b002c54d97b1ecsm11026732wrt.72.2023.02.15.03.27.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:52 -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=Y67tixTvt/tYOnbC1oMiSzkMJPDPGSkjTOTNexreHBE=; b=NeXpNp6y15OTEC7PVwfTVODCqmRics5zM6b1IspAcHZN+XCCpZPFONyGENq4jcvCzd JtNmaKNwMoeCzG5AyXudy6BLFD89J+CEmo2cCmoXzBTBVtTCTSkrvu9NXG6mwhQDnkeG KztbZv/C5YNp80jyZwgCDYasMe6Xuc4B1nfemBQnY7VPUjUHHv+XgbxH0sXe5V/wEqCM ZRoso5wsrp2eOiQT/MKHiboSN0K+Lzq3ViihUp5FBKKqGxm8213fuJPa280Cv8QhLZRU fzVr8utt0nL0Co1o1KHhXcyvdzNaxy+T3chEw9dHic7n9+YiyjiJIRV+uOV2qi9lX2dx eNJw== 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=Y67tixTvt/tYOnbC1oMiSzkMJPDPGSkjTOTNexreHBE=; b=Kc9CNPTgsWE/T7TOZIFGWoW8M+wGFaPNFLfwALugA+jnFh26UzsnLkQIGF/TCIgIk8 Xg+yvN4RQdIYXFAgjMXxj78mn2fUCY6VV7tfXESgsDQZCkBlgCL/1GWO4wZ9MPlEYBRf MDbV7rA8/GIzVxPvO3L2ZRYklqRtna5i8znOi072SMNWCX2KcFjLObhdAL0uJk/ye1lr 6JkSM8CNbe47JC/p4aa0PVByFO/VVs5+KNPhLvuUvcldS551Nk8SoQBk9tDdanbZwLzu iy1HbWVTusttN1nmG+xUXfGtkYpuEdOCfChGYdjSqEJsbUZW6q/bww9rIDRFh9oFU7Al dCsA== X-Gm-Message-State: AO0yUKWaj9pLWh5HrmrAmz26LFlYiRtlBVEL/c1kRCNNIq8oYzWUS8lz Hu6ohD5ryDsjHjyHIhvzXpbHLPoQjZE9T3B3 X-Google-Smtp-Source: AK7set+9U2XJtok+EpKcom75GEsu7G4vzJ+qGdBX4iffZsALNDbWwIeA4wli1VZajgUjykjniXv1sQ== X-Received: by 2002:adf:f204:0:b0:2c3:dc42:5252 with SMTP id p4-20020adff204000000b002c3dc425252mr1232908wro.70.1676460473226; Wed, 15 Feb 2023 03:27:53 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 08/20] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Date: Wed, 15 Feb 2023 12:27:00 +0100 Message-Id: <20230215112712.23110-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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: 1676460616882100003 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 Reviewed-by: Richard Henderson --- 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 Sat May 18 05:04:59 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=1676460537; cv=none; d=zohomail.com; s=zohoarc; b=nix1TbLonmzvzJ1LLwmfvm2dxn617TYJUDRmYr0eUdpXsYSZ8cx91POVkTa1aW0eMXeLZzlMonIuPj8i98fki/O6VBJC8sTuOMOx6he5XrXCQDeWGkIYHpaYinYieM8ZtfiLAnOqJnA8/DuzxBwpPPFMkrsbNPyNVXj1HuOWvFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460537; 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=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=cT1JtOINx0RlsaS95rTdCDOmCu/ozs/jin19XlsaJKaxCMPO5Coqq2WTcfVFI8mjlRTf+pv1g1sQM7A/e4ydSSVSYDoULckLrJUV9bjMCENmI36kqOReyPdzbzPJu4n1rvM+7Ep0MH3sgn4Ar+HKnEUbYHCOIAxHHiu1oeCil6s= 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 1676460537900236.62604484887277; Wed, 15 Feb 2023 03:28:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxF-00011c-IN; Wed, 15 Feb 2023 06:28: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 1pSFxB-0000kr-Ba for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28: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 1pSFx9-0003Pq-80 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:00 -0500 Received: by mail-wr1-x42e.google.com with SMTP id y1so18805465wru.2 for ; Wed, 15 Feb 2023 03:27:58 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v12-20020a5d610c000000b002c56a991971sm2407905wrt.76.2023.02.15.03.27.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:27:57 -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=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=m0H56OuK3Ozxw3g8voFeSzoZVdKBd1uACvb2WRFiVbyQuLugAQJJ8lSv3+B6bgM5ea 7u6quTfrZd9r4QJFR4vlcFZpnL1P2+t/6XRQF5b1ifP0DjWimP34FSm3TuHzumyDQpoK u82DF7GsKCuW5oskiBaH6JD9bqsvYdxM7ih599vX+NXlCivyYiUWQnkNlks5QztEHu1x nu4Ut3uWZ0C4DBHdtx6M8DiGPGLHo2euvoy/TxY7Od3uE4lKkDpaE+JZIN44/Ha33jvE MN09QIrquQQaSnJLXJ3du5o48RzmJpX6gJOcTnWozpNkTiEsm+mW7SNXzxbm3EajS5F1 rVkQ== 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=lRBJt3/a5AQkWk6sGB4CY5cBjybxjq8f9nxbechh2uk=; b=tXc8vI2QbWEIph62b+gbJH0KPpvA7cLajfGqvLtH6jV/yG7knXUE+u/8hT2vwVAS+x q7ztyIHw5AimZE2+HHk5W+dHEp6HPiwdAxkfeuMOQDizCeO3P9p2qu+LJNPzNUCwl74v L1vfaVWD7wrRyyH6g9y2ZM1NI5ssr8j0nvTvEIP6xdg+2SYvYcPgIeKVUE6D+LBKNvV2 P+sV9rTRZ5eYixdzF9dsXtvscQUUt/DvoglrVgHFQHnJjF7T1NFgkp0v7UHbHTQcV75S szGZasR7Zecti4ZckyGFJgrnY2Po9Q4sQV3RNH8aB+ds2H1i/J/dbuel1O3owKPGFxhP e3FA== X-Gm-Message-State: AO0yUKXkZbJWuM0W2jDg2nRSUvdm9C882ABTxddiCR1FpCqRmTl57wKd A+DrdEu+KHcsFOS0wkeqaONeSCgJN46rTcuA X-Google-Smtp-Source: AK7set/rYaYRdhjultEfICVQ9EfL+6rDDnVXFrvvex81mglNid8+kUz0/UNWDh23zCspHT4LQ1LdiQ== X-Received: by 2002:adf:ecc3:0:b0:2c5:4bcf:c62a with SMTP id s3-20020adfecc3000000b002c54bcfc62amr1195934wro.29.1676460478190; Wed, 15 Feb 2023 03:27:58 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko , qemu-ppc@nongnu.org Subject: [PATCH 09/20] hw/ide: Un-inline ide_set_irq() Date: Wed, 15 Feb 2023 12:27:01 +0100 Message-Id: <20230215112712.23110-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460538473100009 Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 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 Sat May 18 05:04:59 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=1676460501; cv=none; d=zohomail.com; s=zohoarc; b=m3WJJIiXjdG0LA840NBiD8/DhmqQ96var8pjqXF5TZO+cEwiv8ObXCevhkExk3h717Xh3Mx/dC91UxTIfeYki6RVx32Xzswu97bysPUGtDvVt3t8ik14hfE/ExOMegAc4xUV5S9GNfOD8u5Mk4CicXCck52P1iYDvgfNrBMz4xM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460501; 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=vPCFUWnCoirvmC7pfJNFE9qtA0ul6/mOuciO8/LRg2I=; b=kIkCbBf1bnNIbzuS9wfC00KMb8jdt6x8NmIunKxVo3xJ90FGVx1eQ6fmJfIhAe7z2v12kQq9WZHTxwjQn90KpzsoUzNDnrelm3TECILQ8mQQvqNe9Oo3QAcoojCgKZsD+/YEky+G4oO9TDLtQBsIST1ySjGUyvbQInI3wFQNo/U= 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 1676460500990814.1578417831224; Wed, 15 Feb 2023 03:28:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxI-0001ID-21; Wed, 15 Feb 2023 06:28:08 -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 1pSFxG-00016m-1r for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:06 -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 1pSFxD-0003X4-Up for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:05 -0500 Received: by mail-wr1-x42c.google.com with SMTP id m10so9870267wrn.4 for ; Wed, 15 Feb 2023 03:28:03 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f5-20020adff445000000b002c53f5b13f9sm15282685wrp.0.2023.02.15.03.28.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:02 -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=vPCFUWnCoirvmC7pfJNFE9qtA0ul6/mOuciO8/LRg2I=; b=FpxegphX0ma6uvyN12wrD2QMPPxWyi01rTxxWLaWx+7gCswI5BZ7RcrYR44m6VhiMK AptOa9J+ht2zxyDMWaiTfKiljZGiPbAx/bvg9IKRfrxqblVabpaYn16N8We9Zzmb4fgv EG9et3THRfwa9vhEj39SCBR1q7SDPyg0GK4FOJJvR6/4VvCqt1JKLYpRNxDvr2u9+f7S XdzxZVzcLDWPK/NAnKH3uiqzAwu56sC1Z+syto7Pdbe1FHjhNH5zUXFOY3RgNwWHEnYR G0qJVl9NYRs88/arZuGAkOBaeQDkO1Oy9K3vUwN5/BMW4rS+SbA3IufIy1aUr2I72Djv EMjw== 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=vPCFUWnCoirvmC7pfJNFE9qtA0ul6/mOuciO8/LRg2I=; b=w+ZtLJirV5cQbA9dtDq2lmiP/ovXt4HqsEyZdcGeS8qfgTuG6LWeZ9+X7PKjyCRtks xtYJuWiLOZhD5b77w6E6TQAfzaoFnGHkEC2r/AfdvOxaIxg3yr60Ag3fIFZnYioyLkbh xA+or4gaWJI+31wDQBCdcsIXRTZS+Y/h+lBtZ8AEapY+ogC2II4tRE7oyqHeVuLFoyv8 EoEmSPzO0vSOj4CXL14+fOFwUYoYtTA+SMn2AwxZX4Xmv/cDXBzrc4H6irWgGxcLkWcu W3hmYi14KrQt/TSAtsNU5W7cMfHXwJTunlOOPtgpfoN9Ap/DytKek3DrAc5XjT9PjTGB Nmog== X-Gm-Message-State: AO0yUKUjXpelZpycNOcKGFiuEnsyn4JPxBnYFitXMdvT2Rz3Accid989 7xcN01XkCowGB+y2H7hphDXGzqL+zfVBjGZv X-Google-Smtp-Source: AK7set9VIEJnPr7nELJWY+DCi63Qo9YotA61HpYgfhAfsb9PsoN/C01qT4xFf8cTyshCS0Yeeu5Huw== X-Received: by 2002:a5d:6651:0:b0:2c3:be89:7c2a with SMTP id f17-20020a5d6651000000b002c3be897c2amr2137024wrw.13.1676460482977; Wed, 15 Feb 2023 03:28:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/20] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Date: Wed, 15 Feb 2023 12:27:02 +0100 Message-Id: <20230215112712.23110-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460502459100002 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 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 Sat May 18 05:04:59 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=1676460601; cv=none; d=zohomail.com; s=zohoarc; b=QuNnemWRa9trAbYZN2M+8MQJjnx0XqKZDFw3Ccjd029VtMtYyUkFOwZGw2KCT1FWrtC7PfKbupQL8csKfNRUcLJ+cu6va5AgWKJaBBowJMNY53m+oNCrtgPciTc2TfYTrIe+qMRO/MzEs4/xN4NfxOoLque/hsVFvXyo6+aIPXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460601; 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=TiVfdka5B9ldkUYdKu7ft+9sFiPb97YGArIko4Y3Hq4=; b=AUqRp4/wm5nlHuAzArkUZn8/GZnQ+QHDg9S9KkKcGaIcDa2xI0ElCKMHnJvxZv0GdwV+aMGFMmdJwwQ8E5eScgWORFS9q98vq8wQ+nm+3+oKGycp6n/nia1zOPLsbe3aXwKiQ440Vcc+B4w+ofbQihi47xMCQzsrJT07l/dSKIc= 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 1676460601736995.8356738980515; Wed, 15 Feb 2023 03:30:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxO-0001a4-Um; Wed, 15 Feb 2023 06:28:14 -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 1pSFxM-0001UA-5d for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:12 -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 1pSFxJ-0003bw-Q9 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:11 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso1285623wms.4 for ; Wed, 15 Feb 2023 03:28:09 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p17-20020a05600c205100b003dc51c48f0bsm1800181wmg.19.2023.02.15.03.28.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:07 -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=TiVfdka5B9ldkUYdKu7ft+9sFiPb97YGArIko4Y3Hq4=; b=oHJ/b4azw0VpZ4BRn+jksah+b+jXfM3ELPBE3Qw6piA86YwYZZG1BpmG4jYv6wg7mb 0zyaj79WCjamLAIU8h/lkhcZbWSWAvCXmJqf1gKPg5EfjKSyhhxkVBSse8CY29jarebT D4QgHTAQ58QyedOrN/ncd5uWj4XMmv3jsbxtxqUdDfM6BAGRYismbgP2PlyeZGrFm40V PizfnneOoZQDLybM80RsRAilsQnCFRHYRlJ7XGRm1oVe5J3XuePZ4Rqj1sHcVsUM5WZn ykKGisrEKMJd8R+t0MT+senZoetsMCFeTVxolg5EWy8+TZassSDZCGSBRF26PMzM6Su/ JFcw== 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=TiVfdka5B9ldkUYdKu7ft+9sFiPb97YGArIko4Y3Hq4=; b=WNibu41ChqUh5u20ubpxuwB1pGQ7+Cl3LzCvf1YfKYkUSD0y4eOBO2OBloI402VRUF VzuAxaZ+dohsQOsk7LtcG24MgI8CNN2YtKCXAOJiL66eSKXUNAIqpysEbaM86UYb5Ek4 uy+n5gRdO/s/45Q8vL4JTWx11SfdIc+cI4ibYHLy22c313SOj6rAK3Tzcid/TxpbiiAu az5WsUv/2T5PRYmlDvIrpsLRA9UJIsNGIr9ZKdQI7xV22SmQCpfHLe6wbWv0o9iXWcaW 3Wv6nqVJPvN4JXPuFD8JGGRaXZh8Ey/uRMTwxSACo5e+mKDI7H0MF6O1FUnoHCOogXeP FRRQ== X-Gm-Message-State: AO0yUKUKJ6C+ns73HyKBp+CNMipHo1L/CaCBa1JSF1r1FTF2Xb2sTlRZ O4f8VjdgTXcebXIpN1Z0cfhj/XwAFKAT1Y81 X-Google-Smtp-Source: AK7set8H/WXnNhKwHKC1PwCDR6SPkW0y0foPRsSt7ZRoSpg6eyKx9uWlQBbYKQyFYnc1gZ6kJrE7ZQ== X-Received: by 2002:a05:600c:4b1c:b0:3e2:6ec:61ea with SMTP id i28-20020a05600c4b1c00b003e206ec61eamr395wmp.28.1676460488013; Wed, 15 Feb 2023 03:28:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Radoslaw Biernacki , Peter Maydell , Leif Lindholm , qemu-arm@nongnu.org Subject: [PATCH 11/20] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Date: Wed, 15 Feb 2023 12:27:03 +0100 Message-Id: <20230215112712.23110-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460602841100001 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 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 5153d19ac6..1f1527122e 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 Sat May 18 05:04:59 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=1676460507; cv=none; d=zohomail.com; s=zohoarc; b=UlC7fawKeJwvGjyyvFJ0bom1IcJeoKzNklI+NEJ69qwE2Qp5jw0DllBcMZlWW6r7tuLgQt84Z3T5w7i3CFOmAYzsti7wF4DyYTZaXjjl/6wDoLlLcB/7biShB4hFR6cFe1phj3kb5MfbDC+G4oTuo8leyPMEAMLmgfHceYrGO2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460507; 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=WGmJkWSNgy7/ynEvZkEIYLnmZh5KuFB9CpCEyEsgCaM=; b=htUAM2P0VVQ1L4wwmr3PlWSpx20fvcCKyYTg1PG22r5haFf7hdLTXkt35P/fVAl+Vei6IycoIlb/EyFkWnpcJgwqqz/56kuQc4EbwX6w7JVrfS5/Rcw+k12T0nfFAQd1nwaAo2mm3uw3jgZrAoVnVKrUruQ48MUKRu9hR2F43Dc= 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 1676460507503307.26138324965495; Wed, 15 Feb 2023 03:28:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxU-00029t-55; Wed, 15 Feb 2023 06:28:20 -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 1pSFxR-0001wf-Sg for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:17 -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 1pSFxP-0003dE-NH for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:17 -0500 Received: by mail-wr1-x430.google.com with SMTP id bu23so18773168wrb.8 for ; Wed, 15 Feb 2023 03:28:14 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t13-20020adfe44d000000b002c557f82e27sm8092531wrm.99.2023.02.15.03.28.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:12 -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=WGmJkWSNgy7/ynEvZkEIYLnmZh5KuFB9CpCEyEsgCaM=; b=nlqJ6eD8XcO+VDA3jKu1s81AtbvIc5ISH3Z7rjbv2wwEgKcywowCD2eJuDrKy0A4HH r0+G6A5Wj97IbmjdjYmliFeJqFKXy2EJpYi7Sr2jqB0sot/ZQg4+Nck8AAdHhwa96ER2 NW0GhFIFOueFJ0ayNsHn3heGfgh0stKvDCZrqJAtTl252gQ99u7plhTGgU9m1b4H86Yk CxSZKKGR2ejCc97akZ/GuCU+5Hsla51HB7B7YDibiqiobCLj8wbrF8rFtBsPaUv2wGK6 H92ohY0RAt5+jisQL+UvQ7+TBRvSMyCWQ5G4qctMlUk1586TUzHMagkleuZHaL2yAISj HPbw== 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=WGmJkWSNgy7/ynEvZkEIYLnmZh5KuFB9CpCEyEsgCaM=; b=39jG0zYnqKt9QgBbT7l6c2MtUkoy6zgn/MjwPL3OXtBvSpyZQr3zfoHcc10MPVvzv5 KVmt5vHKn4IN173Dtn5wKADVBUBeR0Hc74tJdzfEaPLiN1qOeW3Z9xZfh6ASk9bI5Th7 RvdcsNNn2hg8Pv/PFhJfyXoavJh703D8FORYawbugWwDRRQgaU64RGgiok8hgurmkFOK RtN1tfQwMIy+8Q4naI3oMDONoAz67KAnhQx8cHZ20YfESFvEsDfv760Nyw/wo+eD17wj GKM1ReSbFsSBa3bO3ryi1UR9nA1BwAZb+BGSZ5H5+IoYRQW7gq0MtBDj1cAz0YPV9Aww F6XQ== X-Gm-Message-State: AO0yUKVlGIUeWg0JLeqhmyH/1VYgZgIZgtxD3yj/xlPbip2mQ4qh06V7 zDT5NWUEeFzsy+NyzQsKp1O0Ojcd73i2k5O1 X-Google-Smtp-Source: AK7set//3E6zUdYE5VYzu6yKKAPPNEbnY3/cuEmACKxjpxsbmEqOF94UxSggFxJ6KkQivqTnVhTfkw== X-Received: by 2002:adf:fa4d:0:b0:2c5:4ffa:ba62 with SMTP id y13-20020adffa4d000000b002c54ffaba62mr1229949wrr.17.1676460492987; Wed, 15 Feb 2023 03:28:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , BALATON Zoltan , qemu-ppc@nongnu.org Subject: [PATCH 12/20] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Date: Wed, 15 Feb 2023 12:27:04 +0100 Message-Id: <20230215112712.23110-13-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460508457100001 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 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 Sat May 18 05:04:59 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=1676460535; cv=none; d=zohomail.com; s=zohoarc; b=gccnKjVTAq2ZYfj3hMoGNms0I7SF79xTDchULS1ebiwBswjkyZGON16n/MIsuANcvmvY7tecwqWvRQNgmgOsbFNOivYtXM3EJTjOK4w437RQsjWAMmNUj8Ko1USBix3sLs+Co7iTkSqyFxsT8vsDSzhqPOoga6EpPdG65qy9EY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460535; 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=U9n13Foi0ErQ6OC7/roMBYkEn0qpFSwKmzmZdhfgQDc=; b=WRActnyE4uTy34d4zcClXZ79Is8jptgWBx6NQwT79w0aO74nxgXHG+hN4tpOxViifCa0xNP+3MMyxaIyIJiW86zo873DKIGYs4n15nfqS80SCSGDpN3YXxEKQDAZEKlpunrvfYNIffzr4+b2iuvTF5xeCkf7FOz4jot91tE/1ls= 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 1676460535148462.5673386412544; Wed, 15 Feb 2023 03:28:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxY-0002Mm-BV; Wed, 15 Feb 2023 06:28:24 -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 1pSFxU-0002GE-Q3 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:20 -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 1pSFxS-0003Uj-Sw for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:20 -0500 Received: by mail-wr1-x430.google.com with SMTP id k3so11157536wrv.5 for ; Wed, 15 Feb 2023 03:28:18 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a1-20020adff7c1000000b002c54a2037d1sm13207148wrq.75.2023.02.15.03.28.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:17 -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=U9n13Foi0ErQ6OC7/roMBYkEn0qpFSwKmzmZdhfgQDc=; b=dID64q3o2VmeIpcwtQair1pKubKZ+5w2qL2zzN/M+gryqcUu/blGLLnTsIl0/kcaag BkBbsECdYNmrBTwU6PV1/TpqBYjeXb7gOUailOMBrG1qdrmyjnIJC5ApwGpewK4hBRXz ZAib58+S4olQJ0yPKqrqhlC12hd4Jg1IHQCK7KpLdb7Y5Dx0rPwb1WczS2vzLZMMaawt J2d3nHaxbiphF8tiWh05UOgFmEuvcf6374UG1NpxI1Rx5utpP0nYtaTb2TDtfRssnc6e pZ7rpmk2K61Z8aFvBk6NWjG5S06i21LzhXlDUsaiJtJyZmdGpWNegNuFy6sGuax3OEUc dh/w== 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=U9n13Foi0ErQ6OC7/roMBYkEn0qpFSwKmzmZdhfgQDc=; b=R1diIjMSewGKtA9KN/39QpViEWJk31u120SMBmLg6lDYsgyuiCW1vOwwwEsLxrHpsG dZI8SmUUj12KvwDZ+14uDEcFmArdd+uKsPEnTWzZvupdZegAYmGHu/NI6sjcL9Kyoibc uNE+MlfUNDgMsN2IsNPm1A4r1Z0bstiaRLLo60sOgXlgVWWhoUQW+nrxnxeZbTs4Xv5P nxYSqr+WoqQtZp3qcRWoA41TnP4XrIMY0LkShHBxFh7A/Xi1EHApd2BZsFIH/29OgrXa cLZRou5wfCakwKxGmkS6Ma+PPDPpfTppasM/40s0guGrtuX6thTB845wtDcglTuCUIvJ 5fTw== X-Gm-Message-State: AO0yUKVz1YdTkp8Q3P5xPO/Hmpuoj0rEZWVOItEGk3ocNgSazeGSrEe/ Sq9lWO2u/IAGwkn87hU6KSLCn0pV/5keRBcl X-Google-Smtp-Source: AK7set9FFrJWbH4143pXW6ycUg9/FJ4CNqj9X12n9D4otzR1oPbIJykxOYrZqVeQJwEPcEN8CAgKoA== X-Received: by 2002:adf:cc8d:0:b0:2c4:57d3:396 with SMTP id p13-20020adfcc8d000000b002c457d30396mr1404115wrj.40.1676460497834; Wed, 15 Feb 2023 03:28:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Wed, 15 Feb 2023 12:27:05 +0100 Message-Id: <20230215112712.23110-14-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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=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: 1676460536503100005 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 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 Sat May 18 05:04:59 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=1676460580; cv=none; d=zohomail.com; s=zohoarc; b=eNdrFLpZgvsK1l3V0EAB1EIp17tWySa4TIylDUp1Qn08f9G1DGoXZVkqP+RueFbgph7k2my2bqBpUy6w3YMvKV8SVlFGoZgDBzDHHRMTMWhe+CUEU0in51DzDLsnUJjIMuNodOmjug+1KZhq5q6t2AlW9g80od5JRAC2PWO4gds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460580; 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=Rhko6eBo+b2YALv98Ryw0md2nUl+2nBlZHFlxqRLTVQ=; b=mRcPHOuB0bF277s8xEKAlu/AIqYCUadAmCKI65tnifmPj6R5Dv0y6vDSIK0aPzb31OBERsjGLx3AdFD5CYTj/CiKzEF49S/YpdJN9g0CivOkuCLQm/ghxQsoejjNHhKy1ujU7RcjDH4Hnwy+Sh7cJLiLBm/uvyzXFfyyGveRdEU= 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 1676460580392824.7214877808531; Wed, 15 Feb 2023 03:29:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFxb-0002ly-Oh; Wed, 15 Feb 2023 06:28:27 -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 1pSFxa-0002e5-0b for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:26 -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 1pSFxY-0003X4-2j for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:25 -0500 Received: by mail-wr1-x42c.google.com with SMTP id m10so9871315wrn.4 for ; Wed, 15 Feb 2023 03:28:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d2-20020adfe2c2000000b002c3f7dfd15csm15361673wrj.32.2023.02.15.03.28.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:22 -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=Rhko6eBo+b2YALv98Ryw0md2nUl+2nBlZHFlxqRLTVQ=; b=kshTL/uDaxdVqOTiqffqwcsa3Gg88s6kPLQHJ88U3vcluBMG+FrmG5COnSF535+h7G 52q5VT8n28myEzzhx9tVp3kPacCA4AEMF/dg9+VIdlu0PSI8Y0WTFPUry31vvMpd65dF xS8bgaTqbUX+f29OyvT84kGzu6t3j0vWKdvsowE/bh8O7dNE/mqMm3G0dxmQQ3CS1n+T uVAgIO7QY8j8EPBH04c2efxQ2IbtvpGk+QauCchj8/v4Zk/4zsjYG8qsrH3scOd55XDJ VDa4cetvPzCCAhB1z/pL76qxyD2LBcJBMITpzrEaTmdop0nhOxaUyY4un8tQOrp/lcAY uv0g== 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=Rhko6eBo+b2YALv98Ryw0md2nUl+2nBlZHFlxqRLTVQ=; b=hHuYHDCs3OlmfvE8XuEsOw/qN0lrU2OyPPTV2Z3LMrzcHUow9OWNqjvifnXb2wukqS f7IeaKjw8wu3c7lQu5EZ40KVKxM21jAn5DJlb1MRrOu/tfQ3iZktjBMao2Md2Hot6SC6 Yx4G2r6mOOcmtLT3zjgkkfv+uktjZXGY2AlSU+YtLIl312slJ2bdYnmQLv7Qbgkq2p55 H8qe63qtunAIUx+lLNKdM/8tiKWAtCxri2EbPFFhURVX7SM1t+Xws3vZJqpKu8uRsnUw Lm2Ri7VIN4py/87WxZHp91D7NKJXeuo2/GbnALIXjoYwoKul9gMQj0e/Oh5AADgPgRm/ V1kA== X-Gm-Message-State: AO0yUKUDRSHzxH6i0+3TNu2UbV+7glUyjQ+esGuwbpDn+ArRyEHZDkxS /JR0WL1XPj8fBTbkMpIrtqnJR/8YvFotxFyi X-Google-Smtp-Source: AK7set83aEQWzxQ9YhMXAaSeNfMoUvFXt4AiVmWKo0s3VWQohqivZ1aG7nraKMW7P51zLs0KI2pLHQ== X-Received: by 2002:a5d:44cc:0:b0:2bf:b199:c7ef with SMTP id z12-20020a5d44cc000000b002bfb199c7efmr1338935wrr.12.1676460502950; Wed, 15 Feb 2023 03:28:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , BALATON Zoltan , qemu-ppc@nongnu.org Subject: [PATCH 14/20] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Date: Wed, 15 Feb 2023 12:27:06 +0100 Message-Id: <20230215112712.23110-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460580688100001 ide_init2() initializes a IDEBus, and set 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 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 1f1527122e..b6c40bc028 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 Sat May 18 05:04:59 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=1676460556; cv=none; d=zohomail.com; s=zohoarc; b=f6+0X3WiWFMO8KuCkx/4mw2om0L/nM9QcUvZpFHrWeo9CPF5GNR2qLTvLXI1Q7zNcLPWqrqc52EghP62Pu/pl5IHcIbPMujYS1aKVNNM4Kv4raKDyBvIoI3idKeDjeyJ+2H0iLBnQTWzHEvpmYXnTl9qS55tdgDmtbPHGZbqJ+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460556; 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=VMQABnxD1Beh0f+S34hrwat9iJbN0H6rcMTsrC1rcF8=; b=e1yMSRkkjqSusgqu9G51/x7AKgK8Os4dCV107RURsGZNGoDlx10+bLMNCUjaZ//8q5wFDHKJ0V5jTn5MLhSXjXmsBiZuK4tBRGKtMVS1p3IzloFo+m27lfkiU4r/128v9U9bWsF3jc0a/aVbzbohjNAMXkT0L4Rdrofr9/Pl3mc= 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 1676460556884157.1242558588358; Wed, 15 Feb 2023 03:29:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFy2-00032H-Jt; Wed, 15 Feb 2023 06:28: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 1pSFxf-0002oZ-66 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:31 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFxd-0003hw-D0 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:30 -0500 Received: by mail-wm1-x335.google.com with SMTP id m20-20020a05600c3b1400b003e1e754657aso1317195wms.2 for ; Wed, 15 Feb 2023 03:28:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m32-20020a05600c3b2000b003e2066a6339sm611155wms.5.2023.02.15.03.28.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:27 -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=VMQABnxD1Beh0f+S34hrwat9iJbN0H6rcMTsrC1rcF8=; b=yUYYI549UEBpofrzoW/TFlPj2NU061wv6P+OENpn52LHkwfbXaV9PVXu6Y+n7Yaj9G 6hRs5q2y8YH5zBPzmqRiRdbe+8AXOOK9/KyfUAiVR0JTM0NZ0wujpEuZagIOw9+AiQZl GhyQU5Hc/FrOEHVx6LufTtHmRIElIS46tfbViX5kCD3/TePzuRMYDtvf9onHSYQYzfPe S/psxGDh2nIskiqBcporKLo4VgQKvXvWJ5EG6CRlTTIyitdLtElR+P3JI0nDRADPK4Na cdTrC3KMOA6KKtz3jg/LR2eSUaiW4K4UNVgqlTuQNgN/4HtCLyCaosqLtGJRpXNixmsO W9jg== 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=VMQABnxD1Beh0f+S34hrwat9iJbN0H6rcMTsrC1rcF8=; b=po6StdQ1FW7Skxn55232WS/grgr1Fxer5jkkskNhPrwhBYOE94hWRhcR+Fl5mFHGcF bCClqXnNnaD5wNesrwmqOwoVmYHpcYBcQAihLDFl81Lx7LPOulPYS11Rwrdwe+zd/ie7 i3xpZtLehz+vGlUfPtYpw/q28pOPbPdLeDxGERxzVrdIEsFn+D1OpzCt8H+bJJZTUPI8 yZV10OcSxGe+4NlmXSFDmB1YrMDAyZw4I6unibiBs1CxzKvWXdjxSM9eWIbJiX8lCD1O qi2HABxjgK9F4b0wfx2kockf0+fyQvNusB9Sm7QhuCSZBLKaJpKaPeNHc2J/lSfSwQep 9TfA== X-Gm-Message-State: AO0yUKXPWyDVAZ+n6q8KLQHcRQxPVfdcjPRgQVG9njhqRk2u2NRVfvVA yqAd1O0BaJhx3XaTDfoECpdKwmRQwJzWHAwq X-Google-Smtp-Source: AK7set/v2+OQonlNW5pNn4zA8Nf4YRQ1dhkGGuoic9DDwE9+Lt27TFa5VS/AqxXTIEmpkMb8M4yaTA== X-Received: by 2002:a05:600c:30ca:b0:3df:12ac:7cc9 with SMTP id h10-20020a05600c30ca00b003df12ac7cc9mr1680682wmn.15.1676460507820; Wed, 15 Feb 2023 03:28:27 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 15/20] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Date: Wed, 15 Feb 2023 12:27:07 +0100 Message-Id: <20230215112712.23110-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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: 1676460558530100001 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 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 Sat May 18 05:04:59 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=1676460562; cv=none; d=zohomail.com; s=zohoarc; b=lGVHajJBXaxzErPgqnWMrsoGpoGzsGp/6MfW4+A4iFV23GPlXkY/zmU5/qeqEkBjcrqtwo64fqukcGmifKFmJVeNTvMp6zUMJ/flw2Pq4y4fTDxCAMxVgU4OmQVuTsnCYc6xpB9d5Ldfjg4f6pwSbX+ZUtpWGspexMrFKATzhrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460562; 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=himCXWtvMBCOM0cvJ1xkT+Q6h790A02ukedCl0Ioy3s=; b=V0VenHdlQnUcR1pL8P5OeTxc4Qp6od4kO9nY8NpdDGUk6Rw7jx0RaDN7ibwK03bsy9rR4km8em/v9J38lLqf8FY8PQ/uwvtIahon08Ro6Satd/rBsXA5ggsJty0EW2vY+l6uh4oCkGGtSJb3UIGtepedZESvvEk8R/AV+FnwdIM= 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 1676460562424152.19638543817837; Wed, 15 Feb 2023 03:29:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFy3-0003JH-KI; Wed, 15 Feb 2023 06:28: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 1pSFxj-0002wP-Sb for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:44 -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 1pSFxi-0003io-Bm for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:35 -0500 Received: by mail-wr1-x435.google.com with SMTP id h16so18770381wrz.12 for ; Wed, 15 Feb 2023 03:28:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k24-20020a5d5258000000b002c54c9bd71fsm12194243wrc.93.2023.02.15.03.28.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:32 -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=himCXWtvMBCOM0cvJ1xkT+Q6h790A02ukedCl0Ioy3s=; b=W/nXYmt1UXXefnldIcEwT+nWSb4MSeC+Yaod4BGMHYUUzwj0RuxdXI5EbaubNsdUyG a6uevPEI0bCWKjvR0p7VLADrRqFHYp/5i9RXPZ0FDNTHkrg2S0B+O/fgLweRsbVTUUlr +LBjMy2+3c7hgBZE8dppr3dVlVq8NJevAvdTOYcYdQ8CxzOyMZOVV1aGeNaOel5hpgpl twM5caxyB6NHXffGQoRJrYgo3nwvIbXEKJDGwvKqO/IRS9mzHkYHoog95wuQWG15MLi/ IUz99mSF+vfUljoF5qZjQCJOWBhsRxYr8Yv+AHTj+K75V/rEFU8sb986vqdxdl+oRbcj wWTw== 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=himCXWtvMBCOM0cvJ1xkT+Q6h790A02ukedCl0Ioy3s=; b=uG0U7NjiWbJgn2F7YE19S8mSP977mPKpfWiPA5pMae00e5xT+j2wwMT7KgZkaNWblP 5y12azgsSN5WpHSJnDA7t13tEubtKO+1GwaqExruJOv8nOMtXhJJwbKv9Bd7Y4FIlTGq Ch9yyzb070V4DlkHvKmZfwjRCX74t/8B+CUl8QDVSWVe4kDo/G9zIGfoc9Ma3+LVEc1u YEFSawKVYLLNQQpJMsg/pNhdGJuyAQXXTW5nu1pVAV51+H36qZKrD0NgYZzGasCWnrda hyuUF5y/9CRQs48hk6QabYt9GhB9XOXqVQA5gPcRzN5lRlJ5XWP9RzfYrCban2vst9uj FzbQ== X-Gm-Message-State: AO0yUKWzT1dVHZaU/KJAvgfSfUY9GtmNyL6XrjfveiezabXfVvDIn1VE obAEsGBWqOrvk3+r2HS7/IW91SeTQz7yPB93 X-Google-Smtp-Source: AK7set8B+rrv1NYuvJhFH9vpAyMO91n8DM2pNAdP8aIksMeQ9VWzCWu2ARhU5rkmBw24PlG7bHPmAg== X-Received: by 2002:a5d:6845:0:b0:2bf:d0a4:3e63 with SMTP id o5-20020a5d6845000000b002bfd0a43e63mr1367933wrw.44.1676460512565; Wed, 15 Feb 2023 03:28:32 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 16/20] hw/ide/ioport: Remove unnecessary includes Date: Wed, 15 Feb 2023 12:27:08 +0100 Message-Id: <20230215112712.23110-17-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460564555100003 Signed-off-by: Philippe Mathieu-Daud=C3=A9 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 e6caa537fa..e2ecc6230c 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/internal.h" #include "trace.h" =20 --=20 2.38.1 From nobody Sat May 18 05:04:59 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=1676460605; cv=none; d=zohomail.com; s=zohoarc; b=isMaCQFAzoPq2wW6/LPmyiN3vccmgGLJjgyrCxxs97f5RLxehQ3CKid5vODNFRh34g1vBwVYmmBdkBf2Mb7jl/UJcTwXGnx/C3nZKGIiZiYNJMJTcPoIJ5HZiRRslW5T8b4zqRyGz3G017m8N05WJd3C3z3Ig54585zYS7EIFrk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460605; 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=IHf/E3PTOxZJLvTGNb/GM1UwNTDyQZV3QHx2O65mezKA29cgMVr0RleeqbcD+xTtHG0CnOqL7jVVQXvnXsE8ZAsYiEWNhAHGjPtr4qjve7PGQAa5qo7G8pBYeFzxUfBbPb2XS17/h0nLMCeOulDutt21j9XzEkGWx2Xty02PZAk= 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 167646060585270.06754827164843; Wed, 15 Feb 2023 03:30:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFy5-0003Wm-OU; Wed, 15 Feb 2023 06:28:57 -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 1pSFxr-0002zg-4i for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:51 -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 1pSFxn-0003jO-4G for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:42 -0500 Received: by mail-wm1-x329.google.com with SMTP id k8-20020a05600c1c8800b003dc57ea0dfeso1356570wms.0 for ; Wed, 15 Feb 2023 03:28:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t19-20020a05600c451300b003e1f319b87bsm2038630wmo.24.2023.02.15.03.28.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:37 -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=FDEpq891SJJTD33BLm7+mPU4j83Y1FTHm5FhH7xYFEH7arPmmpEg2tfIIdnqE5jtEX gpioEJ+w9T5DP8ctbrd1KMbkJqRP6IISr1hxk8Z0VlfkEliKEx1paalLcKgBB9o0IF82 ieSpIDvXXIch9bkTOIFiWm/XF1LD2bDGkfOLl4smBHJqQziyXgpINeGPiRQfhd1pVb2R H9b9UXJoOciikZGcEaCIK8d0fyJN7YFXphBKWvHLHXAw96wVbx1A+mgHaTJe+XtWYpC7 aO9rBVWpNgnIryiaTsW95oKYoqmcafT0Jd8cMTEEzmvdJDt77n1NkxoZ504TPKdl7P/L OKPQ== 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=kW4u0AqCpk9OV1tzq9v8Mq4Y+QcokrvK/w+wPD+fGv53gKOtsr8SAIz0zb4L0xGmym 63V0Xp0QdC8OCSMPyvVP41kG05Yo1UUwyzYYseMQLAxOSYLt9wTMX6zNjUtR/ZSODQYr 0d+Jm/xwr7HzQUgLIRCW+HXC1wNCFGo2txJZmzN24bw9RsUbiH/HlBiM9qaJRQOpfeGd SPDd3fDTyX/D4rH3HI2kImAAKRaUXXQew2/OHUq0zuJMou92WuRN/7qLhVC4K4a+A1Nz 7lNJeGlX5d6G1J7cZdtgd82b1cQy3svn8s7E51UxSugLNpSLTp3X/aHN7KMyuLF4oz1Z qbVw== X-Gm-Message-State: AO0yUKVkHQRMtI7BDHnqis7mVFNU61V63v0t3mwbsdyatTIi5PEQvV2F 5RQZS8Kv/T1Vb2UU/4hxSzf/IEw7wDHBU/6x X-Google-Smtp-Source: AK7set+89475AUjyMvfwpJ3QkpofDQEcycNmhCK1jIbrBW8Tc0Ge/6nsztUCB/z5FhLR6I+ateiD+g== X-Received: by 2002:a05:600c:8505:b0:3e0:185:44af with SMTP id gw5-20020a05600c850500b003e0018544afmr1355411wmb.20.1676460517480; Wed, 15 Feb 2023 03:28:37 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 17/20] hw/ide/pci: Unexport bmdma_active_if() Date: Wed, 15 Feb 2023 12:27:09 +0100 Message-Id: <20230215112712.23110-18-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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: 1676460606907100009 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 Reviewed-by: Richard Henderson --- 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 Sat May 18 05:04:59 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=1676460587; cv=none; d=zohomail.com; s=zohoarc; b=TnNT2MMbP5eRTN8E7lVqVYB4Vzzn3U+WJ+1UAvkJMPk5UGyN7KSvwc40Ne1MFbT9M2OiM1AlNCqnjJTnQtMGWRUong1QrM3Du8gwQVE0SSmT0zvtGig1gPWhZmni0+Vrlzk+QIw1U6WyjsPtEcCgoSbeFSQvv2gFchuAle1Fp30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460587; 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=VTwT5VGfn+8UwZX3OhE9cueSsB1q4gTrSW5DQD7KfW0=; b=EinAcb1pIIlEllMBDX1usCnCsmfHs+QDt0n/s9GlFF9OISa1Q1uZY7WurFsuPZoGvUnV6AzmEXrq5TX8caBrxWe88lryJgtpMEQxMCI+hfboXawCqJomOD9wJeEkH0/mQo8H2Dm8lSwV9LupGr9eHQQKib2mL7oaesBvsx0XWyQ= 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 1676460587092511.4520026243554; Wed, 15 Feb 2023 03:29:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFyH-00041u-Rp; Wed, 15 Feb 2023 06:29:11 -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 1pSFxt-000316-Tc for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:51 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSFxs-0003k5-6J for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:45 -0500 Received: by mail-wm1-x335.google.com with SMTP id bg5-20020a05600c3c8500b003e00c739ce4so1284882wmb.5 for ; Wed, 15 Feb 2023 03:28:43 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n27-20020a05600c3b9b00b003e206cc7237sm33073wms.24.2023.02.15.03.28.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28:42 -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=VTwT5VGfn+8UwZX3OhE9cueSsB1q4gTrSW5DQD7KfW0=; b=J/Wmsp3VZdkGx4vxHG+B1F7gdRC0pbuz9DpRdm1wEU2+nbH8HiCqGsQ70cHugAry2R ktfybVzmqYYTfVAO1AFZhjnSkVO/TEo9wmM1mA7eR8sHij3iSTPFZSF8N5xPGI4EM+2J eKAlpToXOHI5LHju833m+uE5fpdT4Xfs3NUfptq0wY5W9lDOLPVGR7R5JGme6zYFTub0 ZfuBn/BT0/DDKXdVpp7bs6hIf0pPbZWQo5rpP/+Y46AJUfPjCqxKxD75G3RIaZY9+Ubf 8o4xuS8T5g4a+iHciqxrQBAyVJ1n90PAuVlFa21iV/v36/Fj2rQg1/5HFFdXUzPuD8F9 d5+Q== 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=VTwT5VGfn+8UwZX3OhE9cueSsB1q4gTrSW5DQD7KfW0=; b=mxpp98fHY1HmaoT+5G1kaK3MOmJ0XSmlPLG/mdu5CHECG/lxEIJSE7xndLq+rGI53a V5RXRN527f4HrMvhPZ7ZwU51294MGH6i6gXgwjzMaDGPyGT5TwjOkztmvSOUA9aImfuD VUQiTLkMqkTBfvqfiOSkMmk3g3Ln6uUXbGHnImLz3CJ3ZDRu2xzSEVLNt0twF08k8WfV enAP5+clLBgEgcyf9Y/SWZ63Miugd36vENBp/A8knblHP+SND1Nvyr9buqwpjtQQULYb bUkDt+U7A6ku8xMgDtIAaDsYZz4EhhrutaunZaCsiZhlqDwe0EUQ8Cb+dUt7aM7tmB71 PDzg== X-Gm-Message-State: AO0yUKV2GaHn+a2wbCd9pPy4xwmdASYj3YgCWIrvuk7s9Nc14aOxnBjc ENOCECbLMLtnCI3+DZWcqUfshq4KqCg13fDn X-Google-Smtp-Source: AK7set/CDuOFrxkha2P3ZaZ2sHD4jthr3T3bb94vWHQ9q7l74HqVx1FfZYzQ7001lYfkdl2LFTNYhg== X-Received: by 2002:a05:600c:90a:b0:3df:50eb:7cd9 with SMTP id m10-20020a05600c090a00b003df50eb7cd9mr1887255wmp.14.1676460522361; Wed, 15 Feb 2023 03:28:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 18/20] hw/ide/piix: Remove unused includes Date: Wed, 15 Feb 2023 12:27:10 +0100 Message-Id: <20230215112712.23110-19-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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: 1676460588678100001 Signed-off-by: Philippe Mathieu-Daud=C3=A9 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 2f71376b93..6354ae740b 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 "trace.h" --=20 2.38.1 From nobody Sat May 18 05:04:59 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=1676460605; cv=none; d=zohomail.com; s=zohoarc; b=TEYF/2GS8R7jRPwbjRjK7Is08KAg5LIzEqgozW55C9Mzwa9s/Ja0Yuvq9AyFUH4GKxwcErr7Epeh/1rARUhugbRuOn9jgEXi8rrNnTpKvDUhh+Z0lm23F0t9tgvsoEtXocsvkaACbC/aCT3uTMnD9w7wZXan2EsNz9ZpB2cULXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460605; 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=4pZvcBz/M9JVspsVPGj8tHQKwKplW2O7nq3QqDRzxpo=; b=Ty0GnKjVPyX9P30+KESzUjiatRGn83xEnyFHYspFJ6ehFpzlSlVWXHG4ZeR23RAzZViZFgXBUdiubLEz9M5ufrOf+pIkvD7/UH8jfAV5eOFZDL2c2ZyiLdjlh1veTewDHlyulA87eNv2CKoSqeKI4ALZwFmki/20S78QhJy9c0g= 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 1676460605489698.0332512561736; Wed, 15 Feb 2023 03:30:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFy4-0003OO-Ji; Wed, 15 Feb 2023 06:28: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 1pSFxx-000329-JS for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:51 -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 1pSFxw-0003X4-0P for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:49 -0500 Received: by mail-wr1-x42c.google.com with SMTP id m10so9872497wrn.4 for ; Wed, 15 Feb 2023 03:28:47 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z17-20020a5d4d11000000b002c56a7872f4sm2482148wrt.82.2023.02.15.03.28.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28: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=4pZvcBz/M9JVspsVPGj8tHQKwKplW2O7nq3QqDRzxpo=; b=uqi7ArIRN+gum6G0JqTGsQg1HVX4upXCd/85Zz4mP7KzK9YTe0RPy+qgTnU4OM8kPr ITbyUPh8AUzBv1Hs+X0aMMZijvhbd8Vrb0L2zG8eFhwp3fr6zn/zmzcbecSEecs3SSeV oldXRGwRMerjzGvIQQJ04XBzburldMIiUgdb1DwDhHMa3NGExZpekQ9OuOsV5vZ6jFmN EgNcOxJqxX9D6/OPfb/4Z8sN7WDT99G4mm7Vm1uMzROHfeIub0e4ZU1B5stxVkYmB/O7 E7equB1Cd7sW43552waeul2qpcxfQ6RfNwopo25fYINylxULYyMNsuB8ElaXhprwE+O4 Wgvw== 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=4pZvcBz/M9JVspsVPGj8tHQKwKplW2O7nq3QqDRzxpo=; b=I0l26ufSsJy+yPl7ZgeQz+vhH7c5OxjOsD9K5cAZJqVe/2DteficEv9qc/3f00LEIk 1CSPuH8sLCTPIAL0+/D5ZRUo/IrqnVq/729gjBsJzQe1OCDJKpH5OulGoW8abMjMvtwF 5vaYOJn8ILM0mdBOJ0RVS3r3n+wXZYg/iOVz2+DjCzF9c47+8l7oMfpy9fsvDeqzEvbk 9ro7WhqXVpxeH9WzUnD78EmG5eR4tHPbS348OcRe2NzczPRu7AaTTvDHtuUzvKc3tfZ2 7MBTQ9rITcIGGmAgzf6bhW1RIXStWUlPm4SJuYASPho4bhHue1zpOFgUFnWSYEDIKA3J t0dA== X-Gm-Message-State: AO0yUKWSfXjAuhzkVxpXt0hOnWUpxib+L93qgZoR05iGBHMVDxlR5bOE w8Db+KYBwO81ReJIx0bGcDUHP6LcY4aq3T5N X-Google-Smtp-Source: AK7set8177pmYmaHd0twvUO3zNRm1RxM9FzWcogS6irKhTqwnqMozYiUVFO1i0fcyLyOUe9Q14AgPQ== X-Received: by 2002:adf:ce83:0:b0:2c3:e16a:aa33 with SMTP id r3-20020adfce83000000b002c3e16aaa33mr1181323wrn.36.1676460527150; Wed, 15 Feb 2023 03:28:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 19/20] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Date: Wed, 15 Feb 2023 12:27:11 +0100 Message-Id: <20230215112712.23110-20-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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=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: 1676460606828100007 Signed-off-by: Philippe Mathieu-Daud=C3=A9 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 6354ae740b..f10bdf39ff 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -121,7 +121,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; @@ -138,7 +138,9 @@ static int pci_piix_init_ports(PCIIDEState *d) ret =3D ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, 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)); @@ -148,14 +150,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 @@ -164,10 +165,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 Sat May 18 05:04:59 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=1676460583; cv=none; d=zohomail.com; s=zohoarc; b=HHx4B8Y00QgnQYRyYHNx0k2JfwrJC3ktVfo++I5hyANKtEZZ9hUv0kxOWP9MDDN49LizNwyE/hIWkAUTfzXFjABVR3pZTmv8pRI+AYNW/Zy/fmRlyHfUEaMxFayhg7/UFDFSU0EpMYCi+mfbjMeorrzDJDHqVZKW4FV22Q+ihGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460583; 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=rkzUfSiq/c6mggilmV6GobDXfpVINJSGyHsNi3pBEGk=; b=nz6TTzGYLlWc9hIiMOBoms5bQ4zvAJj4sncERL/0sbb8LsfdpN65V6RH7YjzyXJEA1VXsYGRktioX0W/G2Yr/tbO/7EmDwYDfn92ht83/pDncQC6lYsc9vBa3h7Xn6XjjFUbt7udGnzqzuyO06j2V2pBIJFlXL/tYuDpUd4rDXs= 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 1676460583478805.8043402514219; Wed, 15 Feb 2023 03:29:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSFy5-0003Vr-OI; Wed, 15 Feb 2023 06:28:57 -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 1pSFy3-0003Ge-9J for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:55 -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 1pSFy1-0003X4-Eo for qemu-devel@nongnu.org; Wed, 15 Feb 2023 06:28:54 -0500 Received: by mail-wr1-x42c.google.com with SMTP id m10so9872778wrn.4 for ; Wed, 15 Feb 2023 03:28:52 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d12-20020adfe84c000000b002c3f03d8851sm3646035wrn.16.2023.02.15.03.28.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 03:28: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=rkzUfSiq/c6mggilmV6GobDXfpVINJSGyHsNi3pBEGk=; b=ivvdJlWncT9BTiEezFQoCwF43fu0e2HoMzMa3gqM5IpyrYPKW5zEajHZNA+TFyIsh5 23K7+OqVd1n+7zf9vR8f9NBwVm5yHqwsTBQXd/ZZq43wnsDOOFo77tN64gVd5qujSpxt 2LZb9aup3iCTWDMKCiWNq8k/73nGfwiAN/Kkx7zZv3/2JSyFXpkHk0+hLR6d/YysFkOJ JBAkjFipIxG3zGXjC/aNltisjJdJwGRnKxlFN/JRbRZtNEPBd8+Ebfmw1GjWWGuM23xQ Cfgc1Fk328yaoByQ0ZNCyMYdwQRr9BWbgFPKEHw6aD2PTmq7mmB7tqkejSBAyp6Fzijc yVVA== 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=rkzUfSiq/c6mggilmV6GobDXfpVINJSGyHsNi3pBEGk=; b=pmvrx7+P4WvYbYkkTQOjZfXSX0bVtUYtReBY+7mv6fdlBPENOq9+Jv2nGeCKMvckZ0 vhLes7/XkjF5SlblWtdi87galHerky6YRZTnkVzxnw+YmPK9hWkq5ktBQD26p9Okm5Hj c5HL8/eFLCeh2RGvjIzWAEmRMqQN8MYTrqSNvTvcxXsP7r+YavkPIXMJ8R1uUJx4rz9B BZXVHxp86roKs87mg9sS9FRfrBhgGQhrLUlHRVImghWcGPvgs+OnZsvhgxdwr1dkvkbs Bhyhp7SVv3cEtXJwY/wFR5kFUPhcKKEHzFt+ONP4iXqC6kd/sTtSpE2zW6aKnETAEqP7 u6kw== X-Gm-Message-State: AO0yUKUEJBn2kVnnjMWBqwU+Ys5rMaF3zL29QU5YV4vAcSHa5V0u8StI MKdEf/6egairlKvXWK6vUsLUGiMP0HacP9u5 X-Google-Smtp-Source: AK7set85+3QtDJKgN5WT3lf1LjndXRyEDx59NHqVMUZk3rW9BR8TXTlLyYyRUhAhGAyG63dpMAFAXg== X-Received: by 2002:a5d:5488:0:b0:2c5:5db4:bcd with SMTP id h8-20020a5d5488000000b002c55db40bcdmr1658808wrv.11.1676460532489; Wed, 15 Feb 2023 03:28:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eduardo Habkost , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 20/20] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Date: Wed, 15 Feb 2023 12:27:12 +0100 Message-Id: <20230215112712.23110-21-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215112712.23110-1-philmd@linaro.org> References: <20230215112712.23110-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=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: 1676460584677100007 Signed-off-by: Philippe Mathieu-Daud=C3=A9 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 f10bdf39ff..41d60921e3 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -121,7 +121,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; @@ -131,24 +131,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_init_ioport(&d->bus[i], NULL, port_info[i].iobase, - 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_init_ioport(&d->bus[i], NULL, port_info[i].iobase, + 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].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; } @@ -165,8 +162,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