From patchwork Wed Oct 6 16:43:25 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: 515362 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp590259ime; Wed, 6 Oct 2021 09:43:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF6vFf/jZoRNi9dYmIH12DKbXgwhsWEmsgZCdZ06xLaOP6HSgs1M9RsdttQJ3wmq4FGOjT X-Received: by 2002:a17:906:6549:: with SMTP id u9mr32607028ejn.514.1633538630778; Wed, 06 Oct 2021 09:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538630; cv=none; d=google.com; s=arc-20160816; b=hiS9k81UUnmySghgrFmaJyzdoWfhXoZZmXy5wJZlhvkLgViRhOwBaPzukDlvo1ybQm G4fVINet69qNAhzBuBuxJ151wLHthe9F2mZd5lveFjISM+zddhXOF8p8hlTuxd6cZ9GO TQaMGx6WSgaSGqFLPhULDIjfTro2jsDGUn9WL1CacRj841nhJF5Hbb6LuksGgqV1DDSD 5vp2olv4GranP8r2n+FayDVU05FcytieCnTtHALerGBvaukcBw/V3rPv0UkIanfxsQgF adhVA9y8zb3VG8tRV30xdQtnwWXSXKJx6Q+gXT+i727HzVLS4Tvh465SUkWdbcebF3ws q41g== 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=CN2tRnfV0nmrSbuDbyHoypag3neEaofRCNv6xL7Eiog=; b=SyF+VpOBtgZsjmS8t4EIC4aNXljWVt7i/H3XgGVlAuCJuYWSvSG5WzIVsaHAthfaHY mIBB0nxzZV+2fQJ7MEv1oXLbGd/ZokVbTc/7FpO2MD9Rkhsz3a+YZ5TaqPDsKONx7JTg ErAkLRCNFk3lAngjpb1QFKseFknTef5tlb8JrJj3IoAjAMz/D3RlfY1GYnwL7qdjRCOd GNwUHzK9FLFpKu/RBuK/MpG+cGmXz05eblGzuKCka6eL+Jb2PirDOjmY7UdqgwPTjiCE F5Xq0zmhn3JTjvcmIVTewqEjRhkyEjmELURZsZtFfZQKQ5jYKalK1oOsKvIW9pNk48jx y2EQ== 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 b3si19117438ejp.504.2021.10.06.09.43.50; Wed, 06 Oct 2021 09:43:50 -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 S239423AbhJFQpl (ORCPT + 7 others); Wed, 6 Oct 2021 12:45:41 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:35658 "EHLO mail-oi1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239428AbhJFQph (ORCPT ); Wed, 6 Oct 2021 12:45:37 -0400 Received: by mail-oi1-f182.google.com with SMTP id n64so4890194oih.2; Wed, 06 Oct 2021 09:43:44 -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=CN2tRnfV0nmrSbuDbyHoypag3neEaofRCNv6xL7Eiog=; b=BEgHC543RKZC7CqBo05WKnJagmM8YIIneNefpzsqjJRmQ2hoFkKPOsiZl1OdmEZrPw OojVSelb1RkV2fMbsnvreceDSxtpWe1OSddW/4iCh2gLB91D81XPywbKwdn3+lIPCVmx 02v5MOrmhN88a8pWVPUD4r3GUg0cIW5ejbUerPYZr+YaaQbPXjc9SaZTKd/HPYQNoM52 q6D4Yfdkw4GytF2NUuuF3eB85RPmaD5wsZsVcU3vauW62THts/G+E0C7ak3GVxLGVxgU 2KtwbD6TNsvFRQyDRAJka6f7Amyx9CwqxeDwqie7M1df+K5klplIQ1WWHNOKuyCu/6aY nlxA== X-Gm-Message-State: AOAM532wgalESwiX1Xs/oJCu86OZmpkETuBdUToxMtj6bd156aV6YXkI M1sdYMZ1Yt4ahJHsAMoVXQ== X-Received: by 2002:aca:30c9:: with SMTP id w192mr7839682oiw.93.1633538624646; Wed, 06 Oct 2021 09:43:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:44 -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 05/12] csky: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:25 -0500 Message-Id: <20211006164332.1981454-6-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: Guo Ren Cc: linux-csky@vger.kernel.org Signed-off-by: Rob Herring --- arch/csky/kernel/smp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.30.2 diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c index e2993539af8e..6bb38bc2f39b 100644 --- a/arch/csky/kernel/smp.c +++ b/arch/csky/kernel/smp.c @@ -180,15 +180,13 @@ void __init setup_smp_ipi(void) void __init setup_smp(void) { struct device_node *node = NULL; - int cpu; + unsigned int cpu; for_each_of_cpu_node(node) { if (!of_device_is_available(node)) continue; - if (of_property_read_u32(node, "reg", &cpu)) - continue; - + cpu = of_get_cpu_hwid(node, 0); if (cpu >= NR_CPUS) continue;