From patchwork Mon Feb 27 14:01:02 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: 657076 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381138wrb; Mon, 27 Feb 2023 06:28:25 -0800 (PST) X-Google-Smtp-Source: AK7set+leyu3Lnt1Tov2OJo6x6KGx0/F+zMZ4tmCRsMdbcA3dgmsXrE5KAgynj6FlGredx5obF3C X-Received: by 2002:a05:622a:513:b0:3bf:d9ee:8814 with SMTP id l19-20020a05622a051300b003bfd9ee8814mr5494750qtx.17.1677508104965; Mon, 27 Feb 2023 06:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508104; cv=none; d=google.com; s=arc-20160816; b=tiYG9g8w8M9Cl23R+qi+5IlZGRbIlNp9Z0sUfw5eGrBnysgmk0ajcMkAhIIwrbPSzh CfsU9/NRvDCprMdmZOKJw576X+z1zmNIsjCca52TWJhwhkhTMunDHHih4gtcmJqWwIaU 2yNHW9jCd1FUAuyDeto3YNrnHEhTCRrzDd/SsTqzHQFTtjCU9oQqtTcJEyi7n+JSGFRM UnfCf+It1FD8hE+kpbN8IRkp5T24oB3uLwjb01maO49JBqw2A2Z5RmPzNoGVVe3MIYvc XvGOPa7nGLUO+d1zOVt9p8s+Y/neX3RVbce0ONWTFEZccbt+z1xYL9k1NEpoaGL8RxGm WmxQ== 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:to:from :dkim-signature; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=Vm9znrJ2XxICzlhYh55Jax9xdbsXC+mvR2BNp1d9GIHAehPizyUaYDHCzp+EqeHbUO 4rONquttFebs6TKVO2gcdGpsxHMy53tTXc8dEi08BMjLLCAZHtl9qZakA6dMS15aVYgP nxmS/DrucqGRpFMCrwQLIjSCu6Fstt5YYiRxmAAOAiUn2ZTo0wxKe6cr6PyFuNvx/rJ+ 00roxa1gP87Og5RzGb0ZZPuhAvM7OHmrZaMfTVHvvgwX0w9L9SYStDEHKBAhGChVAv0R PrxS7ORAt7iiVLP5bDLbKvZlvLWALVUHutwMxocRqGNta1i/4LiXrX7JFQied3vCxvg5 olUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uhMuANSs; 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 i7-20020ac85c07000000b003b3c56ce5b2si6872100qti.367.2023.02.27.06.28.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28: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=uhMuANSs; 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 1pWe9A-00068K-Mi; Mon, 27 Feb 2023 09:06:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWe98-0005yd-Jr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:31 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe96-00007u-Lm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:30 -0500 Received: by mail-wr1-x42f.google.com with SMTP id l1so3304300wry.12 for ; Mon, 27 Feb 2023 06:06:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=uhMuANSsBD1gVY23Uv8L13qMDeHiDtMvokvxRDj4GCibWeXYV3Ggc36Oeud86KhHV6 +OArFgo3BDMpHgy6osObCFIMhj4md3xoSGn45TkQLMF0eKjGdiYvVWZmr1zRnZ9p4plf 6Z6E3l5BbSQlyprqUefe7cZxEXAmbYnWjTBeoVrVhk0Rv7cgX9pBsJxE4kzBu5BukadP J87VLjnpQ6wbGevynvGm8Mm63Wxqkxn7ahn6J2sKPxYrQoz3URs/5UF57H8dGpmQhuSY FR0rQpD+yFmrCkrvVmqSDjNX5VQA2qFiNbVR2kHn8f2WTYJbVOnDzWhtNKjl7UieQH+a rwhQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=jw0a4FkK5WufZvYer5SXGvberHF57zd/LqzQJ/6ZDcfUZb2/Z2NHY9HvZeAIlqUv5A 28VWTiM8ikYBE4GLIqobn1vLXxBiB9EtYsSh6XVVW6SuWLImaj3A5skM2KjBjCrhoujc rsJpPAZq64zZ4YT7CSu3EeIw79fYyF9jAVhYSQkSGmdKFx45RtdW0GaK8PkIP26/TQLg LHTiVQImLDpcLMHsd63cI9jTIYW0PISDG7oFLglVauZQwgxaEryM0wXAVnvd+clJjGOS 6N73BnaX2kiyNPg3N5taonFdzZUl9PwwYeqsQt9/nzN5mss+8ySPAZxd5IdyJpBhpPR5 yixg== X-Gm-Message-State: AO0yUKVxBv9oE7qpfUx9gxjSw9xeDvLRZO+/jOOQm69tSoMMjxAnz3Uc boo72XdHnTQSjQzyKQpbvrwKnx/XY08BSriS X-Received: by 2002:adf:fbc6:0:b0:2c5:54a7:3630 with SMTP id d6-20020adffbc6000000b002c554a73630mr21491287wrs.46.1677506783493; Mon, 27 Feb 2023 06:06:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x6-20020adff646000000b002c56046a3b5sm7050207wrp.53.2023.02.27.06.06.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 055/126] hw/isa/i82378: Remove intermediate IRQ forwarder Date: Mon, 27 Feb 2023 15:01:02 +0100 Message-Id: <20230227140213.35084-46-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 From: Philippe Mathieu-Daudé 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é Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-4-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- 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; qemu_irq cpu_intr; - qemu_irq *i8259; + qemu_irq *isa_irqs_in; MemoryRegion io; }; @@ -47,18 +47,12 @@ static const VMStateDescription vmstate_i82378 = { }, }; -static void i82378_request_out0_irq(void *opaque, int irq, int level) -{ - I82378State *s = opaque; - qemu_set_irq(s->cpu_intr, level); -} - static void i82378_request_pic_irq(void *opaque, int irq, int level) { DeviceState *dev = opaque; I82378State *s = I82378(dev); - qemu_set_irq(s->i8259[irq], level); + qemu_set_irq(s->isa_irqs_in[irq], level); } static void i82378_realize(PCIDevice *pci, Error **errp) @@ -94,9 +88,8 @@ static void i82378_realize(PCIDevice *pci, Error **errp) */ /* 2 82C59 (irq) */ - s->i8259 = i8259_init(isabus, - qemu_allocate_irq(i82378_request_out0_irq, s, 0)); - isa_bus_irqs(isabus, s->i8259); + s->isa_irqs_in = i8259_init(isabus, s->cpu_intr); + isa_bus_irqs(isabus, s->isa_irqs_in); /* 1 82C54 (pit) */ pit = i8254_pit_init(isabus, 0x40, 0, NULL);