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 7AE9DC433EF for ; Wed, 6 Oct 2021 16:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62F86610E5 for ; Wed, 6 Oct 2021 16:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239460AbhJFQpl (ORCPT ); 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-Google-Smtp-Source: ABdhPJz/z+8TSD/WdWHkwOUMUF3/lnf5Mt7uWOPSGKwTcm1xutcPl6qw5jPqaYPZiNT3CeLWfPqlWg== 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 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: 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(-) 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; -- 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 57144C433EF for ; Wed, 6 Oct 2021 16:45:27 +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 67A296113E for ; Wed, 6 Oct 2021 16:45:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 67A296113E 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 4HPgLD6x0Lz3c6B for ; Thu, 7 Oct 2021 03:45:24 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.167.177; helo=mail-oi1-f177.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (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 4HPgJM04Frz2ygB for ; Thu, 7 Oct 2021 03:43:46 +1100 (AEDT) Received: by mail-oi1-f177.google.com with SMTP id w206so4862679oiw.4 for ; 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=CN2tRnfV0nmrSbuDbyHoypag3neEaofRCNv6xL7Eiog=; b=3wep7S3yM5JjPRxoZjXCAnqOjEqAkpZOKnRmMlIm+Yek1eCKDcz9h92x1qvEv2K7XC H2pu/mlTwDddKHTr/E50zhfjL1MzxzKmG2ZaoKmvJDzt6dCh/0xS45sKUdAjIwaoOC7/ 358bOLlGeCfk3FejMP405i+h/LxLs8iRD/xKX22rimvANOcWTbPcQOGt3Ifhy7rBFmKo IcF32LD6i3WEtFctI+GtO+83m+HXo7GkdocyGWKcMz+zgorZpiTVJvs/cgcIHpTBCRUO T8uNYj4tnXvi2lyFXzeUTquV1pvBgMsnkgz1GWe2OTd0z++BT0kSxLKPFJv4F3mess3x +ocw== X-Gm-Message-State: AOAM530XRKSh9JUdXWsM/zjAziSLSaQ7riVMGAiAMyvAZFFLamOEDcAu hz3DLRlXr15aTsjv/HjGHw== X-Google-Smtp-Source: ABdhPJz/z+8TSD/WdWHkwOUMUF3/lnf5Mt7uWOPSGKwTcm1xutcPl6qw5jPqaYPZiNT3CeLWfPqlWg== 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 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 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: 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(-) 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; -- 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 8312BC433F5 for ; Wed, 6 Oct 2021 16:45:52 +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 51C9061175 for ; Wed, 6 Oct 2021 16:45:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 51C9061175 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=eSujylSZ/PbL5M/j+Z/cE6mK+8RqorKR6CK1I89nLs8=; b=2dhvovzSE35qX4 2B05HorKmTBUcOs3V321XKz97G13Lc8f0n/0C18K/FrZLHMddKcRR4We9RRlqjhQUNrYZ563B+MAV INzJUoPYGaPBvn3fWnwyAfJ96eAoOHIagwhl/LqFrSuNowI8eH6KCoTsrjsK8X/pfWhqrfCs4G7fo EZasjnsVK7wSRnH/CKENkBHOV9HEnF06wBMVe8QxI29CIbBRgSKizQC0TL4rhUAZPnexwRw5GeBuD IXK5sPy1exCVCGrNUJ5JQbx3cdrZTYZPRV0dIASrAx1xcFWEXPSYDboK+c79oglMolrd/NIyp/hlJ lmcJEsrDVtJq0LghGpEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA2z-00F35L-Rn; Wed, 06 Oct 2021 16:45:37 +0000 Received: from mail-oi1-f169.google.com ([209.85.167.169]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA1B-00F26I-79; Wed, 06 Oct 2021 16:43:46 +0000 Received: by mail-oi1-f169.google.com with SMTP id s69so4786094oie.13; Wed, 06 Oct 2021 09:43:45 -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=nPBBNZkw5USLBYw+mFWTSqWC14IDfYJ4+U2sr+EOJqX/6yPkoij5YNvJfN/FmT7vBa XQPa5p9N/aUt7QvFIOOk/Oy84PvwBMHMtR5DP/o5hgrmiN4IeMm877y2vFEkEI2hMfet 3ihCxPM+ZsNr8Vbvch+ufIONz2hF/XXhzDXjHT3eVyL5JUF68Va9asy/UX7/fyF+ibcp 5b+8NrzBlCaYfDEnHXsZH+cCALu31VJZP+8S66L9osRjOjqyRda1UQNYPJpvpu0+8sZx /zn7khK1QT8fVXuY8cP7g4sxeuX+w0uBBMIqfZ2wnGyHXioxrftuFKQJ8c+Cx1QcgFgh YRiw== X-Gm-Message-State: AOAM5301YESWexjrVlUMxVTSV1l292uNLUcS2Ot9Tst7YehY0VuxPmEt xsEaBKm9aT+mmH3V6tu6JA== X-Google-Smtp-Source: ABdhPJz/z+8TSD/WdWHkwOUMUF3/lnf5Mt7uWOPSGKwTcm1xutcPl6qw5jPqaYPZiNT3CeLWfPqlWg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_094345_278168_F4C46D76 X-CRM114-Status: GOOD ( 12.12 ) 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: 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(-) 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; -- 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 F3AEDC433EF for ; Wed, 6 Oct 2021 16:47:09 +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 B8B5460235 for ; Wed, 6 Oct 2021 16:47:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B8B5460235 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=ND5ipsxO0bzhNquZeg0Si9MenxkcpgGVjQ0qJZM1s/U=; b=zVAc8WFatu/9yI vMD84lyICSvyKhy5d1bq8r+RZ4x1zJoybkG2h3cWKKE1lTmYYGDlkNc+ZMG4GHy5TifRjfX7mbQg/ 98N4NlY/8wa5Eb0oRyDDDKNQMESuxByQMmGouWR8Ef5z8yJkm4UI7bWrHFM9sNksmWuaJTFGWTPMa wdo5XYg83e0ZgTayDtkZwJVmvlNkq/0DafmracpN7njdp9rORG20CPYOE+HE1SCBaQ7jCV+t8igR/ 4ctofwAjw0TRP+cAEMWWXYzXx/bIFGW8ZYt2PofZwLrX6pNbu5qqmKytLbjrzWvFDENw4wo37rqMw BXSkCXU+EwQVsYbIEveA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA2Z-00F2oo-CN; Wed, 06 Oct 2021 16:45:11 +0000 Received: from mail-oi1-f169.google.com ([209.85.167.169]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYA1B-00F26I-79; Wed, 06 Oct 2021 16:43:46 +0000 Received: by mail-oi1-f169.google.com with SMTP id s69so4786094oie.13; Wed, 06 Oct 2021 09:43:45 -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=nPBBNZkw5USLBYw+mFWTSqWC14IDfYJ4+U2sr+EOJqX/6yPkoij5YNvJfN/FmT7vBa XQPa5p9N/aUt7QvFIOOk/Oy84PvwBMHMtR5DP/o5hgrmiN4IeMm877y2vFEkEI2hMfet 3ihCxPM+ZsNr8Vbvch+ufIONz2hF/XXhzDXjHT3eVyL5JUF68Va9asy/UX7/fyF+ibcp 5b+8NrzBlCaYfDEnHXsZH+cCALu31VJZP+8S66L9osRjOjqyRda1UQNYPJpvpu0+8sZx /zn7khK1QT8fVXuY8cP7g4sxeuX+w0uBBMIqfZ2wnGyHXioxrftuFKQJ8c+Cx1QcgFgh YRiw== X-Gm-Message-State: AOAM5301YESWexjrVlUMxVTSV1l292uNLUcS2Ot9Tst7YehY0VuxPmEt xsEaBKm9aT+mmH3V6tu6JA== X-Google-Smtp-Source: ABdhPJz/z+8TSD/WdWHkwOUMUF3/lnf5Mt7uWOPSGKwTcm1xutcPl6qw5jPqaYPZiNT3CeLWfPqlWg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_094345_278168_F4C46D76 X-CRM114-Status: GOOD ( 12.12 ) 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: 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(-) 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; -- 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:25 -0500 Subject: [OpenRISC] [PATCH 05/12] csky: 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-6-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: Guo Ren Cc: linux-csky at vger.kernel.org Signed-off-by: Rob Herring --- arch/csky/kernel/smp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; -- 2.30.2