Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp307182pxm; Wed, 2 Mar 2022 16:00:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4s01ESsCFWHIjimK9eQdTe6J8vIhpLVh7obqZ95aeSG4K/H/w5f1BblgZWiMEibOR5Y7j X-Received: by 2002:a17:902:e806:b0:14f:d9b7:ab1 with SMTP id u6-20020a170902e80600b0014fd9b70ab1mr33630544plg.151.1646265605387; Wed, 02 Mar 2022 16:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646265605; cv=none; d=google.com; s=arc-20160816; b=goC+OZCWC5W+8XP8NinZII0I9mlZJ6Lh0XNZxMjOVgGxittS2I1EPKlaqg1iIYEyip 0zSXDiWZKAzLHvP89FlfsOxfArGuMA8sxgIaoCSHkW3ZoF6pR0hdZPtZDWUksw1Exz4E N4mvbJ1yJQp9CBpB1ig83Ic5TCHzLJW/eYCdonMKB5THdeEg2AfrXpumaHDkwmQNfPbL cKQmGaaV5oOPSVstKrQ41ChSM0F5V8cq1e22uVD0N+SmJHluUJlQE2pzj9lPeuJyF1B8 LVdpxlZQnZ/2ps/3CcquJcGHYiqyxRXPryolsRulvEi0Seg+RPmO1D3wdjkWGp9cOJjZ WxgA== 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 :message-id:date:subject:cc:to:from; bh=Qt9BPoRhxttd15KiVV1Cu58GHBjN4uLibQp6QdbJhso=; b=Xb6YL2MFAQ5YONN6r22WN8IC6MK7di0AY7/jcWFh5IVaOZoQfNctErSQ00y8GvkQld ji3x+B99E4tH5moTHV+tGknHBkkmJ21pkRHX8Z7DuUkeEWBYLCd1V9HVwdFEg92VtC5i wz3TPtmQhjClC9uoELjpk0Uld6YXudwAkg42EhMGbsdS4A3efthJjqJM2jFfNUb5jA1t xHtB5LirYj98PWZ5q8VQU/j/Y82PYriQlqoTI8WxUGgNKEeUTVsvPDvJwd3oM+5HL1WR IQ2og7Kp9+7auY+qrFbmSStIcVJIjKIlaBLTJqfnAzuFqZGMKxleyOXc9yLWwHFFFM2p wJ1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u63-20020a638542000000b003656c6cc42csi427255pgd.670.2022.03.02.16.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:00:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96F6413C386; Wed, 2 Mar 2022 15:19:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244420AbiCBSKd (ORCPT + 99 others); Wed, 2 Mar 2022 13:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244029AbiCBSKb (ORCPT ); Wed, 2 Mar 2022 13:10:31 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7980D7090E; Wed, 2 Mar 2022 10:09:48 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 40621139F; Wed, 2 Mar 2022 10:09:48 -0800 (PST) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.195.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 71FB53F73D; Wed, 2 Mar 2022 10:09:46 -0800 (PST) From: Ionela Voinescu To: Sudeep Holla , "Rafael J . Wysocki" , Thomas Gleixner , Ingo Molnar , Giovanni Gherdovich , Catalin Marinas , Will Deacon , Valentin Schneider , Dietmar Eggemann , Sean Kelley Cc: Pierre Gondois , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/3] arch_topology, ACPI: populate cpu capacity from CPPC Date: Wed, 2 Mar 2022 18:09:10 +0000 Message-Id: <20220302180913.13229-1-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.29.2.dirty MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi all, v2->v3: - v2 can be found at [2] - Added sanity checking on perf_caps.highest_perf v1->v2: - v1 can be found at [1] - Changed debug prints to the format used on the DT path - s/init_cpu_capacity_cppc/topology_init_cpu_capacity_cppc Patches are based on v5.17-rc6. The patches have been build tested on x86 and more thoroughly tested on Juno R2 (arm64), which uses the new functionality, with the following results: root@buildroot:~# dmesg | grep cpu_capacity [ 2.191152] cpu_capacity: CPU0 cpu_capacity=38300 (raw). [ 2.196482] cpu_capacity: CPU1 cpu_capacity=38300 (raw). [ 2.201809] cpu_capacity: CPU2 cpu_capacity=38300 (raw). [ 2.207136] cpu_capacity: CPU3 cpu_capacity=38300 (raw). [ 2.212463] cpu_capacity: CPU4 cpu_capacity=102400 (raw). [ 2.217877] cpu_capacity: CPU5 cpu_capacity=102400 (raw). [ 2.223291] cpu_capacity: capacity_scale=102400 [ 2.227834] cpu_capacity: CPU0 cpu_capacity=383 [ 2.232376] cpu_capacity: CPU1 cpu_capacity=383 [ 2.236919] cpu_capacity: CPU2 cpu_capacity=383 [ 2.241462] cpu_capacity: CPU3 cpu_capacity=383 [ 2.246004] cpu_capacity: CPU4 cpu_capacity=1024 [ 2.250634] cpu_capacity: CPU5 cpu_capacity=1024 [ 2.255321] cpu_capacity: cpu_capacity initialization done root@buildroot:~# tail -n +1 /sys/devices/system/cpu/cpu*/cpu_capacity ==> /sys/devices/system/cpu/cpu0/cpu_capacity <== 383 ==> /sys/devices/system/cpu/cpu1/cpu_capacity <== 383 ==> /sys/devices/system/cpu/cpu2/cpu_capacity <== 383 ==> /sys/devices/system/cpu/cpu3/cpu_capacity <== 383 ==> /sys/devices/system/cpu/cpu4/cpu_capacity <== 1024 ==> /sys/devices/system/cpu/cpu5/cpu_capacity <== 1024 [1] https://lore.kernel.org/lkml/20210514095339.12979-1-ionela.voinescu@arm.com/ [2] https://lore.kernel.org/lkml/20210824105651.28660-1-ionela.voinescu@arm.com/ Thanks, Ionela. Ionela Voinescu (3): x86, ACPI: rename init_freq_invariance_cppc to arch_init_invariance_cppc arch_topology: obtain cpu capacity using information from CPPC arm64, topology: enable use of init_cpu_capacity_cppc() arch/arm64/include/asm/topology.h | 4 ++++ arch/x86/include/asm/topology.h | 2 +- drivers/acpi/cppc_acpi.c | 6 ++--- drivers/base/arch_topology.c | 40 +++++++++++++++++++++++++++++++ include/linux/arch_topology.h | 4 ++++ 5 files changed, 52 insertions(+), 4 deletions(-) -- 2.25.1