From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 155AB230BDB for ; Sun, 16 Aug 2026 07:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863687; cv=none; b=hvoX5EUpsmaTma+f4rh6A3qARbEYofsQABlykYQuI405PrqbRRiFirDD4vFdq1dwoCsIT4q5+dpzfAhZwXItkdfu6X6lkLvhNSjwf7ChAHbKlYEXvYRMJUCn5U9QU9Wt/ZBYfr+Jspo8VjJ3R1Y2zNE5kMfcf2koRcvnD3WnQWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863687; c=relaxed/simple; bh=DjWKEp40dbYMvccmMW4HoUEb+j/pQvYI1b+R5Eocft4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OLtCJKIKBI46AVEzeGkYqvKvdDGNp7d72oyMc2wgy9m3r9xVqdrssOhhG+ASS8A6KJZIWTckGLYtrM1BLhD8DYUrais6Z11QiqYdC5AuMZ0lcLlj0fnSgO1Ly3AKAlBUU5C2Kt3DsVzaF+k4pukBHmzNHadzGTYedDt1xDvk7UQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jxHMRhEp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jxHMRhEp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E01FF1F00A3A; Sun, 16 Aug 2026 07:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863685; bh=dB/jeR1Y8CYCi+kLcLnNsF3XST9sa8hY/+IQpCFYcjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jxHMRhEpDraNs5qWgyF8Y0u6HTAgxoXCL4aYX6a+rBNvZ31DGd9MOxFD48eNOMs5u RPVv4DCD1qgI4dM4tEpsJzKNOuuD2BTqyS2kLyDbx27cg2JtMcI4roWo3cboYI2W6y OMxq4/0SNEsk93/nbixuaP4FOJZvLrXnsb8NwlKfQM94EtI3P46YYB01BaUVBWrOdq z1/elxmirB5edLLFD4S+AjnmMsVtq+TsI1cH3OW6kUVD0y5ytorJz4+X3B7VQTKvym IH3TCekLNnbS8yUE05SVqLq+7MvpQZMeLcE24CxUyFgVcswiOVR3RytcDxrazPLS+O uIAHZf3r+PkOw== From: Guo Ren To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: palmer@dabbelt.com, pjw@kernel.org, aou@eecs.berkeley.edu, alex@ghiti.fr, tglx@kernel.org, daniel.lezcano@kernel.org, anup@brainfault.org, hui.wang@canonical.com, samuel.holland@sifive.com, "GUO Ren (XuanTie)" Subject: [PATCH 5/5] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI Date: Sun, 16 Aug 2026 07:00:49 +0000 Message-ID: <20260816070049.2097442-6-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "GUO Ren (XuanTie)" IMSIC was defining its own IMSIC_NR_IPI (= 8) which happened to match the architecture's IPI_MAX. Now that IPI_MAX is exported from riscv asm/smp.h, use the architecture constant and drop the private define. This keeps the number of multiplexed IPIs in sync with the rest of the RISC-V IPI infrastructure. Signed-off-by: GUO Ren (XuanTie) --- drivers/irqchip/irq-riscv-imsic-early.c | 4 ++-- drivers/irqchip/irq-riscv-imsic-state.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c index 12efd241ce88..823f5f2ecb3d 100644 --- a/drivers/irqchip/irq-riscv-imsic-early.c +++ b/drivers/irqchip/irq-riscv-imsic-early.c @@ -67,12 +67,12 @@ static int __init imsic_ipi_domain_init(void) return 0; /* Create IMSIC IPI multiplexing */ - virq = ipi_mux_create(IMSIC_NR_IPI, imsic_ipi_send); + virq = ipi_mux_create(IPI_MAX, imsic_ipi_send); if (virq <= 0) return virq < 0 ? virq : -ENOMEM; /* Set vIRQ range */ - riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI); + riscv_ipi_set_virq_range(virq, IPI_MAX); /* Announce that IMSIC is providing IPIs */ pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSIC_IPI_ID); diff --git a/drivers/irqchip/irq-riscv-imsic-state.h b/drivers/irqchip/irq-riscv-imsic-state.h index c42ee180b305..878cc192ccec 100644 --- a/drivers/irqchip/irq-riscv-imsic-state.h +++ b/drivers/irqchip/irq-riscv-imsic-state.h @@ -13,7 +13,6 @@ #include #define IMSIC_IPI_ID 1 -#define IMSIC_NR_IPI 8 struct imsic_vector { /* Fixed details of the vector */ -- 2.43.0