From nobody Sun Nov 24 11:37: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=quarantine dis=none) header.from=schmorgal.com ARC-Seal: i=1; a=rsa-sha256; t=1723832327; cv=none; d=zohomail.com; s=zohoarc; b=dYLxg+E2jQQ5yU+qCNGLpkf65xJOgBqVI1QQin1d78DPKWe+smsK/TKZ/6CdAdUq7UnIFyojRDv+LQnP6RJ7/b7JuaPEc+MM8z1A+vy5I9wZkPzvEye1WR88xytUUfVKczcnNlh2eyyjGyM3BBAbKPqKBNXARxbwChlTCIfMsDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723832327; h=Content-Transfer-Encoding:Cc:Cc: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; bh=Hpykp3v3nUS3no6XDt2FDZxaHDZOI6A5wRB8LlJUTdQ=; b=Ni1gJnHsXFkr4Dm2YEax1IxQonG7my3uD8VSgQTaoC/66ppLbMnj8TgxsWBuPMVxvjjQx31x/ytL6pJpVehm2hMZhq4zQ0tUhXM6DHXT5A1PgHWMFBb5qARJxlLGKcCr/zIz+TjMtdtiAZYX7xoWzBRcp0kIQGVXdPv1vzM3lAw= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723832327557910.3092866132821; Fri, 16 Aug 2024 11:18:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sf1X2-0004LI-TI; Fri, 16 Aug 2024 14:18: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 1sezwe-0003GX-FR for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:36:56 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezwZ-0002KG-7h for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:36:56 -0400 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2d3ed48c748so159303a91.3 for ; Fri, 16 Aug 2024 09:36:50 -0700 (PDT) Received: from doug-ryzen-5700G.. ([50.37.200.153]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3e2e6b201sm2134285a91.15.2024.08.16.09.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 09:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schmorgal.com; s=google; t=1723826210; x=1724431010; 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=Hpykp3v3nUS3no6XDt2FDZxaHDZOI6A5wRB8LlJUTdQ=; b=VqjC/92pQ54Pj0Mzn0kzAxfEQ8vMZgqMoxKEGM8NHas1Te9LJ782Jc26Iit+mpCJlw NZXlzFdsEu9FZBxeLWOC67oHdI/Hc9N/it/e45W/oEC5OyfN9qzbHio+55WheMWVo5og IU6eJu6OTJbcn+S0/0+brYUdc8Pl9vMNnwbYA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723826210; x=1724431010; 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=Hpykp3v3nUS3no6XDt2FDZxaHDZOI6A5wRB8LlJUTdQ=; b=NgiopPYQOz4Y1EutX65XKzKXwP7hSD/gqVecXZrC6ehQMo9ck334vleFacT2VCc4np I663NNIefw8hrr8SUNWLVgSrxfVFip/U09jd5Ee3ZaQ8wBlkyW8iTmmozpWRgSIOqJgb rVv5a9HPoJ8fbvxkgX4ty6U8CeL4qxNLp5AvOSJexuTHSTWIGnPFgDuYOLKoM2O80Cm/ BSueFj2DwUwqYtCT/3Bjw9uy4Z+9YtrhvF/Ccjy2RJSf3xniDGC3WVclvaueFmzs3Qzj Ct//S6DGdIZN94CB4Zs5woz5m0BHkd7nVGWHz6yLLzXvdMEYfg05SDDHhAUsIUGp5QxE UMHA== X-Forwarded-Encrypted: i=1; AJvYcCWRAc+mgtRjqTKiMzyvnx1SKwdv15StKeT13t4L9Ny5ZdDUsffsjLpbJC6ZSpiZiKWs6jpT8uWWkVxL@nongnu.org X-Gm-Message-State: AOJu0YzrcMhB7JZCTsJiIPhhkSZChZFaULzVC9csD7XCFd5QmWvAevVI TfUWiy/GAhjm4D+NZGrPeZDfe/VOUE7XNWsjnCXDMxugtWfzPXdfm8f0CmGg1UE= X-Google-Smtp-Source: AGHT+IHtue1ofcS5v4Hx4+pAt9Dw9ZXebnre/TFnx2PeOqt8lj0qBsytmNORWwtiXFPBgWyZLAcGKg== X-Received: by 2002:a17:90a:ad83:b0:2cd:1e0d:a4c8 with SMTP id 98e67ed59e1d1-2d3e02ebd87mr2208763a91.3.1723826209538; Fri, 16 Aug 2024 09:36:49 -0700 (PDT) From: Doug Brown To: Vikram Garhwal , Francisco Iglesias , Pavel Pisa Cc: Jason Wang , qemu-devel@nongnu.org, Doug Brown Subject: [PATCH 1/5] hw/net/can/xlnx-versal-canfd: Fix interrupt level Date: Fri, 16 Aug 2024 09:35:01 -0700 Message-Id: <20240816163504.789393-2-doug@schmorgal.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240816163504.789393-1-doug@schmorgal.com> References: <20240816163504.789393-1-doug@schmorgal.com> 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=2607:f8b0:4864:20::1030; envelope-from=doug@schmorgal.com; helo=mail-pj1-x1030.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 16 Aug 2024 14:18:34 -0400 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 @schmorgal.com) X-ZM-MESSAGEID: 1723832329662116600 Content-Type: text/plain; charset="utf-8" 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 --- 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 5f083c21e9..ad0c4da3c8 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