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 4C5D7C433F5 for ; Wed, 6 Oct 2021 21:25:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 308AC61040 for ; Wed, 6 Oct 2021 21:25:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239683AbhJFV1G (ORCPT ); Wed, 6 Oct 2021 17:27:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239706AbhJFV1F (ORCPT ); Wed, 6 Oct 2021 17:27:05 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF809C061746; Wed, 6 Oct 2021 14:25:12 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 133so3665956pgb.1; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=UBSXKYjm15FEKybh0KfefqRjd/fVs22AWYzwe2iCJvmOHscvoAutQW2HwE99YHZeWu vEtNDuMS9d78IGfnBrQ47YiMpXMPPhe6dbQyF9hg/uSAQDApFpiVmZ7RCXYk//sWXr1Q 0LSfp/P7/3d3pFfamzEH93p+y9SKpm/qjQxtZn4fAQUwleau5VdUB+9jn7Ku+OYnfnmC SnnK3Phc97T0RV6YdV7B/6OMV0qq1QjiJmwn6G9SBEM6VpE4qBOh3ESLF6KJAuPLSvNB EipYZeSbBljiqKzHr1N+foOdNe3WDWrdfrXbmYefd7v8ToBI7aLskwiFwDPpPQdD6I/S LWFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=JWdC6OOii4vGrggI1sOIRq8lgFC1JohH33kQxyGAZ6apsqXQjeRJBYIfLm/G9yK/8x wyn9/BItcZrP12BcwK/nNeMDNWKleaWuOg3ync1Npn+jRceN7IGEr6KAU5CW9N7Nyv/U 321AY90hWdGwCLKW16qbsBPuqcp7VrPaXZeFVjtV9753Oqg1gdsruRkNzXUoFZFhQWiB 2jghSJgFeZ21CKz0ygQ/7LUNKvpo4WIk0e1OzBrWhNMnsA1QV6geoB7nFLOLiTN7eiY6 i+utMKV2J9wo75kbiYAsOi+e3atp9JbiDZh8NgP/evvH5SjKe6kF4tLkxhArxxdi5iI1 WVcw== X-Gm-Message-State: AOAM531+sHpjE+qaWCTN4lMkAdeq9nzKXrimslHyejGfKdmAtKF1DIVw p4wso4Wm31K1qhAAIdgoUr8= X-Google-Smtp-Source: ABdhPJyKapemGEMJ+oiRHHIk+xiUwqOqgxkK1126yB2yYflqm+sLMNs5knM5JE9Oh1WDASGMBmxR4Q== X-Received: by 2002:aa7:92d0:0:b0:44c:ab24:cce7 with SMTP id k16-20020aa792d0000000b0044cab24cce7mr370069pfa.6.1633555512314; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id i9sm18264104pfd.32.2021.10.06.14.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 14:25:11 -0700 (PDT) Date: Thu, 7 Oct 2021 06:25:09 +0900 From: Stafford Horne To: Rob Herring Cc: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , X86 ML , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel , "linux-kernel@vger.kernel.org" , linux-csky@vger.kernel.org, Openrisc , linuxppc-dev , linux-riscv , SH-Linux , devicetree@vger.kernel.org Subject: Re: [PATCH 06/12] openrisc: Use of_get_cpu_hwid() Message-ID: References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-7-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Wed, Oct 06, 2021 at 04:08:38PM -0500, Rob Herring wrote: > On Wed, Oct 6, 2021 at 3:44 PM Stafford Horne wrote: > > > > On Wed, Oct 06, 2021 at 11:43:26AM -0500, Rob Herring wrote: > > > 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(-) > > > > > > 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); > > Oops, that should be: of_get_cpu_hwid(cpu, 0); OK. I checked all other patches in the series, it seems OpenRISC was the only one missing that. Sorry I missed it initially. > I thought I double checked all those... > > > You have defined of_get_cpu_hwid to return u64, will this create compiler > > warnings when since we are storing a u64 into a u32? > > I'm counting on the caller to know the max size for their platform. OK. > > > > It seems only if we make with W=3. > > > > I thought we usually warned on this. Oh well, for the openrisc bits. > > That's only on ptr truncation I think. Right, that makes sense. -Stafford 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 D40CAC433EF for ; Wed, 6 Oct 2021 21:25:48 +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 8B731610CC for ; Wed, 6 Oct 2021 21:25:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8B731610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ackjeh+j/acUjaDSsq0XRHb4Zsp7+9hMmOlTTa37qIE=; b=DVVUvBjn95xMpy 41phHTt+jKpioZ/D2RRlmoOxRn3VMV2IrqU+aU8llZ3LOBw7RrDw61gD8/wZsUQpmhE5YAASMSmKT 0nMn+T3LovQq3RymJKI8Obq+ee8wBA85DCgXEFK/5qOXCF+RpCVN1YZtnrTWbOanDs88MOp+CjjGL iVvneqx8yK3TKvjNagTxyu/qDJzZd9CWgMYWm63gDepBxYps39nGwL+ypTa3WZc7ol43ozjhIzjK8 1M0j8P2mFZIk3toBKDkVCl6noEio4RAZjBan4lnL/xxML6SYQ1EaTB8llx364RE36kLTAq75fP/VN CLDzFYBq6h9CXA/WDsNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYEPm-00FbEY-UN; Wed, 06 Oct 2021 21:25:26 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYEPZ-00FbC1-4H; Wed, 06 Oct 2021 21:25:14 +0000 Received: by mail-pg1-x535.google.com with SMTP id q201so3605956pgq.12; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=UBSXKYjm15FEKybh0KfefqRjd/fVs22AWYzwe2iCJvmOHscvoAutQW2HwE99YHZeWu vEtNDuMS9d78IGfnBrQ47YiMpXMPPhe6dbQyF9hg/uSAQDApFpiVmZ7RCXYk//sWXr1Q 0LSfp/P7/3d3pFfamzEH93p+y9SKpm/qjQxtZn4fAQUwleau5VdUB+9jn7Ku+OYnfnmC SnnK3Phc97T0RV6YdV7B/6OMV0qq1QjiJmwn6G9SBEM6VpE4qBOh3ESLF6KJAuPLSvNB EipYZeSbBljiqKzHr1N+foOdNe3WDWrdfrXbmYefd7v8ToBI7aLskwiFwDPpPQdD6I/S LWFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=C1MTXENPYxD+AnHa9k8tIKsCPFFhIfJV0SNfTiquo8UgT5XJfWYqRm/gsm/8jeDLyp ZxmQ+FxC2M6sTfmiJ2qExt5E87VBtvL1KSScjDlaGK7E9siA3wkoq8XnrjiC9dcL/ZFK AtpEcA2K29pGi2Ae6auad76VFzVSoI057/onQeNoR6IDGcY3yrMN4Q+iit55BumzhGfr FdKI38X8K0q5mK8TsPw9yEyQQTdtoJgY/2+q0ymdo7JoKgvDvEuSIGAli+NPtQCzVR6K H3C6paVjkCQKv0k6DAHgZ4o6MAxZYA1kA5Npe13Um9WvEZcM25fRbpnanFz4E9t93LSG YB9A== X-Gm-Message-State: AOAM53279AW03gAeLP2FwEjqcJmiirzfIGuER9HyS0wIwVs0SafRzluW WsPa6njh208mzfRqp4XvhUU= X-Google-Smtp-Source: ABdhPJyKapemGEMJ+oiRHHIk+xiUwqOqgxkK1126yB2yYflqm+sLMNs5knM5JE9Oh1WDASGMBmxR4Q== X-Received: by 2002:aa7:92d0:0:b0:44c:ab24:cce7 with SMTP id k16-20020aa792d0000000b0044cab24cce7mr370069pfa.6.1633555512314; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id i9sm18264104pfd.32.2021.10.06.14.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 14:25:11 -0700 (PDT) Date: Thu, 7 Oct 2021 06:25:09 +0900 From: Stafford Horne To: Rob Herring Cc: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , X86 ML , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel , "linux-kernel@vger.kernel.org" , linux-csky@vger.kernel.org, Openrisc , linuxppc-dev , linux-riscv , SH-Linux , devicetree@vger.kernel.org Subject: Re: [PATCH 06/12] openrisc: Use of_get_cpu_hwid() Message-ID: References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-7-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_142513_201005_015B344F X-CRM114-Status: GOOD ( 23.94 ) 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 On Wed, Oct 06, 2021 at 04:08:38PM -0500, Rob Herring wrote: > On Wed, Oct 6, 2021 at 3:44 PM Stafford Horne wrote: > > > > On Wed, Oct 06, 2021 at 11:43:26AM -0500, Rob Herring wrote: > > > 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(-) > > > > > > 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); > > Oops, that should be: of_get_cpu_hwid(cpu, 0); OK. I checked all other patches in the series, it seems OpenRISC was the only one missing that. Sorry I missed it initially. > I thought I double checked all those... > > > You have defined of_get_cpu_hwid to return u64, will this create compiler > > warnings when since we are storing a u64 into a u32? > > I'm counting on the caller to know the max size for their platform. OK. > > > > It seems only if we make with W=3. > > > > I thought we usually warned on this. Oh well, for the openrisc bits. > > That's only on ptr truncation I think. Right, that makes sense. -Stafford _______________________________________________ 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 404DCC433EF for ; Wed, 6 Oct 2021 21:27:39 +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 CEB446105A for ; Wed, 6 Oct 2021 21:27:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CEB446105A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 4HPnbs2pZvz3cNP for ; Thu, 7 Oct 2021 08:27:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UBSXKYjm; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::435; helo=mail-pf1-x435.google.com; envelope-from=shorne@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UBSXKYjm; dkim-atps=neutral Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 4HPnY82n5yz3bYD for ; Thu, 7 Oct 2021 08:25:15 +1100 (AEDT) Received: by mail-pf1-x435.google.com with SMTP id 187so3474792pfc.10 for ; Wed, 06 Oct 2021 14:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=UBSXKYjm15FEKybh0KfefqRjd/fVs22AWYzwe2iCJvmOHscvoAutQW2HwE99YHZeWu vEtNDuMS9d78IGfnBrQ47YiMpXMPPhe6dbQyF9hg/uSAQDApFpiVmZ7RCXYk//sWXr1Q 0LSfp/P7/3d3pFfamzEH93p+y9SKpm/qjQxtZn4fAQUwleau5VdUB+9jn7Ku+OYnfnmC SnnK3Phc97T0RV6YdV7B/6OMV0qq1QjiJmwn6G9SBEM6VpE4qBOh3ESLF6KJAuPLSvNB EipYZeSbBljiqKzHr1N+foOdNe3WDWrdfrXbmYefd7v8ToBI7aLskwiFwDPpPQdD6I/S LWFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=wCAvLbxwqvKMAA1PzTIbMdCi7qKrOqLq9On3lkgH28l/0bShFddUUYIimR080O0950 +TyB3KQcRAMovouVM5bl4FdCU/uHsAFT+i/Wv2O+Z9r10GbnrRBMkQmkhuj52NOPPjED vm2vwW4sz7igByS/u0DiwA7YNUZ+UplZRPBIW0YIq0c324W+21VL/VciaMoFC0AdGmoK cRP1rumoymsZGwiaw81EdI4yA28dF36xUb1Rz2yjf7pjC19Nw69TQH2NluBcshr4TCnf VpHh9bRJI6m54715DL/tAuqXZznIt4dpKsP7IJmWwvnnaS819/hNUYVuFi4+AIqGMP5Y HeYA== X-Gm-Message-State: AOAM530rOdJU2c8ngiL52huQtTVSOHOhzIwsuwNSzcwb8k47s/dPBEHE bG8kOSTERz1XvqmMgOKJr4c= X-Google-Smtp-Source: ABdhPJyKapemGEMJ+oiRHHIk+xiUwqOqgxkK1126yB2yYflqm+sLMNs5knM5JE9Oh1WDASGMBmxR4Q== X-Received: by 2002:aa7:92d0:0:b0:44c:ab24:cce7 with SMTP id k16-20020aa792d0000000b0044cab24cce7mr370069pfa.6.1633555512314; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id i9sm18264104pfd.32.2021.10.06.14.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 14:25:11 -0700 (PDT) Date: Thu, 7 Oct 2021 06:25:09 +0900 From: Stafford Horne To: Rob Herring Subject: Re: [PATCH 06/12] openrisc: Use of_get_cpu_hwid() Message-ID: References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-7-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Rich Felker , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Guo Ren , "H. Peter Anvin" , linux-riscv , Will Deacon , Jonas Bonn , Florian Fainelli , Yoshinori Sato , SH-Linux , X86 ML , Russell King , linux-csky@vger.kernel.org, Ingo Molnar , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Catalin Marinas , Palmer Dabbelt , devicetree@vger.kernel.org, Albert Ou , Ray Jui , Stefan Kristiansson , Openrisc , Borislav Petkov , Paul Walmsley , Thomas Gleixner , linux-arm-kernel , Scott Branden , Greg Kroah-Hartman , Frank Rowand , James Morse , Paul Mackerras , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Oct 06, 2021 at 04:08:38PM -0500, Rob Herring wrote: > On Wed, Oct 6, 2021 at 3:44 PM Stafford Horne wrote: > > > > On Wed, Oct 06, 2021 at 11:43:26AM -0500, Rob Herring wrote: > > > 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(-) > > > > > > 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); > > Oops, that should be: of_get_cpu_hwid(cpu, 0); OK. I checked all other patches in the series, it seems OpenRISC was the only one missing that. Sorry I missed it initially. > I thought I double checked all those... > > > You have defined of_get_cpu_hwid to return u64, will this create compiler > > warnings when since we are storing a u64 into a u32? > > I'm counting on the caller to know the max size for their platform. OK. > > > > It seems only if we make with W=3. > > > > I thought we usually warned on this. Oh well, for the openrisc bits. > > That's only on ptr truncation I think. Right, that makes sense. -Stafford 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 F0040C433F5 for ; Wed, 6 Oct 2021 21:27:28 +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 B94A66105A for ; Wed, 6 Oct 2021 21:27:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B94A66105A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lU/ZITfNK7414/YJwIylaa+l16IT/IPfXLnedF7c5j8=; b=Yc4cHNRQZyCxPy Lb4+86y31NxyFP8odZ8U54guqPb3MxK6G7mGMacQEPnYmpf1xr+UCDcbWD9s1jg2bIVHJWgHCWUKR lIRptV93L+eMs450+tmjjv3h8qWWsdi0fn83dU0w2qua6kaE0jA0I5gQ2VsyPmvWU9sAGUrs3Ojkd NyjwYUbNALXq6t7LimwWdrYcYBIRHgq5DcqaRsH2o39uMl9Yr4OcXx0AxII4ijRLkbm/7iTndueCD pGhRnMf4Kl8E6Iee8U73H9QYAe5VGFtmimMQn+c2Bb3Su49oTVV+9ZPk8/doK4T982mG0E6FiWhBO OP8EZb/zxDoNwz5C6nNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYEPd-00FbDV-Qk; Wed, 06 Oct 2021 21:25:18 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYEPZ-00FbC1-4H; Wed, 06 Oct 2021 21:25:14 +0000 Received: by mail-pg1-x535.google.com with SMTP id q201so3605956pgq.12; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=UBSXKYjm15FEKybh0KfefqRjd/fVs22AWYzwe2iCJvmOHscvoAutQW2HwE99YHZeWu vEtNDuMS9d78IGfnBrQ47YiMpXMPPhe6dbQyF9hg/uSAQDApFpiVmZ7RCXYk//sWXr1Q 0LSfp/P7/3d3pFfamzEH93p+y9SKpm/qjQxtZn4fAQUwleau5VdUB+9jn7Ku+OYnfnmC SnnK3Phc97T0RV6YdV7B/6OMV0qq1QjiJmwn6G9SBEM6VpE4qBOh3ESLF6KJAuPLSvNB EipYZeSbBljiqKzHr1N+foOdNe3WDWrdfrXbmYefd7v8ToBI7aLskwiFwDPpPQdD6I/S LWFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e64UMCL2WVnOr2UI7AUcgF8cpI0jeUTyJjvzOQZ8YrE=; b=C1MTXENPYxD+AnHa9k8tIKsCPFFhIfJV0SNfTiquo8UgT5XJfWYqRm/gsm/8jeDLyp ZxmQ+FxC2M6sTfmiJ2qExt5E87VBtvL1KSScjDlaGK7E9siA3wkoq8XnrjiC9dcL/ZFK AtpEcA2K29pGi2Ae6auad76VFzVSoI057/onQeNoR6IDGcY3yrMN4Q+iit55BumzhGfr FdKI38X8K0q5mK8TsPw9yEyQQTdtoJgY/2+q0ymdo7JoKgvDvEuSIGAli+NPtQCzVR6K H3C6paVjkCQKv0k6DAHgZ4o6MAxZYA1kA5Npe13Um9WvEZcM25fRbpnanFz4E9t93LSG YB9A== X-Gm-Message-State: AOAM53279AW03gAeLP2FwEjqcJmiirzfIGuER9HyS0wIwVs0SafRzluW WsPa6njh208mzfRqp4XvhUU= X-Google-Smtp-Source: ABdhPJyKapemGEMJ+oiRHHIk+xiUwqOqgxkK1126yB2yYflqm+sLMNs5knM5JE9Oh1WDASGMBmxR4Q== X-Received: by 2002:aa7:92d0:0:b0:44c:ab24:cce7 with SMTP id k16-20020aa792d0000000b0044cab24cce7mr370069pfa.6.1633555512314; Wed, 06 Oct 2021 14:25:12 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id i9sm18264104pfd.32.2021.10.06.14.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 14:25:11 -0700 (PDT) Date: Thu, 7 Oct 2021 06:25:09 +0900 From: Stafford Horne To: Rob Herring Cc: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , X86 ML , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel , "linux-kernel@vger.kernel.org" , linux-csky@vger.kernel.org, Openrisc , linuxppc-dev , linux-riscv , SH-Linux , devicetree@vger.kernel.org Subject: Re: [PATCH 06/12] openrisc: Use of_get_cpu_hwid() Message-ID: References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-7-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_142513_201005_015B344F X-CRM114-Status: GOOD ( 23.94 ) 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 On Wed, Oct 06, 2021 at 04:08:38PM -0500, Rob Herring wrote: > On Wed, Oct 6, 2021 at 3:44 PM Stafford Horne wrote: > > > > On Wed, Oct 06, 2021 at 11:43:26AM -0500, Rob Herring wrote: > > > 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(-) > > > > > > 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); > > Oops, that should be: of_get_cpu_hwid(cpu, 0); OK. I checked all other patches in the series, it seems OpenRISC was the only one missing that. Sorry I missed it initially. > I thought I double checked all those... > > > You have defined of_get_cpu_hwid to return u64, will this create compiler > > warnings when since we are storing a u64 into a u32? > > I'm counting on the caller to know the max size for their platform. OK. > > > > It seems only if we make with W=3. > > > > I thought we usually warned on this. Oh well, for the openrisc bits. > > That's only on ptr truncation I think. Right, that makes sense. -Stafford _______________________________________________ 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: Stafford Horne Date: Thu, 7 Oct 2021 06:25:09 +0900 Subject: [OpenRISC] [PATCH 06/12] openrisc: Use of_get_cpu_hwid() In-Reply-To: References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-7-robh@kernel.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Wed, Oct 06, 2021 at 04:08:38PM -0500, Rob Herring wrote: > On Wed, Oct 6, 2021 at 3:44 PM Stafford Horne wrote: > > > > On Wed, Oct 06, 2021 at 11:43:26AM -0500, Rob Herring wrote: > > > 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 at lists.librecores.org > > > Signed-off-by: Rob Herring > > > --- > > > arch/openrisc/kernel/smp.c | 6 +----- > > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > > > 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); > > Oops, that should be: of_get_cpu_hwid(cpu, 0); OK. I checked all other patches in the series, it seems OpenRISC was the only one missing that. Sorry I missed it initially. > I thought I double checked all those... > > > You have defined of_get_cpu_hwid to return u64, will this create compiler > > warnings when since we are storing a u64 into a u32? > > I'm counting on the caller to know the max size for their platform. OK. > > > > It seems only if we make with W=3. > > > > I thought we usually warned on this. Oh well, for the openrisc bits. > > That's only on ptr truncation I think. Right, that makes sense. -Stafford