From nobody Sun Nov 24 05:54:08 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=1726240830; cv=none; d=zohomail.com; s=zohoarc; b=FAQPFDwhRDJvsTKZz0NN0WKvgIVo+3S/Yigl7UmIIaET9bjgS/1YPdWnL8WEB7es4zIKv7l4Sfp5tplFMDCVFKOVVrKidW/MXB9txykpi1zbCn2v5QPYtUaXXEU2gEi8b3LxE84kDHvU8eJQGgjXYPmkSgDcpCY3SzvELd5JZs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726240830; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=dcqXMxLjwWlPP6O8WmHKBKl3hhhcbk38Qfnbk5uacwc=; b=lNqSAe1KAZrut92r6+2WiCYWdl4N6JkVuHnjHRtGGHlh5qG9xNq2Al6ki27s4sGVCGtrCfHYsw+y4wHwMtw+aSNQEbSrnc720bfMmq0rIci1seL4tZnBdLYJhqvZ96v6xPC9AXbdtUwmpFYksp6cyJAaQ6sBoK8zhpYlsRk6s/8= 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 1726240830010426.6798731733169; Fri, 13 Sep 2024 08:20:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sp80b-0003Ok-4q; Fri, 13 Sep 2024 11:14:53 -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 1sp809-000299-Tk for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:26 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sp807-0007nj-E4 for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:25 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42cb806623eso20966345e9.2 for ; Fri, 13 Sep 2024 08:14:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b16bfbfsm29152325e9.22.2024.09.13.08.14.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 08:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726240462; x=1726845262; darn=nongnu.org; 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=dcqXMxLjwWlPP6O8WmHKBKl3hhhcbk38Qfnbk5uacwc=; b=koen2+tUovz6PKNMtguqFw/H7i7YfxdJuEE/KFGDMlqerTvrtntFOtMK7SC0/2DeoH ZBlWHv7NvpbnbEgurIGvbOoVHEpD8OAKEnbqFJLQxY23tzP36wXPukM5fdlMxO9oeELS O2MdnLIvp+gZmBfo6eDUc3WvQinkatJWr1CumBlTWeJ5zYZlYLbGXocRvzXKhX3ifRXV 0Nk1JQeHALBec39YFDRZZqYkKQ5Ju8WZkIaDVlfx9yefKFysPgUJlAWayeuWYSZdqYlA gRtML1LgGE48x8cy90LnetTTchMGdmhwlbx6pwN+aTSIk5dpFZsWxCcwtlCNMiCvFQij Nd1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726240462; x=1726845262; 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=dcqXMxLjwWlPP6O8WmHKBKl3hhhcbk38Qfnbk5uacwc=; b=f48eqFy4O0HV3PztRuxvVdP8MBvY55ExZITGVX6KmFBhHEbT1MajCtMS7VegcXdY0W jh0xisrjh6WCfRcZ0bkOJ0XWHbcG1gs/Fk0dB9rzDuyan7uIlNcjXo9/F8I2M2Yg4IUW VOtbLMJR+P3YUjUkDevK+87lukJutnIWzPzJNhCDnBOHIZXBOzmMlvUo/NgAeq1kISJr a1uhLovBiXbSDr/L2SUs4VL4e7Vnt/Fm8Dte4gfPInkpvwrTXtCItRQcWAO1CQ6Kk7DN wH+2SlFkoaEPTzbuVHHepPxPyoHX20gDzflkcc/gQCx4j6MzRshpviQghDRBMtm2OIe3 Iqdw== X-Gm-Message-State: AOJu0Yy+PB7isTiQBpnvhZCzZVzvhNnBMgvkjTePRRaH6Wx/vrJ07d6v DCubIEgUeizZfL5/Aho/J94pEPa3EQ39bqhq/4PTSZoTrG1KQZSmgJzGmF7HlPuAIzJxDdYwO74 1 X-Google-Smtp-Source: AGHT+IGNHCfGwidw6zlDXf7OlsNh4WrTDGhpS6PdDMI5XdpKJgBbN5rbEqsSgoYYe2zB66Atu7jqxg== X-Received: by 2002:a05:600c:1c1a:b0:42c:b037:5f9d with SMTP id 5b1f17b1804b1-42cdb4e6a7bmr57568285e9.3.1726240461998; Fri, 13 Sep 2024 08:14:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/27] hw/net/can/xlnx-versal-canfd: Fix interrupt level Date: Fri, 13 Sep 2024 16:14:01 +0100 Message-Id: <20240913151411.2167922-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240913151411.2167922-1-peter.maydell@linaro.org> References: <20240913151411.2167922-1-peter.maydell@linaro.org> MIME-Version: 1.0 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::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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: 1726240831215116600 Content-Type: text/plain; charset="utf-8" From: Doug Brown The interrupt level should be 0 or 1. The existing code was using the interrupt flags to determine the level. In the only machine currently supported (xlnx-versal-virt), the GICv3 was masking off all bits except bit 0 when applying it, resulting in the IRQ never being delivered. Signed-off-by: Doug Brown Reviewed-by: Francisco Iglesias Reviewed-by: Pavel Pisa Message-id: 20240827034927.66659-2-doug@schmorgal.com Signed-off-by: Peter Maydell --- hw/net/can/xlnx-versal-canfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c index b30edb83bf8..f89dfc565b5 100644 --- a/hw/net/can/xlnx-versal-canfd.c +++ b/hw/net/can/xlnx-versal-canfd.c @@ -682,8 +682,8 @@ static uint8_t canfd_dlc_array[8] =3D {8, 12, 16, 20, 2= 4, 32, 48, 64}; =20 static void canfd_update_irq(XlnxVersalCANFDState *s) { - unsigned int irq =3D s->regs[R_INTERRUPT_STATUS_REGISTER] & - s->regs[R_INTERRUPT_ENABLE_REGISTER]; + const bool irq =3D (s->regs[R_INTERRUPT_STATUS_REGISTER] & + s->regs[R_INTERRUPT_ENABLE_REGISTER]) !=3D 0; g_autofree char *path =3D object_get_canonical_path(OBJECT(s)); =20 /* RX watermark interrupts. */ --=20 2.34.1