From patchwork Mon Feb 20 09:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655045 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1291525wrc; Mon, 20 Feb 2023 01:15:09 -0800 (PST) X-Google-Smtp-Source: AK7set+6b6A4AZJdAnKCUSdO2miB4W8E+bLquVJ0FVJwaY3taMDEVPsAwBariNplV9cBzaLqiF4l X-Received: by 2002:a05:6214:19ca:b0:571:6ac:ec8e with SMTP id j10-20020a05621419ca00b0057106acec8emr2791925qvc.13.1676884509326; Mon, 20 Feb 2023 01:15:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884509; cv=none; d=google.com; s=arc-20160816; b=kGviu+vJ/bSwq1wPWhA9mrGoE6wxyW1DoCc0lbyDmWkZrehQdiZJdeOoSKgrG9hsgi lfuE/CIi+WuOw4+rNZNp8AnTU8Db3U1yRsxS0hnW05O83xemTaEZ6W/pqU0rMXn7HtNH H79N8hN9TI28wxHqEn3mNrKIXCsPb3gyxWnJn4IQf1BQy90B2Vr2CYGTV6x8Ocsr/ml6 NnqwyRpwOElgBSxGyPSiTgN0tCwFiHc37MD4i+/Veq0LKfOZhhS2L5oS4NRGy50F733W ZyFG5d5sTL387RsnsjgcPZw4pLRAJQK63cEdbLLfI45wVQBFi1CZ8sQedJmF95ZFO9iT r2hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=FcME0t/6DVc7slFUNeIZsph7WrZFfwcdU2wcJF+WO8K4OWb7Rn6d1sYDV0zjDJ9NsE ETpyGlweMhdxNHAXy1LBKxFrV/6uUgnji8Cm7DNBDn8QYZdE4m+s6xvl3aXy8smSTqY3 mbeDcnGfqKjPR0wyamq2fgfEurTkf7R44KVXbJCX+FQ1nnWWaZ1KDyJT/xM1y4TCH7U3 2GjWHhAvtnlLrEDuaeGMfd2fWE2MzGvgb+QAgL0QrKU5+y7byQEOrCihMG2ktLr2OQHo PJLhc9P53A1X0yfLitcVPVBgDsDJvAqPYMxVW8BkYUiYBzZIew7IxX6CZn7fCWEZyzF8 mJ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WyFW55FB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a17-20020a0ca991000000b0056eff66f663si2814679qvb.5.2023.02.20.01.15.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:15:09 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WyFW55FB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fb-0005fl-LH; Mon, 20 Feb 2023 04:14:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FP-0005Xi-Rk for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:13 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FL-0003ja-NR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:10 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg28so401451wmb.0 for ; Mon, 20 Feb 2023 01:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=WyFW55FBx+SX8Sfu9PUlqVniIPHXR4bFEAKvxqiyXg5bbhj14tXeRvguO3HNwrERsi C48k05vsddw/0PNtFfSih+OjUqy7rX0yfXsLrasMrbKzU4l7VIPkJPiP7nQGRe8gu10X umJsRUtK0zd/A3J1GdClHcjeHirMzykf48gui0h+PNt9qFiilo/+uNtVEejiDBwHhqtQ V9uYhuxGPFK0k3OSVy+WnipyWXbDzZYTYR3y/5tsmwC9xf06OsedLvJLrzPUTFQ72Yna CC4VArW3RBB5+QU/ToN4Zi6xbPByAy3TK3xV7NfVCk+m9tVUrT0U0OvPqnKON55Su9o7 w/2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vbq7Yid+DCc0hkC10nW8TDlz85UdxpCIIBbqcQwiV2Q=; b=hpAXV5MGsIvYxye2GN+obaf/nRg19mg77nBD/wMK1E2Ft9d/i3ZFI8X9UaNfhNLjff 8C7zuMt9nSjvGLjqciSm4+pyyqLLAxTgW0IiLt208qE0zNHjkD4YRQBKGoVtQ6E348eZ afHdinK2vEYIL1E/qgt7CFluYkePqYSgLXoXvRaJhZ5IWEW1Me5c4MeZx38sSV+eFH+/ /AJv/bQdGZYc93GavE3igCbBsVFAX1Dn6IxImgHjxQpc5uOieYEODU4qhjSjMn37fnze GqY3H337kf5sErCh6OVRzh4N8l+gJh9dHwELapwgWjy+DV93SNV0c3xyWoROmHjYiJEg KfxA== X-Gm-Message-State: AO0yUKXEBcvQXHuEiWg1NAGCXr6DF1NToAp9HCcs8WUoHidn5Ax0POqj 3DNLvpgG6K28CLeO0OBteGCurvTpE6mmpeVU X-Received: by 2002:a05:600c:1d0b:b0:3d2:2d2a:d581 with SMTP id l11-20020a05600c1d0b00b003d22d2ad581mr245290wms.30.1676884445575; Mon, 20 Feb 2023 01:14:05 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b13-20020adff90d000000b002c3f50228afsm2765498wrr.3.2023.02.20.01.14.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 01/24] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Date: Mon, 20 Feb 2023 10:13:35 +0100 Message-Id: <20230220091358.17038-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: John Snow I have not been able to give these devices the love they need for a while now. Update the maintainers file to reflect the truth of the matter. Signed-off-by: John Snow Message-Id: <20230206182544.711117-1-jsnow@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fd54c1f140..0612fff63b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1791,7 +1791,7 @@ F: hw/misc/edu.c IDE M: John Snow L: qemu-block@nongnu.org -S: Supported +S: Odd Fixes F: include/hw/ide.h F: include/hw/ide/ F: hw/ide/ @@ -1816,7 +1816,7 @@ T: git https://github.com/cminyard/qemu.git master-ipmi-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 From patchwork Mon Feb 20 09:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655066 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1296541wrc; Mon, 20 Feb 2023 01:30:00 -0800 (PST) X-Google-Smtp-Source: AK7set9/Xktd5BJO8N8TDu5mfpjsDLQ2hFDTa7F/YBl69FBXrmWUEy9TGZTknL2c78dves54cES9 X-Received: by 2002:ac8:5e47:0:b0:3b9:b619:42c1 with SMTP id i7-20020ac85e47000000b003b9b61942c1mr13082214qtx.27.1676885400226; Mon, 20 Feb 2023 01:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885400; cv=none; d=google.com; s=arc-20160816; b=iS7EuVQAKC7wRHjr1wY7YmP8ng/bksF+05GENbFch2rCqF9gjqzcK42bgutfqKjxqg 0owrbOu8PTrXCvqoMRskj6/Udknn0LSey4rElRaxHfKO81SWLPE/WBuyrsIwKfpZBjWj k2oPl2Q2pPAN4L+SE4iFqi+rjC+EBK6ZY/DsoSKipQ6L8WkmpEs03xw+KbhTYbAXW7fh PCXiJk9aH9x27FhfRwaP2GmO2K10uQlVlaxGlN0aSYwss2iuVsgj45b+aliDslnkRHbn mgCNulwdw2WOYRbIRhHEnazo/PJU46DKFPWE6a466jTZn1bQNI7IfGgv+FwYbMlqNFmJ BNTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=sVGXvgZjvBrWOAWBL02lTcdAp43KnOXEbiPF7oMPcwOcHsktZ7/AI1ZNuTwnfHN4yv G3m4nZxbzOgoMOvTVY6knqXQmBrZOlbpwJP0thWusVm7sVo0424QjETLjdpvtEhJgS/A Jx4VbOJvcZVOqsM9OaAb/413HE1tXqdPE9qljSfI3deZX/aYbINvTm+hN2U99M45YQqs P9doA4QPZE6IxSxsNqr1PzxsqqOYXppozj3rX4oRCybjMsomndS0UlSOUgMTYWPVlelX p/2G5XZShlfifKLG7H5o0SVpu1teSf4yLE0gdovgZ4Ge4R/KuPLEM5wCyTKQKr4/FCyj nDUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ixQoK3vR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y20-20020ac85f54000000b003b82f17aed5si9859873qta.3.2023.02.20.01.29.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ixQoK3vR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2FZ-0005al-Ld; Mon, 20 Feb 2023 04:14:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FT-0005Yg-7F for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:16 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FQ-0003kM-3N for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:13 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1924009wrd.3 for ; Mon, 20 Feb 2023 01:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=ixQoK3vRNaLvZtGNYpq6vHbDKkGj/0dNxU6uYwWZvItEbg6p9W3FTZXmoDwwoAFFUn jtbbkgjQRIcynPUQSdZT8oN8QzGxTuamy9z37kOpC8+iHtgNpRqvXlxFG77Hl+lITss2 p330O5RlMIKwt6Akg0Y08+gtBaDn6TxtoyjqadVVA++h50YytsfFCXITKc4mWbpuJ5fj UrwXJcLt/DFwk0Zg1SqwaQ7CIkTWfUIE4pPMpwGYhX7l4EqxdSiay8MAAv4MT7fSLVOa 0/je56tDs4DBt6hvjrabCPxE8W1Ub6O26DiHD7Ppfkxt0TLjqPWuHw/lz/GRCaqKo964 WTwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tVwFPC8/Cym1VDjogehpU1u1QuWz7q979OWiyNkc7u4=; b=QHiODLg57Z3xpGNVpRg9X389QCWeoRSG/2pvB00IFWndX4n6w7R5Hul7QltHBfAfOY 5XG56DrtijWGFCiGhIlcPUMUdN9/+XzOiG6QIXvYJi7vDAN6yfuYU8LMi1PRNWC8PP9x jqfkgMCwrkkU2TVnE7ks2nfbcSlVDdlOU1snGQX1HUDHqH90bTeP/Zp4M6zS/+6Wx8Zr OhJgU9U4g8ZF0czlK/T28Id54AEom0TzynH6KM4UJ3B9anXGlrdFQw8MscPdDhMSlITY FEWzSbS7mhVJG27cFU+FkzmPdpV6FFZimgvb9hcyOZBX2yqvHiCKO6CsmBFkfNWHciqe GCSg== X-Gm-Message-State: AO0yUKXHkV52nF/CRNdyVjGBMY/6go1JsAPT7qccSRbg0lBeHh8dwEG1 mV1m7wndFTl+NFLj+ZRD6c7DtvEORxj3/dgB X-Received: by 2002:adf:dd86:0:b0:2c5:a370:df65 with SMTP id x6-20020adfdd86000000b002c5a370df65mr528344wrl.10.1676884450408; Mon, 20 Feb 2023 01:14:10 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n3-20020a5d67c3000000b002c59f186739sm1919995wrw.23.2023.02.20.01.14.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/24] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Date: Mon, 20 Feb 2023 10:13:36 +0100 Message-Id: <20230220091358.17038-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Following docs/devel/style.rst guidelines, rename MMIOIDEState as MmioIdeState. Having the structure name and its typedef named equally, we can manually convert from the old DECLARE_INSTANCE_CHECKER() macro to the more recent OBJECT_DECLARE_SIMPLE_TYPE(). Note, due to that name mismatch, this macro wasn't automatically converted during commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- hw/ide/mmio.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index fb2ebd4847..c33d42437f 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -40,11 +40,9 @@ */ #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) -struct MMIOIDEState { +struct MmioIdeState { /*< private >*/ SysBusDevice parent_obj; /*< public >*/ @@ -58,7 +56,7 @@ struct MMIOIDEState { static void mmio_ide_reset(DeviceState *dev) { - MMIOState *s = MMIO_IDE(dev); + MmioIdeState *s = MMIO_IDE(dev); 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 = opaque; + MmioIdeState *s = opaque; addr >>= 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 = opaque; + MmioIdeState *s = opaque; addr >>= s->shift; if (addr & 7) ide_ioport_write(&s->bus, addr, val); @@ -94,14 +92,14 @@ static const MemoryRegionOps mmio_ide_ops = { static uint64_t mmio_ide_status_read(void *opaque, hwaddr addr, unsigned size) { - MMIOState *s= opaque; + MmioIdeState *s= opaque; return ide_status_read(&s->bus, 0); } static void mmio_ide_ctrl_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - MMIOState *s = opaque; + MmioIdeState *s = opaque; ide_ctrl_write(&s->bus, 0, val); } @@ -116,8 +114,8 @@ static const VMStateDescription vmstate_ide_mmio = { .version_id = 3, .minimum_version_id = 0, .fields = (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 = { static void mmio_ide_realizefn(DeviceState *dev, Error **errp) { SysBusDevice *d = SYS_BUS_DEVICE(dev); - MMIOState *s = MMIO_IDE(dev); + MmioIdeState *s = MMIO_IDE(dev); ide_init2(&s->bus, s->irq); @@ -140,14 +138,14 @@ static void mmio_ide_realizefn(DeviceState *dev, Error **errp) static void mmio_ide_initfn(Object *obj) { SysBusDevice *d = SYS_BUS_DEVICE(obj); - MMIOState *s = MMIO_IDE(obj); + MmioIdeState *s = MMIO_IDE(obj); ide_bus_init(&s->bus, sizeof(s->bus), DEVICE(obj), 0, 2); sysbus_init_irq(d, &s->irq); } static Property mmio_ide_properties[] = { - DEFINE_PROP_UINT32("shift", MMIOState, shift, 0), + DEFINE_PROP_UINT32("shift", MmioIdeState, shift, 0), DEFINE_PROP_END_OF_LIST() }; @@ -164,7 +162,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *data) static const TypeInfo mmio_ide_type_info = { .name = TYPE_MMIO_IDE, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(MMIOState), + .instance_size = sizeof(MmioIdeState), .instance_init = mmio_ide_initfn, .class_init = mmio_ide_class_init, }; @@ -176,7 +174,7 @@ static void mmio_ide_register_types(void) void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1) { - MMIOState *s = MMIO_IDE(dev); + MmioIdeState *s = MMIO_IDE(dev); if (hd0 != NULL) { ide_create_drive(&s->bus, 0, hd0); From patchwork Mon Feb 20 09:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655044 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1291491wrc; Mon, 20 Feb 2023 01:15:02 -0800 (PST) X-Google-Smtp-Source: AK7set9mSqwG8G6P6kIkTywQPBuqLyTRS7Z8j6kk/2UFHtk+ZajIp8K5dd/KQtpsZK/odgPIL1ef X-Received: by 2002:a05:6214:20c4:b0:56e:aa11:daa3 with SMTP id 4-20020a05621420c400b0056eaa11daa3mr4908403qve.14.1676884502545; Mon, 20 Feb 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884502; cv=none; d=google.com; s=arc-20160816; b=bmyXK47QraW3k4iXdwf5yCcYfe1EdPAIYJjANrZY9GG00ULOaLdJ3GoiIIccBq/Aqt MFCKD0RJTKHFr0CIZeN0yNCtO2+erqQ9s9KEZXyX1mncSV8eD2KFyRhb58OY2pBt1Nc/ Qn0FdVw1K9AIR0nK6Bddjwnn0C614E+RYKtgvH4eNVqeubiKIHe+FYUkzRoaGHeyeXEp IpdFh0SqoHmb/ZV7aLmeJma0gwEB71XpoZFFJSHb+YrZK3esxB9SdiEPDxcW1M9QaF82 qH0nxRMxTaL8DMc3AkoCCGYVo9iXci0uECMeoQzPapkYT8Cy4VLaz9dxqW11tow2IGcs mDmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=DG4Y9M2YbWi1pO1KpifkShsZ6iF3fB6SWVTgDZsK0Jprz9nMlcts16Z2SQJEg+VhT0 5VCnzlTcnTVovglupgL4rm4bdaNVbS3D6QG1pZIGyd8zysfECi6A8AA4/2YxSqAm1dDH 7SZWU7V/OPQBExneu81e4ZSHQIXQE+z7ZhYcwgtAP+l/f40d9j9J2taHVFnZPrdrbJSo fYlnfna4KDDbB/LtxyA3X36HQAhIqQeGMCBKbPDHjnRLFPcTbkJ42yZnXWkpv/fAjS5d r1NL4Cb1jsqijjlWn3GgjdX36bawP0E6CKXAFO0Ev0r/ed6oeQYX28jE23NmCg3gknap h9qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E4kzdFZE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a187-20020a3798c4000000b006faaf64e6bfsi7514592qke.707.2023.02.20.01.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E4kzdFZE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fb-0005g5-UF; Mon, 20 Feb 2023 04:14:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2FX-0005ab-QR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:20 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FV-0003ly-8l for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:19 -0500 Received: by mail-wr1-x42c.google.com with SMTP id t13so254682wrv.13 for ; Mon, 20 Feb 2023 01:14:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=E4kzdFZElZdBHc1j5MrlE89N7qaa4yexo/AxhYkWB593YndVBY+dsR0H0jYdvViQOA SROuqjlQY/pHYRp7d954cKLIl7KF/qBOvzSWb5cvo2De2gUcFDt4c9aRLaUp4ZozpNkP KZaStCdzw2+9LqrQuuH8fOk6AlTsk1PH+/8h2Z3Aom6PA2oJQkxnN/rhqThOe46jMce8 pqxEAp/6ruXfFnL01b21RBvMTfKwYS7IFdFrxBBWaflDKgf/oO8Ifj6uoMJK/+0FT0Ui 5OgRWucFcEzSolEtoyszDecoq90jAJIbVAllf77SWPvMRYUY4q2Dr881f0BZYaZ7yuZk weIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qK71KEeZ1dXO+J7OSOV435FopVrvh5A+el2kM0w8yiE=; b=llgDR1QoL3hcHNWoK27TOMuRRJVXeTP86L9MK6mI7olJflPNvnh4PqpPh1x/UpDUfH O9W3zPqtjEDPeb9SDbZ93NuzCsyyumoJNz1GMI7Va9v3mjnJWkQwuzwArUvBjXq4cd5q S4ZdWSWoADLL3p/ygOCiMKSpDoV0wYayOotjhAQyyAZGrwpp9g/ELH/HEVAOJtJFvkwX rPiN7X3S9jHY4014OpjjDYoG/SpsFXISb2GiCXfomUZplJmddgbDGi+7ENSrmlivTTH/ S2Trfbnau3dn+/LgK+kYG6tSWce3efcr/lQn0i2WUyPWiAf7L0/YQCmP9tw3EtOKGcdw goVA== X-Gm-Message-State: AO0yUKUnWNTgLU2CQXlzGZpqavFYuwxK5OWT1E+Cf96GUm1TpH8T4EEI hTJlkFF9ttOPam5UbkX3PlbRB7NDSC/W4f8J X-Received: by 2002:a5d:4e49:0:b0:2c3:e4f5:18c with SMTP id r9-20020a5d4e49000000b002c3e4f5018cmr302337wrt.30.1676884455709; Mon, 20 Feb 2023 01:14:15 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b11-20020adfe30b000000b002c573a6216fsm11911601wrj.37.2023.02.20.01.14.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Richard Henderson , Yoshinori Sato , Magnus Damm Subject: [PATCH v2 03/24] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Date: Mon, 20 Feb 2023 10:13:37 +0100 Message-Id: <20230220091358.17038-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org "hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Message-Id: <20230215112712.23110-4-philmd@linaro.org> Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/mmio.c | 5 +---- hw/sh4/r2d.c | 4 ++-- include/hw/ide.h | 3 --- include/hw/ide/mmio.h | 26 ++++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 include/hw/ide/mmio.h diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index c33d42437f..8b2ba604c5 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -29,9 +29,9 @@ #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/ide/mmio.h" #include "hw/ide/internal.h" #include "hw/qdev-properties.h" -#include "qom/object.h" /***********************************************************/ /* MMIO based ide port @@ -39,9 +39,6 @@ * dedicated ide controller, which is often seen on embedded boards. */ -#define TYPE_MMIO_IDE "mmio-ide" -OBJECT_DECLARE_SIMPLE_TYPE(MmioIdeState, MMIO_IDE) - struct MmioIdeState { /*< private >*/ SysBusDevice parent_obj; diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 39fc4f19d9..7aaa11b748 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -38,7 +38,7 @@ #include "hw/qdev-properties.h" #include "net/net.h" #include "sh7750_regs.h" -#include "hw/ide.h" +#include "hw/ide/mmio.h" #include "hw/irq.h" #include "hw/loader.h" #include "hw/usb.h" @@ -283,7 +283,7 @@ static void r2d_init(MachineState *machine) /* onboard CF (True IDE mode, Master only). */ dinfo = drive_get(IF_IDE, 0, 0); - dev = qdev_new("mmio-ide"); + dev = qdev_new(TYPE_MMIO_IDE); busdev = SYS_BUS_DEVICE(dev); sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); diff --git a/include/hw/ide.h b/include/hw/ide.h index 60f1f4f714..5f8c36b2aa 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -8,9 +8,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, DriveInfo *hd0, DriveInfo *hd1); -/* ide-mmio.c */ -void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/mmio.h b/include/hw/ide/mmio.h new file mode 100644 index 0000000000..fccfd17c79 --- /dev/null +++ b/include/hw/ide/mmio.h @@ -0,0 +1,26 @@ +/* + * QEMU IDE Emulation: mmio support (for embedded). + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ + +#ifndef HW_IDE_MMIO_H +#define HW_IDE_MMIO_H + +#include "qom/object.h" + +/* + * QEMU interface: + * + sysbus IRQ 0: asserted by the IDE channel + * + sysbus MMIO region 0: data registers + * + sysbus MMIO region 1: status & control registers + */ +#define TYPE_MMIO_IDE "mmio-ide" +OBJECT_DECLARE_SIMPLE_TYPE(MmioIdeState, MMIO_IDE) + +void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1); + +#endif From patchwork Mon Feb 20 09:13:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655055 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1293992wrc; Mon, 20 Feb 2023 01:22:31 -0800 (PST) X-Google-Smtp-Source: AK7set/ce/qOxppcjQg6Y3qeA2SJTl8B02xS4VtSSnBaAIIQ9cu0jJJP3ZGl9Rjg3xL5p04hWIuZ X-Received: by 2002:a05:622a:205:b0:3b8:6215:789b with SMTP id b5-20020a05622a020500b003b86215789bmr17185499qtx.35.1676884951265; Mon, 20 Feb 2023 01:22:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884951; cv=none; d=google.com; s=arc-20160816; b=ubIW+SSwKAMs1PMhytT2HlIPIH+myszpAEM4MfE02r5sUrvnhCEeqyGJdmusOYl9ep +AaC42L1cz9ycYDuAsjL0vsZMTtFg8o3Xoibm1hbNqkneD1oP9Dg89J7W2iPZ4MXl/Kc uFnqXajjA/dJbKD/hXYC5PvQSFWmTl/roq6/c8QSlJFU4kLNEgRXthRtvlU3Zkn/0xou WB6U1y9nhxcFbHItMm8rs5ayyHdFTJgOnZVEWrgfDsEMuEMI4ZGX4T6PRbW5V+z38RPS yj2vXsTw2wkGCr5q2VW6yOV7RT/+/+tteMnV1jUdN8AXbzPMu9tfDNXfCDxKFlTHxkEy Gl2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=Ty7JsusCfDc4k2y6RC32Z+oZpetNJOATMnhep5hnEgBu9ZqTKev4HaAvrQzfHVK099 9vN+EzpmgWVDv/46P/WgaHletH9lNHLdy9PqDxZlA7higg+1eOnFJzJXNfOzCMy9uCmZ 4PG9XoS2bNQ3WF/Z8WeUU9Xe4aG1AFQ7PWOiPjBAsppW/x7544Tf73B/0JVKt8NxlLMP 2PNNoMDoLSO/l/rP/ilu3DhySPM8dWzQQoAjMH+oh5KT5WdhPiTm1g/WFqSbiqNvM7Ik M60TktcPu1Wmjsb+wUxjGXUvXupa+bMka3njT0/VDMiZ4fH7hhuh+gRV60M2XnzFkINb O4lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Oi9fRADP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e12-20020ac8010c000000b003bcd91aa37dsi8700417qtg.47.2023.02.20.01.22.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:22:31 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Oi9fRADP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fe-0005iT-TX; Mon, 20 Feb 2023 04:14:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fc-0005gA-E1 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:24 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2FZ-0003jX-ID for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:24 -0500 Received: by mail-wm1-x330.google.com with SMTP id p26so401013wmc.4 for ; Mon, 20 Feb 2023 01:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=Oi9fRADPm4mQ8QrjNJxO44msZ0Sf8oIfHEOgcSvoLovJY7fbrdgwbniIRpeg0WNopY VpTGpueMEbNCTXm/EjH/pxTc5O944Nw6i2NKvh/wGYAa022smOtlET9sJcnhOyukGff8 ltAWS61M8D9QAcdanizxg7Msc2FRj86hJaDeVpjQKL0v8+ICH9NAsT9YO3MA6OsFoHCX RqXG8ITslUay9WNEc9tsWxMYQxmZc4buxdEOI0ozWKMwZky5ulHwNKO+2+2YtDXmrnMO 6gfMGO0OANcsXmELhHCMuxF2pgBlN/onmRGKpxf09TxmX466I/KcBo63XqaPjkrXVnXr 6Mzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5jcQ5Jy5SaeE5p3W9B4GoLvdNk0rJLyHlurFAjM3Bhw=; b=j42toklmWM6BSHeiPaTv5BengbjLKbLZ0qSYiG6q4q5LoemvV17eAIprjYZjEMIuAO nm0+4PEuRDzxH+/0gobbBzCASC99kDDiBVCFOe1VEpYEXXNX2EoqsP8rMq0pPfwP66G8 YYd85XRZ12MKP5Fqt+wrcQ5SoMO/b374WL6ZNaQWe4655TMf9OGI0CDHxSFrfJNEDO6f 5oOOAr0uoxq9NsQ07FZA1birLbAzGQjA+9lPJZytkW9ld+VDXMrQq48N3kucy2z0qCu+ ftVVXbQQJNXmn24GZg4tf/bVq7LtyEy1XGca97lcia57Y7jvqfMXf4SM9OaUosw2uTdp a4VA== X-Gm-Message-State: AO0yUKWX/VOuyOaLege9QUJTpZthAj9lfq/6cn4+opZmT1xSKtXHHt6D ARf6r0OiHycSIFUcLxh3tJkj/26llb0zGmEI X-Received: by 2002:a05:600c:4487:b0:3e2:1ddf:7452 with SMTP id e7-20020a05600c448700b003e21ddf7452mr7877108wmo.5.1676884460618; Mon, 20 Feb 2023 01:14:20 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id iz7-20020a05600c554700b003e203681b26sm12951069wmb.29.2023.02.20.01.14.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Bernhard Beschow Subject: [PATCH v2 04/24] hw/ide/isa: Rename isairq -> irqnum Date: Mon, 20 Feb 2023 10:13:38 +0100 Message-Id: <20230220091358.17038-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow --- hw/ide/isa.c | 10 +++++----- include/hw/ide.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 8bedbd13f1..b434cbd0e9 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -46,7 +46,7 @@ struct ISAIDEState { IDEBus bus; uint32_t iobase; uint32_t iobase2; - uint32_t isairq; + uint32_t irqnum; qemu_irq irq; }; @@ -75,13 +75,13 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq = isa_get_irq(isadev, s->isairq); + s->irq = 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); } -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1) { DeviceState *dev; @@ -92,7 +92,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, dev = 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); s = ISA_IDE(dev); @@ -108,7 +108,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, static Property isa_ide_properties[] = { 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(), }; diff --git a/include/hw/ide.h b/include/hw/ide.h index 5f8c36b2aa..09fe169ebb 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -5,7 +5,7 @@ #include "exec/memory.h" /* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1); int ide_get_geometry(BusState *bus, int unit, From patchwork Mon Feb 20 09:13:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655056 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294401wrc; Mon, 20 Feb 2023 01:23:46 -0800 (PST) X-Google-Smtp-Source: AK7set84i2AmqzGUR+X5xY8+0wvO8Jot8WjUJwY3D+11MK1DpETAW3SZrpv0GASCIc/gmf/HwlW1 X-Received: by 2002:a05:622a:1a89:b0:3b9:bc8c:c202 with SMTP id s9-20020a05622a1a8900b003b9bc8cc202mr909052qtc.13.1676885025802; Mon, 20 Feb 2023 01:23:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885025; cv=none; d=google.com; s=arc-20160816; b=LiffM1Bey6jHOKZtXFD5blMs21z051eNg0XI5uHeEP3UTp+3n2XDhjAsoszejpVeH1 RV9Yr3Yi1ls0GXn8ArG/gtwhvxnC7aObg+JRzkhs0nVZdyurNJ8GtEVhRNmwssBidMZS HTMon4R6yuzvUgOQusfN3D59eDZ9NN1hb/HQw3VEtTu25Fm/geL4xsgAdPe9tMUshw3F doTfsYSl23fZNI9k4AjRKr/Sig1FfWykSkhlc9aJYuxQHo+ssL2RSGVlWLKFMR3cDg/s dSbPZVxRn5yhgVfUQnlE4izauJ7hyr8kWuq9Y42EEyifzNrAaSUsEJEK0BfxL6gjfwGb i2pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=EUi/VmLWkHSkoHXTwihAUfSOdUaJN05GoSKvK1D1xEf24+be72mDOngYQ1e/POfj3G uEjWIqraOHZpMjx/W5uiiUdh3M53GaoYM4md6+OqyIqWeU78CDTXYKOC0XtNF9sLTSni VO3bYc/EoRMj1Iy3q+/LZl5TEJVNSokVF3wOgG13C7qe3LglUZNMAReWlDxceVFnTeDM 2tlap2STq/JTEMj+iKFRwYi1fvDUj0THg/uZIrKSTVxfMTtFS98jAidKhwlJRGbYdKMZ PY0p3n7Oh75IsommgP/z/kBSypxqSCxH4tsDlWV1oer6M3cBEEKwJQEt//P7q6YzAlBc n65w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XCDUjcHu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a62-20020a379841000000b0073bb0dc724dsi6646045qke.466.2023.02.20.01.23.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:23:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XCDUjcHu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fk-0005kr-CZ; Mon, 20 Feb 2023 04:14:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fi-0005jR-3P for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:30 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Ff-0003kI-GP for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:29 -0500 Received: by mail-wr1-x434.google.com with SMTP id c12so335618wrw.1 for ; Mon, 20 Feb 2023 01:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=XCDUjcHuEbgCSljkHsgBVm/zGTIHWv+GsfReiRoxG6rvFyhyPO083Lj0aEEvaLeBcA Xn9jtHnoqxEaN4H5qsKzqpS+oVWMfuxmL7b+jnhciZn7OQrPCFpQ5u1UfGsG26GGgCKS TQo2NrXbnSeS26JG5oTxfury4UNvl7tIU56ulgq3IUJ3uTbmSYOC85htlTYtub8ZdDuN 2TzVRNyIuyX5NKGILlPxJZoi85Mck7ETDYSIe4+VElDscQxV0G8tt/6nXIKBPiL9S9/x svJbnmJDU2CoSOkCwyCnvTNzzA6rW/W4TaGpSw0+i/YNlyppuevuAWMObVk517f1bzxd RV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=s2sxemjZM4xP/xDQ3/uH0RZYbF5oN1qPX+6UffbyO6rkZrviUIsH9fi541VyHK0eJG K+DPqVPCwipDw0lU6LePVUJ+hhbI4el/TD3aWF9e8zyh4qnT340lFo/kgalOYSOqa4ey A1GV1aqOLYRtbQFfOsXkWtMqmd36iuxxq1jmdX7joqP47nAyiBL9kyrIYlhGM+uQhfnj mTbOA3GqMwBuSTAQ75d+f9nwhi697fvX6DH29RSAgXvXiHHEqV3dTNPlC3bkEdjSTcUz WTKlXu19q18JxyIjuSBObBUwW6HpVQOx6RbVnO1bcsiwISQD7hBtWsMm2m7LVd6zSeav McDg== X-Gm-Message-State: AO0yUKWveSY2HzfhJXBRYczR3vmLSa98YfyyNbmMRjsgYfJPDXqRy9HO ae22QkJkVphriN5t1TNDlm12iJKe9fvCzOVa X-Received: by 2002:a5d:66cf:0:b0:2c6:e824:7a5e with SMTP id k15-20020a5d66cf000000b002c6e8247a5emr2183303wrw.34.1676884466560; Mon, 20 Feb 2023 01:14:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t18-20020a5d42d2000000b002c6e84cadcbsm3269545wrr.72.2023.02.20.01.14.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Bernhard Beschow , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v2 05/24] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Date: Mon, 20 Feb 2023 10:13:39 +0100 Message-Id: <20230220091358.17038-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org "hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 + hw/ide/isa.c | 4 +--- include/hw/ide.h | 5 ----- include/hw/ide/isa.h | 20 ++++++++++++++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 include/hw/ide/isa.h diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df64dd8dcc..7085b4bc58 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" +#include "hw/ide/isa.h" #include "hw/ide/pci.h" #include "hw/ide/piix.h" #include "hw/irq.h" diff --git a/hw/ide/isa.c b/hw/ide/isa.c index b434cbd0e9..5c3e83a0fc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -31,15 +31,13 @@ #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "qom/object.h" /***********************************************************/ /* ISA IDE definitions */ -#define TYPE_ISA_IDE "isa-ide" -OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) - struct ISAIDEState { ISADevice parent_obj; diff --git a/include/hw/ide.h b/include/hw/ide.h index 09fe169ebb..24a7aa2925 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -1,13 +1,8 @@ #ifndef HW_IDE_H #define HW_IDE_H -#include "hw/isa/isa.h" #include "exec/memory.h" -/* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, - DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h new file mode 100644 index 0000000000..1cd0ff1fa6 --- /dev/null +++ b/include/hw/ide/isa.h @@ -0,0 +1,20 @@ +/* + * QEMU IDE Emulation: ISA Bus support. + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ +#ifndef HW_IDE_ISA_H +#define HW_IDE_ISA_H + +#include "qom/object.h" + +#define TYPE_ISA_IDE "isa-ide" +OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) + +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, + DriveInfo *hd0, DriveInfo *hd1); + +#endif From patchwork Mon Feb 20 09:13:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655064 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1295801wrc; Mon, 20 Feb 2023 01:27:52 -0800 (PST) X-Google-Smtp-Source: AK7set9i5FpOr0vSWBhZfDN3iyj5bak8QKuinU45x7I8mXixSwAGJFadFz6346AiTyO7xDpu2SxB X-Received: by 2002:a05:6214:21a4:b0:56e:b273:fb36 with SMTP id t4-20020a05621421a400b0056eb273fb36mr1209852qvc.51.1676885272178; Mon, 20 Feb 2023 01:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885272; cv=none; d=google.com; s=arc-20160816; b=q/nN11IYOkisy26ZLh4sIVCBYGpBFmAulKi3kvcPE6OzexOG3POcyWnCLDxtKmJk+V X2v4JBOQi/dgdvuWhUMtsRztZGdJdFGZlC1e7dKvrZYet1d9kf7oPuufvU1NOW8FyrOW tBlpbr048njfRcJ3gjS2INaPpJKGkwmrQKO4N2bGRGo+8HkLMGf3UcepBuXsbRWPb9KY FYTXZijuXJNbQ1hz6gDMfy5D2b9Y4YzcXUeMntadQNKH9aFlM5C9736EL2S5zcvJz73X Nb6M0E0bH23FjVx3vfPUVhvIB0ZbkrWKSYLXSQcYriwtFvCGTfKzShpY9J9r12BQ0ead O7Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=RfE2AvHMhHS7HZ4vi0KPUWNHV8/YkBtD2sZKw8/ApX5TahhkHBf82Daf3imrHPZfG5 73XfeUSPnVSZDlaM9xwr/CTQiQcqnP/q9WGnPiZagYznERl6mMtY6WFng1wip+AdVfd6 93rSFgmyr3pzAjiE7QF0gmLf93OFl3D0r1Msd2RlLpsYOWgW3bYI/DWZowzBaG5va8Js 6/H06AHATuFatrLAziKZeqPrc9HN5oJ/1ITuI4Lirp0ZVfIDxQEH/6d3aw2ALCG6l0qI QPkyWjSfBQdn2tUj64Ygwqi2c9gZtiR1Ef0l4dhdwZQ58A+Xjuw9WhN088DsoKTUz06E QgRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BEYq2Swc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j186-20020a37b9c3000000b0073b8417d6b5si9297265qkf.170.2023.02.20.01.27.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:27:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BEYq2Swc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fp-0005n0-1a; Mon, 20 Feb 2023 04:14:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fn-0005lU-9q for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:35 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fk-0003id-L9 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:34 -0500 Received: by mail-wr1-x435.google.com with SMTP id r7so163386wrz.6 for ; Mon, 20 Feb 2023 01:14:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=BEYq2SwcM7Ko/Qtg515nOgnqfSctUE4pkYwordb0fLF6n6vhWQcfA8GoLMftdYevkC 3LSdCAvnyeXfjBUnN+RFKQutgg/jwrIyuxweJxPmiRUB0qUsRqMHcTJcfZyx/OpxXfyp o7sqTjqMZ2uLMbJcL0L782wvcSJtlREKpwTKBWvYQaCvU8dcPBtMp07P3NzELHT8jIA/ a4+8pyxxxuGEUe5L8O3fnbl+L144XTEsnGLOb+xBc/uWJiPyg9EV4btsqkYJyXIkgz4Z +baqrve1pKbRsiPMWJbtSc4TaZCbZz9IgB8pqWCyE69HPXzsdNBAK0yqb079lh4e9Y8W gOqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=UElhwZXG6Nd5x4xztqMWp7gG7aNGPtzlR7FUcuZMVHzwD8e3gtnIkwob8yoyxyVgKj ikt/Mgai7kWtL4pxXkAAsxyu91t4daAGZLoOPHN9XW/UV8Zr8gHZFxBZeUZnjNvCqE9a iuG+hUKtwI4Gh9Pfx672ZxKS71CHJqT7fhcfH3nEPBO1lP7wepaqNxidhvG8GbCr/uMw nBY94K1SREnv3rkBwPZjGqM8XMw94OHdM2v5qQKw7c1zisRgRlNU0D5VtJnlJSQsphI6 E9WG6uSehpqzA7n0kKKdz/d2AmN29pYmRbrdTVqpbkrIgdMBt12JO2bOrhf5TRRf7jyM wFiQ== X-Gm-Message-State: AO0yUKUKkN9i44gmhCnIc4pwaInWMpdtV8g8iNC+H//sYWQskJ6RVF7v EMCMmfJb6LkeafQFDKvyJrcC9EA7Us3Ith8t X-Received: by 2002:a5d:6b83:0:b0:2c5:77de:426b with SMTP id n3-20020a5d6b83000000b002c577de426bmr51913wrx.60.1676884471696; Mon, 20 Feb 2023 01:14:31 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a17-20020adffad1000000b002c54e26bca5sm4973762wrs.49.2023.02.20.01.14.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bernhard Beschow , Richard Henderson Subject: [PATCH v2 06/24] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Date: Mon, 20 Feb 2023 10:13:40 +0100 Message-Id: <20230220091358.17038-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The intermediate ISAIDEState::irq variable just add noise, remove it. Message-Id: <20230215112712.23110-6-philmd@linaro.org> Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- 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; }; static void isa_ide_reset(DeviceState *d) @@ -73,8 +72,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq = 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); } From patchwork Mon Feb 20 09:13:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655067 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1296742wrc; Mon, 20 Feb 2023 01:30:35 -0800 (PST) X-Google-Smtp-Source: AK7set/tqKENtEczhRuNj7YZavkdqxb8N5gchYoVEECe+vJuSJiUMXAYFG3qCDmUViS3R1fCS3t8 X-Received: by 2002:a05:6214:1bc7:b0:56e:bdfb:f4c5 with SMTP id m7-20020a0562141bc700b0056ebdfbf4c5mr2980143qvc.36.1676885435796; Mon, 20 Feb 2023 01:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885435; cv=none; d=google.com; s=arc-20160816; b=JSYNpaukx8CWzUJyHvO9mnbW1zT9B229vW77XFwXdacoYnEaIbKbNVFL5MyJrPpssK F0gGVSALElA72/6ksrhHpar+v/Q+0CZwzk8+jWZSa8kqZxBWIBxjBwX6RSrh9EjX9/qd i3gmDsMucwl8MKRVf3Gy6PZDk5C0/AxJR2jM+/rKOizbnq3PBzS72FaeIL4sj084LXeu IYm4gccrs+yA/0/gJdLONkzv8s2ecTwIMd8P9o5PpYoBAgCQt5x24oPWfsWKNkmWFWxA ELtKWgN2kB7ZzP440MG6BpZ2R8Bl0WOBt5AXSmfZUXWH8iD6hIyXLJZJSLSh+sfz4VhP 8FeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=U8JnAwT7jqggmUnF1jSQMlLsCCNn2AlC1eEsQzdFLBbo7+z3yzAEoIEjcpF0ScVMeZ Y+/esD+EvvMfg8iV5NUMZ/3nhwli0KmF3EFhaWnkAo6J/MhE+a9zdb/FVJ3jpyF5nrSj Lj6czc7xR9RBhUtmGTq1N0sS8ng7dJ0hyfS5SFNRyJQj5qEhzBflt9ap08/4k7/SnYfz PcUhbdHGsz0GwC1xcKM4hKDSEiqKWatPUPuc8U16xsWverxHeAyQWLWpNES8uvthyf36 60qlQRJNMh8oC26x4/SsFSklNkmvSRmC/D17lhb3jpV2w1AVm6J5uAWdxrBBd2SofSma 88NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VMMF68If; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a2-20020a0ce382000000b0056c21b703b9si9277796qvl.256.2023.02.20.01.30.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:30:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VMMF68If; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Ft-0005oc-CH; Mon, 20 Feb 2023 04:14:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fr-0005na-0e for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:39 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fp-0003nx-Ft for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:38 -0500 Received: by mail-wr1-x432.google.com with SMTP id p8so467435wrt.12 for ; Mon, 20 Feb 2023 01:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=VMMF68IfCFBiDNEPh2dFsd5bYegYPyfqkTAd6Wm+uAcTN42e87fDZX7tljlFHKUz0r nCjsFJ42bcvyhzqmbdvKRRqjFWLeStLnTwoXMLZW/Df1KPOfunFVQazS/XZzPWoBt812 wCh6metLi+npgDYELGFsfAKpKaPfO/WwqZLpXr8KOznKfl/pKXogh1NPNX0sqgM8hRsz cio9jLxRR12hIfD3eCgkEHoOnGO9HmRYxSmVoBVv7mRCa4nyiHT+U913l4hhDnXiKMTA 3FWtqdenLKc0TBxDWiiEMCyH6ZvQ7UQUKA4Di0tDsaEDba+2rMRIanbahdFYTQTr6QSV c2+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYSWNkl19vdmz07TNk4hcBZdhyvX8ZTfJLLhpTEmM7g=; b=P5mItirDn6hHGeMN2si2lCGfYN1EwrNjVhIYETjppyahOhwcl6uuCJ/6gafmhBkraW leV4UPQ+diIFdaPOKnGyCDsfUtjscZhZUCIvGpSvXASgwQzTa0HUWqyUrZNGAfnCer/7 xH+YecyCvrHnNAavBYcsU224CkqurI8zsVjL9i6MnFqS8JBRE84Q3B0QzQGHwuuqJ3W6 rPtZVG7zL7ZsUGZy7mCwI00ekFq+bW3s3brcId6CWC+VqG52jLDjRt2oJL8GlB4p+GlJ iUDznKUFMnFVPkg/68R8H1n8+Tz11eo46ll/62ki8nwNE2cSjzgrTL/X4Y1eJ/AMThdP W/7w== X-Gm-Message-State: AO0yUKVIGnFHtqA2ggZuEnL7orvwYet+ZCj3Wl9WgmxKZVIaRJW0HwMp U1K48jV7qzgAjd9JvQ1z4U6glphVj1u2PexM X-Received: by 2002:a5d:5e93:0:b0:2c5:5297:24ae with SMTP id ck19-20020a5d5e93000000b002c5529724aemr1418808wrb.2.1676884476580; Mon, 20 Feb 2023 01:14:36 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w15-20020adfec4f000000b002c54241b4fesm5428562wrn.80.2023.02.20.01.14.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 07/24] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Date: Mon, 20 Feb 2023 10:13:41 +0100 Message-Id: <20230220091358.17038-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-7-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- 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" #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" /* debug IDE devices */ #define USE_DMA_CDROM From patchwork Mon Feb 20 09:13:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655063 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1295581wrc; Mon, 20 Feb 2023 01:27:07 -0800 (PST) X-Google-Smtp-Source: AK7set/t5NNg9Y9taza4CaoBkDuvgwcg0qalBN4maK+dfSN+SrJV0Ieq9wr821bDUV8RyEoyQKz9 X-Received: by 2002:a05:622a:5:b0:3bd:1647:1601 with SMTP id x5-20020a05622a000500b003bd16471601mr21762844qtw.53.1676885227389; Mon, 20 Feb 2023 01:27:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885227; cv=none; d=google.com; s=arc-20160816; b=CtrCMQTxxCd2lbNXx1DhjAY24IfDXhVuveQnlSKwF6kwBpGNwuziERkRZ+ZetKN4t0 E/oiGhqL7L31GC344DQ8nJMbq+6p1qEeDGDagQDsU8nvuil5iMUMFwoXrTT8O6IODf9S owEZDf5YGTn0vSl+N/dapL7u66jFUNXlDmBThQumarOOFCC63kh4lM546JrY7uuM5TRK EpK6QdOeydPKJHHChJhvh10M8QFh4aOzXoauM3UYXczWMCWzq5l/dLFAOVCxIrOajVE3 QQDQPwXvEcWrBs0QHMekB7RwqS54qhU2iV1EzCNhu5ryOY8qRwApWRHg0kRZhyUbFI12 iJQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=nvzFAM6G0E9KOWuahRM7nty2UjqAKWYXu5yMLoMAeg8zN1l68bJ+aElBZirja3/DKI i/0TwKMhtaAdwpqOmG2Cg4sRgPx7yTqveFgh01PMsfYioHt9WVh9331+U73YdlSYnRnF ODRP+pCTB9h98VyNUXYfE59dd5177p8s8tYVTy1aIWMoZ7cNb+XAEyNDWipi22nwmjl/ 8mSv3abz0dI9/er3kEk7TQ3gFcmWZq3/g5mCO5BZ3kmC8Pk1C91p1HTYHLX97yIErvl/ jmfdPng/nTOzUoYEt4wJ+jGcpR9ooGcRGQMkBYzTyncdcsJjB488zJk/VE0jp0lZLabG DohA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e6MUYLMq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l11-20020a05622a050b00b003b8328e179asi9714503qtx.561.2023.02.20.01.27.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:27:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e6MUYLMq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2G0-0005y0-1Y; Mon, 20 Feb 2023 04:14:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fw-0005qh-Tg for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:44 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fu-0003kM-Ab for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:44 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1925643wrd.3 for ; Mon, 20 Feb 2023 01:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=e6MUYLMqWdLWeqQZMf2Hw3csPi3Px7nSr8ih0whFq60tzAMtGHRUyodHL8wHXicFOV bKYGQRAAGCNMxPxIjBhVSPDrfQ/M1FA8qpG/ntTPviYpvZTk79xzeCgSfWBywi8ygDNu AUMvrirJJ3ZtmOZXW4EvGXG1DV9zz113BIL7Wb0NE8CGT1QIPlx98MlV9X/P2Gs/wHjo 1LQcULiZ12JQSkKT3bSwAMkVEimTyo1qQu5AVBoUaFZUgnvFq+7JpVcibM64+XshDO/H VXQ/ckZZbzlmd4YQK/im3Q+pwlXKGImTlQRgKUTWNZrIwb4ar0+Ymm56CSJWTRxUqUaI 8/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4A4SsLrMuIwbak6pyt/+cbMSuHTNMfA64YSLVmLb5ZM=; b=d5KoV7wnCKuG4VZOjo5lJOH0XnGXBZAkGo78O8wFFdICYya7Pl7Gr9ApkSR+64fDov fnHc59J6RI7fvli0iTA8W218P6lMw1Mq6CSlnQjtlAjl5lG2wZ6hRI3fCAyvWNM6wBfv 48C2Cku7CQ2kjXQneUelCTy8d4s+5uyrmEsH1kpNbi489zF9awuJ5udSFakAufuKJyEB HlzS+uu4facH5vHVz/rYI6tG/AI6+cHLWJL4G0iiij4+1vIQfmfjAO8nszkYpac+QDpY QwdXuJD3EHA7MmcbuIucstJAKq5rvztBR8Mfr13A6jbv6JAKO0bl3Ch+xAgEN9EXynfF Kqtg== X-Gm-Message-State: AO0yUKXbdlip1nkNVe4QpAfW7zITwC2fpA/yJLAfd+EkVXerHoj7otds 1MYFDw0xpQL7Pc0BIKi4RgCvPwZ2pOKttE5z X-Received: by 2002:a5d:6548:0:b0:2c5:54fd:265e with SMTP id z8-20020a5d6548000000b002c554fd265emr974190wrv.70.1676884481451; Mon, 20 Feb 2023 01:14:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j1-20020a05600c410100b003dec22de1b1sm13328503wmi.10.2023.02.20.01.14.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 08/24] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Date: Mon, 20 Feb 2023 10:13:42 +0100 Message-Id: <20230220091358.17038-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-8-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- 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 */ -#include "qapi/qapi-types-run-state.h" #include "hw/ide.h" #include "hw/irq.h" #include "hw/isa/isa.h" From patchwork Mon Feb 20 09:13:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655053 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292692wrc; Mon, 20 Feb 2023 01:18:32 -0800 (PST) X-Google-Smtp-Source: AK7set8ZgCIiefAoNtwTQHnW7nZK25ISzxGCDXOMRGzb2n6Bw0s2v/e6Yj6uz0ePekDsmNfnQeKY X-Received: by 2002:a05:6214:410e:b0:537:62ac:97b0 with SMTP id kc14-20020a056214410e00b0053762ac97b0mr742344qvb.27.1676884712792; Mon, 20 Feb 2023 01:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884712; cv=none; d=google.com; s=arc-20160816; b=LXHws8Ruo1bJMbpA1lpxpz4mfx9RrWP7LaM8xkVJCX5SFsPjwrfY9sJHmV+PWd6NEX kxLxhA71OTHzamhT+22/IoIpnuxPWOkNa21HB9yubNk5eGAfKsnZ3+ly74NdEI7lSiR1 EIfFQNqWVBncLndYmCEWlmGpAsTaXDSmUVX/+/KMudKxvKsC3i5COKFRRBBt3C9pBy25 QPvk6Sc16zNzVeWpxR4EM/L6Zv2ztpcv36Zd21MHSI0H25e4nQjvLTAmcRyGpgbPb+mv ScDM0YK9gkxuw5/YjKAWDPM580xdnRCaXv0xWsCQdCkji8etsJlquXihQr7kaZOguF22 ZIJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=UMqi5eXd4oNae/DMmZU2OZDS4bcHb3ygYQELK00/Yf1PfPBGgJZU5BOWHwoigMQBAL 8JvZ6uIt5ksrTjwLk8+MXGUqCGjmRR0CX4jAmrXng1pHIGGmflyqgayV8kwzZ/MkmPFq xwkhfAB61J+sbOeYmH466IT4cZAXERmtkyc5K6WzqUUWexbl6qZ+4PoBNyI6mNB4OWh9 /+Ju6MZhrNNLOykmvRoojvi5jZIuTj4gMPZ5xW4xEBSq8N2n+WiLPuvlPplVR8ErnKe0 HMdgrwyRI4azw8Qprj9SR8eVATW34ibUQ7+OYncoZDWOW/dKFV1ZfomXJcPLdpapm7kj rQBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUYBeljv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z8-20020a0ca948000000b0056ebdd6c30esi9214774qva.126.2023.02.20.01.18.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:18:32 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUYBeljv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2G8-0006AD-SS; Mon, 20 Feb 2023 04:14:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2G2-00067g-Mc for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:50 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Fz-0003pI-P2 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:50 -0500 Received: by mail-wr1-x42d.google.com with SMTP id l1so57006wry.10 for ; Mon, 20 Feb 2023 01:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=XUYBeljvgh3q1R3oaieUKzDYpey0axCv2ZuZVQEDUz0dafL+FauEShaqdnxFqj9ytB SzsMNIbDRo137M2qEkkWROt+SgkCu6Fa+fxEQjmxfDlX+2JPRagg/L8G46VgsE6N4xtt V+oeyIXlD9UD7eGJiOe1bazyLLqhzpNv1YXAyOwIzHMpe5wpIi8NkSudPJ3IXxhL7Alh XJ/0kCCaTuzVbc3nkuxzYbeGyi/oscV6S0w0entZsTRNiF4ObQOM8pj19qtkP4kqtznV y5NBj+4ALmzxYqxvHu8gfJ70TuZVhA9QDXZKXvlGA/vNEtGbjxpKN8RNxubxx2CJqzTh 0jCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6GX52poexdzbavesE33D0oasmIscp78YK8pcc7pX2tY=; b=UkjAMsq4CsuuLMLnXKupDz9FhL4oxKg3EXIZrG5qeVR5OlVDXfEbeGavF4M1PKfEvJ 1l3HmZ38//cPZFiE4EsL7fcZAYEbTUDGSt1wqutLNwmMGtWoJq49uJMXGIfUbCiW+kKc c5jqBlK3eWU9dOJoQ9y7j+1S9XdPkZT/4IjTY/Qi/XTfOhMzM28oN26XoWrSPpvnyeL6 t6WI+gBjRmWP72n3bBGYt9fNR2Ou6uy9ssBI7NCiaMevRXmrspxf14RAQkN4wwBoTpKC rAJ3AR9EnImn7NxR5lDcyQqcsLH7KbE+9Gulz5TOQGvT3GDpYOVo589G4P/utqLc1Kq+ /omQ== X-Gm-Message-State: AO0yUKW/lW4U0QK8Qw5LoL0ImhvDtu6/TyjGCl2Xgn5iJNUTQeFEGlNO Zx0+ZxL+loCgG3H00fFnRksLjAjS3+iUNxic X-Received: by 2002:adf:e54e:0:b0:2c6:e7b9:a4a0 with SMTP id z14-20020adfe54e000000b002c6e7b9a4a0mr1821220wrm.71.1676884486438; Mon, 20 Feb 2023 01:14:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b15-20020a5d4b8f000000b002c561805a4csm3096438wrt.45.2023.02.20.01.14.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 09/24] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Date: Mon, 20 Feb 2023 10:13:43 +0100 Message-Id: <20230220091358.17038-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-9-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- 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 @@ #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" /* debug IDE devices */ #define USE_DMA_CDROM From patchwork Mon Feb 20 09:13:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655048 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292127wrc; Mon, 20 Feb 2023 01:16:52 -0800 (PST) X-Google-Smtp-Source: AK7set/QGsw7WsuSM+M6ibE2S9QC6ZY4x/ErwCZNwZR7XnMpoRg93Dh5o5NRXiDyfA09QyMNvozz X-Received: by 2002:ac8:5c82:0:b0:3b8:67c4:b11d with SMTP id r2-20020ac85c82000000b003b867c4b11dmr14619505qta.49.1676884612578; Mon, 20 Feb 2023 01:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884612; cv=none; d=google.com; s=arc-20160816; b=fSPj7eV7NAF+hywy8tqdlWu/0i5UVdAmocqWcuMtECN3bSJDiiajVo7kddwAv33xiY Nmo+U2DcSfko3OvgQX0/xp25J0If9OhDTgeoEjlnaJR+oJGW5HcCDeCzwiegTRzZjTa5 JB+7n/i3VmaRl/X1mstuam3SISeqOPCSUV9ArhcGngXdsNW9TmdJC2+zlqLGgjXV7w5m i8ghS/SzSLJHwIXKwtl8dDprfvm66vWlBlBnsCEUG0lXlcb42oE5MftoSD0cnmLVSuEE bxISF+u6hYPIMhH6ixc8p7GxKAie7GseDhhXDFMcmmTl0j+CwKB94+NOZ4OYRdtYdkP5 o3aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=m98WJO+ZW/oixBwFAzXcz8OiOv+wByDdcX5gX2bR67b5t+sMG/syxxqairdre8ZB5N b3+jb1PCG50ECd/2ta9CFSubmW4nuROnNGUZX9Ob9yEluCOsYurxPloDyI67XLXVpYj6 kCYxv9nDpcvr922vAoE0SV0EY8mBGKkxjlRVZrnLqqSA49omcsE8BgB/QJsgu2w1I7Zj omHeS3ErXsoOTb3XijZJelsJBSmBCAlNLXHL/f25Bodo/vXmTs7cH5I6YR9zIfYWjnPu uTDoHQ+j6gGi+Si0YlMhS9hNETKKsmS1KRYxlE6PgFxOr1QxeFR819OXz2q9GoDTb3xO ZA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SZMmpFIE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g21-20020ac87f55000000b003bd106682basi8662833qtk.72.2023.02.20.01.16.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:16:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SZMmpFIE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GB-0006H7-8H; Mon, 20 Feb 2023 04:14:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2G7-0006Ae-PG for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:56 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2G4-0003oX-Nj for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:55 -0500 Received: by mail-wr1-x431.google.com with SMTP id v3so256351wrp.2 for ; Mon, 20 Feb 2023 01:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=SZMmpFIE3LLMs9Dvfftvm+3Jf52QEbVRb0i6UzQFwK5X0xVraceBByvQj0Ig2WgnFY ymMghBACAjtBddhQwAxY+RmHxAicvK/YlufuXNKzPW9G6ONIw40nOdXnWXCjLF8C7NOb geFxFvS4hbBSBYhRCHLnS2IGKT7uQNGkmr0ti1GLEOUJmBjycyhVe0IMpT2v9yDkwR8b ePuwR5KCJCB12NEh95nfDasa3/VcWuKow5Vztf1RHuiIL4F8LSTGO+QjJcgsTWSd9wye Im/8RZrD8p6pyUVpyG8/Oqk0ivjehufZ7Ryss8wx7atMLKLi7SVZkGRP/vwXctxpCkJO M4PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOmXyBanz6S+n204WlJsn+lUZrrI5EryewBPrff6Ww8=; b=vvb9s/uAhnDeV41+r6OVHys2lOILMolXX9Raa1+HBpXeO7wZNO8Lh3CyLbdT5he1xh 0N/YlcTG+DpGHVntjkctPThx39t3Cw/+AbVvRSVgUXcqXMLpr9f1wtIWNKMtnSbMQ1Ba cyXaonzU+wXYIrw6xhaVZKoE1qlOlcMUy+fw7NI7jX4XVcfHx7U/M0GIoP+NfjYhl4EO rAOZuRD6KnqDWOfxU0qIpoICTBcLD5R4N45a1kT5QQGz+7o0ktDnm3TyB3yLfMiUFeEt UFB8+2M5TVOyMQGf5JbC4Aeu/iWIyRvhlS9LuWuQL4HUz30970NI1dDZ1a08PJW60Oy6 ER2g== X-Gm-Message-State: AO0yUKW5YGtIx2UmjRCHiMVVw70Z7APAoiczhvYxWPI6chhXSOkZm0Wu cMGdBrmXu6afHrWEKgmIglCCv+ZFdQlMED3i X-Received: by 2002:a05:6000:14e:b0:2bf:dcdc:afb8 with SMTP id r14-20020a056000014e00b002bfdcdcafb8mr1032450wrx.64.1676884491518; Mon, 20 Feb 2023 01:14:51 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k22-20020a05600c0b5600b003e21ba8684dsm11808758wmr.26.2023.02.20.01.14.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH v2 10/24] hw/ide: Un-inline ide_set_irq() Date: Mon, 20 Feb 2023 10:13:44 +0100 Message-Id: <20230220091358.17038-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 ++++++++ hw/ide/ich.c | 1 + hw/ide/macio.c | 1 + hw/ide/microdrive.c | 1 + hw/ide/pci.c | 1 + hw/misc/macio/gpio.c | 1 + hw/sparc64/sun4u.c | 1 + include/hw/ide/internal.h | 9 +-------- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7ce001cacd..3e21f607fe 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -22,6 +22,7 @@ */ #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 @@ */ #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 = &ide_dma_nop; } +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 @@ */ #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 @@ */ #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" #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 @@ */ #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 @@ */ #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; } -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; @@ -627,6 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind 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); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 20 09:13:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655046 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1291851wrc; Mon, 20 Feb 2023 01:16:04 -0800 (PST) X-Google-Smtp-Source: AK7set8ML+ubDN/uJej1PWmzAjG3swMKd5D/0yuXvJExdInt4neg8jjhGOetGh9P4m/1Pea+f5k+ X-Received: by 2002:ad4:5deb:0:b0:56e:b16d:ec9b with SMTP id jn11-20020ad45deb000000b0056eb16dec9bmr435285qvb.21.1676884564730; Mon, 20 Feb 2023 01:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884564; cv=none; d=google.com; s=arc-20160816; b=ot44Tl0k6NWF/VgELA55yL4TQEmr99ab4GcZFZ78aqcH16UwljrzkkFn3KZ9u9LnHb n1H44Xkq8VpjUe6krnR9MBRcj0DVr8CBn0Jpz8uj2tQdJQLtAWuKCnzTJtU/tuI2B/dQ T+4m0ZFOoc3XTYhCAYxspvfp+jvNgrYVnm9radWW8zMbUm6vO7aTXQyDHzB7rTsAPm3Z gqr3+goCQDHRDfjQabuEPCERgAapPSRfe+zRGjXl7C8ToiMwlWHuUwI4gHts3ghpSueu gGjsM5hB3RbBYwVmro/YkC7Nq5TnxatWjCq0zx4hm6y7rpTRvFe/6Wc8JLF7v6FgQX6T 37OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=J/Ks+UMo7zV3SX+M7uRBXuy2lRO8Cg45btNBDWV+xmL/ZHMLVLXTCMZIvhg09MdOsd 1ukAZEq3fYuqQGgGt15iMgdJCrDbwdw2yO5mpQQNrVe0QWzZsiFC2TmxNNylD7L8Ftup aNjr6ThgWAr8E2XEOTYQ4IlAvZO8ZgKSdBEZ7p+u36j3P172UGrpp/okCMAEnUHtJUsc lirP9OJfLChUH9piDYqrxrMpfJlOY8O301C62IPXO0tGoZCwyAxoiTIZX7d2arbe9aVy tcK7Ad1djqMX49XpTQ3VdHwL4pwPRqe/dPA7eeM4b7lNhMiQToD77uUyEG5cbECZDVVI Vwkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RzZ5P0hZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l26-20020a0c979a000000b0056eb692e1b6si8454718qvd.114.2023.02.20.01.16.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:16:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RzZ5P0hZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GE-0006SI-Te; Mon, 20 Feb 2023 04:15:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GD-0006Oe-9p for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:01 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2G9-0003kM-By for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:00 -0500 Received: by mail-wr1-x42e.google.com with SMTP id g7so1926382wrd.3 for ; Mon, 20 Feb 2023 01:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=RzZ5P0hZbxyU2e1SxthfpXLSlowUSyBwv90pSxMMRMN30aynzmkaq914ll7VIZmoN5 ZwxTRsXgNVlmk073h2o/xQP3YKEymdV5Q4lc/Eit7VdrYLgS4WsaXxeSOeZZSW/zGe3y Jz9KxPvRghZJdTSfYaWUXycxWX4cTk+t9o09hEkWHxKqfojFDQL0bzhTfGmonO+nF5V1 wcI+uc+2cCe/06lVzfcoCWe+V44NF28jsG7hZ5Ce9WhKahaEqRX7pbonJvCnc3tqeKoA Ah9INPodZGqtQqu8AcST+5M7xJXE6aA8vvfTdq8IE/RNRaQby4khVDAUkqaznbibsE6f igHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=QZEooqL72Zd6Rc/h6I94zvQUxKMP4WuxrbBlYm1u8yfMY1qadqe02Z/+Lw3l+/P+Q7 csb2ShF0RRS/Frjs8x3Jq4qVfZuicw6uLd6IEa5AGi5ctrJzhUlxRK892CtQ5yVsUr+A QDbo3uhyEhuW/o2cNVhL+Y1nD8KAXizXRYE/N6N11ZakXMmXbkLJu7hIwHbi8p2PeZNz uhfWEM0WpVE+rzxzDWOQcvka0foZSlTWhKBqZGJYFHIrqa4fbmtSUU9uQEdJXqvv6WUf /sP2dWuycvFMmV9ldFl4G9oMGN5unnq3ya4HUOqo4nPA4ib0EAv72v06OPa8h8IDetOJ ACIw== X-Gm-Message-State: AO0yUKW0ziXPyuPcVEf1ELzfz7TZh4SEnSyqc+POgiYOmyK3xO1tDUIc zIoE5VqIIW5OMBiaAAPpHozG9qlFW4k5AX/5 X-Received: by 2002:a05:6000:85:b0:2c5:534d:eebb with SMTP id m5-20020a056000008500b002c5534deebbmr1392356wrx.13.1676884496365; Mon, 20 Feb 2023 01:14:56 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j27-20020a5d453b000000b002c577e2fc87sm2793691wra.15.2023.02.20.01.14.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 11/24] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Date: Mon, 20 Feb 2023 10:13:45 +0100 Message-Id: <20230220091358.17038-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-11-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/atapi.c | 12 +++++------ hw/ide/core.c | 44 +++++++++++++++++++-------------------- hw/ide/macio.c | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 0c36bd0afd..dcc39df9a4 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -179,7 +179,7 @@ void ide_atapi_cmd_ok(IDEState *s) s->status = READY_STAT | SEEK_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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, int asc) s->sense_key = sense_key; s->asc = asc; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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 = (s->nsector & ~7) | ATAPI_INT_REASON_IO; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); byte_count_limit = atapi_byte_count_limit(s); trace_ide_atapi_cmd_reply_end_bcl(s, byte_count_limit); size = 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); } /* 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 = MC_ERR | (UNIT_ATTENTION << 4); s->status = ERR_STAT; s->nsector = 0; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } /* ATAPI DMA support */ @@ -384,7 +384,7 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret) if (s->packet_transfer_size <= 0) { s->status = READY_STAT | SEEK_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } 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) static void ide_rw_error(IDEState *s) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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 -= n; /* Allow the guest to read the io_buffer */ ide_transfer_start(s, s->io_buffer, n * BDRV_SECTOR_SIZE, ide_sector_read); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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); } 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 == 0) { s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } @@ -1007,7 +1007,7 @@ static void ide_sector_write(IDEState *s); static void ide_sector_write_timer_cb(void *opaque) { IDEState *s = opaque; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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_VIRTUAL) + (NANOSECONDS_PER_SECOND / 1000)); } else { - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } @@ -1106,7 +1106,7 @@ static void ide_flush_cb(void *opaque, int ret) } s->status = READY_STAT | SEEK_STAT; ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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 = 1; s->events.new_media = true; s->events.eject_request = false; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_cd_eject_request_cb(void *opaque, bool force) @@ -1206,7 +1206,7 @@ static void ide_cd_eject_request_cb(void *opaque, bool force) if (force) { s->tray_locked = false; } - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } 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 = 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 == IDE_CD) { @@ -1630,7 +1630,7 @@ static bool cmd_specify(IDEState *s, uint8_t cmd) if (s->blk && s->drive_kind != IDE_CD) { s->heads = (s->select & (ATA_DEV_HS)) + 1; s->sectors = 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 = 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; } @@ -1756,7 +1756,7 @@ static bool cmd_exec_dev_diagnostic(IDEState *s, uint8_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 = 0x01; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } return false; @@ -1788,7 +1788,7 @@ static bool cmd_cfa_req_ext_error_code(IDEState *s, uint8_t cmd) { s->error = 0x09; /* miscellaneous error */ s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1827,7 +1827,7 @@ static bool cmd_cfa_translate_sector(IDEState *s, uint8_t cmd) s->io_buffer[0x1a] = 0x01; /* Hot count */ ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1851,7 +1851,7 @@ static bool cmd_cfa_access_metadata_storage(IDEState *s, uint8_t cmd) ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); s->status = 0x00; /* NOTE: READY is _not_ set */ - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1934,7 +1934,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) s->status = 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; case SMART_READ_DATA: @@ -1975,7 +1975,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) s->status = 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; case SMART_READ_LOG: @@ -2014,7 +2014,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) } s->status = 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; case SMART_EXECUTE_OFFLINE: @@ -2146,7 +2146,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) if (!ide_cmd_permitted(s, val)) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return; } @@ -2164,7 +2164,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) } ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } @@ -2783,7 +2783,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma = &ide_dma_nop; } -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 = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); m->dma_active = 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, IDEDriveKind 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); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 20 09:13:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655047 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292091wrc; Mon, 20 Feb 2023 01:16:46 -0800 (PST) X-Google-Smtp-Source: AK7set9zBYBacOTX9h6tzE+mvM82Q8zrhbclt74V8Exwrf9vYPhcDHvCi42oM9CD4uViC+6LGBRy X-Received: by 2002:a05:6214:1942:b0:56e:9210:e34c with SMTP id q2-20020a056214194200b0056e9210e34cmr3246918qvk.23.1676884606283; Mon, 20 Feb 2023 01:16:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884606; cv=none; d=google.com; s=arc-20160816; b=umyFeLOwZNPKVIogHKqf/Odg+CB4s8n4t7Am9mCrcUofrfyhUBwMSpgdPoN6i4WHdG IRdVYOKgneAukDevRQjlDYfUmy6BLu6RqHBzpea42kxv9X8kSzLBfXSJja/cbHv1ZYEP 0MfB1CySnqioOb6mhgZHRPNTd/rP6lwUWESEv7sIKPO/+0en2NpHYjFF32KbyRzK+NYw jsLDpkgw3Fxrc8C5xqNBHb0qiys3aE2+g3cU1WSXXxBW0i99NIbMk6AZZxIEIt/hJUk1 y8HplHew8FYTj6zETUfnvd34X22HONhyD5MkDA6siAST/5N7jSYjke0znOv7cJHAym6e yD0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=Yl9JvLiEWXIWSPHc5WGqhWU4BE0RsKs9XosDDXs7sgYWqfDJVa29RiRM6QT+ImvN/i M0frxi4HENaViXRU7TPaomSCOcXeYBbUsPcL6NCCj6OIbmJNOrxKAkkqDdV+QJ7ZsoV0 Iu+68kGncac7NxCBa2cWV5KetwMa5MTdjiV6IJNMLM4ZAiA6hI/a+cAT1K300hOsmGSO yPSmcdAH3QksNHYYoP7a6pwhWPI6VjsSlPqy8ZfAhDku0CFVGZ2X1rlskgWhFWPPSgn+ v9zZymihCl4Id6oIIFsOUGvf/k7OoiGBIqYEovpILnOaJ+QShZ92ldyvvrX6KQE/5J/U Ji4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pgpHNnMb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q9-20020a05620a0d8900b0071ab9598fd0si9573129qkl.330.2023.02.20.01.16.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:16:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pgpHNnMb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GP-0006co-2q; Mon, 20 Feb 2023 04:15:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GI-0006ZY-Gn for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:07 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GF-0003ur-Rv for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:06 -0500 Received: by mail-wm1-x329.google.com with SMTP id l2-20020a05600c1d0200b003e1f6dff952so376544wms.1 for ; Mon, 20 Feb 2023 01:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=pgpHNnMbA+dBPOgBLlntf5WYgXAiAB0Zsmb1Z1/L6PVQwhc+qR1XI3esNvMxOcYL8G 6oA7p0kAL2h3Sf7OQcB3F3JPPATVs7TbScehmgjShJqYYQYDZRW6tZ9hkpY+pZqKMPBK NuXtP5pSXUP4qxE31orF2KkJ164G2fZ9KMkiYu9talOlaMy9JWirY2Ja3bEDemcR2S7/ Hg6XwIDnYr2aSg7Fyoq9+pX5NkEzesMezLy58Ah1l75K9d7Lkr0pi6C+jHpjfhXgx9to YLAPcZe0JDpOTzCBFdaLUWw4UbxHcFHGAqlZJHIyGBO43HVvkSutWFBM7IkFO/ev/8/i 42aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MmvmyViEw30a3ByZFiHCey1CNg7krVr0VebVR7rY4oU=; b=1OvzhjRI8TzxOhWSN8XQcGYHpMVK2qh2tszd6I0PeohT9OvezpPg05kgha6cwKyilY U5T/Swg1zgr9/bJr3sJNDb/upBm0v7BI7iW+0tjfncjqjFAyF7Tl1cyelFFaTq+AZfLs vZRAXiZ6aFODZlhkwKJ6KRTSX57f1F5Kummlgqz3mg910gVLP2F3Yp2AmC6NbL9NOM+p TyJ9KYa9ofyXMOeY/aUrGeF5p9qHQ/tqIy4g4VaVaLsob+Gkc92SmKUBJnU+XTh5CVYN dBFZbUQDp+X9h6ERWPMsUwKq5htMLybY7RmX0gtPiyxJ69/z2fcc5EvmoJHA5pNty9L0 WTwg== X-Gm-Message-State: AO0yUKXbLsQhx3bCJKC553bJU5DUKECpQrrh2STlQarUw6JANdqG2YhO 6/lNdAs8aDZati+D8mBZxvbi2JB7bYCUUeTl X-Received: by 2002:a05:600c:32a7:b0:3db:15b1:fb28 with SMTP id t39-20020a05600c32a700b003db15b1fb28mr40296wmp.19.1676884501502; Mon, 20 Feb 2023 01:15:01 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w18-20020a05600c475200b003e220998b6bsm1013732wmo.17.2023.02.20.01.15.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Radoslaw Biernacki , Peter Maydell , Leif Lindholm Subject: [PATCH v2 12/24] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Date: Mon, 20 Feb 2023 10:13:46 +0100 Message-Id: <20230220091358.17038-13-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-12-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/arm/sbsa-ref.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/isa.c | 4 ++-- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 4 ++-- hw/ide/pci.c | 2 +- hw/ide/qdev.c | 2 +- include/hw/ide/internal.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index f778cb6d09..0b93558dde 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -554,7 +554,7 @@ static void create_ahci(const SBSAMachineState *sms) if (hd[i] == NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } } 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] == NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } } 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 iobase2, int irqnum, s = 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) for (i = 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); if (dinfo != NULL) { - ide_create_drive(&md->bus, 0, dinfo); + ide_bus_create_drive(&md->bus, 0, dinfo); } md->bus.ifs[0].drive_kind = IDE_CFATA; md->bus.ifs[0].mdata_size = METADATA_SIZE; diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 8b2ba604c5..d650dcee4d 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -174,10 +174,10 @@ void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1) MmioIdeState *s = MMIO_IDE(dev); if (hd0 != NULL) { - ide_create_drive(&s->bus, 0, hd0); + ide_bus_create_drive(&s->bus, 0, hd0); } if (hd1 != NULL) { - ide_create_drive(&s->bus, 1, hd1); + ide_bus_create_drive(&s->bus, 1, hd1); } } 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 = 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); } -IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive) +IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive) { DeviceState *dev; 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); int ide_handle_rw_error(IDEState *s, int error, int op); From patchwork Mon Feb 20 09:13:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655068 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1297166wrc; Mon, 20 Feb 2023 01:31:40 -0800 (PST) X-Google-Smtp-Source: AK7set+bHp0AvApnlBv7vPj6Arj4+71b2HGp3mBHCe4GxP7hj5YIBN8Vnz+8/JuEIakFsSuKV1Ty X-Received: by 2002:ad4:5cae:0:b0:56c:27b0:ed05 with SMTP id q14-20020ad45cae000000b0056c27b0ed05mr2245728qvh.45.1676885499906; Mon, 20 Feb 2023 01:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885499; cv=none; d=google.com; s=arc-20160816; b=aJUtRRlAfU62+awSSm7w2v95F7aV+Tjz3e2vKFaRqarlLXBYCYo/c3Zo9s3S8yRO88 xMl29ybZRs5uPlHT0zE0Rq6r1pcxuhAfHpsKDwxE3DmH1QOzLcfTmHkkUB/rnWgaLbGR 7ttiIgo5SWpf6g7j20mWG8oZCN9pOCcDw6grOrdmuhTiSW7mBD+eqyYX+NBgNV2PxBkF Id+uY9wyrCfcAGP9MkHviGFL5N+w17rUNx4G2VniyWzx+Kn3inlKIUGML2fgzH5+s5aU DFdMPFHiLM7/1AnhEAzNCtJG2SO3QLa5Vce3O6L5f1hk7SlD9wHZ5nXDqYUPAaaGnzQd bhTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=VbuICTOfUKGvqU4FNSXlFDxh2oLI5uvk9oGMRt5zmv7mCoIBWkZZHLb8bWRHZ+zcbK n2vZbhXSHrcYXYxzpx5NMqRXAmwG+sulYuZFP965CEPTH7UN0917uYGstu1wvjRrnfa3 tfSHgwlKBnXCf9PVloS2YGGrndY/BViPBLZrSp63r41wWZRmjIpomI+aHMpGXd9CgjkQ pK8ldKmBBRhixq93PrwsACu5/6rspHH32fgfuRyv5ZwfX4BjlRLEkS2RQoKE7P2pwaWb PcBgHyBIIO/VFZ727MNIKWO/sZ98U5WPbqjpZ+9ezjQetCqqMR8oaaMAqSIl2XUSzLWo U0wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mAf4yQ1E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w15-20020a0ce10f000000b0056e91962a36si8911132qvk.377.2023.02.20.01.31.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:31:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mAf4yQ1E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2GX-0006nX-IE; Mon, 20 Feb 2023 04:15:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GN-0006cn-OR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:12 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GK-0003lt-FG for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:11 -0500 Received: by mail-wr1-x430.google.com with SMTP id t15so437059wrz.7 for ; Mon, 20 Feb 2023 01:15:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=mAf4yQ1EFe4goLXMf3Kt0pImswORQT+N+ywdHHMHH0eDdUsdtIB0r02y2H1OiOdvnV D6EHUXd8JSc2UEL9yq7M2qSLOZMVtQfN4MjdQ41nyZ1/KNFQWKQMNfqctbKe2kpS9hvH AgBDxfymYk2J+GPjDrMqkcOP+ebIeYX2D6SKSLwskB0IDObxrBYkQyh60HuK3fu4QkvO LeBAGp0vXk3XaGNy/SukF6c9xR5liehR4fE6VquP7qZqZp28leAzTFOjFZjpnOsf7+3C 7aD/+vpcyqTNiheBgWonIwUhTMTgvAEuFdAcFJB9sTQw+nnKUdNJ8POk3eAT1VtKZuZf Tyjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vt6PhkOauBmS4s+Hk5XyQ3elHoYvUAOplun9HCHnuMI=; b=R9qT6w1Wz24Y1QhCvu40auMXPaBXCf/lZ2tzxLe2dTdI5CPZOkcI3R+vWkduXu+hUI ovKt5dcnWot/i3WiX6/mr/m1AzvAkbLey6qIP+z47qLRI5Hhv7C5ogbNA4UARQwcSA7X qENEvQzsmearYjXEAKxbqzygO20EDwgtV3ZDy+Vt5gRDbu0HQkaEm557PsLnA1fCWyya P2evb5qGWqAdaU1/W1IWP1bF0eIx99bvKKujU/DRQP52zTt1Qb7uNT77mXBvKf3As/zL x0R9YJ/WNuNtwphyRAHVMp/lIFJhMB1ieMbIGqJVpxQ2p2e69k7A3J1OpfLgIFjYAoDt dZxA== X-Gm-Message-State: AO0yUKVo2VyipNV3mUMpArfe0ZFQDMkYuiysDwCvROqhKKUDPmwjNRLm tJdDPRTFRMh/qN9bdi0GMHvDRtjmrJyiU717 X-Received: by 2002:adf:e811:0:b0:2c5:61ef:7b37 with SMTP id o17-20020adfe811000000b002c561ef7b37mr1251045wrm.10.1676884506582; Mon, 20 Feb 2023 01:15:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d9-20020a5d5389000000b002c6eb1fc07asm1262627wrv.31.2023.02.20.01.15.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , BALATON Zoltan Subject: [PATCH v2 13/24] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Date: Mon, 20 Feb 2023 10:13:47 +0100 Message-Id: <20230220091358.17038-14-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-13-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 90fea5d059..430961d73b 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1560,7 +1560,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) ad->port_no = i; ad->port.dma = &ad->dma; ad->port.dma->ops = &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, Error **errp) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } 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) } } -void ide_register_restart_cb(IDEBus *bus) +void ide_bus_register_restart_cb(IDEBus *bus) { if (bus->dma->ops->restart_dma) { bus->vmstate = 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 **errp) 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); } 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) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } 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) bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus = &s->bus[i]; - ide_register_restart_cb(&s->bus[i]); + ide_bus_register_restart_cb(&s->bus[i]); } } 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 **errp) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } 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); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 20 09:13:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655060 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294790wrc; Mon, 20 Feb 2023 01:24:58 -0800 (PST) X-Google-Smtp-Source: AK7set8lnuhMK8F216/3CYosO44k88yDB96E/7oSXvA8VQ+m+Gze+5tQKZHjtADuxXkhTEmZPUlZ X-Received: by 2002:ac8:5742:0:b0:3b8:6dc8:a9b5 with SMTP id 2-20020ac85742000000b003b86dc8a9b5mr24052595qtx.34.1676885098279; Mon, 20 Feb 2023 01:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885098; cv=none; d=google.com; s=arc-20160816; b=SRX3uB2jc4snQ7yoXYOgXdiLnlGEIoql+dfVk2gyGg08sfEq3sZDDmMXVLCrfY2I6g RfsXK07+cOtXUPyfO9WHwlfF6adCfae7ggocH1wu3dPCV0Rm9DAVAwj45d+AULvK9uwA A0TQG5OTvXgaYoxXeaqyj+h5DhF1zVORhuFzn9IRWuB6Tv7ra+NaGcMc10RUifdL+uli jtG5aCwi+TaKJxL3aFxkZXeYGZwIBTc9T3TzAW7aLe4C5up/VYPWYz+QMrrmDe60IjXW UFuiNurZ4j5vxtvzZJzenjZwQWtelEgORJjPb/luh7nigxmM730rBIOw0fpwpdCP/q47 jmXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=EuncGZV2p3tEcQPo1bnYbEHGiOTMpApvjDqa9vooeil8N0FqbkN+q6cNqk8GZGNGtu iEw4V/lhOCpjSWdFE/xsqaWB4U4Fs5e3QYYYOhJmzutjevjNZWCm8aCmJGhhPgOAeBTx GKIdsBhxAc8o9uGzCVExfBqbSBTXT8balfez5XXfC2XJtcJVT13bVWMjYHy4Y/bCQqFd PE9uw9bEa66w23meyAbS97uZ4gPE2p5nENU7Yfg8PlSamsFEqZ3v+H9LX1RKrVcVh0SF yeHjbfuRoDEVhxJ6cr3dNrqKH2WW6FTXrvHcv3x1J8/cpob5cKvHj3pJLO9eTHNJ2tLP MNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cP2VdLny; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m17-20020a05622a055100b003bd0e7e288bsi8813317qtx.553.2023.02.20.01.24.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:24:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cP2VdLny; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2H5-0007LX-DU; Mon, 20 Feb 2023 04:15:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GR-0006fM-LA for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GP-00048C-Bm for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: by mail-wm1-x32f.google.com with SMTP id j2-20020a05600c1c0200b003e1e754657aso449056wms.2 for ; Mon, 20 Feb 2023 01:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=cP2VdLnyazYynhs8JhILPzR/RjhnqJ45T5QWbihxAeY4iHAfYFLgYN59+R+7J6sLha g/2tiWt6UGdjk2t7J5NQ5IDTRo1OM5au8swo4svbLJfF9i8uhMSOP8uqkeS1VLe4+OQ3 kFxkQN2sSfN8mOX2U+NMPwdLNSfKJlJjkqTTHZ4b75jxQT6OCbA7TxyuIVfoCAQQ0CyF jJQrJozvV22PzQfsblNUCNbXvMtQvmPfYc0fqvcBb/0zQZu0TQHIYFhfdAKxkQCYaSum 1ZJOCkT14TUUerI/fClO/BTxiomfzed7j7mKCaYGLyaWUHWyVbjDxrvyleHTUHsIuJSz QZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=uqKYBL9QVFdHb9WDPy4qcyEhZQk42e1MIBrKPN9wrf1MNTdTVk2Zd3T+ID5wp0mxe2 +hXgP0s8J/uuncRKRogK/KQJmuDPSl2LPZ47LzJFURdMCnyVrhfxdv9A4r7Zq1BeKUKj 3ihE9Oi0uwPr1pBIr3r3DOcIFi1JtfPt1Ix61PTKDfn13LzR1dF4mAe3+SnLkK2vofax EhJwl1eVIN/DeUvuKN3MKXYNHZE8KiBGmwsKGjhC3h7W20SuVqX05cI56x0kW+tqH3/+ ktqsW9osgtQrOypuC3aHSb5RKJ1ffrJ7gcoxou7T+B5wWqI4HcfiwCWdeThRptxpkCZn X0+g== X-Gm-Message-State: AO0yUKWTZ8hGQI5xwlqufys7EO83bszC73HY0NMlgVgpjnh0G8hvPWIc lF00jDNs1YrkjTsYbgjvUBxBkXk5CjrayMDm X-Received: by 2002:a05:600c:4393:b0:3e2:8f1:7684 with SMTP id e19-20020a05600c439300b003e208f17684mr11281360wmn.33.1676884511504; Mon, 20 Feb 2023 01:15:11 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b003dc3f3d77e3sm507650wmi.7.2023.02.20.01.15.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 14/24] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Mon, 20 Feb 2023 10:13:48 +0100 Message-Id: <20230220091358.17038-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/core.c | 6 +++--- hw/ide/trace-events | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 430961d73b..7f67fb3119 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port, cmd->status = 0; /* 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]); } 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, uint32_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)); } -void ide_exec_cmd(IDEBus *bus, uint32_t val) +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) { IDEState *s; bool complete; s = idebus_active_if(bus); - trace_ide_exec_cmd(bus, s, val); + trace_ide_bus_exec_cmd(bus, s, val); /* ignore commands to non existent slave */ if (s != 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, void *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 buffered request %p with -ECANCELED" ide_cancel_dma_sync_remaining(void) "draining all remaining requests" ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%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 iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); -void ide_exec_cmd(IDEBus *bus, uint32_t val); +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val); void ide_transfer_start(IDEState *s, uint8_t *buf, int size, EndTransferFunc *end_transfer_func); From patchwork Mon Feb 20 09:13:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655062 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294965wrc; Mon, 20 Feb 2023 01:25:27 -0800 (PST) X-Google-Smtp-Source: AK7set8vZM2+Lm+KLEsmj3EM5aYo6gGVIDLaOqoa/3Cr285QGvSHOBo4hiMuJaBqiYzhUnRXd8ua X-Received: by 2002:a05:6214:301c:b0:56b:fd8c:746f with SMTP id ke28-20020a056214301c00b0056bfd8c746fmr2191486qvb.39.1676885127241; Mon, 20 Feb 2023 01:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885127; cv=none; d=google.com; s=arc-20160816; b=QomFsxo4Y1qJpJhoA/w6fIbXHIwVNb1KIezsX8xc5ZRIO6DUDlKjGM4unkniE+kTTt /NM+7Z+H8xeonNbK92wZZGimzQw7ZxA/wFg21OqBG7+2+AQ7+fmlv1rbDOpvDrMgcrSy BsC5PNJkcCgWqis68c3Q75tsr//tnFhpJGUtQOD+bR1NNMfrN9+agXwR3t5hfUiPJ8f0 iPNvTdubvOr8Rn7RmnCa85C4/CtBjEUmfrBgGwnmddOf3vEaY//4BXSnygIxVGSXv17z pxSm4eEJFG9wkvGMnjm1h4tOk54vNplbQ1WeL3meyBa9kw1lWgtwnXTjoAgz5zukuEo+ kkEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=LZt5H2LuTNLinqzlDLJT6k0+oXwHkkWydwZxnPC5rExlEd7S5a7PFKp5NEnWUr+JjT vRZ3wzOarV4JrT7qXoB+JHLVsDUZo3y0HZ4nBGNTStF/eVq6t9wUj4kASuEcq/cnuxVq 3CSXcJRwnWO6VWc+hDFPayKNiCFacHBvTwHxWb0K60we9xq/txA3kVtmoASYryOnKJRt Booo5MaHiquXHoQXNQOPBxXh76HOvocXGXuGRrOg7bzHgjbtWm4+NfOUNmETeXTIm2Nf AYlQC8DI1IoP+lmmOPDC8+dHXnsmjtRGyjgnz/gmWSbgfztPCJrWW9Za61D4/KwiTUb7 1Rxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GxK6YJbE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id de12-20020a05620a370c00b006fcacb194efsi9835740qkb.53.2023.02.20.01.25.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GxK6YJbE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2H3-0007Ec-T3; Mon, 20 Feb 2023 04:15:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2GW-0006ni-9y for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:20 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GT-000491-Tl for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:19 -0500 Received: by mail-wr1-x433.google.com with SMTP id t13so257895wrv.13 for ; Mon, 20 Feb 2023 01:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=GxK6YJbEZ1JjfE46GsK2VgA9UW52U2FneaJhnmVFtFckgtxnA8hFncNQDCiu6d/0Pl 9OrcMgBqXZ32Gemm54vY/Nx2uUAFmFl/UefDgPSev1wP+Y7oSG1JWZzauPEC1ffxVaaO kRckiKd/FDVSYsj1EXSQMBDo7tS1fiac5g432u5xYn+Pf59BGMYPMSeGmb82mhoHijwr dRmZnmmqG/GFgvM9ELeEhnkQEs5Tv2ffMXb87O6EdqiaqGyQVzUeGHp5FfFYGJK77cb2 kSBuazw8cbKhxhEdwUJZ8eLmZ/ngUPMCs7SoQu3z/Xd2Zcxza0+guNwuaGvtUScxkKRx 0GtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GMjTemuFLJ3RFOowD2crRLZnd5GWJHiz0MSZdBMbUX4=; b=rGgl8tPlg4LKXszKRVnOe3DhAqmUgT+QBCdMEGAKY5qVOitbBaxspAaiJsXsRoKpDR k992pbl0nkJWSMdGqImJYm1oTvbYWCJFGZ6EjSgzpvB9SiFqeL7GYW0cLa1OF7eJ6qA0 IuyFdIajYhcRCehOMoJFgV7vOSX1v7JDgR6Pyf4ytbrpVLtxQ2jSU6X/LOwsOVkz+3Iu JuzceL6y5WZtkdHG98IXMaBwYvKEpVgKbRvyi1QNjGuhGEWFWPbN5+qYRxP8Z7CCYIk4 uAg1XPv1H6ROQAyfewOsIrZanTqCflKA5x+b6t6qToiXTasFJEB6C1mEpBVCUBIDSFR0 69+A== X-Gm-Message-State: AO0yUKVuRe1t0mbr41T1IUS1Et996sdIKRkXQFuvCNFcV8fBc4YiRxsq ocDwWSjoK9xWX+0H/19UBUZwKKdnTO+wn8nd X-Received: by 2002:a05:6000:1f10:b0:2c5:512c:f499 with SMTP id bv16-20020a0560001f1000b002c5512cf499mr500362wrb.27.1676884516402; Mon, 20 Feb 2023 01:15:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l11-20020adff48b000000b002c592535839sm969827wro.17.2023.02.20.01.15.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , BALATON Zoltan Subject: [PATCH v2 15/24] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Date: Mon, 20 Feb 2023 10:13:49 +0100 Message-Id: <20230220091358.17038-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ide_init2() initializes an IDEBus, and sets its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq(). Mechanical change using: $ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-15-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 4 ++-- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 3 ++- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 4 ++-- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7f67fb3119..d79b70d8c5 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1554,7 +1554,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) AHCIDevice *ad = &s->dev[i]; 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]); ad->hba = s; ad->port_no = 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, Error **errp) qdev_init_gpio_in(ds, cmd646_set_irq, 2); for (i = 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)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &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 = { .aiocb = NULL, }; -void ide_init2(IDEBus *bus, qemu_irq irq) +void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out) { int i; @@ -2779,7 +2779,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) ide_init1(bus, i); ide_reset(&bus->ifs[i]); } - bus->irq = irq; + bus->irq = irq_out; bus->dma = &ide_dma_nop; } 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 **errp) 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 = MACIO_IDE(dev); - ide_init2(&s->bus, s->ide_irq); + ide_bus_init_output_irq(&s->bus, s->ide_irq); /* Register DMA callbacks */ s->dma.ops = &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 = MICRODRIVE(dev); - 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)); } static void microdrive_init(Object *obj) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index d650dcee4d..c6c0299c53 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -122,7 +122,7 @@ static void mmio_ide_realizefn(DeviceState *dev, Error **errp) SysBusDevice *d = SYS_BUS_DEVICE(dev); MmioIdeState *s = MMIO_IDE(dev); - ide_init2(&s->bus, s->irq); + ide_bus_init_output_irq(&s->bus, s->irq); 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)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &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 = 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)); bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus = &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 **errp) qdev_init_gpio_in(ds, via_ide_set_irq, 2); for (i = 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)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &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 */ int error_status; uint8_t retry_unit; @@ -616,8 +616,8 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind 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); From patchwork Mon Feb 20 09:13:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655051 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292354wrc; Mon, 20 Feb 2023 01:17:29 -0800 (PST) X-Google-Smtp-Source: AK7set/1kNm2vGzsqR1ukDUirsQrV78v6qWFvNAIY9MI0ElDWOEZFSBLIWitPSLbJN2YQqS+Cq/q X-Received: by 2002:a05:622a:255:b0:3b9:bd05:bdf1 with SMTP id c21-20020a05622a025500b003b9bd05bdf1mr16049471qtx.14.1676884649122; Mon, 20 Feb 2023 01:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884649; cv=none; d=google.com; s=arc-20160816; b=FVR7kk6nvQsdtOlK5bg9Oa+2Wifm1WbMvzYsYXUu8j4xUYgJ1TSM5AMyGj+5GqJzQN 9dMcb49vcKjD/W+gzNGM8ZqquOdD3KTmYl+dYoqyJXUTO22RsheKT+qDdRSvL81dH/Gn y3zaKd42yiNNuCA7uiC8ISMouFYpljD2mYKRezJKMXgsrTNeKB/U8DuhjoOoqdkMKsUW Hbtbz1ffjp63AL73YhZxV+AQKnAS9/QDdClditp/Ci56nXUHI0SZkgUNn0yLzcq3pi8k PwJhG4YuZmC1pjZlwmjinl3kiG5XTHUvtXR8Z0OPBKd9Tn7bnhUIcZBVVHN53GN5FUtq Jc8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=GM7Zp5ADuIWeW6mZcgDqAH4s8qDZf8IUBl4hbYYdXCnZfsWh9+eQ9ERbu0g/unrOtw 2VRte4C6tPSw99t0wUmNwuuWq3mnt5nfVdfIPY4iaxgvmqMaDG4BLMt7SUzynSlLfSSB 7/fqMJjdWVVxq2mUF7ZX42DwbrcS3GBFrW9zlRmaHnu6IJ6IpM5qeA88rpB5PA3xEcAI iRZ4+B3pCeC5xfTIQBiLKKRQLWjrMy+DyByy8NO74X6EUIw1GPAjdeTMWzncxbrA/TnO t9yuShH1ozf86HkRwLn6n9QE/ZuOrJs+bcger4H8E2E34syZQNAVKGMndw2IQXFHGibt j7pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxV3NkPg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b12-20020ac85bcc000000b003b9bd193f59si9916624qtb.568.2023.02.20.01.17.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxV3NkPg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HN-00086y-Dk; Mon, 20 Feb 2023 04:16:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Ga-0006rJ-PV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:25 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GY-0003uk-DJ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:24 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg37-20020a05600c3ca500b003e21e018039so1198492wmb.3 for ; Mon, 20 Feb 2023 01:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=uxV3NkPgzWR3OQk197UP9a8Jm0cd0Qu8tV4e65IeXsa0ZLY69qO9Zz0lH/dhZeSicL AgDsrlYPtGm5MpiER0jzg3AVBuglYvG5002GjTP3CMyQedT7VkMGXLdrfe989oFYliTY P1xv82A87ca8aFxYH+e0lbvZ+u8cXFs+aBEebxfXQuTk2zgKvEC6hQ+qmWn4NyzZH3vO KfRYAtkZKunZ6mp3bp836zr0s33j8s7Vm4WDVJXi2dWRMOEwbRMSi+lw86FU82NqXqq6 BYixRaSrvMu8YlIwit9cd3zy9xQyJyFE0du1r8Gk4YO4rhHeqh9YOO5EvzYSsmclCnjz 1ouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=LKAR8cDHltRQQzvJjv9lBScaicO5c2B5Ip0wjmwdO52SK3OrSfbE+mKkSnYbK3orjq QVbYL9j2HNtbh6wc8gyWDR/xE695YKJVOdgG7P0qXG/EiOg9jTpvd8tJdI3xxBtHwiTq p0F7GnFYPUyDmBAicNuUZ0la7dZUO5s4qrO97VtgNm4AwMsQusNoOi1xKvR8iAUUCXix 3T6cG/Xa6/8nrEOqDapx8AG85dyPut0EsbYxCBSIMoc7pia1aLWQEjMkntzpZPqJ9wgW acOqXfLwZBcPSp55dy9treuj5m4Q1Dhnw1tyNUtgmayPcsV4MAfFjwt2+hfUaUUWoZ/T JXzg== X-Gm-Message-State: AO0yUKVlRTJC19Mm0gjwhNsopd1+gwr5l9PoF6QGUz68upVUIgwaMPPX ckVicOohhs5IB8t1T8fQRBWXnfyrRqtMmUpN X-Received: by 2002:a05:600c:2b46:b0:3e0:1ab:cf2a with SMTP id e6-20020a05600c2b4600b003e001abcf2amr226474wmf.39.1676884521495; Mon, 20 Feb 2023 01:15:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n21-20020a1c7215000000b003df7b40f99fsm8152060wmc.11.2023.02.20.01.15.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 16/24] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Date: Mon, 20 Feb 2023 10:13:50 +0100 Message-Id: <20230220091358.17038-17-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20230215112712.23110-16-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/core.c | 18 +++++++++--------- hw/ide/macio.c | 8 ++++---- hw/ide/microdrive.c | 4 ++-- hw/ide/pci.c | 2 +- include/hw/ide/internal.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index fd2215c506..2d034731cf 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1265,7 +1265,7 @@ const char *ATA_IOPORT_WR_lookup[ATA_IOPORT_WR_NUM_REGISTERS] = { void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); int reg_num = addr & 7; 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; - s = idebus_active_if(bus); + s = ide_bus_active_if(bus); trace_ide_bus_exec_cmd(bus, s, val); /* ignore commands to non existent slave */ @@ -2195,7 +2195,7 @@ const char *ATA_IOPORT_RR_lookup[ATA_IOPORT_RR_NUM_REGISTERS] = { uint32_t ide_ioport_read(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint32_t reg_num; int ret, hob; @@ -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 = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); int ret; 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 = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; trace_ide_data_writew(addr, val, bus, s); @@ -2406,7 +2406,7 @@ void ide_data_writew(void *opaque, uint32_t addr, uint32_t val) uint32_t ide_data_readw(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; int ret; @@ -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 = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; trace_ide_data_writel(addr, val, bus, s); @@ -2472,7 +2472,7 @@ void ide_data_writel(void *opaque, uint32_t addr, uint32_t val) uint32_t ide_data_readl(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; int ret; @@ -2711,7 +2711,7 @@ static void ide_restart_bh(void *opaque) return; } - s = idebus_active_if(bus); + s = ide_bus_active_if(bus); is_read = (bus->error_status & IDE_RETRY_READ) != 0; /* The error status must be cleared before resubmitting the request: The 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 = opaque; MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); int64_t offset; 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 = opaque; MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); int64_t offset; MACIO_DPRINTF("pmac_ide_transfer_cb\n"); @@ -220,7 +220,7 @@ done: static void pmac_ide_transfer(DBDMA_io *io) { MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); MACIO_DPRINTF("\n"); @@ -251,7 +251,7 @@ static void pmac_ide_transfer(DBDMA_io *io) static void pmac_ide_flush(DBDMA_io *io) { MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); 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 = idebus_active_if(&s->bus); + ifs = ide_bus_active_if(&s->bus); if (ifs->blk) { return ifs->status; } else { return 0; } case 0xf: /* Device Address */ - ifs = idebus_active_if(&s->bus); + ifs = 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) != (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 &= ~BM_STATUS_DMAING; } else { bm->cur_addr = 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; } -static inline IDEState *idebus_active_if(IDEBus *bus) +static inline IDEState *ide_bus_active_if(IDEBus *bus) { return bus->ifs + bus->unit; } From patchwork Mon Feb 20 09:13:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655050 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292315wrc; Mon, 20 Feb 2023 01:17:22 -0800 (PST) X-Google-Smtp-Source: AK7set/Wa9+yKtEFeLw4oXKV5Lf1IKdfzrgL+MZtQRWOCo6uDlCNcRl2m0TyA0Y6i4UkeehLGjhe X-Received: by 2002:a05:6214:da4:b0:56e:fb48:cb18 with SMTP id h4-20020a0562140da400b0056efb48cb18mr405032qvh.29.1676884641897; Mon, 20 Feb 2023 01:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884641; cv=none; d=google.com; s=arc-20160816; b=hIyihAKspbmK8s+v/jpOCdvX7TyqG6nTQ55GwXWW7hIo6MCNG+I8DPF/TEAjG2jyMk fyPJ6Mc5Ei0mD9DnACjXg5+ti0VYiNMnt2p91FXEVI8/w7UBssSIRfAj6FY5wg2vy4JF eSwhU49MuiDTogpzQIVIeE5Lg0EzrR02giNjZX6VVEgBbSdpzMUadig2KmrwpMUswSYN FjZiZ4/CQeo/dPvkUaYNfQ5NQHa1Bh2mjRDCnkj9pF09PCpEVC5RDVIQo7UxstWGHfx7 RJURBs7zwHNS8zL8lM3Hq86VGHutK8u4odoaPi+QhRyGCArwuywN8GnCAxxzZ8nEPxaS gFOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=ltxeoK+FxilslMUc6ZFvZV5Gq+NAn7yP4S9Xsjwt4pIx0Q3TDUDeocKbZrMg7sZA0t rLoH/Ev5+kAO0h8WDveVC0OFkmPUOAbj+5Af/3AU6ot69oZ62s9Y0KGdeEmItWbYw0R+ YtFPXgQoPgDxLJYaaAo0HuoISlO0f4Pdp219m007ytI9502040+kr+mzHMdkLqGw62yB ABxlgjyM6QaeOA5QDw/uO2HWP5jt1M2TBYPO77QJ5gaB3VTa9WzYXEIrBmoyva1h5+Na /JREhChi+FdO2pfwVe2tvC2Jtll4SC9RngkcbtrHNTB9QdCvh4J7pt4aQe+L+1tXKXBJ xqGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wj2U1p9M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m66-20020a375845000000b007050f63d946si8735903qkb.716.2023.02.20.01.17.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:17:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wj2U1p9M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HR-0008F8-Aq; Mon, 20 Feb 2023 04:16:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gg-00071P-2K for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:34 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gd-0003kI-CN for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:29 -0500 Received: by mail-wr1-x434.google.com with SMTP id c12so338853wrw.1 for ; Mon, 20 Feb 2023 01:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=wj2U1p9MxWJrb5KdACVC1CO7lBVcGMa/jKfn4/kdF4CVhh2IgYRbk+IqQL9KQuxJ4R liYRI9rU4um1J38EVAeI+a6CAsVww73tuD6rY/qzigXqTFHUpL9XEPprikbm0gHT/jvf 6wjMWVC4t+7l7yE1LpMkbBz5o3aVcwK95XsYp3zAQ914d5Ugh6739RX8fFITV3Iluzq4 nCz5Wi46gqluryzoiQeX1ff7X/OpNsAmboAtCFU9JLOyZpNB+WHOng9S5FsqFoG0i6ME ZMa3oXQi7p5YLKIgSiM3JwuPErwRXZ4jr38J+dFwPH1jFET9STHj+KP/+u65uKReLcA4 7wkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l+kQmnueqHR1/7y+7KCNnDEw+Oe5smCTiQ+KK+3S1XU=; b=TCFbC03/vwXlKjPLgyJIeHORr9BfIMjbI5TmDqBBxc6ieqc79G1CIEcvthaRRAOEQH 2YmU3RpBpBLPnAa/CJRWuQ8eXx7Br3GK96z0JgaOTfz+PDF8B+5OFYzjeCgdlH6nFwd4 LGX+DtFY5P96On6I+oIh2qHzAwhFObaQeE7LMjE1OB5uoR5hUfhDC8TifYctNjpclSvO BKtTq8Vm2rvUrL/4YtBgiOAGDxIZQboufe7vByGHf5w1xjD9AMqnaD5MvF+c6eCk4OTJ dklJoVlTcFs1ORomL+y28ErxPJth5JrhXSbsiOiDt6Hgkwej9/PXhd9XNfyMKDNZ6qko 8BZg== X-Gm-Message-State: AO0yUKXs7ZAKEnFs1ZXuON91XoAxZ7wxqP1kTg/cT2qyknmz60SYMXgy 9KofFSVs3NXJjEb+q/yC5RITu4wyDdMuuUal X-Received: by 2002:adf:e255:0:b0:2c5:52ef:61c5 with SMTP id bl21-20020adfe255000000b002c552ef61c5mr136594wrb.41.1676884526496; Mon, 20 Feb 2023 01:15:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m6-20020a05600c4f4600b003df245cd853sm1048184wmq.44.2023.02.20.01.15.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v2 17/24] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' Date: Mon, 20 Feb 2023 10:13:51 +0100 Message-Id: <20230220091358.17038-18-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- hw/i386/pc.c | 3 ++- include/hw/ide.h | 4 ---- include/hw/ide/internal.h | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6e592bd969..79297a6ecd 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -34,7 +34,8 @@ #include "hw/i386/vmport.h" #include "sysemu/cpus.h" #include "hw/block/fdc.h" -#include "hw/ide.h" +#include "hw/ide/internal.h" +#include "hw/ide/isa.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" #include "hw/pci-bridge/pci_expander_bridge.h" diff --git a/include/hw/ide.h b/include/hw/ide.h index 24a7aa2925..db963bdb77 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -3,10 +3,6 @@ #include "exec/memory.h" -int ide_get_geometry(BusState *bus, int unit, - int16_t *cyls, int8_t *heads, int8_t *secs); -int ide_get_bios_chs_trans(BusState *bus, int unit); - /* ide/core.c */ void ide_drive_get(DriveInfo **hd, int max_bus); diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index c2b794150f..d9f1f77dd5 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -647,6 +647,10 @@ void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev, int bus_id, int max_units); IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive); +int ide_get_geometry(BusState *bus, int unit, + int16_t *cyls, int8_t *heads, int8_t *secs); +int ide_get_bios_chs_trans(BusState *bus, int unit); + int ide_handle_rw_error(IDEState *s, int error, int op); #endif /* HW_IDE_INTERNAL_H */ From patchwork Mon Feb 20 09:13:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655052 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1292602wrc; Mon, 20 Feb 2023 01:18:18 -0800 (PST) X-Google-Smtp-Source: AK7set9IZ31A20S3saFJZf/v38JE+7f2t7kk1uVnhDRrQLj2+cCNApRNcuxDK5IzxYyrtFMPwzQ5 X-Received: by 2002:ac8:5c47:0:b0:3b8:6d67:c178 with SMTP id j7-20020ac85c47000000b003b86d67c178mr18895151qtj.3.1676884698189; Mon, 20 Feb 2023 01:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884698; cv=none; d=google.com; s=arc-20160816; b=AXVOdKyfZQT6WVrdOoYmc/Y/E0sawGHcpih5PdDf6Xkie74NXAgnWqr1yrlG/RVX7m h7Y8/EOLfW9BynvptkMtdpNba4QZKTZheyKWCvcum9ct7dOlXLJzQ2nqlWe/sDPbaR1C rzU/NG6uc7FBErjGikBPaqZAibqFYuX3bxOLmkFlcgF/sdSccsnyedZas1P0puV0N6dk ed68HDIC0kjXxMNgA05RKPbZ1IZAoPtHJJuaiZx93VeEBaS/537r8tKvYYN4vNwz8np8 x57UaWmlFFFqGMig9O0eoys+XTGPsB5/mYC8fwyw63iQp2z9HrpZpN2h6RuPNsWg6rMe 3sqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=HJ+mE5ppy/b7ZnsyO+ArePxTHxlsHBlIwqOzLWow9c//mwYRNwReAtsheB4Gfwk3Bo Tdy0tl46G6QzKFprvepiLDOsc3W2xbQ0Swy7LKyjGmWCDGi623hm1ErQQe7jeC2+oYZ9 a6gxLp+jwECnVwQIML1t1IHWQQgo/jvGp5wSFfYjHJvJSJH0A42at4OeUwgT5f1TR0XC wCQf26/i+efnQKLxk1+CnkO18sCZDncsYR/hmPaIuapjEGH1OcdHstgaomYIzugzCOgp W6rdEkEi+YRpnuA/1JtJyCc2tcOY41hQyJ0Cr9s6jjFOtDphFhQKA3jn9xoO1Am48+28 LFOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kkMjx7Gg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h13-20020ac8584d000000b003a526360fdcsi9657150qth.607.2023.02.20.01.18.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:18:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kkMjx7Gg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HF-0007dG-DK; Mon, 20 Feb 2023 04:16:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gl-00072t-Ke for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:40 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gi-0004Ge-TV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:35 -0500 Received: by mail-wm1-x32f.google.com with SMTP id m14-20020a7bce0e000000b003e00c739ce4so313774wmc.5 for ; Mon, 20 Feb 2023 01:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=kkMjx7GgkkZi3BsfS4ITbV34M7i21b/ozd5L/2r+vsRBOg25IxsFkW5K52pdeGhDbE CzbL6pdQSOaJiRYvMEJsSieuuCB8qPjHjya7Wbz82+ZEezhYEY5ToCmD02ZfeaeC8uXy R4uOg9UzGgutypzYE23m5pGzkw9+l5AmNBFScFKI2K49VQfGzGtJVgf9AlT31UyiUhno ufUmwNSkL2C5NIQqMSVdSsG80TMNBFFpbXNLt2Oemyq/5Dxi45SJ4Urb0pVD+bRaBR2t VonQzmL8X12rCmjt9wdIEE8ClwQsfCa87HVBEbdxJ+WdWXl+2sL+RI5sU1B7j9BpTWmc yJaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3d3dAgvSU7y0t40ls900hD5+K9cJXXT4fSGii8WVS2E=; b=wOy+uSQ48FNb84L0BAaEksET2wLfScqM3UPFUDEUOKDJ8NekA9vQtO4n/z5QCZX1fI 8w/h67wCyw9MxBgon5uIygorqZlswOrnpYpZzbrkkY462THxJ/TShPz/WPpYnZQ/aY7l IOT+35ZaBhi6jH7VaJVar/YLPEDclx9dVJkZhwz2mT+7O2FdMYCdoa5SJPuw6Eerdjsc NIIQYyET7SVC5KhFYU/lfyfDKGHtIU8zNZVHt8wCm6tJ1EMGRDWWWfdiAyj2WhPLLKrq spgMKc2gOE7HlBNquU+NChNOGPGGYWOnfPXHQrv0BUycTW1NWsQOEQAhN7vvxiVnT3tI tOjw== X-Gm-Message-State: AO0yUKXHxDGa0u0n6tib8T9g4PKUtIDs0xZIDpHG86i2GBSresPFvVnO tiZzUzYPsUhTzT3vibg+fMjDPr9XCYCs3Qlf X-Received: by 2002:a05:600c:3316:b0:3dc:42e7:f626 with SMTP id q22-20020a05600c331600b003dc42e7f626mr6301754wmp.26.1676884531368; Mon, 20 Feb 2023 01:15:31 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c4fc600b003dd8feea827sm10216609wmq.4.2023.02.20.01.15.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 18/24] hw/ide: Rename ISA specific ide_init_ioport -> ide_bus_init_ioport_isa Date: Mon, 20 Feb 2023 10:13:52 +0100 Message-Id: <20230220091358.17038-19-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Rename ide_init_ioport() as ide_bus_init_ioport_isa() to make explicit it expects an ISA device. Move the declaration to "hw/ide/isa.h" where it belongs. Message-Id: <20230215161641.32663-13-philmd@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 4 +++- hw/ide/isa.c | 2 +- hw/ide/piix.c | 5 +++-- include/hw/ide/internal.h | 1 - include/hw/ide/isa.h | 3 +++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index e6caa537fa..7156c465da 100644 --- a/hw/ide/ioport.c +++ b/hw/ide/ioport.c @@ -35,6 +35,7 @@ #include "qemu/cutils.h" #include "sysemu/replay.h" +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "trace.h" @@ -50,7 +51,8 @@ static const MemoryRegionPortio ide_portio2_list[] = { PORTIO_END_OF_LIST(), }; -int ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2) +int ide_bus_init_ioport_isa(IDEBus *bus, ISADevice *dev, + int iobase, int iobase2) { int ret; diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 95053e026f..6eed16bf87 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -71,7 +71,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ISAIDEState *s = ISA_IDE(dev); ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); - ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); + ide_bus_init_ioport_isa(&s->bus, isadev, s->iobase, s->iobase2); ide_bus_init_output_irq(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_bus_register_restart_cb(&s->bus); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 2f71376b93..fc44c261cc 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -38,6 +38,7 @@ #include "hw/ide/piix.h" #include "hw/ide/pci.h" +#include "hw/ide/isa.h" #include "trace.h" static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size) @@ -140,8 +141,8 @@ static int pci_piix_init_ports(PCIIDEState *d) for (i = 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); - ret = ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, - port_info[i].iobase2); + ret = ide_bus_init_ioport_isa(&d->bus[i], NULL, port_info[i].iobase, + port_info[i].iobase2); if (ret) { return ret; } diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index d9f1f77dd5..d3b7fdc504 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -618,7 +618,6 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, int chs_trans, Error **errp); void ide_exit(IDEState *s); void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out); -int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h index 1cd0ff1fa6..7f7a850265 100644 --- a/include/hw/ide/isa.h +++ b/include/hw/ide/isa.h @@ -10,11 +10,14 @@ #define HW_IDE_ISA_H #include "qom/object.h" +#include "hw/ide/internal.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); +int ide_bus_init_ioport_isa(IDEBus *bus, ISADevice *isa, + int iobase, int iobase2); #endif From patchwork Mon Feb 20 09:13:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655057 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294402wrc; Mon, 20 Feb 2023 01:23:46 -0800 (PST) X-Google-Smtp-Source: AK7set+tUGWz7epdU37p84N8TgfjK8ApQVYOKzmiauEwNZVA8E3gR6KgkJFweMUAUlkJnInmPI8q X-Received: by 2002:a05:622a:d6:b0:3ae:189c:7455 with SMTP id p22-20020a05622a00d600b003ae189c7455mr16154678qtw.47.1676885026083; Mon, 20 Feb 2023 01:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885026; cv=none; d=google.com; s=arc-20160816; b=L7uFNEavbAnOQCMWOVPpulwSOksRipvKEmSI5EDXhRazYWIhNJW8FrUNcDDY2pCp/k z0hfoLWMN+A2JEEokmgn6pP4bTLpLAdAQ2+dKJhiIFRO+cyiOAgdTnpjMwe5+X/SixbV ngcDwSWB/VCZ8V7NWndZ1mDOhPEm/nOdSfz/ts63uPnBrM9Q5GaJWFWh+Jkbcs596cRs c5Q4MMZcgqVZKvUs3s37howLhehpb1p9mXekRIFJz1xvKQXr5kMGkj+aqiv33Ys2Eh+t UEUUgC92r7yte3tBdtaPQ52hqbWpT8A3mdIi/w+Urn+6uMOKUinyyceZYFId0jHzz9Vi oppg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=tV/JiRRQSSllsgY2Tix/XG/6Zho+TsgAvdsFo5OeYYEngRI7MphOLmgk33DqrUgchg NQuSzdWnSdYaj7lSMl0Fq86sxTgmC9a1vSWo3+h64sDG7CiscqTxxYffDxYsTpDBIspZ xuR4YTqfIr6MDgt8ViJUVOKdNe7pWE2Q+7fE3EKo+JM51wCsNFfIshHNR3/lVpVD0JuV GI5j81NvDW7M+RMvlgs2edr8yItGh0javmbn5UzAPAnTj9j3mExBpFVGSmJ+oWVsKo32 p4dlD+1F4cvC6UkhW+kQF8YL3AvMSb9sDhNj8zcR4Lr08rxAv3m01Zr+LqcdsPXbIniV QcjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y40nzJTu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k5-20020a05620a414500b0071a6778dd61si10216103qko.538.2023.02.20.01.23.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y40nzJTu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2HS-0008Ii-CK; Mon, 20 Feb 2023 04:16:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gq-00073W-Rx for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:43 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Go-000491-A8 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:39 -0500 Received: by mail-wr1-x433.google.com with SMTP id t13so258863wrv.13 for ; Mon, 20 Feb 2023 01:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=y40nzJTu9YqYn48V52PzwvKykjR4DTUGi4ggJGcN2sgTXDOAjXkcRKvnblnjA91Ybl xWqRYLABhjv34K8fIZch8l63qnDN7qnYaCKWFMkKnYfKbv2Y5+xIZEImCPBeRAAOUTQY TNfaRnD9uMSvtUzzKdTdPj/pKiBT1NIWPMDypUQtyhv9tioSfbeyTE5J9Qs8TbMrzrw9 pxNByejeorB88qFLv3irmLl9QmlHrCa9RJ/xyZ6PA5zicby3nbbTPb4yNZB8/RpU1ZJ4 yRHHlXZWCnuBpsJ6ENrqGAsFxe/ygPmSqlr0XeBCDnDi7jxB9zPQCzEcowVnFuSA5sd0 8zuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6KPs6QzBVbeld/TzCnm7LDXOq9GMzfPGQoiYYFroMT8=; b=gVKS4j0e0aAteZ6s9dC/PIWARd+iWU3a520/JYF5mfZhEyyMHa1b6rhFdM95FLLG+T w+0wWASOSfFke3hp+KKtxb0cdE8ABb8+zXo8XbJSrtDnvXZg/rT4XmyNXBUHnj2C5Lj/ 3S6KT1I/+w2BDv/BMckwm5o+XaLJ8pgjUbrBFCOCNcwEvv73iWC4vaIBihJ/fQVMrDGu /mlVfhLN0d6/3JTE7GRUcOKY6zjWhyXsG01pp6rx3zo6wRFnbyrAmwya08TQUNfnZoyo WpBHq4CT8Q/3v+tDAWoWuT/TbUc2HX86IBF4SrH3E4kC89FfyviWsmULG8XWs4EMwY5p 0Zjw== X-Gm-Message-State: AO0yUKVBmxzY46aOIWdzVi5Snl9ASvoMt9evd0oUeq/zJW6QhDkntTDD XVkhyI1Ibg4c9opjOCY9BvvyXUEptgXHT6fB X-Received: by 2002:a5d:66d2:0:b0:2c5:9cb8:d314 with SMTP id k18-20020a5d66d2000000b002c59cb8d314mr2155152wrw.56.1676884536405; Mon, 20 Feb 2023 01:15:36 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v17-20020a5d6111000000b002c559def236sm4013038wrt.57.2023.02.20.01.15.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 19/24] hw/ide/ioport: Remove unnecessary includes Date: Mon, 20 Feb 2023 10:13:53 +0100 Message-Id: <20230220091358.17038-20-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-17-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ioport.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index 7156c465da..d869f8018a 100644 --- a/hw/ide/ioport.c +++ b/hw/ide/ioport.c @@ -25,16 +25,6 @@ #include "qemu/osdep.h" #include "hw/isa/isa.h" -#include "qemu/error-report.h" -#include "qemu/timer.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" -#include "hw/block/block.h" -#include "sysemu/block-backend.h" -#include "qapi/error.h" -#include "qemu/cutils.h" -#include "sysemu/replay.h" - #include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "trace.h" From patchwork Mon Feb 20 09:13:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655061 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294883wrc; Mon, 20 Feb 2023 01:25:11 -0800 (PST) X-Google-Smtp-Source: AK7set/WBvBzaRf+X4ZPpRIfXTRJ0Crng9eyAH2PwDR4XWcRVlrfPZgABIc+l7F3C9V6PxgYgF8e X-Received: by 2002:ac8:7d84:0:b0:3b6:30dd:d472 with SMTP id c4-20020ac87d84000000b003b630ddd472mr12443661qtd.44.1676885111658; Mon, 20 Feb 2023 01:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885111; cv=none; d=google.com; s=arc-20160816; b=w1KEp/NkpmMPXIIde4o0iQG1oSH48/9vR8g1+RybUVY38TJJimDFufd8j0zAXaCCpq pCadUlpamWKYNsM2k3FKM6xDmUWLyrdCq3JOM0/xKqmt8HB3sVyCuxG8A+aQZl0MPQTF NIM3E54k1oB5Uv9MNMtctTJ15lwkQ9BfEro5pI93KmS3zcQ5VZsinKWosjAwcd8pPzOf zK2G98Y7RVOZNfr85SIGO2Y7InsTCTcJXXOiWgIFLJPVuFkMSHizAgNKdVAXoTlPcSqt DOWf6nf1AuNT64VFV2cUfIemN2w3xlzOsUTBZeg3lIzh4vHLSoE6D1Bb6vPdPsuCuL16 9geQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=r//GjvG9SZ4Cd1zpoXUWSWUu9OhfYFMb2qScch9w/TxrHBZykjCG/nBOQ8ODqlY4+E /1CPIImmo8gYPd494qlRqsYqsw7PGu2qk7RsRnUhJSLA90Ds7dc4GAjjp1ttVfARyN8k p0jUsCRtUFkbByIqbu1FZh3rsLQ5jgp4LCDA0nglbJ6nI6Vzp+z2M2Aw4oPTMQT/w+Jv 8kP4XGWo8jKaadk/F8JHGc7H3jls3Ox5YwCa0K9ailF7Miu7+mqAm4OoxLTB+ggXiCK6 xmHIp58kNkJTZ9qjIArQXDihuhXzjNa09Z6aKiPBi/iJvrzoghBpveVHL4f/ryMZ8fne kIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMKuljpn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o19-20020a05622a139300b003b63c88761esi9955132qtk.700.2023.02.20.01.25.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:25:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMKuljpn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2IU-0001aS-LZ; Mon, 20 Feb 2023 04:17:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Gt-0007AR-Vp for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:44 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gs-0003t0-6p for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:43 -0500 Received: by mail-wr1-x436.google.com with SMTP id b10so1930649wrx.11 for ; Mon, 20 Feb 2023 01:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=iMKuljpnZBJ7a/EDsmZR4NisF1RKjfx4bI6aAVBclwO6/ZEGdJ2XasXkRfdhlE3Tmi TWWM4iXx96COyPQZLyTeMeVj5R35MlqIgPGc3S68NtjLqUrEiCk0/A5af9w+51UWlHwl jO45PJK99CbH5QdiMz3GDKxHXMlyFOg+hzK6rk+O3FOlOR3hLbz3h6SX0oh1aygo8HE7 cLhFpqSypDd8KPG38NXtCtvm5fIJ2eOqcRC8BLltwCHokiaTaqH5cMxPLTtJqWEYXeIN Vf1MRk57fSsr5wxDGKPwJc6/6pjM+TfxrPx05v+P/rg5PoxhQMOG5/73ryeOmze3gXG7 s2Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4M2DzovwtGl/lACfMl2//Pyf/dMcjW1q/+QzA0NgGAA=; b=f/xq8+WIaWZQZW4DXFWiXTNgrboJCtThn7kVb1peZTW4a/RpBpk0lxgt8hbWbMHfK8 7SUAtU92pFhsgEEWrvrFXQNH7JTAim0NqSJV8Ny4/XtS0omYARltIVyK8jftckpBQeIf 45KeinHP9V/BflFoMf7b2LjuP7FA4pvCI8gjULwhDm23qBAV+qf6WchFQEnoT+bSYbSt kaK1pzcOXxaPOBCB+yHo3bhRQojV2Irh7idZxJh25iX37aKiW4oMxuhND+iZDYFPOISZ fws9ZrC9WNp/imgd3CUS+S9fcreIyrF90o/jOizwqDxsqFEuSRs4ZKzdjq1HfKJ/0TEY J1XA== X-Gm-Message-State: AO0yUKUIx/MpdnU1TZU4GoQFAVR8BfzvISYX//i+vO8om4xXrFgDvrZ+ vJ3IsonRBC6vTTIcbTu+K7A/fPLZMFBcfXLY X-Received: by 2002:adf:e255:0:b0:2c5:52ef:61c5 with SMTP id bl21-20020adfe255000000b002c552ef61c5mr137090wrb.41.1676884541203; Mon, 20 Feb 2023 01:15:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x17-20020adff651000000b002c563b124basm1028706wrp.103.2023.02.20.01.15.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, Bernhard Beschow , =?utf-8?q?Philip?= =?utf-8?q?pe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 20/24] hw/ide/pci: Unexport bmdma_active_if() Date: Mon, 20 Feb 2023 10:13:54 +0100 Message-Id: <20230220091358.17038-21-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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 = { .endianness = DEVICE_LITTLE_ENDIAN, }; +static IDEState *bmdma_active_if(BMDMAState *bmdma) +{ + assert(bmdma->bus->retry_unit != (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]; }; -static inline IDEState *bmdma_active_if(BMDMAState *bmdma) -{ - assert(bmdma->bus->retry_unit != (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; From patchwork Mon Feb 20 09:13:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655054 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1293030wrc; Mon, 20 Feb 2023 01:19:34 -0800 (PST) X-Google-Smtp-Source: AK7set9F5SPD/fHiZ5yEy0MZAU4HD3ZYuz4D+SufV8W+EV75jPxojlyuijtPpQCLorXp5NoqGqH7 X-Received: by 2002:ac8:5901:0:b0:3b8:6ae9:b104 with SMTP id 1-20020ac85901000000b003b86ae9b104mr1225672qty.17.1676884774757; Mon, 20 Feb 2023 01:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676884774; cv=none; d=google.com; s=arc-20160816; b=oPi+TQITyL7eXSuL03VGXmOQnJBZ2OqDIqTXVQ+zKWZsc9NS9jTWIM2QNszW2dRlyA s/kGgvCTAv+VH76fsFR401SrxLBXT4EiGEcUn7qo+L7WGoi6IVGgJEGKQAcYab/AWaj5 XGIZZbGSXojMpkuyBXdoXEY/89VZ0+13AOAjPEYjUaevUohOx6LaQTqHu0OL6ryTAdcD IWYvFieAQt77Y6bXmaYW12WQdi8s+H7BL6t8h05wv0zKFPe/xUUY+BP6fIhBaxXALpZ/ aMaMM42C+68QBHNkLTCXf12KSHHRDhy5Fpknm6Kl8d/viwgLVFoatSlEbFXT1rDfbARS QFAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=zlBtZAUj6RL7hku6nuHVgQUWuRLQ/lcTvZshbnHOAlhoToaMJOgubX5LMuwtRjyz0M FJJftRwgKd3TgZmMY+/WUcolIOxCU7yZSFZgnWH56oD7sQzWDiB2rt+DB5CmyIIsrsZ1 +kbwesEBhGJKWq72FCdni9i9Ev7CQ3CvF9/DOR/g8unR6tuXdqXb7gybq4uzsY9UnkTm UrAjth/tuaYvM6tkKvGenymdpuEIgEV9GlMi/wicJUwK9/WgT1VIW5ZteZeK7CbiVkm3 VnXsTXGMLZ3UPMGqYAHqf7kmaMS10FDyQ6WpLkM6B9Yf0yWnokSimOZWEP3K6SJgqjOj uRzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbSyiQnY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h12-20020a05620a284c00b006fec2c77e8fsi9821430qkp.481.2023.02.20.01.19.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:19:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbSyiQnY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2JO-0002ez-70; Mon, 20 Feb 2023 04:18:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H0-0007Fg-5R for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:52 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Gx-0004HM-0u for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:49 -0500 Received: by mail-wr1-x430.google.com with SMTP id v3so259152wrp.2 for ; Mon, 20 Feb 2023 01:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=tbSyiQnYW7uyyr1xu3zTSDiwzYz+kA5vEvAMfnRm3+slVutvwEMeB7+UvXA0Q8YWxm JH6q0PhP9bQOnn4P9qBMgVJulIlV5DGK/Gqg+36Sq+bn4Gd1uqfURpKVojvxj9WVPoae lnhhnjEGRKX17U1Kvl/+wo2zImfXchxgW8jueRl3t8cZ8M+Tup3YehRe9Zba9ExlX1sa W4dI7mPknbSFYOehIjNbH9JAyh7Z+O7UmyxOP1i501BnyXvyHRhRan6dimdGl2Ei360/ N7mmY+SDOl8LgHcmV8skuv8pFKp9WDWwSt762CCeR/QLjjmswTxxlfZCEtLOaeSQ7Zbt zoTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0KdhDKZTpIfdnIsIhU6e7ahfJOkAf9uQWOD0nOAFFM=; b=XH7mTDravODAofeqL5S5sJCjCZt54IbqZ/XE4OCbXMruQNd4P01urfMBQBxezISzK9 a38hRw9lh9W3+wns2/HWJVtl3RNUMD7CV/A1gRLz5rpwit3kKNTAzFk1Su/nsze0p4I9 YEjVUPyWjuPgmVA1zVB6IWT5cqYWUt2HYBidWF+MBipaWH0fhLE3D20heF9h/j6UY9ly KSqL/iYSUL10crvX4aC/3EJN5GYGyQp4lJKvs1PxNndegIXEk8gvGKVvKMVau8c9bM3f qguWJJM4gAZjXZ/gGo0yQ6PSC4IQ9dNMizRqRu/zckicDQeifLrO/Cyb32n1VTUykmdt OAdA== X-Gm-Message-State: AO0yUKWn403XhDACqxBAXp5AdgCUptdMV4tyRvrU3lE24iiBmZhq/n5H Yg+AXxOk4A5T5Y+LKHlPc6xoa2LZUsLoPf2C X-Received: by 2002:a5d:66c5:0:b0:2bf:ee7d:5369 with SMTP id k5-20020a5d66c5000000b002bfee7d5369mr949275wrw.59.1676884546169; Mon, 20 Feb 2023 01:15:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w18-20020a5d6092000000b002c6d0462163sm3253711wrt.100.2023.02.20.01.15.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 21/24] hw/ide/piix: Remove unused includes Date: Mon, 20 Feb 2023 10:13:55 +0100 Message-Id: <20230220091358.17038-22-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-19-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index fc44c261cc..5b1455e232 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -28,14 +28,9 @@ */ #include "qemu/osdep.h" -#include "hw/pci/pci.h" #include "migration/vmstate.h" #include "qapi/error.h" -#include "qemu/module.h" -#include "sysemu/block-backend.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" - +#include "hw/pci/pci.h" #include "hw/ide/piix.h" #include "hw/ide/pci.h" #include "hw/ide/isa.h" From patchwork Mon Feb 20 09:13:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655059 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294700wrc; Mon, 20 Feb 2023 01:24:40 -0800 (PST) X-Google-Smtp-Source: AK7set/6dTuP4EO9lg6lYKK1Eq10lrGPadEDK9GFfzamNKLEvR4B5ObXRsRtKvumrrUCJFHuFWVN X-Received: by 2002:a05:622a:1212:b0:3b8:5057:3776 with SMTP id y18-20020a05622a121200b003b850573776mr14747430qtx.13.1676885080706; Mon, 20 Feb 2023 01:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885080; cv=none; d=google.com; s=arc-20160816; b=ygAKm2Trikwff9MbC9pJkns6JdxaQR0trGq/WHebI5ElQeTqTBkjE2c0PobaHT/YRT EC9Ajsj/RttCBdFPX2YEd3mS64lxLZ005+jyrTGJyj5li+2rMDKajB7wPNKY/gr0HjX0 mnQYP8/xPJXdlOyiPwl/LW7YnDoKIx+7pSDYZ0PxSKzvq0kVTTKfNmMBWN4IDqCSzwh2 bkrceLD8o6Fz0tQIVI83fjYZ6EFBe/XegFkq0psMhelRdLGI72s24hQgWmzxRPKFESEZ 9I0meUouvfIwL0LHKNDLLlamhkyX9muR28QxTCozYF+E40NdbqPvfyxLSy8bX2svwlGd KtzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=OHTWA2lN6Gtym366T6duvZkOSXB+HrGOuA2SQUhny0FDuGj/+Ygz5WqLqQAmzZWmR2 Kryxc8q+vQEQ3UvDJGbMduRnAKIihX3J7yrw6TUVN8XYhAuzvKdFEczWLmysz+r+xN+i odAZmMPth+rQ1k2QCKbWz+NqmMltK7lc65YZEnADFFPvtgTN7iwk+IH5t/EKjn33SiAI bOGhVpfqu5EGHO/x6mJgf3lLJ3NUyv/V2XZZQAYx6QQgduZZQb3oqMMeUIakF/IpRfyp NJYomkQMEvLyteKz32CkGEDeS4pPh+hv28mc4lQvP8AZqnFWpkqXyfiBdfRISgKuzVpv 9avQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/O7waE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j7-20020a05622a038700b003bd013dc765si9730259qtx.102.2023.02.20.01.24.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:24:40 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/O7waE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Hn-0000SZ-BY; Mon, 20 Feb 2023 04:16:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H3-0007K0-QL for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:54 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2H1-0003s6-UQ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:53 -0500 Received: by mail-wr1-x434.google.com with SMTP id c5so1027793wrr.5 for ; Mon, 20 Feb 2023 01:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=fd/O7waEqStVVMsRHrOf5+NtZVlvPNKiHVweW33qIRYx30+9GnXhs90IGgj9YsE5yF k0hYsmUsLENpZhfeBJTAGLy2K1u/PJ6dEjBz6TWvfRjg/7L7xey3VVMfdME6UhEo3RHY HCheWGrEdA8gdTw2BADuJ95qPjrRUbxRKY+ced1XHRDUPE+2iTrAP5jrebl/JEKX6Qdg g28X2/sFCpJ/8OGhc5+6qQcGWW7m504f2+kZf6Z6lbpK0vL2Tz1Z6WzbOat7rbr+z4Zl stYrF0ByRDAtt5Uo4e7uxembIVpvhYkiYHIgfZKKrFog8nqGnErbBm1PHRSqouh7dM/0 q4Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OKzBr2qnyWx4EHsQiRdE7a+Dj3wNarZUSazoPOYlSfI=; b=tiSp0au9fpPvC4TFhgAsgQ8Cm/mtlEir6XSxr9TqhyGjl2aUus3V/4gkSu+TBdo377 nlKxjS2EM96RMM9coUtKVpe8B65L1FJG/WVNW9m2wb/UL9NXWpkk8aCnBTO3z/XPf4Si pZt4GQw2huHhtB1Wf/3k7FQs7MKQTgQNPGcDDJAngkQ+Hh9upKlh+bq8Ow3nlBnmB9LN j1HLqdXVasHA7JgawzxPAJON74hYdHyez9esY2ouGQkwcOVWvDzpwJFuZJAxBgRsOzc3 ETjnQ0nA6DFbojVOjCHTVbw0uvv8IfXPDKBPhmFj/A5O2HkN769Thl4+bArPTJvttkZ1 uwgA== X-Gm-Message-State: AO0yUKURvVWgg1mVGggLuPnSAvDwC95t9dgwM9Ud65d2xFUTtJW4Q7I3 ZvouZuh6nKZnWCyczCdkQ3Cde5E0HKXhgr+2 X-Received: by 2002:a5d:5607:0:b0:2c3:dc42:525d with SMTP id l7-20020a5d5607000000b002c3dc42525dmr1841452wrv.36.1676884551066; Mon, 20 Feb 2023 01:15:51 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t14-20020adfe10e000000b002c56af32e8csm3265644wrz.35.2023.02.20.01.15.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 22/24] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Date: Mon, 20 Feb 2023 10:13:56 +0100 Message-Id: <20230220091358.17038-23-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-20-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 5b1455e232..b74f1c77c4 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -122,7 +122,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } -static int pci_piix_init_ports(PCIIDEState *d) +static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) { static const struct { int iobase; @@ -139,7 +139,9 @@ static int pci_piix_init_ports(PCIIDEState *d) ret = ide_bus_init_ioport_isa(&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)); @@ -149,14 +151,13 @@ static int pci_piix_init_ports(PCIIDEState *d) ide_bus_register_restart_cb(&d->bus[i]); } - return 0; + return true; } static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) { PCIIDEState *d = PCI_IDE(dev); uint8_t *pci_conf = dev->config; - int rc; pci_conf[PCI_CLASS_PROG] = 0x80; // legacy ATA mode @@ -165,10 +166,8 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - rc = 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; } } From patchwork Mon Feb 20 09:13:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655065 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1296486wrc; Mon, 20 Feb 2023 01:29:50 -0800 (PST) X-Google-Smtp-Source: AK7set8HdN4EPdD/FUu5Wf1TMSzimN1E2ldfP6VquW8UZZCfvjx3rZLsfZp4XAW2K3TUL/dq8Kc0 X-Received: by 2002:a05:622a:494:b0:3b8:6ae9:b108 with SMTP id p20-20020a05622a049400b003b86ae9b108mr15041238qtx.27.1676885390292; Mon, 20 Feb 2023 01:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885390; cv=none; d=google.com; s=arc-20160816; b=MTSdhVYmU4P5zks1H+QmHpUYZIbMCMCATOoH9Tfrop0Y6zWUJDCRef0QDBC0U1I9JP BEuMvpsHAqLUAaSsMabOrbx4C0apLd1wlQennPLRM8CYCvaqSg0YoAwrW8cZhRuzqsV3 IdI6fuzXnLklw6jKYU6y62a+7MApSUEAPXHxQ4ALU1b2gVNflg5hHl5mGLCEMTF0o9KL 3riJDAE+XJhwmUGeWevO7mvzYYdXTZ3SwcAMJfK3bWc6TGHxvwzxSVYVmuFxM8REI8p6 u8JLdmpfY3Y7glDK27Q0BEXotYDLB3sWFbBhCwWsckNGOEsARP6qZiiBAmMKWBvKkGkO ovJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=xBp+vgE/Ssj0AhdQa1xnPiCDssmJTzyJ8sW7ptS7/zI5qX+DvPvl/fKfa6TgWpwdjd 7zYV5qTKNONgFoQNf2VyMwJ2lIRmaFXJX3YhyqHJs7fs5qhq9ewFmlvDn0wn1kDUXeg5 51IwhO9KaN6qQvUJ4e68pIOAT5WMOCzElFF/p6AvMCNtXXhxyR4TKoMJmkGYsBLgRlUG 8raDJt+FStAtmMjFaE5Xm0h/95m0Km1AJ6b4R9FQjpEpvTnmV/VIAtr+mdCNBEN7cu2m LqdVpSSwpsF/ruzB+UhB4eBhqcMuD1duAx3RdyucDO2Z0Zhp3nSYoJu//28BCgQZ0vVG e2sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PfUnD/Ir"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c29-20020a0ca9dd000000b0054ace222c06si1666529qvb.589.2023.02.20.01.29.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:29:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PfUnD/Ir"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Ir-00020F-IV; Mon, 20 Feb 2023 04:17:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2H9-0007Y6-Bg for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:00 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2H7-0004MI-HV for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:59 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg28so405092wmb.0 for ; Mon, 20 Feb 2023 01:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=PfUnD/IrABYau0XaQ92dv/4sRwiEfhCSs655lVSoDxgLHNT7XuxW50lHhSloPVQAtv 1fr80LwL0vJF0J8LuhkP1fPHzoIjiJ1yobgJMG6dEWVib21CiwKZaMe70RgXkuHxeDpt azQBqMKr8HauYTc5jsgx7neLwjcz9qQYokzmb24LcZZpu/KAGsHMQ+p1xnTAXy3csIml 4w5t13Y/eRzHzB98ZC+M4fSKRDYWLQpXx5owL7M3QrUyuhG2HkmF61VHVR5v8fopvOSc 3XylvJJkjgT3byPWzRxAovoGSHn+niHN9rvxn1iXAcpFGVVFoK0/a8I2vX/M01ulBe+c YlUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JkD4ylCUPd/YYTKvkzbI+ReBZ+PYphiYSDNHJcbrxXw=; b=rpQWMYUQZ1QeeQnlzkfjT15hSMquFXlIDWGTlSKktcNLYdhnKxDQevNYoevWJNwTgT Wy68N2ppXNI1HbA0+KqrByIjR4pKnDMPs2eIalX81MZ2id2pv2qWZEP43DGXtBB3Fg+n vA/pwUcN/xS/IXc/PmTbknHjEatV2zqQgZwGp9jyhLsvTruY+Y9StUqR3xW4/T0n4Ju2 7CE/PTT2O29dA2ariFvV5oYYuYHbWr/lrkVBGL3/WOpxfFQdG1j9Ddp5SXTezrkC3ZCe rSlcIJmqwyfP3EN0gTWJnigXLcCKZoev9CdogOYnzMQLumBFA3dk5oS9C7wZuxd3mIc5 +3aQ== X-Gm-Message-State: AO0yUKVqpKC5Q/K8bL3VCYk+U/upytjgEMEwKFfiN1nHmlJp6W3eHdvC T6m0MTtQpDE1hxsik6P3hoOUzprWnjuIk6mB X-Received: by 2002:a05:600c:706:b0:3e2:1368:e3a0 with SMTP id i6-20020a05600c070600b003e21368e3a0mr9518224wmn.18.1676884555970; Mon, 20 Feb 2023 01:15:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a12-20020a05600c224c00b003dc53217e07sm13119110wmm.16.2023.02.20.01.15.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 23/24] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Date: Mon, 20 Feb 2023 10:13:57 +0100 Message-Id: <20230220091358.17038-24-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-21-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b74f1c77c4..acb4eaa27f 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -122,7 +122,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } -static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) +static bool pci_piix_init_bus(PCIIDEState *d, unsigned i, Error **errp) { static const struct { int iobase; @@ -132,24 +132,21 @@ static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) {0x1f0, 0x3f6, 14}, {0x170, 0x376, 15}, }; - int i, ret; + int ret; - for (i = 0; i < 2; i++) { - ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); - ret = ide_bus_init_ioport_isa(&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 = &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 = ide_bus_init_ioport_isa(&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 = &d->bus[i]; + ide_bus_register_restart_cb(&d->bus[i]); return true; } @@ -166,8 +163,10 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - if (!pci_piix_init_ports(d, errp)) { - return; + for (unsigned i = 0; i < 2; i++) { + if (!pci_piix_init_bus(d, i, errp)) { + return; + } } } From patchwork Mon Feb 20 09:13:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655058 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294592wrc; Mon, 20 Feb 2023 01:24:22 -0800 (PST) X-Google-Smtp-Source: AK7set9UQJ5RWBQkdu0j2T64ch3uUn6xH+5RmgnGBMHvIhfhsLt6VPKehRTZHsuwrwMgJXtxNwFe X-Received: by 2002:ac8:5804:0:b0:3ad:202f:8797 with SMTP id g4-20020ac85804000000b003ad202f8797mr16010774qtg.9.1676885061892; Mon, 20 Feb 2023 01:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885061; cv=none; d=google.com; s=arc-20160816; b=ENDsMAiZdaplnDNZea5koy1pP46s1N++JPuxFeJPlP14vRdFBVBdEne+KbNfNjQBDl XY5bJgv0e4XBXgIaC5shn5JYDyQ6f/sp4TD3w0avKwrr8X3AiP5cJTjtmO8GqvI+MRaj SqnrlOqWU4wOLq5lAqsy49Ko8PMsTm10VB/jJTABW2RrAtsqTSbHCcI6aM9KC8NAQV8T bjXpj1MHgFmHJCYP3vDeWYYRJXa/OREKJ3zo6Rpdoj2zEevPwNBIqcx7467Awx3OFolg 0Xm2uae+Dzxwos1GHkmVETkL1m9cECV0NCBhoENnS7PtdRjWVu26guKcJI/c1rBcdbQ+ Otqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=DqgyJjExoNfAt6koBNZxUm6OQ5rnqewMvNxwdANwAtgTizMoAVQm6lWpzGu4QeVFf+ 8NW+TshxVKx4o5pO1CLEajbSFHnTvF3J53NADpnv79FDsSJnVVZPwjrFoY1uUBUi/z3k GdFsTUx7bl1Uqp2LSqucdBf2+x9+nd2Zk1FKzx5h8E7vT/HIGOGWVDVw7heVNB/EiqyF IZ2Z0jDVVacpbNlC7remzWx4q0z737lV5gs0z4bJWgyzuBsznyIUWu43/ejc2ZqUI066 Ozl+5f96VTOQew0kdGosC5VMDb0CK5zq0vnZ8u1a+HfSMbkYlCXzrcwZols1Oi/ypC69 NYHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X9HI8cuK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 11-20020a370c0b000000b0072721ecb3e5si8928445qkm.410.2023.02.20.01.24.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:24:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X9HI8cuK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Js-00046m-Cn; Mon, 20 Feb 2023 04:18:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2HF-0007hB-2H for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:05 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2HC-0004NF-Ia for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:16:04 -0500 Received: by mail-wm1-x32d.google.com with SMTP id k14-20020a05600c1c8e00b003e22107b7ccso511826wms.0 for ; Mon, 20 Feb 2023 01:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=X9HI8cuKVoc6cu7Gy/gd0haTMRShy2N0X6gMidIQHR+XvCNefLGAOjD2DoeYj6tURQ SuH5B2BqI9h3Yncex8mygXrjRLxzVGKJK1uaxwS3C+/EOAQZntxDApkjaBy2+kFm3zuY 6tgr8/NeeTG8RfYV4LD+hUK/EvRctLyFUj6w2dICzyrce0LbbrF/IJ57iHPdjR+4b+gk SGFuFwSj6x5YmUW3yKsojCUJt3F4bwIxuvY2Sg1O7AYGqSgFEBN3oqCrM+8FCrar7Z1Z vJGM2kOTRw1Xmkun6xa+K3Hxdo7VqSAZJicduCAxIq9p6H8+B+jkuiuBijw50TEAIZBq lvjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jeXuk3DN5Mx4yuY9/PXaV3cLllgNC2UqEL9auJG1ah4=; b=bQvUQPikuSoy+vh+r3tbYEP6sBKYhu6PDNcKm5hId6RdWi5op0aUiCbsSisIMYuSn9 kjDDymrOO7SX3NzXeWIdEuex8oPPtAXJ/b65V/8vg2deHES6UPmZjZCjQs6zmlSh31bV gAju1AdbYsOZzVv9ASG/Kyf7xNa+3F1cSyXaBjSP/tJXKZwM8SS3a/Ec7zgnwfUoc+F5 bMb1EI7c2xXlekL+dSLv38RKXVfRT7v12SSMX5PYq+UQfw50xWTyKbHhgC7IW/UOL4Vp WJX0C63UVfd9A1g1fHE6L5NRKJM6ebmAzOiW0kUhOkmglCOzJhW+5RRYR58bpfKa5JH4 Q/iQ== X-Gm-Message-State: AO0yUKX4E/fjCWeqqgYVsHx6tyZXEflUinwdAbWv28OzeVB2L/XTe0Za xiuAwn2BNUIqN2uV7uWDbH4Wy4Gp2x80eU3T X-Received: by 2002:a05:600c:984:b0:3e1:fff7:e970 with SMTP id w4-20020a05600c098400b003e1fff7e970mr82721wmp.30.1676884560915; Mon, 20 Feb 2023 01:16:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n9-20020a05600c500900b003daffc2ecdesm9573572wmr.13.2023.02.20.01.15.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:16:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, Fiona Ebner , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PATCH v2 24/24] hw/ide/ahci: trace ncq write command as write instead of read Date: Mon, 20 Feb 2023 10:13:58 +0100 Message-Id: <20230220091358.17038-25-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Fiona Ebner Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: Fiona Ebner Reviewed-by: Alex Bennée Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230217103130.42077-1-f.ebner@proxmox.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 4 ++-- hw/ide/trace-events | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d79b70d8c5..55902e1df7 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1086,8 +1086,8 @@ static void execute_ncq_command(NCQTransferState *ncq_tfs) ncq_cb, ncq_tfs); break; case WRITE_FPDMA_QUEUED: - trace_execute_ncq_command_read(ad->hba, port, ncq_tfs->tag, - ncq_tfs->sector_count, ncq_tfs->lba); + trace_execute_ncq_command_write(ad->hba, port, ncq_tfs->tag, + ncq_tfs->sector_count, ncq_tfs->lba); dma_acct_start(ide_state->blk, &ncq_tfs->acct, &ncq_tfs->sglist, BLOCK_ACCT_WRITE); ncq_tfs->aiocb = dma_blk_write(ide_state->blk, &ncq_tfs->sglist, diff --git a/hw/ide/trace-events b/hw/ide/trace-events index a394c05710..57042cafdd 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -91,6 +91,7 @@ ahci_populate_sglist_short_map(void *s, int port) "ahci(%p)[%d]: mapped less tha ahci_populate_sglist_bad_offset(void *s, int port, int off_idx, int64_t off_pos) "ahci(%p)[%d]: Incorrect offset! off_idx: %d, off_pos: %"PRId64 ncq_finish(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:%d]: NCQ transfer finished" execute_ncq_command_read(void *s, int port, uint8_t tag, int count, int64_t lba) "ahci(%p)[%d][tag:%d]: NCQ reading %d sectors from LBA %"PRId64 +execute_ncq_command_write(void *s, int port, uint8_t tag, int count, int64_t lba) "ahci(%p)[%d][tag:%d]: NCQ writing %d sectors to LBA %"PRId64 execute_ncq_command_unsup(void *s, int port, uint8_t tag, uint8_t cmd) "ahci(%p)[%d][tag:%d]: error: unsupported NCQ command (0x%02x) received" process_ncq_command_mismatch(void *s, int port, uint8_t tag, uint8_t slot) "ahci(%p)[%d][tag:%d]: Warning: NCQ slot (%d) did not match the given tag" process_ncq_command_aux(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:%d]: Warn: Attempt to use NCQ auxiliary fields"