From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CDD6CCF9EB for ; Mon, 27 Oct 2025 19:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W7JTiZ3C7NBeCUbhao7E0hJGZHL/4qklBa/0QvNZ0OQ=; b=rda8K+dxucM2bP tZrgl2FIuupkD9IQEn52dabZd4otkTGyQ90JfSAblh5nddmD+iPNLAThon/ql9pnVjRF50ygQYXzZ IdoRZX5XMya5eX150Z2t6J87cuXJVP8UoB7J61UrtnOqq+Q3lkQjjh4X5b2p75r2E5qE91R9wDt9K /ETTzyIYckRUMxM4WjBF0lw06aGjutTh3c35OTqmQyjTOJeBpRBcXVilKkUFt+ftw2KRYx/bdqfBL bZIRNvqln6IBeCy2qE44acbYtBrluz3g2LntKiIoX5qXxZ0PgSaveuI7NbJ5XtDWLytfQ5h6dgXp/ YGw3u6YjuD6MyYtgRhHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDSZ8-0000000EchA-2fxw; Mon, 27 Oct 2025 19:07:38 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDSZ6-0000000Ecgq-34jj for linux-riscv@lists.infradead.org; Mon, 27 Oct 2025 19:07:38 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 2483344386; Mon, 27 Oct 2025 19:07:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5CA1C4CEF1; Mon, 27 Oct 2025 19:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761592052; bh=PbSM5Goroah3kg+eVMNFshrN2EhgSvGlXNZQZDE60SM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p7QZ96Mnxzfza4/gc8yBSPC76BDRgHUbR72Nedm9ak0i72qa8bClcGtm1hcwSaQ8d k8vV+8QQg9QhopOYHdvn1WWh4qa+3jGieS9ztKnicjwJYcmjjZlWWwyFoj7m4bNXgI UNGXh6wPsuRIlwYLueTnAVil2TiCz0zuDky+yuvI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Rob Herring , Sasha Levin Subject: [PATCH 5.15 070/123] riscv: Use of_get_cpu_hwid() Date: Mon, 27 Oct 2025 19:35:50 +0100 Message-ID: <20251027183448.271242205@linuxfoundation.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027183446.381986645@linuxfoundation.org> References: <20251027183446.381986645@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251027_120736_792856_2964657C X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rob Herring [ Upstream commit bd2259ee458e299ec14061da7faddcfb0d54d154 ] Replace open coded parsing of CPU nodes' 'reg' property with of_get_cpu_hwid(). Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20211006164332.1981454-9-robh@kernel.org Stable-dep-of: d2721bb165b3 ("RISC-V: Don't print details of CPUs disabled in DT") Signed-off-by: Sasha Levin --- arch/riscv/kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index 6d59e6906fddf..f13b2c9ea912d 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -22,7 +22,8 @@ int riscv_of_processor_hartid(struct device_node *node) return -ENODEV; } - if (of_property_read_u32(node, "reg", &hart)) { + hart = of_get_cpu_hwid(node, 0); + if (hart == ~0U) { pr_warn("Found CPU without hart ID\n"); return -ENODEV; } -- 2.51.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv