From patchwork Tue Feb 27 21:18:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 207437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2970766dyb; Tue, 27 Feb 2024 13:18:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVciocIA8yGBSkLXX17qnGw1A13BYYiEiRNfTckpc+JzmHpAvbyjTuUkDWKYJWi7cvE6CujU7eCpttDLcQpIFrmCjnbPA== X-Google-Smtp-Source: AGHT+IF7jJp46x3vZY8d+HG3DTvEkYVPYozHrbOIFyfuL94YkxjF/kMVeZADjStL6STf3jR1PuYJ X-Received: by 2002:a05:620a:1791:b0:787:a08f:a6c6 with SMTP id ay17-20020a05620a179100b00787a08fa6c6mr3837432qkb.33.1709068698051; Tue, 27 Feb 2024 13:18:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709068698; cv=pass; d=google.com; s=arc-20160816; b=ocIYciyQW+Rdmue0ope3Y746l0mafCTpAhzZfF+u4JWwxMxpn6UnO4BJ6QN4I8DPfN wWBHkelYgFGe4kPs2H5i0qESsJhfVjA8HQXsjzIldGJQf5mK34lLbxBBmbSAyO1cY18E t4yaBDIYv0+pec/apr04T+cbFpZmIBNpJAg8OVdLSzMEmULk4XzHIXYFMxl3wdc1kg1e jfXpFYXfuU3+O0LUAZpduIoOovpwWt8z9XA3yDBAeSg5v7k/ocQTPX7ljseCZBjg5UZb Hbb3AhFUkYvQN6gDvII4PRx+HN9lUYL0MWjNJmHUUJ39vPfBry7BvSKT9O+NsbzkmTE0 HtcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=PwhnWrACoSS5MqsaaDh+q42DkYCfvHCT7sWkf3xoyFY=; fh=546OEPtoZUYjWwSPOd/hX3L3p6biPmSjgTUnSRYaJpA=; b=V61SQh1wleDH/h1t+zP+5OODx8g/CzqQ2oyk1PLR6bR35ZKC1Cukt/8HtU99WE2/XF VzIyNDLgUVFrsildVvibbQqv2Y5P3qmJi66pDVKBLa77q80eSNE+VhBUghO+R7KqFg4n elmQTWJFF5gePRl2ydw3d+zon22zOw+cn+RY/GbjKYVJA37qWjxuZPlP9KLUfkcUT1WG DEKGk42ldyTkmfP3hZTGwr2mofd/3zJeSDxq3533hug1mhZ1u1XxsyGejlWhm6aNmoZD yaW3RqAaa26A3j5Br5/P5hFLauemdSVvY3vybtgXcfg9MJeHOnPNPfnZQI98v6rObuB3 d+pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oo8mK+td; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-84019-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84019-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w16-20020a05620a445000b00787ef204e32si425991qkp.428.2024.02.27.13.18.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 13:18:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84019-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oo8mK+td; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-84019-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84019-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D3A2F1C20ECB for ; Tue, 27 Feb 2024 21:18:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5B6314F972; Tue, 27 Feb 2024 21:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oo8mK+td"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nHai63OF" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73C2351C4C; Tue, 27 Feb 2024 21:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709068686; cv=none; b=jeSoh73rT9zWeBNyYy8N49FEPJ4Zo9nqRPIIUlUZlPdr0bOGMA7Y5Fmo7X0eRTfvSIN0lmSP+QZCh/pIwtXTpnKatkHndmwgLL2cM0Pbo5hUPwT2fZQ5uIcjh2imF7SKYAD3g1KShRAeZQPywnqKFCxWxH72vUgQAnHXji52nQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709068686; c=relaxed/simple; bh=qRWsrF2FhlekiFeN6dZF6GoevJxpbJKyFnNtXvb6z0k=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=jpIA4i/Ifka7BpWlnd+K6zAP5HrxWngNqISXoFqxDPc6Gm9JJkA6pQb0Ifjgkak4MAcXM57WlRmKqcXU30CYvbL+ncv1OZWUuaMC4+9UK128Df3WyxSQhBCIhzNyo+2TJkMEC2Iff8iDfRE8YkQv4u1n+Ca0ZoZfE170Mo4Erq8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oo8mK+td; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nHai63OF; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 27 Feb 2024 21:18:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709068682; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PwhnWrACoSS5MqsaaDh+q42DkYCfvHCT7sWkf3xoyFY=; b=oo8mK+tdgDYpkx6A1o7w1+XdEwqYjaBSU7PhafutweCG0Ds9Eh2yN20gbWAWwMj+UzYlWF hH10/FKj+9eSi+NSJJFsIgoGkenoOTe0Ab+Ckr/ZCa0/q976gGCG0J9zANZAJx5V3B53+U yPAUOI9gDVTNMDIfVxsM2WMWhoA7g8jiy1NTXB5OY+j6TAsOOv/G7ZvzddgCHlEmzoWApT uH/wx4LIf1KP0NZSqjGz5/xoPHPBXMvGDZx1WkSCZiv2ehWJn1WXrAfLVZw+RF024SIvyG MaNzKiXRLObLeUVmE/edhzERbeXUGxsy+Dg2tdiaiSaj88ZQ/0syGhlh7SJw2g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709068682; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PwhnWrACoSS5MqsaaDh+q42DkYCfvHCT7sWkf3xoyFY=; b=nHai63OFCs/jB/qqzaSHCFpcsRhhJv8p2jNXdQIeI/sKmzKEW2wZG5i4bGCYJwFLYT7Onx FPzwncMRyPmR+5Bg== From: "tip-bot2 for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/msi] irqchip/riscv-intc: Fix low-level interrupt handler setup for AIA Cc: Anup Patel , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240226040746.1396416-2-apatel@ventanamicro.com> References: <20240226040746.1396416-2-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170906868134.398.608439423720843674.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791933119950618479 X-GMAIL-MSGID: 1792088419026933177 The following commit has been merged into the irq/msi branch of tip: Commit-ID: 678c607ecf8a9b1b2ea09c367877164ba66cb11f Gitweb: https://git.kernel.org/tip/678c607ecf8a9b1b2ea09c367877164ba66cb11f Author: Anup Patel AuthorDate: Mon, 26 Feb 2024 09:37:37 +05:30 Committer: Thomas Gleixner CommitterDate: Tue, 27 Feb 2024 22:06:32 +01:00 irqchip/riscv-intc: Fix low-level interrupt handler setup for AIA Use riscv_intc_aia_irq() as the low-level interrupt handler instead of the existing riscv_intc_irq() default handler to make demultiplexing work correctly. Also print "using AIA" in the INTC boot banner when AIA is available. Fixes: 3c46fc5b5507 ("irqchip/riscv-intc: Add support for RISC-V AIA") Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240226040746.1396416-2-apatel@ventanamicro.com --- drivers/irqchip/irq-riscv-intc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index cccb653..f87aeab 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -183,7 +183,10 @@ static int __init riscv_intc_init_common(struct fwnode_handle *fn, struct irq_ch return -ENXIO; } - rc = set_handle_irq(&riscv_intc_irq); + if (riscv_isa_extension_available(NULL, SxAIA)) + rc = set_handle_irq(&riscv_intc_aia_irq); + else + rc = set_handle_irq(&riscv_intc_irq); if (rc) { pr_err("failed to set irq handler\n"); return rc; @@ -191,8 +194,9 @@ static int __init riscv_intc_init_common(struct fwnode_handle *fn, struct irq_ch riscv_set_intc_hwnode_fn(riscv_intc_hwnode); - pr_info("%d local interrupts mapped\n", - riscv_isa_extension_available(NULL, SxAIA) ? 64 : riscv_intc_nr_irqs); + pr_info("%d local interrupts mapped%s\n", + riscv_isa_extension_available(NULL, SxAIA) ? 64 : riscv_intc_nr_irqs, + riscv_isa_extension_available(NULL, SxAIA) ? " using AIA" : ""); if (riscv_intc_custom_nr_irqs) pr_info("%d custom local interrupts mapped\n", riscv_intc_custom_nr_irqs);