From patchwork Fri Feb 10 16:37: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: 652345 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1059775wrr; Fri, 10 Feb 2023 08:39:24 -0800 (PST) X-Google-Smtp-Source: AK7set+JkJ/6ib4qVjoB7BiJdHi5Ng5L+U5x8p8hpNPQLT4t5Edu0rboeNpN3Y2+QfOX5AwTpJC8 X-Received: by 2002:a05:622a:1346:b0:3b8:6ae9:b104 with SMTP id w6-20020a05622a134600b003b86ae9b104mr26815748qtk.17.1676047164122; Fri, 10 Feb 2023 08:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676047164; cv=none; d=google.com; s=arc-20160816; b=mkrQuaeRvV5nhkCMR7vV8wlmXw46jCVbJp6Vzlt2WEKzwAcPFf3Yh8emptXewLDutg aqvReq7cJMWMbMRsWWGlycfjTfDYR2B4Gz0akM9czIaDxPFp3+04yLZWgsp+umxetJ5o USPY7/dSeD7MeLJdekjZG0aM7a5X+EHOS5muWGFRUD+aYErrUF8tIqd7KlkcQluN3PL7 znd/LeqhyAs1A6/WaRwm0THjWiQfBk8iovr5mGdmSXC11UZonVeIzQ7dRqXalG+aFMLS zkOmEKr8pca7xGlGesm20+wvxZX2scrkpxz9PuxhA7dQYZUrkJVNXqom37JPtEU+61AG F2UQ== 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=PEO0iz2+8eqHQfeG9sdi6MqymoLkqqNq3DUXOt6Jl6Y=; b=ChbDue8MWLt1jeKnRk+Kw7Z0kqhIcH00PwbPux6bBrlb7w1gqaXZzVMcj6iJuX5Yzm ByznSrbdcQjj9eD54PxRa20zY/06s9c0k98buHeUuHut3VvOnnD6nNYmZxBU1GDJ6rU/ bxuKCWirkTd0G2iEuyw5kphjfZAY2GoW6Z08b/X5EFaylLIplLEqM+YASRaXGU8JWMLs Oa/RT9CCsVmsNLh4W0gWaSo1N8zodsGxB8LjxiAc9CZqXHXQuFr4lXSYttIfinIUla+t KIiYfD3aYPesn5AWyqKPBMJOChYCx/pG0xC/9ZgcyrR6yZI3onLe+RIO2E05+n2g7Rrk HDnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j1qSxQ+k; 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 u12-20020a05622a14cc00b003b82e92b364si4557538qtx.503.2023.02.10.08.39.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:39:24 -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=j1qSxQ+k; 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 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é 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; 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 = { static void ebus_isa_irq_handler(void *opaque, int n, int level) { EbusState *s = EBUS(opaque); - qemu_irq irq = s->isa_bus_irqs[n]; + qemu_irq irq = s->isa_irqs_out[n]; /* 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 **errp) ISADevice *isa_dev; SysBusDevice *sbd; DeviceState *dev; - qemu_irq *isa_irq; DriveInfo *fd[MAX_FD]; int i; @@ -315,9 +315,9 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) } /* ISA bus */ - isa_irq = 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 = 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); /* Serial ports */