Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5150595rwb; Sun, 22 Jan 2023 04:18:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYx5MGtJINPyqNpa2lT7ApD8vVEu8ZiWqE7kIPcXc76Gj4mNFzbQb51EczGOiYhkVzk/oc X-Received: by 2002:a17:906:fac3:b0:7c1:808e:7660 with SMTP id lu3-20020a170906fac300b007c1808e7660mr20855562ejb.43.1674389914753; Sun, 22 Jan 2023 04:18:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674389914; cv=none; d=google.com; s=arc-20160816; b=l2jZawZ65iCBzet9qcp2wOjzmLEKjXWqAGtYkdpjwDPD0b/u52v2wHROI2qauSR+Af GIS01FgPSwp7D+IWtPD7PX8b++w1OvLbS7lxOn9inhINh250jsTberrnnBl4A3EOt8Ao FgnzR+LMTf0Nn3Q2rAw0qOad9CLOMRWHO4OsT67WEqpGoHkAG35UoMQdjCEdK3F2kJrk V8yPSmQipD1Z+j+YFqEAbyPwxA8FjNS7gUQ+E7PNQVKSsHD3NisOTXVczr4inXcrJ1X5 1G5oTQqpBHEcUduBaRauNckMIsfRwRLivXw/R8Hudna3zB9OJXMYFwMRAChNVtngwgjl x5YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ckWviSxANZfcro+bBRfyc+cenkmtjOkiW7r6SzucWlg=; b=CcoGejah/SncQKiCnYo1YuAc+iiEWljOO5zN5M6LMhVk2bWL5s893wIfqGJ/JglXvw u/a5XTgq7vozLPICoGG06MGAMP+A/Ae5rqn6uBI/WeTi999/S+uHInSJ+NXSkOSasV7D u9p5eFKLxlJoTaQO+78k71OOguSdt9E4B7lT6o8rPFRub2u++u7vl0rnzXzWki4k5p5A dF1J94fA8vIAwfpD9P2RoHfs9FF7owJ3mchHu02NvTePTXMFjHLcNjcDwsUrW0EJJfmk 8Q2QPL8vMwQR/rIDtd1cJuSwGmIu5Fp892atL/prbZF4FfWKReiLhnaz5Ir3yMpE/JwF 84kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVyqAJqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw42-20020a1709066a2a00b007ad943d0608si2241019ejc.630.2023.01.22.04.18.22; Sun, 22 Jan 2023 04:18:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVyqAJqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjAVL5O (ORCPT + 52 others); Sun, 22 Jan 2023 06:57:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbjAVL5M (ORCPT ); Sun, 22 Jan 2023 06:57:12 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85BFC12841 for ; Sun, 22 Jan 2023 03:57:10 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id t5so8492691wrq.1 for ; Sun, 22 Jan 2023 03:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ckWviSxANZfcro+bBRfyc+cenkmtjOkiW7r6SzucWlg=; b=rVyqAJqcbEVO2mLYQVAhfnqaxyKeML/dcpxmRaA391AWy18uZOcTusGjMi44ncpTql vRUlbx31k3vofUNP4vsPJVAi8lmlvkVa9EF7D+g1STXssK/sO9udFfYn+8KZstXrK7qh xd8yLliT4+F15t5bWD1hE7T1GDf9FwKdq6LRDIE6AKZfPND9W8ihbB18IBlG77AI1lAD h2yHlmJaQeszTJT/hh3lV1J+dPT8wAe85E0VKkfG7d3OdVi0bTLkjAqcxHch+rOespJa a741p3AQgK6ZAVKTC3L2Wy3ECwJcIx3YubDD3GwhhX5WXjHjZWZq6eG8muWvlHTdzBqb Y8YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ckWviSxANZfcro+bBRfyc+cenkmtjOkiW7r6SzucWlg=; b=CC1wd1Zc6Kk1uE1FD25tJOKhq24imwcDzsdoLlQAPCmRy6UFUKrQSzQmrUVcQupoGL En2GlsYVN3enfmKSM0og7Um2WQ4ViiyOMB2T9fCBz9KZDaJAdGqdPVZx0l129XBRZUOB 7rib+VIsz/2ILAP8kfmOU8BQHBwge+xMCpNU3YHQtQ5z3ra8JOzzOk8X2r22CDqBXF1G R7YrNFVE3jC7Q6COG5fj1rpDq010XrUS84rRPMYfQ606a8KFPqYYnloOChBAPa3iZiyQ 9VNWUZ1aiJTDzobqLJNqLN+hdrARC/ZOGn5C1+t/+RPqclcHz1SfPwu5T5H12WvFB9f4 +m0g== X-Gm-Message-State: AFqh2krRTYBdF9p5YabzznzYDBIXfQ4Z+VtsAE3PDVWS5lw8DE5t5H3t rVUtsZYZ+iaqpopAiNpPz9rrxw== X-Received: by 2002:a5d:5224:0:b0:2bd:bbf7:1f87 with SMTP id i4-20020a5d5224000000b002bdbbf71f87mr20620225wra.60.1674388629088; Sun, 22 Jan 2023 03:57:09 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id d16-20020adfef90000000b002b9b9445149sm3306165wro.54.2023.01.22.03.57.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Jan 2023 03:57:08 -0800 (PST) Message-ID: <3043df6d-8cc1-6969-09d4-50ad6195c924@linaro.org> Date: Sun, 22 Jan 2023 12:57:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: [RFC PATCH v2 29/31] kvx: Add support for cpuinfo Content-Language: en-US To: Yann Sionneau , Arnd Bergmann , Jonathan Corbet , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Will Deacon , Peter Zijlstra , Boqun Feng , Mark Rutland , Eric Biederman , Kees Cook , Oleg Nesterov , Ingo Molnar , Waiman Long , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin , Paul Moore , Eric Paris , Christian Brauner , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jules Maselbas , Guillaume Thouvenin , Clement Leger , Vincent Chardon , =?UTF-8?Q?Marc_Poulhi=c3=a8s?= , Julian Vetter , Samuel Jones , Ashley Lesdalons , Thomas Costis , Marius Gligor , Jonathan Borne , Julien Villette , Luc Michel , Louis Morhet , Julien Hascoet , Jean-Christophe Pince , Guillaume Missonnier , Alex Michon , Huacai Chen , WANG Xuerui , Shaokun Zhang , John Garry , Guangbin Huang , Bharat Bhushan , Bibo Mao , Atish Patra , "Jason A. Donenfeld" , Qi Liu , Jiaxun Yang , Catalin Marinas , Mark Brown , Janosch Frank , Alexey Dobriyan Cc: Benjamin Mugnier , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-audit@redhat.com, linux-riscv@lists.infradead.org, bpf@vger.kernel.org References: <20230120141002.2442-1-ysionneau@kalray.eu> <20230120141002.2442-30-ysionneau@kalray.eu> From: Krzysztof Kozlowski In-Reply-To: <20230120141002.2442-30-ysionneau@kalray.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/01/2023 15:10, Yann Sionneau wrote: > +static int __init setup_cpuinfo(void) > +{ > + int cpu; > + struct clk *clk; > + unsigned long cpu_freq = 1000000000; > + struct device_node *node = of_get_cpu_node(0, NULL); > + > + clk = of_clk_get(node, 0); > + if (IS_ERR(clk)) { > + printk(KERN_WARNING > + "Device tree missing CPU 'clock' parameter. Assuming frequency is 1GHZ"); > + goto setup_cpu_freq; > + } > + > + cpu_freq = clk_get_rate(clk); What about cpufreq? I don't think this is useful. Best regards, Krzysztof