From patchwork Wed Oct 6 16:43:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 515364 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp590363ime; Wed, 6 Oct 2021 09:43:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQFCQqMZNR16dXYohqPaOfbgM27Yw2fXil63gfExaaJPY1UvPje/qSEs/aXd777SVh+p1n X-Received: by 2002:aa7:c2ca:: with SMTP id m10mr36510246edp.394.1633538638292; Wed, 06 Oct 2021 09:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538638; cv=none; d=google.com; s=arc-20160816; b=KxDffVG6liZ/b0ty+GKoeFvIaYYxOf3xXt+nysH/cPqfVUufsfjjI1YKnybEIVrpah vjyojMoB6jAoz+cAi/ePy3yxZZuq3hqngZWMwjzRz7oIs5tYQhzuF4sZ1JicmA8umddG KlDd6TQ09kbc/M1v3or9zFbpzHwDrR7PuAp3cuzceQLnaFg2WIgGmYOob6u2RhpqI8oT MNgYFvv8NaZBkaqI+WP+Yo6g7ZL5OzR72I1wq/ptSl4z6Lj0/FbAuq+KbdxBpDKuLvUN Pg0xiQjmVPPAaTijAAfLTQB2sXqEUdeXN2GhEKXJNbdnGEZKwL08scOgtBeGmdCvhXuP uFHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lY59MK3rRpvbu1Z+VUSRhTP9oCogI9gtd3qobuL4xSE=; b=FzIBjDS/n8suKoBb9VlX2ATzMjitQgbTEEuq4yFYMo4IAfmOfv9ibFvnHtHsdpdgzt UwN3FXRmmDNIpGfjPL8Dsn8ugjJghVvsRydi1vZ+Kq8Nav8yrLZHobX8aNQqWnhXc/WL hvk932uPcAcRGLSRW8VtMvU6IIBPX97uIdKBYoYOwYu866Be+BF0ExiXp/JbDGBlvdav /E5ijGmqiNbuYVw11X6wX5HgqroRWNHc05FDw+nHPLNDGUKZeHiBXpKG1T2rSGeTBjj3 N/HICWrSil77VziZkDZp+ujuTP67yg/IustoSLpxEpYyHOBg/HyG0lGjv/YghZu8l7/g y3+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si32429334ejm.145.2021.10.06.09.43.58; Wed, 06 Oct 2021 09:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239501AbhJFQps (ORCPT + 7 others); Wed, 6 Oct 2021 12:45:48 -0400 Received: from mail-oo1-f42.google.com ([209.85.161.42]:37659 "EHLO mail-oo1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239426AbhJFQpl (ORCPT ); Wed, 6 Oct 2021 12:45:41 -0400 Received: by mail-oo1-f42.google.com with SMTP id h11-20020a4aa74b000000b002a933d156cbso1032591oom.4; Wed, 06 Oct 2021 09:43:49 -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=lY59MK3rRpvbu1Z+VUSRhTP9oCogI9gtd3qobuL4xSE=; b=VrtFmor9aA0ypN/F0xXijVY6hfMS82MC7K1tVqot7IPidnHRp0iU6214DiS/mAQ3x9 AQz30PPIlMfHHWesFBTh+9N5UHWm9EEWbMdrYAW2FgglvYd1f+WSr5rrbzrwu1VMhuuo ivIezeBHqRh0/nkYb5kONv+qJEZf8sb+nI4YyAkWRQuoMJRnakbKhiQyfOaXBXCYFW4m BIbqqiPSKCsHrcxt6dEazg6BVAeEpMNeLIS1T2VFuL/BN8waayiQ8tHX7vNK1Zp6r5rS uF7c3s7jV5bfVGd2X3ZCzx210kgQXzjtNqui4u5OFhfGER2wh3lPxjLs5QlMM0esU2Tk HpyQ== X-Gm-Message-State: AOAM531Y5XbQJHgFYSYKnW2KDCRTyivpVj+D026havtY+t0Rjc7yXngr WGFKLTipU/adwfPk+mq0Cw== X-Received: by 2002:a05:6820:1018:: with SMTP id v24mr19468852oor.27.1633538628646; Wed, 06 Oct 2021 09:43:48 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:47 -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 07/12] powerpc: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:27 -0500 Message-Id: <20211006164332.1981454-8-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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Replace open coded parsing of CPU nodes' 'reg' property with of_get_cpu_hwid(). Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- arch/powerpc/kernel/smp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.30.2 Acked-by: Michael Ellerman diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 9cc7d3dbf439..d96b0e361a73 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -1313,18 +1313,13 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) int cpu_to_core_id(int cpu) { struct device_node *np; - const __be32 *reg; int id = -1; np = of_get_cpu_node(cpu, NULL); if (!np) goto out; - reg = of_get_property(np, "reg", NULL); - if (!reg) - goto out; - - id = be32_to_cpup(reg); + id = of_get_cpu_hwid(np, 0); out: of_node_put(np); return id;