From patchwork Mon Feb 26 14:21:54 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: 206675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2107903dyb; Mon, 26 Feb 2024 06:22:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVf1qrdv/4yrMqaxQm9sJVKkmRqCifj/mQwEuCe1/+YqMMw2+Wg9d9uf2dhIKYX4eBfsAxydUss4L4+22hoqMjXJdzdyA== X-Google-Smtp-Source: AGHT+IHRFCr1exTAroA8GPwdKZmg0L5Bqh8cr8F0RORRyN7CsIoCdWskjCLLVxO0WM7wd4BW2Sv7 X-Received: by 2002:aa7:80d7:0:b0:6e5:7ff:53ff with SMTP id a23-20020aa780d7000000b006e507ff53ffmr4882683pfn.6.1708957330688; Mon, 26 Feb 2024 06:22:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708957330; cv=pass; d=google.com; s=arc-20160816; b=KXdAIKmgtol1DYHpHxGRTpx1wlFGWLFNEeAu3gznNAPqkgPG2xdZx+goSShF+juqp1 xWhmmCuvVHsyF1ibZxwB/5Czd7qKQois/LA2/f6m6NuFtckD00lYo0cmumHzYVW20Fye au1WSvrRgdyGrknkh5NfZeQZZqtiGcLnQk9REzDh+ukFIBgY0Syfnfta0kbM+6o51xlJ lx9ROMsJXjLCZN7hsgpuNwR2MGk9XaLAVCY8YU3xNWuytC2207EvfWXe/WbJyR2ldb1a 5H+aseNsA2hKrX/7NLkJscAiBf11oh1YvLVeU0iOWDrQEHU6ejzPMw3dYFHMByYuaeM/ yHaQ== 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=gGUxh/MpWYF6modd4VritjfskWdY8aSRe1GkrlnbTQA=; fh=546OEPtoZUYjWwSPOd/hX3L3p6biPmSjgTUnSRYaJpA=; b=vP/uV97JJrVdrJGkESasQL0tsl8ckWToXi5yNgnQEZCVj9IBlBq7Z/8HgIz2pjX9ke txfrIc0Zbr8CKedbJeCSezIDsqV+tFkGnZjPZzQ6PD+FWjn59ya2iw9m+ryC1UNJdLhX oe8zI/XMJ63Vxl/TL3+AYuqWfNEd1mJw+0mMeTeAaj4yflimMY0Y3Uwp0+9Lp0l8HWYU TMJeT43JGWyhQwtGSXidEXH/CB/rzxvG1FZTengM9AN2prYNj30xNQnjR13PLn4/5xj6 Db0/6HFmkfP9w1nmL1ZTxx4gPMOfotUJEZneOa/iIZshAVerdT8ZGSycoqRtluTGeUtT j6rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Di2Qs7Tr; 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-81602-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81602-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b10-20020a056a000cca00b006e5444dc403si2193pfv.190.2024.02.26.06.22.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 06:22:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81602-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Di2Qs7Tr; 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-81602-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81602-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2D9A428976E for ; Mon, 26 Feb 2024 14:22:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA50212A15A; Mon, 26 Feb 2024 14:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Di2Qs7Tr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NiEdbtvB" 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 6829C129A60; Mon, 26 Feb 2024 14:21:57 +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=1708957318; cv=none; b=JChThJajkzq9nAbWH08z+WvI40IVtaFW6qJY9vni9DqfDRUdjrhSNUCHG24PNIWhu/nPHGLR1y7qOmaEsz7rEtt8OW2oSJ+vDIDJcqTIDV6s8m1Paor1j5fuPx+OQwjoYfpzx+aELS2WVrP7fW2qv3R4g6nWoyaqaVmrBQZgJgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708957318; c=relaxed/simple; bh=8WvnMs1Oiazuwc6Dj/9PvxJnw9utvTorR83BBqq8Wqs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=XMcngifRfCFocLsYNdjnVOTYoNYSFpP1p9igCZGIr2lGzQH1jV37v5abqFV45R4olnYW72B8Co8IAm3hd2hlRHttGYiDeT73ljVsDqqxNKVJ5d43rX30RU0Vmcw59uon7NE9u4hWNOjdhU949So8VuJ3dfm0IzvxocgdzF3iiro= 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=Di2Qs7Tr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NiEdbtvB; 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: Mon, 26 Feb 2024 14:21:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708957315; 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=gGUxh/MpWYF6modd4VritjfskWdY8aSRe1GkrlnbTQA=; b=Di2Qs7TrAa2MgtDtmguDRlrZmdoIB89lLyOmDpnBfH9OltqDbh5wq16MUEVBKtDLTI3doi oBYdJoKHM/YInW5JarZKTA+7dWUt7qOW1dbzrv2ETXG7V5I0+IPKG+BCQ0eSnru5uTU9GV 7cxId1os4xPbbMiEJhA4JSDIPU/4W87NfK8DJtWosZ85sC1vKLulfEDwfIq/xdIqXMYAET XPkOlctdB+pqHF543t1M2EPkQxLYof8w9cYIwSVlFe4swEH/LlukekaxTvpIgVxhmWUKvo J/mqsbb+PlfeAWJs5XbTaUzOir2j+lAALIbAZqKObzAxAll0L+rSEZH0BUsnPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708957315; 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=gGUxh/MpWYF6modd4VritjfskWdY8aSRe1GkrlnbTQA=; b=NiEdbtvBxmtCUquJSccOpFvW9AT/gTzjEHemVi8YHgmMusxlpeH3Y5pM9pmkX2+QC/T20T pZZKajuszzxaOFBA== 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: <170895731463.398.6136319036686107784.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: 1791971641969008818 The following commit has been merged into the irq/msi branch of tip: Commit-ID: 1abea7339b404bd79bb26976471e3bf8e6080f47 Gitweb: https://git.kernel.org/tip/1abea7339b404bd79bb26976471e3bf8e6080f47 Author: Anup Patel AuthorDate: Mon, 26 Feb 2024 09:37:37 +05:30 Committer: Thomas Gleixner CommitterDate: Mon, 26 Feb 2024 15:17:11 +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: c1be2ae5987a ("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);