From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047133; cv=none; d=zohomail.com; s=zohoarc; b=OuvBttYcmV9aQIf/L4MvbqjB6qZfDjsluo+of9QUMuzVo2tTOMTjJ0zU1E8Fa2iF7srzn8IoIukyIkc+Z7J+Gm1IxdvmiWjY/fwaTGFL5u7d95iZIk8a076Ha2jjcPo+mp0M8WmLuXqPgb7GsFK02xtNboTROd2ShkZqizm1mKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047133; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9wz1BonRBA4qQZKRmLhECiyYteaw1n0xGhljex2JkKU=; b=EOn9Ky4JmL+hNdDT4ZlRUkOtkl8uxpQEDTIvKoZDwI59ovUCX/NDOo9U72zyMeKBlDO1cPf81KiTLL2Q9WFA5o4wRONVtdZA1GD25GMdp6X75CebOnkWDoCjrEkKXQZTfnG8eZp83mJuHrKWny0RFvOXxQpuDkA5jea1U0RAmxk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047133460709.5384977056098; Fri, 10 Feb 2023 08:38:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPS-0000Oi-5C; Fri, 10 Feb 2023 11:38: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 1pQWPK-0000OO-9E for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:37:54 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWPI-00008K-G7 for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:37:53 -0500 Received: by mail-wm1-x335.google.com with SMTP id o36so4249824wms.1 for ; Fri, 10 Feb 2023 08:37:52 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n19-20020a05600c3b9300b003daf7721bb3sm9399325wms.12.2023.02.10.08.37.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:37: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=9wz1BonRBA4qQZKRmLhECiyYteaw1n0xGhljex2JkKU=; b=iNaBr1JtiKBuEPP9K33XyQEly/Bh6gg3B0lqoU27fmR9rHb2x0926RKsHnI8dWPFRY ZsySQhqZraW52yu7HCr2uDMeC4vHD+sMEH4cFtDR2qCf1mwAwHhwHPAj9meLzqiMdOdo 4nUDdwxyUWmZS0JWMDCP5C0It0PT+xtxH5gtGnvCMzgVS4T6oWafkIY0xx2CGEo9j9pW E5NgLOGLFMe//W5kyfIWifdk5JI112fqJPmiMBMAFBDQSbA+dK7NFHIf8l8WRKGU9Mdb L/T6TGGNLND0T8koDv1Z0TSHcoEIpWgjOJ+0HgV4BkmWe4lek/6dTS5oC81c12zoE/fH bhbA== 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=9wz1BonRBA4qQZKRmLhECiyYteaw1n0xGhljex2JkKU=; b=7i8JoKZN08w51AcFGfBnofrskCHeoAjD+Tcqx+s8aRB8DnZRGkHndPEG/mIjnZYF3R INphokFIz1Kj24y9W4jwNTitWKDTK7LNv+wjHgGcQnct8bfU7kiuwrHf1r7MGqdUyR2O wHEHTujwvsWOtalkQ3yJpud/DC7A2r6lFxxN2n58wAAnJFczveBLmZAgf/P5+z7ZzTMd 6ULNHa3CGiXkvvz9RRUAvm6PNfb9X/2TZa6bWG+WHhSO8wYYTKgZjlmSKALwKTBZlaRx SxTsUXxIVnd0Kq+s9imOC3rLyOFkKmcppFMDIQ4p5hGFrX0nx/m1hN8P4yrvPvemy/DD HlCQ== X-Gm-Message-State: AO0yUKWhot7TGKOkwwLsAqFMJMGMoxXes096kqBwmDNff/pICC6AuF4H 11253h9WvdwOTeoRRhJa6/sa9VD/JI+7DvIJ X-Google-Smtp-Source: AK7set8svLAEe0K82s5i/+b2Oldxnb9NR1kM+cDADv8a6EZLVgmDRVwe0QSG7cGIC2ixLD2UK4XN9w== X-Received: by 2002:a05:600c:3420:b0:3dc:4548:abe6 with SMTP id y32-20020a05600c342000b003dc4548abe6mr13354159wmp.12.1676047071696; Fri, 10 Feb 2023 08:37:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Paolo Bonzini Subject: [PATCH 01/11] hw/intc/i8259: Document i8259_init() Date: Fri, 10 Feb 2023 17:37:34 +0100 Message-Id: <20230210163744.32182-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047135016100005 i8259_init() helper creates a i8259 device on an ISA bus, connects its IRQ output to the parent's input IRQ, and returns an array of 16 ISA input IRQs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/intc/i8259.c | 4 ++-- include/hw/intc/i8259.h | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index 0261f087b2..17910f3bcb 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -406,7 +406,7 @@ static void pic_realize(DeviceState *dev, Error **errp) pc->parent_realize(dev, errp); } =20 -qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq) +qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in) { qemu_irq *irq_set; DeviceState *dev; @@ -418,7 +418,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq) isadev =3D i8259_init_chip(TYPE_I8259, bus, true); dev =3D DEVICE(isadev); =20 - qdev_connect_gpio_out(dev, 0, parent_irq); + qdev_connect_gpio_out(dev, 0, parent_irq_in); for (i =3D 0 ; i < 8; i++) { irq_set[i] =3D qdev_get_gpio_in(dev, i); } diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h index a0e34dd990..c412575775 100644 --- a/include/hw/intc/i8259.h +++ b/include/hw/intc/i8259.h @@ -4,7 +4,15 @@ /* i8259.c */ =20 extern PICCommonState *isa_pic; -qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq); + +/* + * i8259_init() + * + * Create a i8259 device on an ISA @bus, + * connect its output to @parent_irq_in, + * return an (allocated) array of 16 input IRQs. + */ +qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in); qemu_irq *kvm_i8259_init(ISABus *bus); int pic_get_output(PICCommonState *s); int pic_read_irq(PICCommonState *s); --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047108; cv=none; d=zohomail.com; s=zohoarc; b=S0KR/v/u2gpVkhw04KAMxux4OW2BxWrMJUyZP4DENPdxKkZXG/IdmYysz5k4un+o0lFEzjIMwHYscJfA9DDJPyvbYAArpdHTo4w6CCOQbdQxbuEOBsSssiKy1xP+2XaN5Y0eOs+RtnvwDCRdhSP6750ux7JnUrtpXCLkOsnL2Jg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047108; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xNlUpknHvw0osLPPGBJk+hOEoEjuFtxnaLdXgn2w/R4=; b=L5SSSIX3wsMAuieV1jpUEPJqHmmRHDSwjq16PqTsN4emrYzMtXVEMiZA3I9kUmTQYX3Qo5FCdXoNTZVeIm9NUmbi074YHbo+2TaK29qawcNop8R55T1vL0nFLtYToS5HFLfj4esnz+i2tuHBLkldwSHzYW11HMgNHJmo2Zzld5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047108673244.83298273781634; Fri, 10 Feb 2023 08:38:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPU-0000Re-85; Fri, 10 Feb 2023 11:38:04 -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 1pQWPR-0000Ow-Sb for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:02 -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 1pQWPP-0000BB-At for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:01 -0500 Received: by mail-wm1-x330.google.com with SMTP id r18so4223142wmq.5 for ; Fri, 10 Feb 2023 08:37:58 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e19-20020a05600c439300b003dd7edcc960sm5239763wmn.45.2023.02.10.08.37.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:37: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=xNlUpknHvw0osLPPGBJk+hOEoEjuFtxnaLdXgn2w/R4=; b=vX/w/p/6O5JBsyxWOZmL3GOzN+zJsYokWdjeQFcq+omHmB+nnO2CwOcPe/lnzLf5JR jh4cKYI4EMe0vp0LPii0th6alavptAn/nmxKFOsVJJDNN2/WMMrgkYocsKOrutLv+lS5 OgxvCVUBm/gLccdHwl/ZGMwePW8+kmXI+GgQ11eK3bTLa7799y4Qc2dP4FP1dnKGfaYN lwbFiW8tllrc1Dnz7Z2wBJxLqR02Ag/F7DZKOc2xk/ta7gKdgul5FwutsbLMgGIEg5jr Of2E8Mqc8bIGyXJzwaRojEK4kw9fOj1Gc//2gDz8XjV4B20TiOmS6wJgexPnC3SAsrQQ 3mzQ== 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=xNlUpknHvw0osLPPGBJk+hOEoEjuFtxnaLdXgn2w/R4=; b=7R/CBAnT3V1dMe2lJ96aP71zB0JOLB2dB+5kRVJ0P74bTfi+rzRHbiCQwYDd2TVBGh nWVS6mZJvw6+MmrkD8a96VyMujh7GKT8EDscMjsH7vJczwiaEqlpTMEA55z7drGHnSdX 72g+y2IrHfDH8GUm5s7OGmONHxdNatSdi9IdRIXArxRHCbuDQpi7e61MCsdOExujmgyr kHKl8mHX77zWacOxzkNZIpMAefIm8I0eyJO+9EUZPWE/W0Snv9WVmL21E4Us7QDtQp/j VEMygzTJ1+jm8WJsFRR5gmciNzScZQu09Mwq6rZ/KeZWgzfm22t6fyb+C8h6eO7qcu8D 4dFQ== X-Gm-Message-State: AO0yUKV32YhKLkqHqZOEYmK4TW+DlSmYGeJCcfTeUZlrzztgJg4L5Oct OE1IxEypR+21ekOtg6sL1gspXclEjBhlHUdr X-Google-Smtp-Source: AK7set9VqjnlGN54TQsy5YMWW0VR9/8+JTf5DV07UYHZI8TAmvbtAGmOkGLQGGTdS8GGQwCmhn1Hjw== X-Received: by 2002:a05:600c:81b:b0:3c6:e63e:23e9 with SMTP id k27-20020a05600c081b00b003c6e63e23e9mr16782869wmp.24.1676047076763; Fri, 10 Feb 2023 08:37:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [PATCH 02/11] hw/isa/i82378: Rename output IRQ as 'cpu_intr' Date: Fri, 10 Feb 2023 17:37:35 +0100 Message-Id: <20230210163744.32182-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047111563100003 Commit a04ff94097 ("prep: Add i82378 PCI-to-ISA bridge emulation") aimed to model the 2 output IRQs: CPU intr and NMI. Commit 5039d6e235 ("i8257: remove cpu_request_exit irq") removed the NMI IRQ. Since this model only use the CPU interrupt, replace the 'out[2]' array by a single 'cpu_intr'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/isa/i82378.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index e3322e03bf..84ce761f5f 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -32,7 +32,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(I82378State, I82378) struct I82378State { PCIDevice parent_obj; =20 - qemu_irq out[2]; + qemu_irq cpu_intr; qemu_irq *i8259; MemoryRegion io; }; @@ -50,7 +50,7 @@ static const VMStateDescription vmstate_i82378 =3D { static void i82378_request_out0_irq(void *opaque, int irq, int level) { I82378State *s =3D opaque; - qemu_set_irq(s->out[0], level); + qemu_set_irq(s->cpu_intr, level); } =20 static void i82378_request_pic_irq(void *opaque, int irq, int level) @@ -113,7 +113,7 @@ static void i82378_init(Object *obj) DeviceState *dev =3D DEVICE(obj); I82378State *s =3D I82378(obj); =20 - qdev_init_gpio_out(dev, s->out, 1); + qdev_init_gpio_out(dev, &s->cpu_intr, 1); qdev_init_gpio_in(dev, i82378_request_pic_irq, 16); } =20 --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047187; cv=none; d=zohomail.com; s=zohoarc; b=XIAgJf2Q+lcZL/hB29log1CzU1xWkCHNUGaSgmgjbPK2qvZjmW3zPTKCAojpK4cNR+v2PbvCijWjfFVGLvk/tVO5aVhtNMCPgqLpVp/NtqiUWkwiK+v3BKEtgLKZGhakxeusObMM8GfDrnwliE+4Gcv/GJVv4rMzDJWWN6gBUAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047187; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=a2K/4sNW5W4Rl4jasLMZHv15T8ERXUsmy69mOw2i5LA=; b=Ovpm/bQGmcpKj9dXRc89cT/sdcUdMYzOcZOTiX3OJ+h76s69QvquWRLWkv30TxamZ+T/jysMHJG8oGzISY7+H9spXpDc+vlMvhFK3BKo5ZlIzMt8/qG/8zcs9f40IbcrcXl9gSC6coDOWQzscRL/q85vE19priQIOSROo+n+mOE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047187146934.7735858045577; Fri, 10 Feb 2023 08:39:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPY-0000TE-6I; Fri, 10 Feb 2023 11:38:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQWPV-0000Ss-Qw for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:06 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWPT-0000Em-Ht for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:05 -0500 Received: by mail-wm1-x32b.google.com with SMTP id f23-20020a05600c491700b003dff4480a17so5666027wmp.1 for ; Fri, 10 Feb 2023 08:38:03 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l4-20020a7bc444000000b003d9fba3c7a4sm8034390wmi.16.2023.02.10.08.38.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a2K/4sNW5W4Rl4jasLMZHv15T8ERXUsmy69mOw2i5LA=; b=u9nXTa6mcNBWa1ZNMJ3Io03hGIfjuQdBPU/OS7at8pCfnBCn03BYXbv+fvkwtFEgpi TQIkVF3rwcyU3FCDBB301p5z16i/W6wQ5bWCLTO8K0UBulc/jjZK8kTTC8qOuPHFUON5 OObA+gqBzNWmykBvIGywMWRv1Xvicvl/U+iV6yVwmP9zTej6hnZ+q4nQ/3dEGrPosEFm Olu8jI8zND7DaSB+ddvjINv8nWMm34H7yHGFhVgsGERj+XbpKEDPEycPiZ5J1vTnJHCT Od2xGw+nx9lF0W1Mx29MkOdBsMrurxWC7N4xO5slwujcFfZN/kr4S++HU++ElcQOdfKt IxWg== 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=a2K/4sNW5W4Rl4jasLMZHv15T8ERXUsmy69mOw2i5LA=; b=shuBDieX3VLlXTTn8d0PtcipAxCv+JkyCave5i4Vi6uMIPE8xD5U5P3uVZ7IG+/MEz C5qxXtpsdkBIRag+2uucoCUrYcSrAbqJdNIuuIr/xL8l368ghSOyFvgLh4Rg4V9s7jjh P6sYVGygQmK8KHutduBjJ8+ilmhpzMc+sWvi3lB+BGOGFk1h2QV0LOllIrTgxFNV5oyr YJsTIX51QUelKn/+iAGxzjRu3biGtRN+asWhZrBbSmj6e5o/giQMYsm73xvOsCQn59dW ciHErHIsM28JsLehNKQooxjE/YQVh8PGSFa2CRjbUCdVIst3Pz5rJxZdsqNH6cj49aRW 4paw== X-Gm-Message-State: AO0yUKUp7MKYQusynrMGcLgXYzayvqUOCRwyR3u4FbwlNejFd/fbCZCT bUi96I/0c+thTI5K5FPUZTGuSF2IKm7/6dRE X-Google-Smtp-Source: AK7set+jkHbooGoA0SnTVYj6Ei/T5SAhC4Ng1BmHTM6y53kWVf9C3pFyawBR3pIPSSNbWJ6Mw01bAg== X-Received: by 2002:a05:600c:4910:b0:3dc:440f:8e9d with SMTP id f16-20020a05600c491000b003dc440f8e9dmr13754005wmp.0.1676047082115; Fri, 10 Feb 2023 08:38:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [PATCH 03/11] hw/isa/i82378: Remove intermediate IRQ forwarder Date: Fri, 10 Feb 2023 17:37:36 +0100 Message-Id: <20230210163744.32182-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047189237100011 From: Philippe Mathieu-Daud=C3=A9 When the i82378 model was added in commit a04ff940974 ("prep: Add i82378 PCI-to-ISA bridge emulation") the i8259 model was not yet QOM'ified. This happened later in commit 747c70af78f ("i8259: Convert to qdev"). Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate i82378_request_out0_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/isa/i82378.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index 84ce761f5f..d32653369d 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -33,7 +33,7 @@ struct I82378State { PCIDevice parent_obj; =20 qemu_irq cpu_intr; - qemu_irq *i8259; + qemu_irq *isa_irqs_in; MemoryRegion io; }; =20 @@ -47,18 +47,12 @@ static const VMStateDescription vmstate_i82378 =3D { }, }; =20 -static void i82378_request_out0_irq(void *opaque, int irq, int level) -{ - I82378State *s =3D opaque; - qemu_set_irq(s->cpu_intr, level); -} - static void i82378_request_pic_irq(void *opaque, int irq, int level) { DeviceState *dev =3D opaque; I82378State *s =3D I82378(dev); =20 - qemu_set_irq(s->i8259[irq], level); + qemu_set_irq(s->isa_irqs_in[irq], level); } =20 static void i82378_realize(PCIDevice *pci, Error **errp) @@ -94,9 +88,8 @@ static void i82378_realize(PCIDevice *pci, Error **errp) */ =20 /* 2 82C59 (irq) */ - s->i8259 =3D i8259_init(isabus, - qemu_allocate_irq(i82378_request_out0_irq, s, 0)= ); - isa_bus_irqs(isabus, s->i8259); + s->isa_irqs_in =3D i8259_init(isabus, s->cpu_intr); + isa_bus_irqs(isabus, s->isa_irqs_in); =20 /* 1 82C54 (pit) */ pit =3D i8254_pit_init(isabus, 0x40, 0, NULL); --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047167; cv=none; d=zohomail.com; s=zohoarc; b=QKwowxMjQTyFQe4xXiEn2GlNWvqlXi0ycB+Cr/X4jXypJY34Cqxu+hjB8LjkPrjUY8aOL/P5qmVCXzu3BQFwH6Dw/g95dNH8Dh6Eh28x4QeE3ksTnQUpDXzzeBjHGHxWC7s8NnDKrGFFRsv6s5szeusc5eXtdCMnhxBkGKJhmO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047167; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tAEskSQoIREJd0prgZX4+7TZ4EJFCBxdpEPk1pPdPMY=; b=mdnq3Z+H6teSGbka+vgSxS3BVcBev0rLpKEr1HTc1P1pXsupo0FwmuXLOFNKKzfXdncLhDSC/cHkkBSJF+Ogu2Np3xfIPDK9+nWyj7GoG/mJIhvWuK/fEbOXd8TDxx+Tqk/OSZdkSpfb0aQZx5qOu7RmTqSPG6l8rCEpthfeuao= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167604716750285.33778842967354; Fri, 10 Feb 2023 08:39:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPj-0000gt-Hn; Fri, 10 Feb 2023 11:38:19 -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 1pQWPa-0000Y5-KK for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:12 -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 1pQWPY-0000G2-RK for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:10 -0500 Received: by mail-wr1-x436.google.com with SMTP id bu23so5612599wrb.8 for ; Fri, 10 Feb 2023 08:38:08 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p3-20020adff203000000b002c3f6d7d5fesm4086640wro.44.2023.02.10.08.38.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=tAEskSQoIREJd0prgZX4+7TZ4EJFCBxdpEPk1pPdPMY=; b=hEiJbTLU1hRmpzn+EbxZxEEocXV6+FKcv+TMay1NE4ZVuwqoQ4JuIHzBg6nNdts845 idca82N3dnJBIPw6L+sfz4QMPH3IutaKYx7mjgaf9UcFKT9tZ6IHmAiG0rpviHdNGpAT bJwk+0OCayOw7wzOVPrFwWWHMYu/3QkOdg5Ewfnp7I4pQ1WghSTkqYm5nifUokAfgJh7 EnV/RiCW2ivAJihRBEErWG1xV3+pQSSvhaig3Nn4M7dDDBmcGZWa9Y7nGDP1hek3rCz+ H0qJK7IGzX2eke4V6zjKUMXXHCWDppu3x3X+8X0hkgeTt7PSbur0kCNYxulJX8ffglxg q5Zw== 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=tAEskSQoIREJd0prgZX4+7TZ4EJFCBxdpEPk1pPdPMY=; b=y+it0DJYtRa4zcRKWIyxg+lCuB7wneD/AcNCIqbBkGqbqHMI9FhQYJ+IAfS2Wx7Ryj +uynyO//UgTC6rNTJC99N5+yx68ahQEHYlnX9v7Aj1ovbeaHapPVV3TV7KHd/ufyGgGa Q/VipfeXySmxGpkCy9sUQK+Rol4zpkIeN3TcG0vkxK1WVKLedJmRhSQhFw8NLipOLfnw bX0SoiZoJTe7WQQtTOwRFwynxc7nGUjmScCpWLJrh5KEOFdq9QhOJZVFcZmGJJzOkVJz mXb1XZ6mZJkDqPqlAPIjgH0lz0UGspF9KhiesAbb5CfrHWgYDYTcYs9mEXYJH7KtowGB wVMQ== X-Gm-Message-State: AO0yUKV1d2ey1pJ5P6CQdcQW+jJCFQXXIsA2zudLYR57qvMo6i1aVrtu VfUcCKJRz69lmg5f4RIRARA7hu3btRfIqm1G X-Google-Smtp-Source: AK7set/jmIuHOb+7Iu+C79DVSrSpia/7+J6MESQ7/TE+LZFGfwCOvRrG8XOvbYFNm3JRR040HNRlyw== X-Received: by 2002:a5d:6110:0:b0:2c3:dfcb:afc4 with SMTP id v16-20020a5d6110000000b002c3dfcbafc4mr13268708wrt.27.1676047087087; Fri, 10 Feb 2023 08:38:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Huacai Chen , Jiaxun Yang Subject: [PATCH 04/11] hw/isa/vt82c686: Remove intermediate IRQ forwarder Date: Fri, 10 Feb 2023 17:37:37 +0100 Message-Id: <20230210163744.32182-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047169143100007 From: Philippe Mathieu-Daud=C3=A9 Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate via_isa_request_i8259_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 3f9bd0c04d..a913a509f7 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -548,7 +548,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA) struct ViaISAState { PCIDevice dev; qemu_irq cpu_intr; - qemu_irq *isa_irqs; + qemu_irq *isa_irqs_in; ViaSuperIOState via_sio; RTCState rtc; PCIIDEState ide; @@ -595,13 +595,7 @@ static const TypeInfo via_isa_info =3D { void via_isa_set_irq(PCIDevice *d, int n, int level) { ViaISAState *s =3D VIA_ISA(d); - qemu_set_irq(s->isa_irqs[n], level); -} - -static void via_isa_request_i8259_irq(void *opaque, int irq, int level) -{ - ViaISAState *s =3D opaque; - qemu_set_irq(s->cpu_intr, level); + qemu_set_irq(s->isa_irqs_in[n], level); } =20 static void via_isa_realize(PCIDevice *d, Error **errp) @@ -609,12 +603,10 @@ static void via_isa_realize(PCIDevice *d, Error **err= p) ViaISAState *s =3D VIA_ISA(d); DeviceState *dev =3D DEVICE(d); PCIBus *pci_bus =3D pci_get_bus(d); - qemu_irq *isa_irq; ISABus *isa_bus; int i; =20 qdev_init_gpio_out(dev, &s->cpu_intr, 1); - isa_irq =3D qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); isa_bus =3D isa_bus_new(dev, pci_address_space(d), pci_address_space_i= o(d), errp); =20 @@ -622,8 +614,8 @@ static void via_isa_realize(PCIDevice *d, Error **errp) return; } =20 - s->isa_irqs =3D i8259_init(isa_bus, *isa_irq); - isa_bus_irqs(isa_bus, s->isa_irqs); + s->isa_irqs_in =3D i8259_init(isa_bus, s->cpu_intr); + isa_bus_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); =20 --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047183; cv=none; d=zohomail.com; s=zohoarc; b=JzEqOqU5/Ecmw20cOWwkgWIfdqo0ojObxWy1ouO9U8YEtDtkpPeGXAmt60yF2oiHczpLMMTISqtOYdA+LcnNg6o38Rj1vFIhRCiQqqaF9F5MXg5yXHYpkICYvPkYunB6YsSrCiuZS1kdyjqEq2YP979MPQaa44aD/4AUEX8PLKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AoAgqkkVaW/90nUxacTI0iLIaEIQyrnwnsSs7qVHgZI=; b=G/97KN7GDn8YyeoyA4yintU+4RW37m0kIAGqZ22J+WHnqNqHs4KOfJy6sBDzD5dw1jRHS2qHEw7wPMU/d84P/4LVsnPrWPdYjj11HQrrGzGFFPbrs6cUKnjiTpDKKAJZH++9FHxSn7q7foPoBgS8wkGnuXAXk95UAKaR4F471aA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047183889654.4478746025295; Fri, 10 Feb 2023 08:39:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPl-0000yP-Cx; Fri, 10 Feb 2023 11:38: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 1pQWPh-0000gz-Vk for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:19 -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 1pQWPg-00008w-Cu for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:17 -0500 Received: by mail-wm1-x32d.google.com with SMTP id bg26so4278105wmb.0 for ; Fri, 10 Feb 2023 08:38:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p1-20020a1c7401000000b003cfa622a18asm8969649wmc.3.2023.02.10.08.38.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=AoAgqkkVaW/90nUxacTI0iLIaEIQyrnwnsSs7qVHgZI=; b=h/VgQ1mxtjpmlfyI6vqQAuS3QYkgq5B2uf+HVCT2KccHs39TESlkSOCk1euN7ognzZ yUFx2OAm8Bh4Qe/tWSPrq+TloufGjebkKamwLDGcw7UThdB/KlZCYKZ42WqggndsIt1o Tvu/IyTNVYqQWFzUZULT2Z0RGeAa3CSF4Zo6pYqYVaQKYD42vwC7ssK8n7gH6fOM1Yb8 VjTaNIOO++IDPZT7cSIBPmQMIbg34yIzw8Jmc6Siyd2Ny402Ef11MDqRV91xNa98+Pod t1+oTAxnA4ODOZ8WCY/gfqa0N1K5mqhWOG4f4UHtDOkzSVUwx6C0jvQRmgcZeYRqvAIa dA0A== 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=AoAgqkkVaW/90nUxacTI0iLIaEIQyrnwnsSs7qVHgZI=; b=Rt4EasstF3VkZNoI9rmSk5IvSbBD5+PY1R3FY/8PF/Qw4E5fpAE0tSFmVXdIziy27x qZbxijQFm5d7HPFf+GASjILhCstTqpXjALCVVHnx//ZKl1+hLS78afhx2kM0TcgA0iC4 UDzDFUk1+7t+A7EXl+SqJA9y8E2Lhi4Mlsec96llyTT47hf+A85GQaCCNZPP3fp6Apfe or9nvmc4Pa1rwvNi2t8qwSlOO9iNIe25TjakuO104KhsQXTm2m5Ru9xcI1d4Xnedg6ed ILR79ABlfj40FtBYA5wjSICZPkSBaBMLkDQt3XiCeebC5/sYjJEcaLovXrPF0BqIDRjO qz8Q== X-Gm-Message-State: AO0yUKWl6c28xHRm9n00ETExSFMZ79zqoH3l7lrSLl4btrF+vJW8Kw55 j8TM/adjYK8PeZ7e+JtwMTj7QsbC7sqdFQar X-Google-Smtp-Source: AK7set9EdAeDWb2j5hBDCkRPvdxPVfg+jo+dg5GyDUz/6cKQI8Y/3Tp6BJWWuIYRVi0PtJ5ZZzi4Nw== X-Received: by 2002:a05:600c:308a:b0:3dc:43a0:83bb with SMTP id g10-20020a05600c308a00b003dc43a083bbmr13562208wmn.3.1676047092078; Fri, 10 Feb 2023 08:38:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Jiaxun Yang Subject: [PATCH 05/11] hw/mips/jazz: Rename ISA input IRQs as 'isa_irqs_in' Date: Fri, 10 Feb 2023 17:37:38 +0100 Message-Id: <20230210163744.32182-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047185227100004 The following code: /* ISA devices */ i8259 =3D i8259_init(isa_bus, ...); gives the false idea that the function is creating a i8259 device. Instead this function returns an array of input IRQs. Rename the variable to clarify: /* ISA devices */ isa_irqs_in =3D i8259_init(isa_bus, ...); Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/mips/jazz.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 6aefe9a61b..fc7898006c 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -130,7 +130,7 @@ static void mips_jazz_init(MachineState *machine, MIPSCPU *cpu; MIPSCPUClass *mcc; CPUMIPSState *env; - qemu_irq *i8259; + qemu_irq *isa_irqs_in; rc4030_dma *dmas; IOMMUMemoryRegion *rc4030_dma_mr; MemoryRegion *isa_mem =3D g_new(MemoryRegion, 1); @@ -248,8 +248,8 @@ static void mips_jazz_init(MachineState *machine, isa_bus =3D isa_bus_new(NULL, isa_mem, isa_io, &error_abort); =20 /* ISA devices */ - i8259 =3D i8259_init(isa_bus, env->irq[4]); - isa_bus_irqs(isa_bus, i8259); + isa_irqs_in =3D i8259_init(isa_bus, env->irq[4]); + isa_bus_irqs(isa_bus, isa_irqs_in); i8257_dma_init(isa_bus, 0); pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047164; cv=none; d=zohomail.com; s=zohoarc; b=k50yTykSlAXbz2Uj08lh1/AcNb8fWfgnrBF15mjWb9GW6hzzpEGGtLmeNNWupdrji5vTiQ+gtyclA4wwdDWftsSqA9C6Q1yVUEqnHweQdCZPD2LDdUIoZ8n/AlYUPz1VgfbSeaVEzsVb/eAmtufNcHPQ3m8HpPOuAWWD2xytWMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047164; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PEO0iz2+8eqHQfeG9sdi6MqymoLkqqNq3DUXOt6Jl6Y=; b=e7AadgoiDknwXjJHsGEU/QOsEA+ubkPBThSbGZNigQyrlmHk+3q1xgY1c7i7uhwPia4t292LxfvZ4u/YZujdzmvxVVpveR12txJHSoeYlOim+xNAV45SfI+Sfr21nRqq6FBDDj79HDsjjfg8iAIEK16BEmZwGCV6CM5ONLVkX84= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047164648399.64681855567153; Fri, 10 Feb 2023 08:39:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWPl-00010E-IJ; Fri, 10 Feb 2023 11:38: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 1pQWPj-0000k8-Bc for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:19 -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 1pQWPh-0000B9-Ot for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:19 -0500 Received: by mail-wm1-x32f.google.com with SMTP id u10so4231028wmj.3 for ; Fri, 10 Feb 2023 08:38:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k7-20020a05600c080700b003daf672a616sm5110843wmp.22.2023.02.10.08.38.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=PEO0iz2+8eqHQfeG9sdi6MqymoLkqqNq3DUXOt6Jl6Y=; b=j1qSxQ+kCoZA57myLtiQ65H3pOAdWI9GlycxEiDAF+nhOm/SYM0ZRGe3/UQp+I/O7w vXDxg/eJ+zoyjiSZibgc8Yi2pDhjZL35gyU5Qfl53udVtiqDweOTRStbbq+YxMfj3Hhi KHipVrLA+H2LxsjLGHXtqnpIikYOMs3U8kRjuuQShMZk9W+Td2fE5crNiNSojjSuCGqy OPadiwder4UxG+E1mhI/0mmvnJjISQgSi13LIqzWHSELQJf7RVE65WfXUhlTQoMWhCLl +nNWzVTUOgAe6y5Za8aKuUgIxRLHn5w/BX6xXLbgo8rtnTBVf2D0QObvPI6y49wkL8K7 kMSw== 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=PEO0iz2+8eqHQfeG9sdi6MqymoLkqqNq3DUXOt6Jl6Y=; b=w6UscxnDvBVaYuUhjahmQ0zNAVb4+IhKf2S3GIIe69ncTNJAyPpeJG2+5EPm418irv R0GEOljfuZDdIKk3KsZc+2a55af8n29M1a/CYYQjPsT/7GKxBYATuL2HzjYi7Hawjw4Y LUNaqEsWmBzddFashbcjlBlrTRT7cBbBvEfkGdVf4a3dktAuDFmJqosi243IPMsTbe/e Il9F3hjFxt0OqACmck+Ufh+reFPHAr7yzqVUPQETfo+B1Qkdajqz04WJsj8lOlqQHewj YAa23eryqSe3Vb2SJqg4Cp3Mxlb5DVVgwiXtIfqRW/JcGsEWdF8S1laNX/udspTtWC4G UyJQ== X-Gm-Message-State: AO0yUKXP5KYwECu04VhAjlkA0gFIYS6mxjHrCYBr5fpJshY4HLe1GAWM olQuNfOc8hD++IKHV/x4bZd/9Vs6/XAEp2z/ X-Google-Smtp-Source: AK7set9VLlIRig0HWeJjLFKonGbxTegs8CIEeDb3sgpGVQDrQB/Hxq8YSQ2bH15Ks3auiSEkWHq05A== X-Received: by 2002:a05:600c:4496:b0:3dc:de85:5007 with SMTP id e22-20020a05600c449600b003dcde855007mr13279149wmo.21.1676047096878; Fri, 10 Feb 2023 08:38:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH 06/11] hw/sparc64/sun4u: Keep reference to ISA input IRQs in EbusState Date: Fri, 10 Feb 2023 17:37:39 +0100 Message-Id: <20230210163744.32182-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047165110100001 Keep reference to ISA input IRQs in EbusState. To emphasize input/output distinction, rename arrays as isa_irqs_in / isa_irqs_out. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/sparc64/sun4u.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 387181ff77..8fe47e2c22 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -84,7 +84,8 @@ struct EbusState { PCIDevice parent_obj; =20 ISABus *isa_bus; - qemu_irq isa_bus_irqs[ISA_NUM_IRQS]; + qemu_irq *isa_irqs_in; + qemu_irq isa_irqs_out[ISA_NUM_IRQS]; uint64_t console_serial_base; MemoryRegion bar0; MemoryRegion bar1; @@ -287,7 +288,7 @@ static const TypeInfo power_info =3D { static void ebus_isa_irq_handler(void *opaque, int n, int level) { EbusState *s =3D EBUS(opaque); - qemu_irq irq =3D s->isa_bus_irqs[n]; + qemu_irq irq =3D s->isa_irqs_out[n]; =20 /* Pass ISA bus IRQs onto their gpio equivalent */ trace_ebus_isa_irq_handler(n, level); @@ -303,7 +304,6 @@ static void ebus_realize(PCIDevice *pci_dev, Error **er= rp) ISADevice *isa_dev; SysBusDevice *sbd; DeviceState *dev; - qemu_irq *isa_irq; DriveInfo *fd[MAX_FD]; int i; =20 @@ -315,9 +315,9 @@ static void ebus_realize(PCIDevice *pci_dev, Error **er= rp) } =20 /* ISA bus */ - isa_irq =3D qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS); - isa_bus_irqs(s->isa_bus, isa_irq); - qdev_init_gpio_out_named(DEVICE(s), s->isa_bus_irqs, "isa-irq", + s->isa_irqs_in =3D qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM= _IRQS); + isa_bus_irqs(s->isa_bus, s->isa_irqs_in); + qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq", ISA_NUM_IRQS); =20 /* Serial ports */ --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047130; cv=none; d=zohomail.com; s=zohoarc; b=I+ZZkZbrdIP/YtlQSgS25p4AUNMfZ+HVDLuQhYr7wXk1eyg+H936kcYTxYXYzKpZ4EGifKNBnmPbAnwp0S2wtQLjcyTKa24JCOvFbMPZC/+1CtsqjIeq9K6q8wkt90AlrZifEjVXNEHGz1JmOF16N4u54nycjyZF6EMUZJvZ1ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047130; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=789ooQfaoGTNLsCSsIVAXNSCAD6XOwXp+1Wop0X/7+8=; b=d5d4825/PWZakqKI3DR94I1RtwfcO557zTgKEUClwlphMwdeY0F5+SDCivnr6OE1YwvuGsGaLaI+FEYN3HYb5zafzGH5kFht9fRWLvcySyrn9ZJw89YbRvtfdkcFSz7Tns0JxKzJekIbD7eaVc5y3hH1St6/DOyPsb81T61ogWI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047130894487.89381906640085; Fri, 10 Feb 2023 08:38:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWQ2-0001NZ-In; Fri, 10 Feb 2023 11:38:40 -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 1pQWPr-0001Js-Rp for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:27 -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 1pQWPn-0000Hb-1J for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:24 -0500 Received: by mail-wm1-x32f.google.com with SMTP id n13so4224617wmr.4 for ; Fri, 10 Feb 2023 08:38:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o32-20020a05600c512000b003e0238d9101sm6544038wms.31.2023.02.10.08.38.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=789ooQfaoGTNLsCSsIVAXNSCAD6XOwXp+1Wop0X/7+8=; b=EjVc1K69YB+Oewq2eNrpQ5H6wBU8amXtPamYOi2/QR98uEAvjtQ9VX8g9r+8Ejtjtm /E7qIl/6RRNQIHJsF3JJzTvJ7JbcVFQ4MWibXApbbVWfuzTn7OoHVp6TSldbJAiLkdG8 E3bSiH8sJI7ZywcZRmlIZvzFRKE/45o9Oa+/mMXoCuHj108HmGPTtcQspidbPkxT4+Uf AqoYXzGkuH6UDZYvWOCHjRkpAbfJ6RxXsMTZ4/0ytqAPQEeNe7LcJctmp6Qe8ZXwSXBT EbT7sChduQK3DvF3e5KDYgYMopBpnWZOIk+xJk8VNuFsUFdXtaneNGFxKQ+5OevpZtQt iNqg== 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=789ooQfaoGTNLsCSsIVAXNSCAD6XOwXp+1Wop0X/7+8=; b=4EVqnUEXlUGZWdHeKABv9O8poLpPqTQJogE0oqcqDN+4gssaF3zN8ns+YuFDcM/d+m jFYPZ1giIEN/9HipzigB8OqfWUSGjssnZGfvXnadbzSOd4jlQM+Hc6hfxgCvXR+Dgc4A 4XInWgrk+6IhUrJ6GYsHLivTbjWtSTFM0Umfiidcz7HT1pmuRuDCohy4xxISrPhjZCWo Nk+jeOZtl8Mnp8gpt/guX/x2fQJ2ena1WYUGQ2HNCVgox2s3faVjuGw4cH/6eEtIF+KL pJL2A+ivl+orKkKcwi+S2Fi/reTtEyhLqyELTuRz1uX+vkP9ZUAuP4V2132ERrl8FZUu io/Q== X-Gm-Message-State: AO0yUKWM4VXVfXJCM1kYIn9ev8PaJzdjTMHFwf1ng97Ynkk/G7jv5xEA WWGtAz3LWGX6uD6p4klssF2s0GZp1qO48zL1 X-Google-Smtp-Source: AK7set9Iw7IJcEA0wE5x7Irty4XsEVvAlu+UST+v3aqQ7uuppbNmUZO2ku/6sLlBQILvKZa0IcFkog== X-Received: by 2002:a05:600c:2e89:b0:3e1:bfc:d16e with SMTP id p9-20020a05600c2e8900b003e10bfcd16emr10833011wmn.39.1676047101615; Fri, 10 Feb 2023 08:38:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/11] hw/isa: Reorder to separate ISABus* vs ISADevice* functions Date: Fri, 10 Feb 2023 17:37:40 +0100 Message-Id: <20230210163744.32182-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047132971100001 Separate functions taking an ISABus* argument versus functions taking a ISADevice* one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/isa/isa.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 25acd5c34c..e81cd33e3c 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -74,12 +74,8 @@ struct ISADevice { ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, MemoryRegion *address_space_io, Error **errp); void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); -qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); -void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_get_dma(ISABus *bus, int nchan); -MemoryRegion *isa_address_space(ISADevice *dev); -MemoryRegion *isa_address_space_io(ISADevice *dev); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); @@ -87,6 +83,11 @@ ISADevice *isa_create_simple(ISABus *bus, const char *na= me); =20 ISADevice *isa_vga_init(ISABus *bus); =20 +qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); +void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); +MemoryRegion *isa_address_space(ISADevice *dev); +MemoryRegion *isa_address_space_io(ISADevice *dev); + /** * isa_register_ioport: Install an I/O port region on the ISA bus. * --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047150; cv=none; d=zohomail.com; s=zohoarc; b=L0X4yPw0BHQvuMXW17z6S+4CCo3OFN7JD2i/njhkVcHzlakN8fhqLMv2e5wmpmqQP3zFedyy7t53ia7fUEpJ0uzCqNFYMwpjjUy/SN3QX+gMbv5hqwnukzxQByd7C+j8msdG35GKm0KMKzc7m43BVSgY9IE6Cvkf7JvMQFeGKH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047150; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=n7dZh17SiY6wpVQKVSrouGOkN8bNKH5gBgzNDB0k1JYoBTplAexdlkebdnLUs72Zi0OvFo4+Lhw0Y2bIGxC8rC4cXUPMoVsypIWFLlhng5LDbk7nBI6l+Ai+1n5V2+1uzARprYOmBFY9sxxtrEPqODJ4bOxVRwbUAebYkhe57eo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676047150253601.197623649606; Fri, 10 Feb 2023 08:39:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWQ7-0001b7-AU; Fri, 10 Feb 2023 11:38:43 -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 1pQWPu-0001NY-BP for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:34 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWPr-0000Ht-Um for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:29 -0500 Received: by mail-wm1-x331.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so6677017wmb.4 for ; Fri, 10 Feb 2023 08:38:27 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z6-20020a1c4c06000000b003d1d5a83b2esm8273180wmf.35.2023.02.10.08.38.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=vGwwtV6DzmFLbxsdZpxIprsKJuG70CrTDeMlBGFU0q7ib+Z32rZwKKLfWj2eJIwqYv DW44mgYTi28C37FsseZ/uo+GL28c0uQ+qDk0xqxEAvE6B7wMRVRoVUBcnCL0+LgNIPvi 5sZMpunm+yyRerIwLWSBUETFwtctiPF1hFue0mKM06zHTcdM+OyPbTakgGosG8VhiNm1 ZPDTKzduKqyodQdVR7lo3fSEs/SKqzfeOTGiXxRB8fMKGuqsDntUAdQLQErtqD+xR5WD h585u8zU8OxGZK70D3KWQV9Fr4yitJadRSwY8A0knR1mU58XYo0tTnvfJ5wJ0lQjlcoB 5CPw== 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=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=nnyXmcKeZdcqFrDNymZnEnGMVgQ22Apc1h4fV7BmEbf2z3XxkO/xevwRafSiHiC5Zb 6AWZYAaAWTMerrNjZ/2Fc/abbMxkWhJCqxuVCVinplDIRtDcTVxoEWB9/LARuwrz0r0N qV06lsC9R1cTkUfIXUcXTNqgn+LqxiTgglhkAxEsA2EpSR3VfnD4yQ4Bq3r8l39FLFVv JROsWcxeEhbDiJw4iHH/ng7IoUE8sGrSJ5EF8fNyf98n9VFxK2l34zyoV35EawEE5GPE GK+CH9x15sAzKOLnRTgD94wMOSlbCw0/GyUUMEhWJiuOsR82b7ieKgGtH7SK11i/7wzR XWBA== X-Gm-Message-State: AO0yUKVWxACSmAV69oBd+IL5c37OrSK+eh2wSFcLLB6ILgKz/DzADC1D IQx6P1lK9f4ETWI2jSugi1MiYmmzre6YNO7u X-Google-Smtp-Source: AK7set8bEIk+G9FXusJh3KkT3NlP+iUreFW5UQVgVVYuN2ayP4v7VLl3A8ly7H55uQRG7JD1Q8Z92Q== X-Received: by 2002:a05:600c:a295:b0:3dc:40a0:3853 with SMTP id hu21-20020a05600ca29500b003dc40a03853mr2540528wmb.11.1676047106331; Fri, 10 Feb 2023 08:38:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 08/11] hw/isa: Un-inline isa_bus_from_device() Date: Fri, 10 Feb 2023 17:37:41 +0100 Message-Id: <20230210163744.32182-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047151079100007 No point in inlining isa_bus_from_device() which is only used at device realization time. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 5 +++++ include/hw/isa/isa.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 4fe61d6dfe..5bd99379e9 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -162,6 +162,11 @@ bool isa_realize_and_unref(ISADevice *dev, ISABus *bus= , Error **errp) return qdev_realize_and_unref(&dev->parent_obj, &bus->parent_obj, errp= ); } =20 +ISABus *isa_bus_from_device(ISADevice *dev) +{ + return ISA_BUS(qdev_get_parent_bus(DEVICE(dev))); +} + ISADevice *isa_vga_init(ISABus *bus) { vga_interface_created =3D true; diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index e81cd33e3c..1691364011 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -87,6 +87,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); MemoryRegion *isa_address_space(ISADevice *dev); MemoryRegion *isa_address_space_io(ISADevice *dev); +ISABus *isa_bus_from_device(ISADevice *dev); =20 /** * isa_register_ioport: Install an I/O port region on the ISA bus. @@ -124,9 +125,4 @@ int isa_register_portio_list(ISADevice *dev, const MemoryRegionPortio *portio, void *opaque, const char *name); =20 -static inline ISABus *isa_bus_from_device(ISADevice *d) -{ - return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); -} - #endif --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047147; cv=none; d=zohomail.com; s=zohoarc; b=Lr7lpBYDlBu0dGxUQ6vyk9VF9u8KRYVW6ArucAyKH0JOGqWlMuHgX90jBtPlEg0URjNexubPQUCuHxfvdFjso+L+aueh2RIhRVveNyORtgy8dIfJozJMhJZB9eZe67c+UwcyYhGCeuX6WlTshUBz9oKyLuIQGVVCIV+g1tGnTp0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047147; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kTPaflOC6+oM6trEZJQXYf+7BQUWtjQrjMlU/xZObQI=; b=MoaiWBYINzzf466uAIAAwDAQQ9mKRuKv1wUmiMBM1jF2sxSJk2WX6otMsuncnm+aoOHTi1snGgNmOQK7LYljsO42fYSyo+ZkKJK6E3V97YGXKlqVJQEspJ7C/Oy+/iaV3agB7htSlFM9IDuHruIRTl+xprN1D3fSCSmauk8A/FM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16760471472104.2669637437441; Fri, 10 Feb 2023 08:39:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWQD-0001hv-77; Fri, 10 Feb 2023 11:38:49 -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 1pQWQ5-0001Z6-LN for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:42 -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 1pQWPy-0000If-16 for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:40 -0500 Received: by mail-wr1-x42e.google.com with SMTP id o18so5641164wrj.3 for ; Fri, 10 Feb 2023 08:38:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x2-20020a1c7c02000000b003df30c94850sm8498689wmc.25.2023.02.10.08.38.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kTPaflOC6+oM6trEZJQXYf+7BQUWtjQrjMlU/xZObQI=; b=lV8gKKERQhQIbIjAcFgfOLY1bTun3ZEipDoBHYh8j7s4SfvICup4qNU8Ijm2NiwuEq klJ82qe8W97tOgIjfLkGcJ2l3a+gO6mo1y6Bzmi2w4HUBtRngUG3q/Pl2EM6SdRg0aBx bgNDoiQUuseLtqXk0ohIXhpa+zpN7zkSMfC/zzUFW+QSTHALFmnKf2Ac4ZbifFLyyvyy DJ+jCgCcwDYJ8+sW3yWUkr6Q1IlOmHTuVcht8LWAbYdh7zGLLWBO6lIQg18dS4LBP4Ef p90Z/L87vdxBx7mlNWl2GnbMNa9sh42lVJfcgSA6tjpHKJIO7htCKx2JBHEhtUbCq0Xu zgtA== 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=kTPaflOC6+oM6trEZJQXYf+7BQUWtjQrjMlU/xZObQI=; b=kPEbfpQUN1ofr1BQVR6pBcuhcZgUaiF6x74NuzEEeBAN/KlHE558MYyvwoWUyD6eWq awt8RTzC25a3Jo/h5sZN4DqwWjlnWJMAR36TywiTYQz6noiMVLT98pIThtb2Qfz6PRs4 yKxUkzwXKBs60bBBCpnVPY428MQWcyHRAVPuY/BRROrC/769148zesTZuSLnwUJH8JyC x6DbHU+rkybe67ASBuUuZrNPVIyxZnkegBOd2DgvaU2CohIRGMWhWnaEzkj660C1VRFg mH8VDzoO4tKd5ppJKdX2EJkzSIHZmyJaVNFFCWG6Yq4MpdQQ1K2lxGgR28n3G9Sdj9j9 ZLMg== X-Gm-Message-State: AO0yUKX19UgUFFRwhsRk1ZW5yAnIooNT33JUsZkw3JQVoSTVjtZNLfzW jvid9nN3I9HtcTyg6uf4mTvqTGUERLA1vWyD X-Google-Smtp-Source: AK7set9Mpm9uxCMorBLRzPKSQlcHbK+sA0ERtZQ79XqE6pqneJlmAyD8xmUkBjYD/wnjR5bYZzUZhg== X-Received: by 2002:a5d:528f:0:b0:2bf:d285:b787 with SMTP id c15-20020a5d528f000000b002bfd285b787mr13767125wrv.56.1676047111833; Fri, 10 Feb 2023 08:38:31 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Helge Deller , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Huacai Chen , Jiaxun Yang , Aleksandar Rikalo , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH 09/11] hw/isa: Rename isa_bus_irqs() -> isa_bus_register_input_irqs() Date: Fri, 10 Feb 2023 17:37:42 +0100 Message-Id: <20230210163744.32182-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047149076100003 isa_bus_irqs() register an array of input IRQs on the ISA bus. Rename it as isa_bus_register_input_irqs(). Mechanical change using: $ sed -i -e 's/isa_bus_irqs/isa_bus_register_input_irqs/g' \ $(git grep -wl isa_bus_irqs) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/hppa/machine.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/isa/i82378.c | 2 +- hw/isa/isa-bus.c | 8 ++++---- hw/isa/lpc_ich9.c | 2 +- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mips/jazz.c | 2 +- hw/ppc/pnv_lpc.c | 2 +- hw/sparc64/sun4u.c | 2 +- include/hw/isa/isa.h | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 7ac68c943f..8fea5fa6b8 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -98,7 +98,7 @@ static ISABus *hppa_isa_bus(void) isa_irqs =3D i8259_init(isa_bus, /* qemu_allocate_irq(dino_set_isa_irq, s, 0)); */ NULL); - isa_bus_irqs(isa_bus, isa_irqs); + isa_bus_register_input_irqs(isa_bus, isa_irqs); =20 return isa_bus; } diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 29f30dd6d3..fed468a34d 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -174,7 +174,7 @@ static void microvm_devices_init(MicrovmMachineState *m= ms) =20 isa_bus =3D isa_bus_new(NULL, get_system_memory(), get_system_io(), &error_abort); - isa_bus_irqs(isa_bus, x86ms->gsi); + isa_bus_register_input_irqs(isa_bus, x86ms->gsi); =20 ioapic_init_gsi(gsi_state, "machine"); if (ioapics > 1) { diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df64dd8dcc..7c48ba30e0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -246,7 +246,7 @@ static void pc_init1(MachineState *machine, i8257_dma_init(isa_bus, 0); pcms->hpet_enabled =3D false; } - isa_bus_irqs(isa_bus, x86ms->gsi); + isa_bus_register_input_irqs(isa_bus, x86ms->gsi); =20 if (x86ms->pic =3D=3D ON_OFF_AUTO_ON || x86ms->pic =3D=3D ON_OFF_AUTO_= AUTO) { pc_i8259_create(isa_bus, gsi_state->i8259_irq); diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index d32653369d..233059c6dc 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -89,7 +89,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) =20 /* 2 82C59 (irq) */ s->isa_irqs_in =3D i8259_init(isabus, s->cpu_intr); - isa_bus_irqs(isabus, s->isa_irqs_in); + isa_bus_register_input_irqs(isabus, s->isa_irqs_in); =20 /* 1 82C54 (pit) */ pit =3D i8254_pit_init(isabus, 0x40, 0, NULL); diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 5bd99379e9..d19826f96e 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -67,13 +67,13 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* add= ress_space, return isabus; } =20 -void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) +void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in) { - bus->irqs =3D irqs; + bus->irqs_in =3D irqs_in; } =20 /* - * isa_get_irq() returns the corresponding qemu_irq entry for the i8259. + * isa_get_irq() returns the corresponding input qemu_irq entry for the i8= 259. * * This function is only for special cases such as the 'ferr', and * temporary use for normal devices until they are converted to qdev. @@ -82,7 +82,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) { assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) =3D=3D isabus= ); assert(isairq < ISA_NUM_IRQS); - return isabus->irqs[isairq]; + return isabus->irqs_in[isairq]; } =20 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 1fba3c210c..cda2f5621e 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -725,7 +725,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) =20 qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, GSI_NUM_PINS); =20 - isa_bus_irqs(isa_bus, lpc->gsi); + isa_bus_register_input_irqs(isa_bus, lpc->gsi); =20 i8257_dma_init(isa_bus, 0); } diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index de60ceef73..ef24826993 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -212,7 +212,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp) s->isa =3D i8259_init(isa_bus, *i8259_out_irq); =20 /* initialize ISA irqs */ - isa_bus_irqs(isa_bus, s->isa); + isa_bus_register_input_irqs(isa_bus, s->isa); =20 /* initialize pit */ i8254_pit_init(isa_bus, 0x40, 0, NULL); diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index a913a509f7..52814cc751 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -615,7 +615,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp) } =20 s->isa_irqs_in =3D i8259_init(isa_bus, s->cpu_intr); - isa_bus_irqs(isa_bus, s->isa_irqs_in); + isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); =20 diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index fc7898006c..3b09c93a92 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -249,7 +249,7 @@ static void mips_jazz_init(MachineState *machine, =20 /* ISA devices */ isa_irqs_in =3D i8259_init(isa_bus, env->irq[4]); - isa_bus_irqs(isa_bus, isa_irqs_in); + isa_bus_register_input_irqs(isa_bus, isa_irqs_in); i8257_dma_init(isa_bus, 0); pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c index 71143b7692..01f44c19eb 100644 --- a/hw/ppc/pnv_lpc.c +++ b/hw/ppc/pnv_lpc.c @@ -837,7 +837,7 @@ ISABus *pnv_lpc_isa_create(PnvLpcController *lpc, bool = use_cpld, Error **errp) =20 irqs =3D qemu_allocate_irqs(handler, lpc, ISA_NUM_IRQS); =20 - isa_bus_irqs(isa_bus, irqs); + isa_bus_register_input_irqs(isa_bus, irqs); =20 return isa_bus; } diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 8fe47e2c22..8a56ba9f98 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -316,7 +316,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **er= rp) =20 /* ISA bus */ s->isa_irqs_in =3D qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM= _IRQS); - isa_bus_irqs(s->isa_bus, s->isa_irqs_in); + isa_bus_register_input_irqs(s->isa_bus, s->isa_irqs_in); qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq", ISA_NUM_IRQS); =20 diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 1691364011..0aa36d4115 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -59,7 +59,7 @@ struct ISABus { =20 MemoryRegion *address_space; MemoryRegion *address_space_io; - qemu_irq *irqs; + qemu_irq *irqs_in; IsaDma *dma[2]; }; =20 @@ -73,7 +73,7 @@ struct ISADevice { =20 ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, MemoryRegion *address_space_io, Error **errp); -void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); +void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_get_dma(ISABus *bus, int nchan); ISADevice *isa_new(const char *name); --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047211; cv=none; d=zohomail.com; s=zohoarc; b=lldFuYGkkidV7Pf/7Cpf08dYmn4Tk33zdfTsIRD4K2VZ1eNjyc0hCfU6j0IZQL7v5QC+uCcC2oLuD7adI1uT/Un3zc5Qj1nfjFc4PHYHW/ny9gIB3f8rVe86QXd9NYlOMBqXCqZjFqFv6rBjZOr60BdK2EUpN3+ZPcJiEGKVxJ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047211; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YoHT59j3PIEbNQgJjg9OB8ZAxg8LDaeoLJEvNKTWr5M=; b=Ds+NwWKwsT02ELKYSJ5RgcLZqD7JvFExLs/+1eiemln1Ln4587qETNr8EZ66q5yYrLC8pzO8DzqAhW6kxp94XwHlLXW6L6T4jMldCFAgZNJi8ygsasOCm26wBiffrnlOdvPXO9/RM6FqZLsFpnC3nhvY09F/wS6368h+3pAw2d0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167604721129853.424864576350956; Fri, 10 Feb 2023 08:40:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWQL-0002Nw-Ia; Fri, 10 Feb 2023 11:38:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQWQD-0001ih-1E for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:49 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWQ4-0000G0-4V for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:42 -0500 Received: by mail-wr1-x42a.google.com with SMTP id o15so2321590wrc.9 for ; Fri, 10 Feb 2023 08:38:37 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i8-20020a5d4388000000b002c5493a17efsm2023496wrq.25.2023.02.10.08.38.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=YoHT59j3PIEbNQgJjg9OB8ZAxg8LDaeoLJEvNKTWr5M=; b=RJoxFnL0XsRpjQueoM/BiLfGNgDKnkzHECga3h6hdsHDbcxkSPL18g6p3QjWhJkY7C Vur4IzZxjtUXBqgOa6igkmngsr3WAVi+8qXGtQT3LG1qPYNmsziCWQALnkEIT+cgzDmN 0c2FQ/ZmoSZT7572TifeIa4joU9QssrjLqcD4OykuaGfHf9GWkRd7dHox5W596TLUtjC noPyCquajhwa63361h4ITMucScL1AW6y6yTq5Bs104Ae37TjFWITqKKXHRFUU2DrLZSS 8ctjmpipHEsE16JwwiAPrky3K0AIS/3PAVJyK4LR8PocLjLsvc+kE5YI++58w0XBodu5 gukQ== 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=YoHT59j3PIEbNQgJjg9OB8ZAxg8LDaeoLJEvNKTWr5M=; b=CqisFN6MM0EexOB3cKKPVqhpleh1qSWUfIj3VFNEzCXvd2bOfW19+XADd/Zr41qfYu anl7DbPprZ4bAirpxIh25cMqSxS9OUJt8ul0Hmhsype6PU2xSqh7Cy5TcaV3e/tSRrcO zWjA+Is1/kkr1LaRfh53zfi4hVlKjG21C4DPQV6jadxprg2ynBzhAC5wlSq63oosjLBR 7Yv/pRODQJWjN7CaE97ELum90NV8D3L+u3/sdNAx0fvRoRL9kr0r2mgoG7pnOZep/W5r vAQcQ9i3VGNNEIic/vfcNBHXUWOJlSAaSac7OalnA+hjAUw9QgGRFBcOnH0h2g8cnEN+ mfrw== X-Gm-Message-State: AO0yUKX2dzBctbvHxjkPte+iap+FQ4Un5udkC5uTGTUWomjYisB0ogNE oRy/gA60jDKJA9+iiA5Imxt4WNbFJFHBmLEh X-Google-Smtp-Source: AK7set/0ksiFPv6LMRcagGgNMz0y0AGTDUFKy8/hefh+hyYqfOw3qEwajY3lNz8w+90ZdnJfBW7r9w== X-Received: by 2002:a05:6000:1811:b0:2c5:4b17:166 with SMTP id m17-20020a056000181100b002c54b170166mr1888960wrh.48.1676047116584; Fri, 10 Feb 2023 08:38:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/11] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' Date: Fri, 10 Feb 2023 17:37:43 +0100 Message-Id: <20230210163744.32182-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047213310100007 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index d19826f96e..d12973103f 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -114,7 +114,7 @@ static inline void isa_init_ioport(ISADevice *dev, uint= 16_t ioport) =20 void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start) { - memory_region_add_subregion(isabus->address_space_io, start, io); + memory_region_add_subregion(isa_address_space_io(dev), start, io); isa_init_ioport(dev, start); } =20 @@ -133,7 +133,7 @@ int isa_register_portio_list(ISADevice *dev, isa_init_ioport(dev, start); =20 portio_list_register(piolist, OBJECT(dev), pio_start, opaque, name, - isabus->address_space_io, start); + isa_address_space_io(dev), start); =20 return 0; } --=20 2.38.1 From nobody Sun May 19 21:02:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676047202; cv=none; d=zohomail.com; s=zohoarc; b=GqW7BRoFdmYjMWQ/I05s2vate+rf5L4q1GzGKNIhNK4W7hBtQmTJT65pRukl75eeuf2DZifY5bo9D7GotcSXKclykt7Hfr6+2Tg1Mk2bA357zDZ0pxvRqdUIe5Ai2DVplXvsrHmOwLip3es84ktQoPfHf4vncG1sRrBQp1FQzFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676047202; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lXmJ/9H6tejYaoSigJ9Gtxd/ZVq77Quhr/7jqB7U4d8=; b=NFiK9YFwNv7SBHqz1+qPBsUKnn7KOPDFOO8oj0RmrfzGK/SqQ/XNSq7znxYydaL+uShFeaqjCk+yMtRsHzGRi7mbTjJ3FtuIkgp5ByhYT7oAsAkqMs0Bjr2zTsknpBN8DV0OvMGTmsh5PSbW3TStiGTy0iBFltlDRntYaQnCZUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16760472022291007.1395406593239; Fri, 10 Feb 2023 08:40:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQWQI-000275-M5; Fri, 10 Feb 2023 11:38: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 1pQWQE-0001qu-CB for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:50 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWQ8-0000L1-CZ for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:50 -0500 Received: by mail-wr1-x429.google.com with SMTP id h16so5596363wrz.12 for ; Fri, 10 Feb 2023 08:38:42 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e2-20020a5d5002000000b002c4c1a47adfsm4080952wrt.23.2023.02.10.08.38.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38: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=lXmJ/9H6tejYaoSigJ9Gtxd/ZVq77Quhr/7jqB7U4d8=; b=ORGfwVBuN2tpiBwuF4seeFzozkDoKiLEWxteSiyfPa0CljkC8X6cItJvGgtged/P8E 6wHX4Ga4eB/fyblOUP7WFwj18wlm60IaznFQOw2YTWzK+Hk8T/xsbdel1MMjOdEtkRNa eJMbpVe+DC7z2JTYlbjR0wsjt0/zIFYjH/f7luhxV97jvFfWxRVoBWX9yAfLWUA8HhnJ RoOPdtcsumhVMPeszrM9UKUVFPN0shipz8YPUIpvpNZTzxHHtfZDksoDB7ozqaD4UoVX e6MykytDueEusLv7qGaF8Qr4hM0P1A+pr0Lz8M05sz7cgvTeLnRmarVIQbvxiXyH4SO9 AUXg== 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=lXmJ/9H6tejYaoSigJ9Gtxd/ZVq77Quhr/7jqB7U4d8=; b=wgFbykQ/d8+P+mu/vQOGU+RIRghXX2EIxRfVRfkybiWTdj84t5fkSgTY6HuDf6+oqt JNCBRYug3uZJY0KycWGAgh5bisZM4cf/MmVn17rEMjK8QMh14CcEN62KFovga7nX9W6R 7zRrt9kaRFPpiQ49n1ggt55UQo1zhETb9dt0hFJzzYTxK6yS87zmlgXlIJhci4bMezX5 kOi9pkp2QJWcVw+wYAvgzdj0Ggf90Bowwuy9I5TjwDOcSgw2m3tQeaDIrHrvB6EE8CZw Sw99J+YuIKDM1FH5R/WHGlDUyb4QciQzepxjpTinXEmkT7Jx3R7GtTOQfHvsaH6F4d0S 0MfA== X-Gm-Message-State: AO0yUKXOHICq3GZKxPCx54kVe6ZMFAP9cXbCUg8hktAy2XcYlur9O0LQ xxMBWAZnuGI7qQ/7AGghaAbMJBLzHUl9c0E+ X-Google-Smtp-Source: AK7set+SdIoHDPJrB1p64OHVUKhu6lPTaIQar6pWU6dXYoH0dEpk1Lpep72inR60UJnBwgy5RkOwVg== X-Received: by 2002:a5d:674b:0:b0:2c4:98c:1c4b with SMTP id l11-20020a5d674b000000b002c4098c1c4bmr4723392wrw.18.1676047121363; Fri, 10 Feb 2023 08:38:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 11/11] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq() Date: Fri, 10 Feb 2023 17:37:44 +0100 Message-Id: <20230210163744.32182-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676047203287100001 isa_get_irq() was added in commit 3a38d437ca ("Add isa_reserve_irq()" Fri Aug 14 11:36:15 2009) as: a temporary interface to be used to allocate ISA IRQs for devices which have not yet been converted to qdev, and for special cases which are not suited for qdev conversions, such as the 'ferr'. We still use it 14 years later, using the global 'isabus' singleton. In order to get rid of such *temporary* interface, extract isa_bus_get_irq() which can take any ISABus* object. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/isa/isa-bus.c | 14 ++++++++++---- include/hw/isa/isa.h | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index d12973103f..4cf26510bf 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -72,6 +72,13 @@ void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *= irqs_in) bus->irqs_in =3D irqs_in; } =20 +qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum) +{ + assert(irqnum < ISA_NUM_IRQS); + assert(bus->irqs_in); + return bus->irqs_in[irqnum]; +} + /* * isa_get_irq() returns the corresponding input qemu_irq entry for the i8= 259. * @@ -81,14 +88,13 @@ void isa_bus_register_input_irqs(ISABus *bus, qemu_irq = *irqs_in) qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) { assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) =3D=3D isabus= ); - assert(isairq < ISA_NUM_IRQS); - return isabus->irqs_in[isairq]; + return isa_bus_get_irq(isabus, isairq); } =20 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) { - qemu_irq irq =3D isa_get_irq(isadev, isairq); - qdev_connect_gpio_out(DEVICE(isadev), gpioirq, irq); + qemu_irq input_irq =3D isa_get_irq(isadev, isairq); + qdev_connect_gpio_out(DEVICE(isadev), gpioirq, input_irq); } =20 void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 0aa36d4115..ba62a2e6c8 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -76,6 +76,14 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *addr= ess_space, void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_get_dma(ISABus *bus, int nchan); +/** + * isa_bus_get_irq: Return input IRQ on ISA bus. + * @bus: the #ISABus to plug ISA devices on. + * @irqnum: the ISA IRQ number. + * + * Return IRQ @irqnum from the PIC associated on ISA @bus. + */ +qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); --=20 2.38.1