From patchwork Tue Aug 27 06:24:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John B. Wyatt IV" X-Patchwork-Id: 823838 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D372212E1CD for ; Tue, 27 Aug 2024 06:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739942; cv=none; b=tNndW/+r+Somg2LlF/6hHNg1DuubelPuy1PBxDaXuB6Pn8onTVG0GJ20zT49ONFRGwYwP8N520vqcZJfZ4XyZxRn7Ttx8mqopg950tX0ySaZYBPcqPkLUaJ2u5+UqCRAOsFu3clv3dl9cFWa+Ck0hDeq2zigW5vKtFMaaj0WZo0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739942; c=relaxed/simple; bh=YDOz2ktkc+4WUw0EI7xEPOCWzMtR2qUpp2w4WTH+bC4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VcB5Q2Tygfk+vR1hEjRYlMwp+qgduDIFAh/jqFF0y35i+B7YuGMkP2y+HcNMd1BL90+3MGOwHqhuA2LOKYoQusENSm7gF9S7HDBGYYKTle/62msK8S8UM1z2tgjqZCq2fUai16s4rUxqyEiFghGleOHVQoI/KheM3O8ws69kkwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fMqFbAIc; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fMqFbAIc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724739939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wj3PtQNu+U7s40xNxmJSMKWG7VLEYqXeqydmsHsY2gE=; b=fMqFbAIcNKK2/9Pl4MOMv+1BbarFtx1nhCErc56S1IZRSUCsiyPePnNa/30VNpKdGosg08 Y8QBgeym7faePdAYkwwWWyg6FCgljSuSdfwpw/4gLIUqDaYtAWtgDUWBgGdxABE4N1gxLu puteQk5ag7whLiNqaujZrOHnMrgbIWA= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-304-avtOPzE1NViUJKrbIz-6iA-1; Tue, 27 Aug 2024 02:25:38 -0400 X-MC-Unique: avtOPzE1NViUJKrbIz-6iA-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7a1d06f8e78so570884885a.3 for ; Mon, 26 Aug 2024 23:25:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724739938; x=1725344738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wj3PtQNu+U7s40xNxmJSMKWG7VLEYqXeqydmsHsY2gE=; b=MzP/a0dJrOeubJ6GfXaZ/NM3QPV5t8XmWWUGu0h2NwtGH1K4PR2faW05x1Ri3fpSzb /ChbqGCzlC/Z/A/uxuwJJFkIjqDHhqJRG36tVpBqFpBCQ4dGVcRREQWb/IGU/9YdLMjP G6wlEVz9CL3GlLC/lsNVHfYJ+I+uZGkPkO6gQ10yC+w4Pls6fbGmwv3+ktquXrT3ypN2 zdyeZSO2imPPZ9Pt8cXJ1uariPpaLX9W9O8RU5JHFA3lBh6bxAibsY6mJz3EXBuuBmuC i8ZuF3x1z8sMTxXaGDdDF+zYX+BvhtOb5P+zSzFiGG6vGjxLq2MUdnuKoWsP0YlwAP9f Ecdg== X-Forwarded-Encrypted: i=1; AJvYcCXe5iZr2YSNhJRAtqLErZN7OoaBi9WkHiyhVKsov3rUdzzDdZKAbGNZvTapUwiD77ZNVUMIx0cMeg==@vger.kernel.org X-Gm-Message-State: AOJu0Yy2pKq6ixR5XhRIX6eK3bUY7H0RmHxOP8GrwUMa97fNoGu4puzl UcfNxpdYYSIT3AZwbHYF31Z/Dr1VkbUaeYC3YY9HmPtOtLbWiLuCFPpTIfJU+d3Al9k2eyiBjuh H6L4vvI1LPJBIWTUkz04beRpVL1iSnckOSIhN8TZP5pJkbVQpK95TURJ9 X-Received: by 2002:a05:620a:4006:b0:7a1:3ffb:e88e with SMTP id af79cd13be357-7a6896e8a22mr1467875285a.9.1724739937669; Mon, 26 Aug 2024 23:25:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfG8WC7a1JZb94SqRCpHZEk7sO4yY4WDTrC4G2YBvEmPLyLdkBdFAZ7qVQz/x0AtSlRcxliA== X-Received: by 2002:a05:620a:4006:b0:7a1:3ffb:e88e with SMTP id af79cd13be357-7a6896e8a22mr1467873685a.9.1724739937151; Mon, 26 Aug 2024 23:25:37 -0700 (PDT) Received: from rhfedora.. ([71.217.43.75]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a67f1fe176sm521044185a.0.2024.08.26.23.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 23:25:36 -0700 (PDT) From: "John B. Wyatt IV" To: Shuah Khan Cc: "John B. Wyatt IV" , linux-pm@vger.kernel.org, Thomas Renninger , Shuah Khan , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v2 1/4] Add SWIG bindings files for libcpupower Date: Tue, 27 Aug 2024 02:24:33 -0400 Message-ID: <20240827062438.71809-2-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827062438.71809-1-jwyatt@redhat.com> References: <20240827062438.71809-1-jwyatt@redhat.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 SWIG is a tool packaged in Fedora and other distros that can generate bindings from C and C++ code for several languages including Python, Perl, and Go. These bindings allows users to easily write scripts that use and extend libcpupower's functionality. Currently, only Python is provided in the makefile, but additional languages may be added if there is demand. Added suggestions from Shuah Khan for the README and license discussion. Note that while SWIG itself is GPL v3+ licensed; the resulting output, the bindings code, is permissively licensed + the license of the .o files. Please see https://swig.org/legal.html and [1] for more details. [1] https://lore.kernel.org/linux-pm/Zqv9BOjxLAgyNP5B@hatbackup/ Suggested-by: Shuah Khan Signed-off-by: John B. Wyatt IV Signed-off-by: John B. Wyatt IV --- Changes in v2: - Implemented the full bindings from libcpupower headers - Addressed review comments about doc and makefile - Small style and other fixes --- .../power/cpupower/bindings/python/.gitignore | 8 + tools/power/cpupower/bindings/python/Makefile | 31 +++ tools/power/cpupower/bindings/python/README | 59 +++++ .../bindings/python/raw_pylibcpupower.i | 247 ++++++++++++++++++ 4 files changed, 345 insertions(+) create mode 100644 tools/power/cpupower/bindings/python/.gitignore create mode 100644 tools/power/cpupower/bindings/python/Makefile create mode 100644 tools/power/cpupower/bindings/python/README create mode 100644 tools/power/cpupower/bindings/python/raw_pylibcpupower.i diff --git a/tools/power/cpupower/bindings/python/.gitignore b/tools/power/cpupower/bindings/python/.gitignore new file mode 100644 index 000000000000..5c9a1f0212dd --- /dev/null +++ b/tools/power/cpupower/bindings/python/.gitignore @@ -0,0 +1,8 @@ +__pycache__ +raw_pylibcpupower_wrap.c +*.o +*.so +*.py +!test_raw_pylibcpupower.py +# git keeps ignoring this file, use git add -f raw_libcpupower.i +!raw_pylibcpupower.i diff --git a/tools/power/cpupower/bindings/python/Makefile b/tools/power/cpupower/bindings/python/Makefile new file mode 100644 index 000000000000..d0418f902795 --- /dev/null +++ b/tools/power/cpupower/bindings/python/Makefile @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Makefile for libcpupower's Python bindings +# +# This Makefile expects you have already run the makefile for cpupower to build +# the .o files in the lib directory for the bindings to be created. + +CC=gcc + +LIB_DIR = ../../lib +BIND_DIR = . +PY_INCLUDE := $(firstword $(shell python-config --includes)) +#PY_INCLUDE = $(shell python-config --includes | awk '{ print $1 }') + +OBJECTS_LIB = $(wildcard $(LIB_DIR)/*.o) +OBJECTS_BIND = $(wildcard $(BIND_DIR)/*.o) + +all: _raw_pylibcpupower.so + +_raw_pylibcpupower.so: raw_pylibcpupower_wrap.o + $(CC) -shared $(OBJECTS_LIB) raw_pylibcpupower_wrap.o -o _raw_pylibcpupower.so # raw_pylibcpupower_wrap.o +# $(CC) -shared $(OBJECTS_BIND) $(OBJECTS_LIB) -o _raw_pylibcpupower.so # raw_pylibcpupower_wrap.o + +raw_pylibcpupower_wrap.o: raw_pylibcpupower_wrap.c + $(CC) -fPIC -c raw_pylibcpupower_wrap.c $(PY_INCLUDE) + +raw_pylibcpupower_wrap.c: raw_pylibcpupower.i + swig -python raw_pylibcpupower.i + +# Will only clean the bindings folder; will not clean the actual cpupower folder +clean: + rm -f raw_pylibcpupower.py raw_pylibcpupower_wrap.c raw_pylibcpupower_wrap.o _raw_pylibcpupower.so diff --git a/tools/power/cpupower/bindings/python/README b/tools/power/cpupower/bindings/python/README new file mode 100644 index 000000000000..0a4bb2581e8a --- /dev/null +++ b/tools/power/cpupower/bindings/python/README @@ -0,0 +1,59 @@ +This folder contains the necessary files to build the Python bindings for +libcpupower (aside from the libcpupower object files). + + +requirements +------------ + +* You need the object files in the libcpupower directory compiled by +cpupower's makefile. +* The SWIG program must be installed. +* The Python's development libraries installed. + +Please check that your version of SWIG is compatible with the version of Python +installed on your machine by checking the SWIG changelog on their website. +https://swig.org/ + +Note that while SWIG itself is GPL v3+ licensed; the resulting output, +the bindings code: is permissively licensed + the license of libcpupower's .o +files. For these bindings that means GPL v2. + +Please see https://swig.org/legal.html and the discussion [1] for more details. + +[1] +https://lore.kernel.org/linux-pm/Zqv9BOjxLAgyNP5B@hatbackup/ + + +build +----- + +Install SWIG and the Python development files provided by your distribution. + +Build the object files for libcpupower by running make in the cpupower +directory. + +Return to the directory this README is in to run: + +$ make + + +testing +------- + +Please verify the _raw_pylibcpupower.so and raw_pylibcpupower.py files have +been created. + +To run the test script: + +$ python test_raw_pylibcpupower.py + + +credits +------- + +Original Bindings Author: +John B. Wyatt IV +jwyatt@redhat.com +sageofredondo@gmail.com + +Copyright (C) 2024 Red Hat diff --git a/tools/power/cpupower/bindings/python/raw_pylibcpupower.i b/tools/power/cpupower/bindings/python/raw_pylibcpupower.i new file mode 100644 index 000000000000..96556d87a745 --- /dev/null +++ b/tools/power/cpupower/bindings/python/raw_pylibcpupower.i @@ -0,0 +1,247 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +%module raw_pylibcpupower +%{ +#include "../../lib/cpupower_intern.h" +#include "../../lib/acpi_cppc.h" +#include "../../lib/cpufreq.h" +#include "../../lib/cpuidle.h" +#include "../../lib/cpupower.h" +#include "../../lib/powercap.h" +%} + +/* + * cpupower_intern.h + */ + +#define PATH_TO_CPU "/sys/devices/system/cpu/" +#define MAX_LINE_LEN 4096 +#define SYSFS_PATH_MAX 255 + +int is_valid_path(const char *path); + +unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen); + +unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen); + +/* + * acpi_cppc.h + */ + +enum acpi_cppc_value { + HIGHEST_PERF, + LOWEST_PERF, + NOMINAL_PERF, + LOWEST_NONLINEAR_PERF, + LOWEST_FREQ, + NOMINAL_FREQ, + REFERENCE_PERF, + WRAPAROUND_TIME, + MAX_CPPC_VALUE_FILES +}; + +unsigned long acpi_cppc_get_data(unsigned int cpu, + enum acpi_cppc_value which); + +/* + * cpufreq.h + */ + +struct cpufreq_policy { + unsigned long min; + unsigned long max; + char *governor; +}; + +struct cpufreq_available_governors { + char *governor; + struct cpufreq_available_governors *next; + struct cpufreq_available_governors *first; +}; + +struct cpufreq_available_frequencies { + unsigned long frequency; + struct cpufreq_available_frequencies *next; + struct cpufreq_available_frequencies *first; +}; + + +struct cpufreq_affected_cpus { + unsigned int cpu; + struct cpufreq_affected_cpus *next; + struct cpufreq_affected_cpus *first; +}; + +struct cpufreq_stats { + unsigned long frequency; + unsigned long long time_in_state; + struct cpufreq_stats *next; + struct cpufreq_stats *first; +}; + +unsigned long cpufreq_get_freq_kernel(unsigned int cpu); + +unsigned long cpufreq_get_freq_hardware(unsigned int cpu); + +#define cpufreq_get(cpu) cpufreq_get_freq_kernel(cpu); + +unsigned long cpufreq_get_transition_latency(unsigned int cpu); + +int cpufreq_get_hardware_limits(unsigned int cpu, + unsigned long *min, + unsigned long *max); + +char *cpufreq_get_driver(unsigned int cpu); + +void cpufreq_put_driver(char *ptr); + +struct cpufreq_policy *cpufreq_get_policy(unsigned int cpu); + +void cpufreq_put_policy(struct cpufreq_policy *policy); + +struct cpufreq_available_governors +*cpufreq_get_available_governors(unsigned int cpu); + +void cpufreq_put_available_governors( + struct cpufreq_available_governors *first); + +struct cpufreq_available_frequencies +*cpufreq_get_available_frequencies(unsigned int cpu); + +void cpufreq_put_available_frequencies( + struct cpufreq_available_frequencies *first); + +struct cpufreq_available_frequencies +*cpufreq_get_boost_frequencies(unsigned int cpu); + +void cpufreq_put_boost_frequencies( + struct cpufreq_available_frequencies *first); + +struct cpufreq_affected_cpus *cpufreq_get_affected_cpus(unsigned + int cpu); + +void cpufreq_put_affected_cpus(struct cpufreq_affected_cpus *first); + +struct cpufreq_affected_cpus *cpufreq_get_related_cpus(unsigned + int cpu); + +void cpufreq_put_related_cpus(struct cpufreq_affected_cpus *first); + +struct cpufreq_stats *cpufreq_get_stats(unsigned int cpu, + unsigned long long *total_time); + +void cpufreq_put_stats(struct cpufreq_stats *stats); + +unsigned long cpufreq_get_transitions(unsigned int cpu); + +int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy); + +int cpufreq_modify_policy_min(unsigned int cpu, unsigned long min_freq); + +int cpufreq_modify_policy_max(unsigned int cpu, unsigned long max_freq); + +int cpufreq_modify_policy_governor(unsigned int cpu, char *governor); + +int cpufreq_set_frequency(unsigned int cpu, + unsigned long target_frequency); + +unsigned long cpufreq_get_sysfs_value_from_table(unsigned int cpu, + const char **table, + unsigned int index, + unsigned int size); + +/* + * cpuidle.h + */ + +int cpuidle_is_state_disabled(unsigned int cpu, + unsigned int idlestate); +int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate, + unsigned int disable); +unsigned long cpuidle_state_latency(unsigned int cpu, + unsigned int idlestate); +unsigned long cpuidle_state_usage(unsigned int cpu, + unsigned int idlestate); +unsigned long long cpuidle_state_time(unsigned int cpu, + unsigned int idlestate); +char *cpuidle_state_name(unsigned int cpu, + unsigned int idlestate); +char *cpuidle_state_desc(unsigned int cpu, + unsigned int idlestate); +unsigned int cpuidle_state_count(unsigned int cpu); + +char *cpuidle_get_governor(void); + +char *cpuidle_get_driver(void); + +/* + * cpupower.h + */ + +struct cpupower_topology { + /* Amount of CPU cores, packages and threads per core in the system */ + unsigned int cores; + unsigned int pkgs; + unsigned int threads; /* per core */ + + /* Array gets mallocated with cores entries, holding per core info */ + struct cpuid_core_info *core_info; +}; + +struct cpuid_core_info { + int pkg; + int core; + int cpu; + + /* flags */ + unsigned int is_online:1; +}; + +int get_cpu_topology(struct cpupower_topology *cpu_top); + +void cpu_topology_release(struct cpupower_topology cpu_top); + +int cpupower_is_cpu_online(unsigned int cpu); + +/* + * powercap.h + */ + +struct powercap_zone { + char name[MAX_LINE_LEN]; + /* + * sys_name relative to PATH_TO_POWERCAP, + * do not forget the / in between + */ + char sys_name[SYSFS_PATH_MAX]; + int tree_depth; + struct powercap_zone *parent; + struct powercap_zone *children[POWERCAP_MAX_CHILD_ZONES]; + /* More possible caps or attributes to be added? */ + uint32_t has_power_uw:1, + has_energy_uj:1; + +}; + +int powercap_walk_zones(struct powercap_zone *zone, + int (*f)(struct powercap_zone *zone)); + +struct powercap_zone *powercap_init_zones(void); + +int powercap_get_enabled(int *mode); + +int powercap_set_enabled(int mode); + +int powercap_get_driver(char *driver, int buflen); + +int powercap_get_max_energy_range_uj(struct powercap_zone *zone, uint64_t *val); + +int powercap_get_energy_uj(struct powercap_zone *zone, uint64_t *val); + +int powercap_get_max_power_range_uw(struct powercap_zone *zone, uint64_t *val); + +int powercap_get_power_uw(struct powercap_zone *zone, uint64_t *val); + +int powercap_zone_get_enabled(struct powercap_zone *zone, int *mode); + +int powercap_zone_set_enabled(struct powercap_zone *zone, int mode); From patchwork Tue Aug 27 06:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John B. Wyatt IV" X-Patchwork-Id: 823837 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E02A4143C7E for ; Tue, 27 Aug 2024 06:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739944; cv=none; b=GsViYgL5s1acQh456xIzQMudOhSlr5q0XREZwEr/j66jrrwBzhgWxfuu65X/j4Zpxjcc5zwfHrpKrFwyljGWB+ElEd5k3gAbh5S3cGafMbFtyOrNH13v/ykeSCA1FFcoGQRiiFGJ1i8l5QDgd9RRMxJC+SPD5JBP5GmzScNTdOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739944; c=relaxed/simple; bh=Paierbr3OnV+UMAsLtNyQkn6GQuqyEdNk3kfd9t1Pbs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SypZNj5YR0AxfTp7owd51ZDOEyVIw6n6B2SZiWVyfoWxXx2N3RRX8et3hH5HQfolXJp2avg0JV1pan9DF/0v21I++jDpD+uV29rVUX5ek9N6SeWTLV6Vewe/vm94+eKB6PNTgS4A5ngOMz4j+5E6F57ZtBfDg6qco7+NKCYxzeU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DcQyWbNt; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DcQyWbNt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724739941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KvCt7XxbbMqr/ZTectnTYyzcNnevLnwbiS/dEZsdMoE=; b=DcQyWbNtNKlAc3ZUn4Rjt3sqDYFzK1lVTQmhPQeBhO3/aHwF41YIsiy0U3R0t3dkfbirER YEQkc2KWZgINuyyMn4PCHAOnsIhaVMyvEwPd1qZpfJDPgHLtPCL0lWewCPECsgv0FkfHcX xBoAG34GEorfIzqF3bz9ub/AdKYUIUI= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-yqQnMTGXPC2rgLggtaS8OA-1; Tue, 27 Aug 2024 02:25:39 -0400 X-MC-Unique: yqQnMTGXPC2rgLggtaS8OA-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7a1d9a712bcso1200700685a.1 for ; Mon, 26 Aug 2024 23:25:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724739938; x=1725344738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KvCt7XxbbMqr/ZTectnTYyzcNnevLnwbiS/dEZsdMoE=; b=iD2uDbO1v6GZ8OCt4kb5rqU1W5R5Wkl3lBvkx78rGNzIXxU7r7Wdm1EQsYJdjGN/qu EvnMh+MLFe2kz1xkI3gMKwo5h/BcerMnY5N2MjVOAbDQWDZOHei6GDHaZh+8Inrg0L6J H6yTMylxhwiH+eynZCbNrt5biZ9wN+7EVNmcO3T1hbbiLVlI02EwHwTV7O2oO4dfoAIq /BrquJuJDNOp0MdbuUPlILxjxVjOjzpZ6oq7tQIOE8np3VPi0J5ui/2EOFH4E4jpem/x xPqRQ5M2IqW6VMGu5TAnqpMiIRjyJt2B2KNHRfEpiVSqsnJ8t8+mPansCEHE0X9dKPIh Xgnw== X-Forwarded-Encrypted: i=1; AJvYcCXR6dFusw1Se+N4Q7voLKTI6Q8HormXEsPKl0wMqK8F5iIzXRF9dmY/CA0V6sOO0RdI+tu9G0GFOg==@vger.kernel.org X-Gm-Message-State: AOJu0YwzIuTCslp0BAUUApfm6aDi093VZdkOfSgTRBRBlA6WnxMxq+7a 4hnHMOWRnMV+/HL1zrxW+L09XIoC3nDO5ZJxVWGfq5JN44UcF2i7PkIMgAKz+HkEn1xpF/X+sRy 3rDYVNdV5gD0vIgsDJs7jwxRWk+NSayIIhJ8zz23Opm9lTFgnjVeAoRcLrGY9nPfvmbdtyQ== X-Received: by 2002:a05:620a:19a7:b0:79c:c3d:9c22 with SMTP id af79cd13be357-7a7e4c49e7bmr410980385a.8.1724739938553; Mon, 26 Aug 2024 23:25:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOAGCcdImWIfP0W/sHe5KI872sfiULmCGaWHeUiImsKMuTcEl4A00LgBTxnHTb69xUL9c0FQ== X-Received: by 2002:a05:620a:19a7:b0:79c:c3d:9c22 with SMTP id af79cd13be357-7a7e4c49e7bmr410977685a.8.1724739938189; Mon, 26 Aug 2024 23:25:38 -0700 (PDT) Received: from rhfedora.. ([71.217.43.75]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a67f1fe176sm521044185a.0.2024.08.26.23.25.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 23:25:37 -0700 (PDT) From: "John B. Wyatt IV" To: Shuah Khan Cc: "John B. Wyatt IV" , linux-pm@vger.kernel.org, Thomas Renninger , Shuah Khan , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v2 2/4] Implement dummy function for SWIG to accept the full library definitions Date: Tue, 27 Aug 2024 02:24:34 -0400 Message-ID: <20240827062438.71809-3-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827062438.71809-1-jwyatt@redhat.com> References: <20240827062438.71809-1-jwyatt@redhat.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There was a symbol listed in the powercap.h file that was not implemented that caused SWIG to give a symbol not found error, despite not being used. As suggested, implement a dummy function that returns 0 so SWIG accepts the .o files. Suggested-by: Shuah Khan Signed-off-by: John B. Wyatt IV Signed-off-by: John B. Wyatt IV --- Changes in v2: - Implemented the function so SWIG will accept the header definition --- tools/power/cpupower/lib/powercap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/power/cpupower/lib/powercap.c b/tools/power/cpupower/lib/powercap.c index a7a59c6bacda..94a0c69e55ef 100644 --- a/tools/power/cpupower/lib/powercap.c +++ b/tools/power/cpupower/lib/powercap.c @@ -77,6 +77,14 @@ int powercap_get_enabled(int *mode) return sysfs_get_enabled(path, mode); } +/* + * TODO: implement function. Returns 0 for now. + */ +int powercap_set_enabled(int mode) +{ + return 0; +} + /* * Hardcoded, because rapl is the only powercap implementation - * this needs to get more generic if more powercap implementations From patchwork Tue Aug 27 06:24:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John B. Wyatt IV" X-Patchwork-Id: 823836 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF7E4155C94 for ; Tue, 27 Aug 2024 06:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739949; cv=none; b=k/CB303RPrIBmb+t+JFmvdRUxF4clfe4KlcXHSi49sz8DSvSUtNKH4qurPGNV9Cu55i0O6KrJ9t1gD+wmOykRIhYI43z3mTLZnCSAcc0TibUaOKVmnCzDwqrY/Tut0MgDa2Ydpw/ORkXIkhssndA4riG14ceDho6qg5ZrnJHg3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739949; c=relaxed/simple; bh=U2H/nnmhKqJ1mAbFf1o4lwVgpgis69qFv/radbpXrfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vDvmKhMVamaW5ooDboMDEN0TNWuF0Lm+c4sLyFT+pWrl0Pa+HNdgtpvA7sKkOCn0Cx2L390s6kzOo5M2OCh06Kfs8VNhBuOmbiVZwu/eQ3QBKAH0Wp3KKWFKkcc5cYb4XXmSiXUWoKbZUeP0aqx/RizXEhmvM3T3ebkJYVgaEfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HRjJaxwI; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HRjJaxwI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724739947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhFymyY3ZzUyMaZHrWjD0+mazgbdoYhFhxFRaaHDnfA=; b=HRjJaxwIe0UA9GM8U6M4K6xicNB0e5SebWSRYBql2JhIUC+/wngO0fOrD1M4GMOcyKRZ2+ fFgy7RPMMs8F8SOK44Xuo63cF/pHhzzDevdQsk9dQrPFZ/DIOx4iwUxv4LluCaTVXF94ZW h+KA8gT20MHQ/DGRVosvRSdik0TbWQI= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-5r-LINrDNeSx18C7k08dTg-1; Tue, 27 Aug 2024 02:25:40 -0400 X-MC-Unique: 5r-LINrDNeSx18C7k08dTg-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-6b351a76beeso111254357b3.0 for ; Mon, 26 Aug 2024 23:25:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724739939; x=1725344739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AhFymyY3ZzUyMaZHrWjD0+mazgbdoYhFhxFRaaHDnfA=; b=teTJmu4N5qWTwFCmVGSdCjj7d6BVGYZAuHWTXcRqvSccabA+6s+ZCANKl3UFIQhOmM KWGKfSOxasn6E22qdDuWkpsgnHJ/K35dWZWkEjuslMf3uhTK7E3e9Z/b21FG0hC9gZ+j XfG1FHpf02u6WV2qcxTO0PPCm2Tk3kaU/YTM2C0CHSUQvsmgc84bT9NVOlCLhOg74vTm Rtorumw847Be++BItoB5OErYnZq6jjKXfyfZFMWTJ0AfDMN0oP+3j1BCNbXPP5FYvBGD xTXYjJcNOe+L/YjckDIXgDjdBcqHpclE/VKv44+nr3nxOgSTFoJ4My9lKHWWVqQOR+Nv kV4A== X-Forwarded-Encrypted: i=1; AJvYcCXAE6Eq+zYHU6ij5CdEuhdYA96P+/lkfapT5dj7sDgbQjnUFdZkpxkqda7PtZFMnA4k/XVMIYeVUw==@vger.kernel.org X-Gm-Message-State: AOJu0Yy5BX2r7bxlTGqyLxqb+ZLL0S0Bda2TpQj17Zjx+b69k8/uXDaJ 6zLouOx4F2RxPCaacPrMILLyxUKYHpeGu79IxyawQ/lNSMrjAHOlwa/LJ2c01bhbK24WBfD1vF0 UutzwygZmHnICzT3MH2hl3UZD/WzyMnUPSAo7L+taHbiAsgkUo7FOz0eD X-Received: by 2002:a05:690c:fcf:b0:6b2:6cd4:7f92 with SMTP id 00721157ae682-6c71437c598mr132010077b3.5.1724739939593; Mon, 26 Aug 2024 23:25:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVWVMNWNr3EUR2KwhdGnL6M1EPVnmlDwDQ1kPq2zVtyZREcNg3pVJaOfG1nOyO5YCizPH52A== X-Received: by 2002:a05:690c:fcf:b0:6b2:6cd4:7f92 with SMTP id 00721157ae682-6c71437c598mr132009897b3.5.1724739939245; Mon, 26 Aug 2024 23:25:39 -0700 (PDT) Received: from rhfedora.. ([71.217.43.75]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a67f1fe176sm521044185a.0.2024.08.26.23.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 23:25:38 -0700 (PDT) From: "John B. Wyatt IV" To: Shuah Khan Cc: "John B. Wyatt IV" , linux-pm@vger.kernel.org, Thomas Renninger , Shuah Khan , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v2 3/4] Include test_raw_pylibcpupower.py Date: Tue, 27 Aug 2024 02:24:35 -0400 Message-ID: <20240827062438.71809-4-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827062438.71809-1-jwyatt@redhat.com> References: <20240827062438.71809-1-jwyatt@redhat.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This script demonstrates how to make use of, and tests, the bindings. In the future, this script could become part of a larger test suite to test the bindings and libcpupower. Signed-off-by: John B. Wyatt IV Signed-off-by: John B. Wyatt IV --- Changes in v2: - None. --- .../bindings/python/test_raw_pylibcpupower.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py diff --git a/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py b/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py new file mode 100755 index 000000000000..3d6f62b9556a --- /dev/null +++ b/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-only + +import raw_pylibcpupower as p + +# Simple function call + +""" +Get cstate count +""" +cpu_cstates_count = p.cpuidle_state_count(0) +if cpu_cstates_count > -1: + print(f"CPU 0 has {cpu_cstates_count} c-states") +else: + print(f"cstate count error: return code: {cpu_cstates_count}") + +""" +Disable cstate (will fail if the above is 0, ex: a virtual machine) +""" +cstate_disabled = p.cpuidle_state_disable(0, 0, 1) +if cpu_cstates_count == 0: + print(f"CPU 0 has {cpu_cstates_count} c-states") +else: + print(f"cstate count error: return code: {cpu_cstates_count}") + +match cstate_disabled: + case 0: + print(f"CPU state disabled") + case -1: + print(f"Idlestate not available") + case _: + print(f"Not documented") + + +# Pointer example + +topo = p.cpupower_topology() +total_cpus = p.get_cpu_topology(topo) +if total_cpus > 0: + print(f"Number of total cpus: {total_cpus} and number of cores: {topo.cores}") +else: + print(f"Error: could not get cpu topology") From patchwork Tue Aug 27 06:24:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John B. Wyatt IV" X-Patchwork-Id: 822991 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30E9B1487F4 for ; Tue, 27 Aug 2024 06:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739945; cv=none; b=Y+icyIce0IRqKDX5DK3j/KHOWbh2sc/a3gZ+vVzRW+4XWz7SHG408bPxMu8UGd4hO9MnXz54MfLi452zruYDCDTrFWJeIJtwxaWXv9zdhkUY2V+kr+sw3gy70m5Tg6Kpbhhdi0otOsJNZxB3VNJDKUTB33aW+B+n6W2/Np8PElA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724739945; c=relaxed/simple; bh=WmB0wo2kGM2nwplrjypHlZtd9IRU7iJe1X+JRXxRYVQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oMK9FvjLdd7O1NUU503ZaJK3mqbhVctRq1CsTZdFEkxAoHuiN/Ior68LGxgVXfSPCDYC4NDnfhJEL6W9YfbryOwFWSzI1wslnnmXg52Rptd56mV0zUOe8ouwThpvipnlH4lhlmZA70KmpKzJa323qU5nTP5WuvsqsVoX1rHJ9UA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FlRPL94n; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FlRPL94n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724739943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tChrxO1HuAIgDg5Agw3TuPA4TMpEaBjY2k6lF8kLxg0=; b=FlRPL94nDZ3p4ZCc+5K7BbtUxzqJY/Kge9c8cwcjpMQNpAmkyUvPJlysxDI+CeoHUWUmPT MEDjHGOxFZHw9da3O5afF0Yid8QZS7IWuwsGbQTmiR6/+lpcoy57XYtFG++zbgU8dIkOYq ECqMc0Ro2+vCX3hXGpDfP418OK6ZTvs= Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-CH5qacNoM8KqPLEXo4kU4g-1; Tue, 27 Aug 2024 02:25:41 -0400 X-MC-Unique: CH5qacNoM8KqPLEXo4kU4g-1 Received: by mail-vs1-f72.google.com with SMTP id ada2fe7eead31-498cdceda97so2119341137.3 for ; Mon, 26 Aug 2024 23:25:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724739941; x=1725344741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tChrxO1HuAIgDg5Agw3TuPA4TMpEaBjY2k6lF8kLxg0=; b=vE5brpqn9Xpi/Ke8X3xFZxKSZTPmSkYw5+nlPWIpO/XFfxtNaAOAAVoeEyVwfd1oin xJGjch2AMVeQVnzZ3cnUVbXo+N/F7h0PUQ9P8gWXFZFaE7B1P6vLFPjLcP9S9/6PInuH pnzxwq9Olq3RM2VNcbN4u/MfdnDs+4wC3c1KLVqrJPPiNdnuHfLd1SU0WATaZnUqcrMp OvbHoAEnygEMqLFpnUmj8GY4vRWVMZwSM1J8k88pLzIAIipltXNnsSBBevIrcTPAdJtz klzUW9E+mWcT7Zew7QmSJT93DX4FLVCWwQvlG3HO9Lhkm8IdvJ5GuI1YMmoRIQTz/RUZ VOxQ== X-Forwarded-Encrypted: i=1; AJvYcCXBzQht0oxfm5qyR9+Eg32LAZLms4b0fXeRmNZ5/DbF9MfAPg1RJt1njj5MxP8vZx9p/J14XZCCCA==@vger.kernel.org X-Gm-Message-State: AOJu0YwrA3LNaPQaoOzjfw4hf3ZgOcl715DGU+1qEewbPbgVhF/uEO/Q ZVRWz3jMSNBZ/cnRY5nFl2D1HV/3rD8L9sYnLMi9+czlYrUTRAxf703i4d6mf/X5SlHj1MN4dbW cgqa/Jni533Ig7ALwYUms8K7Rf++ks6sN5GkdWvAMA8UKxRyR4XZC5U9b X-Received: by 2002:a05:6102:2ac3:b0:497:6360:6454 with SMTP id ada2fe7eead31-498f4527b10mr10077643137.1.1724739940805; Mon, 26 Aug 2024 23:25:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKJOfa1bnLznhnu8Wk2lq1SZIINHqonjeWtxA62MU4NC0rheKOcp5i9yqAIel7fXo9kfvaag== X-Received: by 2002:a05:6102:2ac3:b0:497:6360:6454 with SMTP id ada2fe7eead31-498f4527b10mr10077631137.1.1724739940420; Mon, 26 Aug 2024 23:25:40 -0700 (PDT) Received: from rhfedora.. ([71.217.43.75]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a67f1fe176sm521044185a.0.2024.08.26.23.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 23:25:39 -0700 (PDT) From: "John B. Wyatt IV" To: Shuah Khan Cc: "John B. Wyatt IV" , linux-pm@vger.kernel.org, Thomas Renninger , Shuah Khan , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v2 4/4] MAINTAINERS: Add Maintainers for SWIG Python bindings Date: Tue, 27 Aug 2024 02:24:36 -0400 Message-ID: <20240827062438.71809-5-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827062438.71809-1-jwyatt@redhat.com> References: <20240827062438.71809-1-jwyatt@redhat.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Adding myself as the primary maintainer and John Kacur as the backup maintainer for the libcpupower SWIG generated Python bindings. Suggested-by: Shuah Khan Signed-off-by: John B. Wyatt IV Signed-off-by: John B. Wyatt IV --- Changes in v2: - Added as requested. --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f328373463b0..80d5475c943b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5819,6 +5819,9 @@ CPU POWER MONITORING SUBSYSTEM M: Thomas Renninger M: Shuah Khan M: Shuah Khan +M: John B. Wyatt IV +M: John B. Wyatt IV +M: John Kacur L: linux-pm@vger.kernel.org S: Maintained F: tools/power/cpupower/