From patchwork Wed Oct 6 16:43:26 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: 515363 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp590310ime; Wed, 6 Oct 2021 09:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV14DoimzXsWSGecjS4GslrJp+Oru8agpYVRllybMjYR88+MKm1hnnFKCtEOPNEQIUvh4v X-Received: by 2002:a50:e08c:: with SMTP id f12mr35500997edl.178.1633538634718; Wed, 06 Oct 2021 09:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538634; cv=none; d=google.com; s=arc-20160816; b=bZQ1olGJuIcvp/LAtWatp+ov9NRMxc96lVCjv6U5z4caTvD3KkPPDEbWNKx8hiwTOp xor7uf0/qiW/SSeqnTLN7hwiIW7VwlIPqbcEQVSBdwrudvMjuUPRSexlpwFAaED3HnxK +sjj5L00esa5OuXk08b/Bqp01bRGr7j4V2hETz35PdFSLHiVqKU2D8KgWIIUE45S8LCt IuvmEhFhmvCfCfXOUZwRgWYlwu77wnj7rTmWUhh6Ij6LLudxiHsVpfIw88FymBLHTcCy IcOhNCHy7Vri0CQfNlh6p+Bc3hr3K3plGYDcssOpHT2O2R+f/GI1XXBNu2uadwKKblLY U3Yg== 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=E46c5KotLBJJxu4fxLSa91xNqDqPq5a/10Op+mtdz/c=; b=EY6lK5Rn7Y638/QU6w17fyF2Bg37Zd8/SQvdGPY8Hb6fumOTqu1uKG15g64HaSJRmB 3y8/jaPKd5gXPoQ9Z24yYsYisT4X4UWNKRMxcdfLcaetLec8UQjrQLqDr1wJpGRc6yne FvFy3Zs28OnVj0dWVSIDxe5djcX78dLAq/M5/HZUednRxnYcgF4nQPwaImsjYlltEPBM MPDMt2UpgbWqPbjFSQrghg4CufFRotXT1WXd2i9PhFiesEHK6feiVODqawtqt1jJw5hv 97FXpEXeqU5apv9+UJzMy9SLHc/kZOaKzOR8Kk+fl3AutM1ucE4Bjv7+UUIJTcndBwOC 8oFg== 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 i22si34249256ejw.286.2021.10.06.09.43.53; Wed, 06 Oct 2021 09:43:54 -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 S239428AbhJFQpn (ORCPT + 7 others); Wed, 6 Oct 2021 12:45:43 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:37615 "EHLO mail-ot1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239438AbhJFQpj (ORCPT ); Wed, 6 Oct 2021 12:45:39 -0400 Received: by mail-ot1-f54.google.com with SMTP id r43-20020a05683044ab00b0054716b40005so3859905otv.4; Wed, 06 Oct 2021 09:43:46 -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=E46c5KotLBJJxu4fxLSa91xNqDqPq5a/10Op+mtdz/c=; b=7a/a5xV9WpA2+5JPBQQwIp7Xji11STygmFR/tXP06Y+odK/1qCniygFlvhES6nMKQk 942NVqTkBTaDyTKQzeAxKojmIGht6SHpSMDoqa+RJYD/kwwXfxZkJDpFFmpbZPhdPT4R K0Tg15tyLJX2yYPy5uZrls5qDd7y9gGDn8hl7CaUn/9AFbOOU7+izjS+JJe8e7A9gToE SUJk1WXqujCbfKUcZFjiauIJ2EKvKDUtfbaNBgbhLIvLP77OD9SblK/OPWwBkMnEVdOf TsSb5oS3nRNQvgZ0i1Dfsf9PbWWDQIa6aQN5W0FgUazCZYdTFroDp1/B2MNWpuyHiGIw MvwA== X-Gm-Message-State: AOAM5309hVNSeMvfe3hpLw7Ciqn7C5cQJuoUYszRmKOsL45vLFY54ULt 3aL+SMst8suuE54W4bwBTA== X-Received: by 2002:a05:6830:1d8b:: with SMTP id y11mr20406228oti.291.1633538626550; Wed, 06 Oct 2021 09:43:46 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:45 -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 06/12] openrisc: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:26 -0500 Message-Id: <20211006164332.1981454-7-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: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: openrisc@lists.librecores.org Signed-off-by: Rob Herring --- arch/openrisc/kernel/smp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.30.2 Acked-by: Stafford Horne diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c index 415e209732a3..7d5a4f303a5a 100644 --- a/arch/openrisc/kernel/smp.c +++ b/arch/openrisc/kernel/smp.c @@ -65,11 +65,7 @@ void __init smp_init_cpus(void) u32 cpu_id; for_each_of_cpu_node(cpu) { - if (of_property_read_u32(cpu, "reg", &cpu_id)) { - pr_warn("%s missing reg property", cpu->full_name); - continue; - } - + cpu_id = of_get_cpu_hwid(cpu); if (cpu_id < NR_CPUS) set_cpu_possible(cpu_id, true); }