Received: by 2002:a6b:7707:0:0:0:0:0 with SMTP id n7csp1335900iom; Fri, 10 Jun 2022 02:07:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq4TcqXpktZv3fFPvR6GFuKjBmCkAUpukd0zhBgAyGnQ2Oan5ud9OiFalO7OxGMdnPrYRC X-Received: by 2002:a17:907:980c:b0:70b:543b:f4cd with SMTP id ji12-20020a170907980c00b0070b543bf4cdmr37504798ejc.34.1654852033273; Fri, 10 Jun 2022 02:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654852033; cv=none; d=google.com; s=arc-20160816; b=yKeRqGb9TUnSSy5W1lLOj+ptezJvR6IGwlngDbBse3s32T6o8NWUERMUbHWBVQ2qRZ aAC6HBwMwX+yIQQg09OPsvtwTDjaiTxrLnzRVwzo7VcnYbkUdu3gk6o8T2iW7MR7pDiq tvRNLxh9bVuws/NbIgDRTV2ASurjr4yHKZ749vxogiwrzyRh3xgCsmvOCMP5b46Ri59j 1ujnO/a0nYMbER1j7/WXxLvsPRaWvJ/CPJQb2CkhccFAfmXu0a41tSdDAayxHdluS5aj Wt/fHqbgF7sOro08tuu86aP3GTitGNoKedArbxRMIiEr1YVRW/0c+Rr7mNkCX2S3z+aP /V5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=0N8DC9YiixUnBDUbCMkl/hkU2FVaOtBGL3Vg0n8cwds=; b=DWhYGb1o5wwNDKEvY5zBSaUiKqp1AeqW7/bUKXfyqLmnhStifKMZA27egPDQrV152Z jTApnaGR55A34cdEvuarPXNuZ7IflR/nyrKVITltuZveNYvG/hBQBAMxsJWms9QqZaDj TUSliJpGe1JxE+9Wc16C+/Pxy2r/ICskvUL3oqbzGreGhXKGpIhcI6gWIlWctpob5Gr3 g6Z4XJRox2g4SbQ3l1ae6KITeqZq0Llb3x2OIN+naTibF5GwMem+mDa3M4Vp/UDrK53V QS/JSwUu1F8VV8lrhhJ+Fp5tzkGQDlYwtCzQlv5v6BsriQTRNjYxjn9iP9g+zuxlvG7C fBHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vj5FPN5F; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a1709065d1200b00711d0bc2394si1589546ejt.892.2022.06.10.02.06.47; Fri, 10 Jun 2022 02:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vj5FPN5F; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347142AbiFJIFM (ORCPT + 99 others); Fri, 10 Jun 2022 04:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347082AbiFJIFF (ORCPT ); Fri, 10 Jun 2022 04:05:05 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7C3C2B199 for ; Fri, 10 Jun 2022 01:05:00 -0700 (PDT) Date: Fri, 10 Jun 2022 08:04:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1654848298; 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=0N8DC9YiixUnBDUbCMkl/hkU2FVaOtBGL3Vg0n8cwds=; b=Vj5FPN5FKVWRZPwXxXfhOvf3uHWERgZexwxayMb2/dVAIuJ+hGSUAO3PE641wave9OCFG/ eLN1vZHRiSPHoDICcWmgwzwiqhi9g1ZVrp1lBJ0d3HOCWNJwsNE4FjG0HVllx47nKhunny NHbeX8uDC6Qzn4Pc5qI3kyN98q3YZgI/agx9ESpq8JqD43iQRxY9nElx9S7rifMCLCt0MW 7e2jA+fm8YIuZkRUKamLHf4srCaVq+vPIDtBGQCC7Uchq+z8e3simuq/2ZgfL4y8WWFDhv KGE9sJooxMqH/EmhzYtOtfB/+ztWDmA7ElJ0+0ZU39BJXQ+27ZpxBlRhv1jBdw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1654848298; 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=0N8DC9YiixUnBDUbCMkl/hkU2FVaOtBGL3Vg0n8cwds=; b=VQ/ikr4TkOALtDvUGSO7VtK8fGg7/TPQZ+mM96GlPiH6xHKmbhE41JZILhxjSi/GPBgFMp Bv8PJkLSTl1GSFDA== From: "irqchip-bot for Jiaxun Yang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-fixes] irqchip/loongson-liointc: Use architecture register to get coreid Cc: Jiaxun Yang , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20220609175242.977-1-jiaxun.yang@flygoat.com> References: <20220609175242.977-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Message-ID: <165484829710.4207.11924416657167515441.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-fixes branch of irqchip: Commit-ID: 6fac824f40987a54a08dfbcc36145869d02e45b1 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/6fac824f40987a54a08dfbcc36145869d02e45b1 Author: Jiaxun Yang AuthorDate: Thu, 09 Jun 2022 18:52:41 +01:00 Committer: Marc Zyngier CommitterDate: Fri, 10 Jun 2022 08:57:19 +01:00 irqchip/loongson-liointc: Use architecture register to get coreid fa84f89395e0 ("irqchip/loongson-liointc: Fix build error for LoongArch") replaced get_ebase_cpunum with physical processor id from SMP facilities. However that breaks MIPS non-SMP build and makes booting from other cores inpossible on non-SMP kernel. Thus we revert get_ebase_cpunum back and use get_csr_cpuid for LoongArch. Fixes: fa84f89395e0 ("irqchip/loongson-liointc: Fix build error for LoongArch") Signed-off-by: Jiaxun Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220609175242.977-1-jiaxun.yang@flygoat.com --- drivers/irqchip/irq-loongson-liointc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index aed8885..8d05d8b 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -39,6 +39,12 @@ #define LIOINTC_ERRATA_IRQ 10 +#if defined(CONFIG_MIPS) +#define liointc_core_id get_ebase_cpunum() +#else +#define liointc_core_id get_csr_cpuid() +#endif + struct liointc_handler_data { struct liointc_priv *priv; u32 parent_int_map; @@ -57,7 +63,7 @@ static void liointc_chained_handle_irq(struct irq_desc *desc) struct liointc_handler_data *handler = irq_desc_get_handler_data(desc); struct irq_chip *chip = irq_desc_get_chip(desc); struct irq_chip_generic *gc = handler->priv->gc; - int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES; + int core = liointc_core_id % LIOINTC_NUM_CORES; u32 pending; chained_irq_enter(chip, desc);