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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27132C433EF for ; Wed, 6 Oct 2021 16:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14BF561154 for ; Wed, 6 Oct 2021 16:44:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239464AbhJFQpw (ORCPT ); Wed, 6 Oct 2021 12:45:52 -0400 Received: from mail-ot1-f48.google.com ([209.85.210.48]:34784 "EHLO mail-ot1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239474AbhJFQpo (ORCPT ); Wed, 6 Oct 2021 12:45:44 -0400 Received: by mail-ot1-f48.google.com with SMTP id g62-20020a9d2dc4000000b0054752cfbc59so3952950otb.1; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YhacG1oflfweV+ZMxYJrdhD3dQtCOWEVKc3UA01qLrg=; b=kSh3oWroS+XO4aAllMH2APeg/Nwl+0EPsAkgwZhzHyw1FdEoYAzcJhtLit8Fypi9RB OYxIx34PzchUjqLWSQB93JDoA7xZqUwOXZ7iryr5cWs/8hdH+xYlvt+coPwV7ymRSiU7 YvSEgEWvU5Cj0LTc75yrz/D9IP7yHa3ELgpYrhk5LhTci2GSuGjNdJUpGSmC8rz/FsR/ 5ppcpKCbHA4bdTnwKEBHrWWoCCXnwcMh9gz1jNxMqE1YPTvYLWmn5BCyUWmaZJEbGQQd SnZ7gawf70T7LHlUbqfrIOpqFvA+Ql+WlDi2RHFD4M7ki8VUU+bKlStmAs7TdhWI10yu xkVw== X-Gm-Message-State: AOAM532nlfwwrfW5o/Ptp54MJsnVuKeBiN7JfF2zayimLfBCdTgh4UXy uvkUu14rM2+p5SHX+3RvRA== X-Google-Smtp-Source: ABdhPJzJQ2R5CEfp/bAtXtoCRQDaDF5B6RqZA1flXSsxFu0kVfpgeNfjZq0OKrhuVdseg2/0PDqWlg== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr20503877otc.300.1633538631080; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id s29sm4236628otg.60.2021.10.06.09.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:49 -0700 (PDT) From: Rob Herring To: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , x86@kernel.org, Greg Kroah-Hartman Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 08/12] riscv: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:28 -0500 Message-Id: <20211006164332.1981454-9-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 --- 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 6d59e6906fdd..f13b2c9ea912 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.30.2 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 743B9C433EF for ; Wed, 6 Oct 2021 16:47:38 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 042D660235 for ; Wed, 6 Oct 2021 16:47:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 042D660235 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HPgNm4vZ7z3dkM for ; Thu, 7 Oct 2021 03:47:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.210.46; helo=mail-ot1-f46.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HPgJT3FPXz2ywS for ; Thu, 7 Oct 2021 03:43:53 +1100 (AEDT) Received: by mail-ot1-f46.google.com with SMTP id r43-20020a05683044ab00b0054716b40005so3860236otv.4 for ; Wed, 06 Oct 2021 09:43:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YhacG1oflfweV+ZMxYJrdhD3dQtCOWEVKc3UA01qLrg=; b=TK2qng1g9S95pYnfOD1bA7TpL1IVe43sOx3zk/rh6Qd8u5fsa1jawkEKucqUwlScKe 0MTTz9kGZWXMoOIw8GhPUH1UEgccmeoyqYOl8uAETWEdH6tKaDGvsaSKBWYn+v3rm2wb KKLGyWAVf2swTJUYlT6umGyMse7cgyEgAgJ4w56aV9YNouCxpWmynwHXhPrJFA3/SxJG N65FoE4Bu8nn28xONQL/WllpYQ3eWd931jQta1N/rg+EJNp7dqIbP5MUc1jNrhWk1b2P wTA+39NFGBnp9jV8VhY/hF0GlgpMOvsPu8f95lfJqWBC0j44GnwQ1THcpbxG3S0tU0u/ A7Ag== X-Gm-Message-State: AOAM530rjB/5rs79xP2a/gjlU83gyxXuRW0txZe0cpqMTxeFxUKuGKLX 17fWptP0wqdJB/Eu8dFejw== X-Google-Smtp-Source: ABdhPJzJQ2R5CEfp/bAtXtoCRQDaDF5B6RqZA1flXSsxFu0kVfpgeNfjZq0OKrhuVdseg2/0PDqWlg== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr20503877otc.300.1633538631080; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id s29sm4236628otg.60.2021.10.06.09.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:49 -0700 (PDT) From: Rob Herring To: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , x86@kernel.org, Greg Kroah-Hartman Subject: [PATCH 08/12] riscv: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:28 -0500 Message-Id: <20211006164332.1981454-9-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Florian Fainelli , Scott Branden , "Rafael J. Wysocki" , linux-sh@vger.kernel.org, Ray Jui , "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, Ingo Molnar , Paul Mackerras , Borislav Petkov , bcm-kernel-feedback-list@broadcom.com, Thomas Gleixner , Frank Rowand , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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 6d59e6906fdd..f13b2c9ea912 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.30.2 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F93EC433F5 for ; Wed, 6 Oct 2021 16:48:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 40C8C6113E for ; Wed, 6 Oct 2021 16:48:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 40C8C6113E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=5uU7v+T6wqtjwix+OMJTniw/gTtIgPxJRfjTIh/2PQ4=; b=nqBG8xw8S/ndru zNlQmEgZ1T+WE4+44A7j9GpeKlzMQ+zOvIfHhR6m7z2qKChvx83tFw6LB5D4lESA+XaKa4K8/A9Q/ GTDAGITRN++p0Ja9KUTv6zdiEZ0vHDtcsitKkCp0PooYaWpxrTrLy9dJJ6ClWkL8iNbMnlbxQvhky +qZH5833rWnOAc/2iVXJEuAcUI/oh3h+XerpBdpRsNw1y4XURE5AkvZBCpVUvsaDvaq7b0xg4Yflb ldLhnNnsMg4NHN2d36gbxC5wlzP+QIxdlspQ/gATXHTcKVc/7czjsaGzKrZRZ2f+dFmIzfqKVgZdJ hl3WEgL9bBEovLrFc3Sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA5d-00F4Vd-23; Wed, 06 Oct 2021 16:48:21 +0000 Received: from mail-ot1-f48.google.com ([209.85.210.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA1I-00F29P-EQ; Wed, 06 Oct 2021 16:43:53 +0000 Received: by mail-ot1-f48.google.com with SMTP id h16-20020a9d3e50000000b0054e25708f41so3071853otg.0; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YhacG1oflfweV+ZMxYJrdhD3dQtCOWEVKc3UA01qLrg=; b=On9lb0qpU4T+GkzVFtR1tWY1IuKmyYcQFHmlskPm4zvsiIIvEaU4VolgqeDMJP9Ws5 bvYl41ehRSZdfnGjGUoLwRWwg4sQ9grL4esV5YexDXu6D3wSQsNQWBnAFA4xg8exJdLF f0O67j7DM3pDcFqGHlwDrtP+v+oEe+TLqZwNwAmu2LAfdU0CkdP8bRg4huCd9TxZgiEe iFLhe51/S107Zi6Vx4O/xRgBIX0Ft8nX6iqKatXpEM+WRuxmYy1Q9wBrGPn1lEFWN81g bH7u5i1Mj2KwUiByOpVqDYHCcZhMrhvpMBSDIFWv+5nceQLM8PBIO5GQRB//EWkQyPmq kjjg== X-Gm-Message-State: AOAM533s2u6+9fxriBBahUX0bcnYuLNahy81bh8VozVNKEfftg8L8HxZ 9Jf/RVSyGqvcV4uHwn86+Q== X-Google-Smtp-Source: ABdhPJzJQ2R5CEfp/bAtXtoCRQDaDF5B6RqZA1flXSsxFu0kVfpgeNfjZq0OKrhuVdseg2/0PDqWlg== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr20503877otc.300.1633538631080; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id s29sm4236628otg.60.2021.10.06.09.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:49 -0700 (PDT) From: Rob Herring To: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , x86@kernel.org, Greg Kroah-Hartman Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 08/12] riscv: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:28 -0500 Message-Id: <20211006164332.1981454-9-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_094352_495029_F4CBE6E7 X-CRM114-Status: GOOD ( 11.78 ) 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 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 --- 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 6d59e6906fdd..f13b2c9ea912 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.30.2 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4436FC433EF for ; Wed, 6 Oct 2021 16:50:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 10D746113A for ; Wed, 6 Oct 2021 16:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 10D746113A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=J99XhzLgzYuf3S9igfQ0arijNnJwtgQcfckda0A4VcY=; b=mGtAkDnmYKSY7O nJhgW9HjhoaaO0OT5CBm/JMaycHv2KqYunGakJ53yGRvh7mnDkXLPK3VGOYrsO3EeNC1jSaQN0Lp4 nJBLAVYeEqy5RYKkwc2cq4oqAvAuQrmCqH/8nbtTCJMIT9f5YboCho8PQdeKbrmTFD0H9ZhGbNqDw bxuucUmwESr7nAPqj1CqcaSNQ+t3uMV6h8VFyXjR7v9TGGphsobCsRZNZ3g3V3dHN85OV6qsmfsuJ Iy1WejBkS4IVmgkbjSRMArRq/yRblAJhpPllL8NTfNmsXkFT5ehgUudTcRz0qBiZcBYJ570wLg2+t dZVqhee2/WENwv519FwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA58-00F4E2-JO; Wed, 06 Oct 2021 16:47:51 +0000 Received: from mail-ot1-f48.google.com ([209.85.210.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA1I-00F29P-EQ; Wed, 06 Oct 2021 16:43:53 +0000 Received: by mail-ot1-f48.google.com with SMTP id h16-20020a9d3e50000000b0054e25708f41so3071853otg.0; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YhacG1oflfweV+ZMxYJrdhD3dQtCOWEVKc3UA01qLrg=; b=On9lb0qpU4T+GkzVFtR1tWY1IuKmyYcQFHmlskPm4zvsiIIvEaU4VolgqeDMJP9Ws5 bvYl41ehRSZdfnGjGUoLwRWwg4sQ9grL4esV5YexDXu6D3wSQsNQWBnAFA4xg8exJdLF f0O67j7DM3pDcFqGHlwDrtP+v+oEe+TLqZwNwAmu2LAfdU0CkdP8bRg4huCd9TxZgiEe iFLhe51/S107Zi6Vx4O/xRgBIX0Ft8nX6iqKatXpEM+WRuxmYy1Q9wBrGPn1lEFWN81g bH7u5i1Mj2KwUiByOpVqDYHCcZhMrhvpMBSDIFWv+5nceQLM8PBIO5GQRB//EWkQyPmq kjjg== X-Gm-Message-State: AOAM533s2u6+9fxriBBahUX0bcnYuLNahy81bh8VozVNKEfftg8L8HxZ 9Jf/RVSyGqvcV4uHwn86+Q== X-Google-Smtp-Source: ABdhPJzJQ2R5CEfp/bAtXtoCRQDaDF5B6RqZA1flXSsxFu0kVfpgeNfjZq0OKrhuVdseg2/0PDqWlg== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr20503877otc.300.1633538631080; Wed, 06 Oct 2021 09:43:51 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id s29sm4236628otg.60.2021.10.06.09.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:49 -0700 (PDT) From: Rob Herring To: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , x86@kernel.org, Greg Kroah-Hartman Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 08/12] riscv: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:28 -0500 Message-Id: <20211006164332.1981454-9-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_094352_495029_F4CBE6E7 X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 6d59e6906fdd..f13b2c9ea912 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.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Wed, 6 Oct 2021 11:43:28 -0500 Subject: [OpenRISC] [PATCH 08/12] riscv: Use of_get_cpu_hwid() In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> Message-ID: <20211006164332.1981454-9-robh@kernel.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org 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 at lists.infradead.org Signed-off-by: Rob Herring --- 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 6d59e6906fdd..f13b2c9ea912 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.30.2