Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2628083pxb; Tue, 24 Aug 2021 03:58:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOCtJpEImmha0xqhAvwSf5dvcuTtPJIrZDnH6YEtQcQi17w80cloLTO1iItSsBiBIlyFIo X-Received: by 2002:a02:ce3a:: with SMTP id v26mr11765648jar.4.1629802682510; Tue, 24 Aug 2021 03:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629802682; cv=none; d=google.com; s=arc-20160816; b=O++Ah7iouOhIDvp7MPr301Qjb8JSrZwji3zxycve0TTA5NFCGZi0JYwmOzVVURmWa5 +shBf83S0qfwKWxQFXsBUhxgSBAH1kLCeIY/YPYjuWA6g0oJALG4BoqSXGVlxxuR3i3H J3acA3FwTDu1gAATq24w8BnwTyWaVYzky4KXmX1XKDR302g7ARzbZZyu4wrNZPCAfKe+ s+ONQVRcebM7vL33WAxBjESOE+BpQdLux/ildi2RwKAUm8nb/ISr2FjmDMFvK5vQWN5e 03VGb5LzyoWut6L45Bw48J9frWt36ov9CltqoF1O+oVLnRNg9lnUmeu0vyZjKUS/Cm4P WEHA== 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=/l5juTwkR60Vp+oYB02JbhKoleFPIlP+D7a4vMQ3MHk=; b=DibuPQ88EToTO5JNfKv61AWdDDni6i7zlR2l5iASV41Wy8pZABYY19U8s8QRKyx1TQ Q6puniminpSM8OOEEnWKDVEvFKhe4mYwbw0k4uDdwVqSnIep/HfktobQYDjczYO21Ujh Vn0srzouk7jnjxR5QpebesqOnedWN2gFVIJskOEgwq6px+45XnzJCUt37Vc7Hr3HO4P2 7nfyADUjmaKg1q/TgeXL7x9i9rui+k6/iRaSDJDkRg8Xo6leonjM5jNB0Ea5Y1NSAB4p 9eNT4KYnbL7TlbQE8mLo5rc27+IHcDr74bDCs7Ij8rK2k8CHGiuuqJd2nNB3olcF6b8s r3RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si19055459iot.89.2021.08.24.03.57.50; Tue, 24 Aug 2021 03:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236380AbhHXK5p (ORCPT + 99 others); Tue, 24 Aug 2021 06:57:45 -0400 Received: from foss.arm.com ([217.140.110.172]:33904 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235905AbhHXK5p (ORCPT ); Tue, 24 Aug 2021 06:57:45 -0400 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 E2B6E101E; Tue, 24 Aug 2021 03:57:00 -0700 (PDT) Received: from e108754-lin.cambridge.arm.com (e108754-lin.cambridge.arm.com [10.1.198.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3FF683F66F; Tue, 24 Aug 2021 03:56:59 -0700 (PDT) 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: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/3] arch_topology, ACPI: populate cpu capacity from CPPC Date: Tue, 24 Aug 2021 11:56:48 +0100 Message-Id: <20210824105651.28660-1-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.29.2.dirty MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Apologies for the long delay in posting v2. 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.14-rc7. 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/ 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 | 37 +++++++++++++++++++++++++++++++ include/linux/arch_topology.h | 4 ++++ 5 files changed, 49 insertions(+), 4 deletions(-) -- 2.29.2.dirty