From patchwork Mon Apr 15 14:55:04 2024 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: 1923762 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=P4S1nKyS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ9GY6LjJz1yZ2 for ; Tue, 16 Apr 2024 00:56:05 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwNk8-0002oW-Nl; Mon, 15 Apr 2024 10:55:36 -0400 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 1rwNjw-0002lZ-LD for qemu-ppc@nongnu.org; Mon, 15 Apr 2024 10:55:24 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwNjt-0002Ts-HB for qemu-ppc@nongnu.org; Mon, 15 Apr 2024 10:55:24 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-41551500a7eso18481205e9.2 for ; Mon, 15 Apr 2024 07:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713192914; x=1713797714; darn=nongnu.org; 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=nBKvjyZHrA8if2PPwIeCgkhgbYs8MogwQPuCwsG2SeE=; b=P4S1nKySTLpYB6AJ3EFlhCwPGOAzdMXu74VtLZ1GgtSeuBkLKDyJb+XZs6VekU2vaD C7B6coLRymMSUtQHVcxUEnUqHKNOTCr1w01/D+LQ/gvvMOezWSRkYH8tJw08DW9jmaLx ZRvAGCdTZ5w+HZHHoT38bCQvx89iAhiA6pTtZ+QYdhxmsrtoHHLpIYvZ6v8my7GI38Jh QB2M6YKRSClZz/+yT86ejtDhUqFpG78PqEfNu9R1UsnJ524P5PUTC5PihKJzq+Nj04Fs LQMXhxnCrZr2JEQtLEmcHdRZhpUga5bpozyKMmlc0HpjQQmTjwofyIxsajTTQk2nOW6Q bn0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713192914; x=1713797714; 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=nBKvjyZHrA8if2PPwIeCgkhgbYs8MogwQPuCwsG2SeE=; b=Ly9AuoObHlBmyKj5uBo9VnE+uxlagbhd3NiPRpSBXdTFVLxDBUSPvn/xF5G6jL2YFw JTNGEo5S1NIJuYkCCSlUuw7PkNgDjcaBPaobNo9hopp6fQcZT6WRyMTTVHkRNBSahl2m shnKvZ7++yKccsHGGo6yt0GRHohFDkNbeJ+VC70Qqbz8AvUt81D1Wngu1JxNIKoB4Dac kpcD8LR4HYQuFDn9Vivy9jtiM64u6tKVPyPhgcHYUNMSeVUt61aMZ2HMClNU24BBh/lt Kn18SWk+o7TT1GnImyZQvvZcqO40atYtYDhXChexBljFb2r8/3uidBDwVytPIO/+KlU8 1ngg== X-Gm-Message-State: AOJu0YxftIqrCgqS39a80QUxNyACXRaCrrkjODXt1T7WGJD3neorxbQH HswJ0wRZtjAVqpaY7RnmYhoo0WTRB3MAntaZccWb5Skzba6D+pdghNqDku1ylD4= X-Google-Smtp-Source: AGHT+IFfPtjdg9SvpAyQMsi/x44alks2bOcBb0OS/XScqo+BKslr699DR4HQhrmbl3RIxAOxcK6zNQ== X-Received: by 2002:a05:600c:4690:b0:418:6044:26cf with SMTP id p16-20020a05600c469000b00418604426cfmr1627759wmo.28.1713192914500; Mon, 15 Apr 2024 07:55:14 -0700 (PDT) Received: from m1x-phil.lan ([176.176.132.126]) by smtp.gmail.com with ESMTPSA id l16-20020a05600c4f1000b00418729383a4sm2497829wmq.46.2024.04.15.07.55.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 Apr 2024 07:55:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, BALATON Zoltan , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 1/2] hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately Date: Mon, 15 Apr 2024 16:55:04 +0200 Message-ID: <20240415145506.48179-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240415145506.48179-1-philmd@linaro.org> References: <20240415145506.48179-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: BALATON Zoltan Move calculation of mask after the switch which sets the function number for PIRQ/PINT pins to make sure the state of these pins are kept track of separately and IRQ is raised if any of them is active. Cc: qemu-stable@nongnu.org Fixes: 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq() Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240410222543.0EA534E6005@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index aa91942745..8582ac0322 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -658,7 +658,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) ViaISAState *s = VIA_ISA(pci_get_function_0(d)); uint8_t irq = d->config[PCI_INTERRUPT_LINE], max_irq = 15; int f = PCI_FUNC(d->devfn); - uint16_t mask = BIT(f); + uint16_t mask; switch (f) { case 0: /* PIRQ/PINT inputs */ @@ -673,6 +673,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) } /* Keep track of the state of all sources */ + mask = BIT(f); if (level) { s->irq_state[0] |= mask; } else {