From patchwork Thu Sep 5 02:19:08 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: 13791606 X-Patchwork-Delegate: shuah@kernel.org 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 DF91B12C81F for ; Thu, 5 Sep 2024 02:19:38 +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=1725502780; cv=none; b=A70flFrjOaNwVRDRazGBnrvzFLrtiW8c8yGQkjP7Wua/l22EAUPWuwg5DnfiDASP4ORDzjKMwAacnChBgv+S/91ATjOCcoYVPDKvGiOjsXrF/zRtHBeD0jEAGkh9CWb3MXVnF+fQDz3xZ8F92SGCrHysw/RiotWWhhoR4qJb0OQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725502780; c=relaxed/simple; bh=6rt/Ua2bCTlaRDGfKmgzk1tmRKl373FsbSHmxOuv2Mw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nZ8mOATIQ52J3wwkqrJL2/kn2TKmz8cXv1FnWCn7RL034H9Yio93Mv2xmi49L7LAN6nyA+P1lNjJ3UTEuSZi2XSh+CLJ8ARclHltxfuyrgqUs0W/lNTK1gt4DP4ySO9KOoN3ArwRJF4hNX3y4qWfRuXnvZnWzQMjWzw2QxdvA50= 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=R6n5+1rV; 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="R6n5+1rV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725502777; 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=0EKP/9IUn+VeZzi5LY6w0YXTYw3bCOdthXlaT1zlipg=; b=R6n5+1rVRB9tDsRCr+ZzYDgqpP5eARP9Y+jj3mlte9a5GT3EHftn9cGtATXnzYsfikHKmY Rxjri0vRgyKh0wgVJy9fBTh3W8BwxeM/p01FPKc42wWQFiq62bQzC8lRCl3IX15hsTDxh3 EbDJ/x7K3QgqezFr0pww1TULC8lGpM4= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-b7wOwxNJPUSqJWMkZI-quQ-1; Wed, 04 Sep 2024 22:19:36 -0400 X-MC-Unique: b7wOwxNJPUSqJWMkZI-quQ-1 Received: by mail-vk1-f197.google.com with SMTP id 71dfb90a1353d-4fcf8ce00f5so106340e0c.1 for ; Wed, 04 Sep 2024 19:19:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725502776; x=1726107576; 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=0EKP/9IUn+VeZzi5LY6w0YXTYw3bCOdthXlaT1zlipg=; b=WDYGAwMsIQ8FA19oNxW4zVTqbfnQiK6Wx1IS7yVlJtADrGH93bcwD2vgu+Xmg9yJ/7 /ZjCFMypweU9yabEqEwk12Z8fv9coQo8gedsCo9SgZMutSbXYvLPl8uSlGEK19S66O1i RE1rIKehDd8ffxbuZgpNkBWLJnm7cF/Wo/UnOT1p8vzvgf8odjS7BCBTPlI+c0Rb18tH 1SsryJSe6/jAfjLol+ew/IBXPybe8wvfXzjsAF5L4Go5XFwJ4jlu4oJMJH5Hk1tSsZFS XMz3w2aXD1dyjQhznSe4nmOW7bw+OsjJ/J26nSg5u/zEoQrPHZG1MWtzYBrZsHuSP32X RE5g== X-Forwarded-Encrypted: i=1; AJvYcCV1Z615hhr1mSjR04Bp4l0Dnlpakz9dhF5KyrtJoUVE7cDoQoz97LkbRz/WpPXYdSi8WsQnUmRYJA==@vger.kernel.org X-Gm-Message-State: AOJu0Yz7EwBFy245+2P2x1XZcqiqQY0qUR7fSlLctPjwoNAaoiAhmj5J 1FnKFwP9gqGYXRWB8jOORrtKFkBZwZeK/0kWvse/g/G7MInHinBEhueXekb+J6POvN0uuDdw80P S++DrDdxmdWTIB14tE94/d+YSQ75iwXo+lCJ6Bir27B+D/JVNWhUE3loZ X-Received: by 2002:a05:6122:7c9:b0:4f2:f1f1:a9f2 with SMTP id 71dfb90a1353d-4ffe4a7d39dmr25535596e0c.4.1725502776285; Wed, 04 Sep 2024 19:19:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZbGFUJCYKiucGl1DslAq9mOBBURUKRyE/cFlJqj1Sd8Nknw5XQxplsW9m1H5Rk+rJ0f31hw== X-Received: by 2002:a05:6122:7c9:b0:4f2:f1f1:a9f2 with SMTP id 71dfb90a1353d-4ffe4a7d39dmr25535578e0c.4.1725502775894; Wed, 04 Sep 2024 19:19:35 -0700 (PDT) Received: from rhfedora.redhat.com ([71.217.47.229]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45801db22b5sm3531181cf.72.2024.09.04.19.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 19:19:35 -0700 (PDT) From: "John B. Wyatt IV" To: Shuah Khan Cc: "John B. Wyatt IV" , linux-pm@vger.kernel.org, Thomas Renninger , Shuah Khan , "Rafael J. Wysocki" , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v3 1/4] pm:cpupower: Add missing powercap_set_enabled() stub function Date: Wed, 4 Sep 2024 22:19:08 -0400 Message-ID: <20240905021916.15938-2-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905021916.15938-1-jwyatt@redhat.com> References: <20240905021916.15938-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. Implement it with a stub return of 0. Programs like SWIG require that functions that are defined in the headers be implemented. Suggested-by: Shuah Khan Signed-off-by: John B. Wyatt IV Signed-off-by: John B. Wyatt IV --- Changes in v3: - Renamed commit header, moved commit to be the first in the patchset as requested by Shuah Khan. Adjusted commit message body to match. - Added pm:cpupower prefix to header and Rafael to Cc 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 dummy 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 Thu Sep 5 02:19:09 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: 13791607 X-Patchwork-Delegate: shuah@kernel.org 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 08DAF12E1C2 for ; Thu, 5 Sep 2024 02:19:39 +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=1725502782; cv=none; b=avU9QGPqGXxIG5UziPzkG1JjreXSMrYIvMu7THvDjaswt4ZmgsdWtIkazXDh+T0Hv+ZLbRmOPVHyDgq1x2lDPk0MgcDtMnhcpeBJ5Iv3INP6tWKcGTtCUDE5OVaqQGRWAZa24UHWyQ2ij3bTw7WFs9kBs+GgeFrx/13pbnmKhIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725502782; c=relaxed/simple; bh=avXZqBGyl0PBfWGutpoedY96JbpOoQ4Nv23V120eKtg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=krsEoVittkkQ8QxWvFmRm0favKZgpfVex4ZDVt7hHcIdmAlgNeD2OjSqzl4UHcEm9dTVey9Mc5B7HPTTIUWQVWctkK84vjA5Evv7wvKlZScqxP8FGfF9iq/kLbL6awA0wSXkkNH5uDE1z1uzZ7N3bwX25m3wJS/dL2qEyvEUMGE= 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=Q5TSXbqB; 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="Q5TSXbqB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725502779; 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=SI2r+N1hUOAE/HA0o+vLkapp6H/3ME0ZRjnOEiTRE+E=; b=Q5TSXbqBBUkkQWC+DApIpXRgo+qBQTxzkOEu+DQ4m5a8eU/V4tVjKqxktNwh4da+p+jlAI m0JgsATaa2yDz/OFLie558IupcwcHJHGN9cgnPTqt0nCBp+sPfRZQnpup3/0m5axYPMzlb TSYJ/EbMGzb319prL3iV6FjQjP7MWvk= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-ZILnwRFeNZqHV017zdjD3A-1; Wed, 04 Sep 2024 22:19:37 -0400 X-MC-Unique: ZILnwRFeNZqHV017zdjD3A-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4567ede92efso3884591cf.1 for ; Wed, 04 Sep 2024 19:19:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725502777; x=1726107577; 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=SI2r+N1hUOAE/HA0o+vLkapp6H/3ME0ZRjnOEiTRE+E=; b=u0JFZhjz5vHE2EklcGA4rThID2By/Fl1IMNtFQa8i4wakJmADuGp1/0RY6vymvZlNY yOaY4UJJtd86+Iffiejri8mGfJRV3w8v1OjDGoJdcoxoD6K19pkO+7iQAOkjk0w+OhdY SmQmandYUz4ySumd9a96l87hvkLpa2TFpKSn2Tvdz4Nx04auVmz1BYudIQuO5wJZQ2mA umsbokkW1lBzP/dsAPUFnqqkuSLDGnUoBO5/hIphP8+u4BJTOZdpUyJ4g8uE652jkau+ mMxtBRDS1No38oVdzW+HVNZjPLda3qr1KojAWJwwUNvMQFXKL5r70zMKnGWv4DSjHrd2 jYPA== X-Forwarded-Encrypted: i=1; AJvYcCVrDmQy/o4qYkLsJetUztjso6FLK16ZVu9Ky5B7utFkifAYg+zz1vaTkpuTgwot3wyffgb0ZWL9TA==@vger.kernel.org X-Gm-Message-State: AOJu0Ywi3k1bGC+yWzargyRlZVjXLEJy8GrSl3K42mqP13CFdlbmmOEZ uEPyKVZftoZTMMzWhlEnKR1aIMwtGPSVMm42Xa1qMNVY8ILKh/I6BurxwPhnVH9EZfHucoQlX6P S8foUw7DYVpY7iGMjZahEAmpDtuMjVscClN2fUTEmYcpdrVQ++qPuPhGI X-Received: by 2002:a05:622a:4108:b0:454:f62b:837b with SMTP id d75a77b69052e-456f1699f05mr143814411cf.13.1725502777212; Wed, 04 Sep 2024 19:19:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZ6lAV1LrCns7mFWbxTbd0zdU4WtLzAxHlEgyJSuS4YrbWAi9sHPaZ+muXWrLAZrzs88TWTg== X-Received: by 2002:a05:622a:4108:b0:454:f62b:837b with SMTP id d75a77b69052e-456f1699f05mr143814241cf.13.1725502776780; Wed, 04 Sep 2024 19:19:36 -0700 (PDT) Received: from rhfedora.redhat.com ([71.217.47.229]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45801db22b5sm3531181cf.72.2024.09.04.19.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 19:19: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 , "Rafael J. Wysocki" , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v3 2/4] pm:cpupower: Add SWIG bindings files for libcpupower Date: Wed, 4 Sep 2024 22:19:09 -0400 Message-ID: <20240905021916.15938-3-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905021916.15938-1-jwyatt@redhat.com> References: <20240905021916.15938-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 v3: - Reordered patch series for cpupower stub implementation to be first. - Added pm:cpupower prefix to header and Rafael to Cc. Changes in v2: - Implemented the function so SWIG will accept the header definition --- .../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 Thu Sep 5 02:19:10 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: 13791608 X-Patchwork-Delegate: shuah@kernel.org 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 4788313B2A2 for ; Thu, 5 Sep 2024 02:19:41 +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=1725502782; cv=none; b=WM53BE/XWzCPYuKqd5Iy3X2smYTNQxkPeCs2sByYJ9lDXoFGg/XRxHNRyLC58nXPkpHIJVAvEzGHjl03fz5etZJJqwFTePp9QMM6UGX6ZLl5HxvNk1wPLiT2cs+R3QX1CcD3O7hML3mOtCHAhOF1qZquATOwhxg1qq17LUPdDbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725502782; c=relaxed/simple; bh=58AAUu3zLBYneqXHjleXP+5dU4Eip6Z0sKnVnDK/33E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oblP+VKHpJeINdF7a4WMaJbPz4d5VcDs7fbwz6szKfSDtd34Zw3pJ1PhtNVcnaHlcMk3SUTl4l+4gn9tR4osEKGagm476oCVxKJio+AC2pCXHt9RI2hIa3yAAu4LRuwj8qx3+1S5vI0z/ZGz7sp0wH/l+LRaROSt9OAODIZyrMw= 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=XsYwnRSj; 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="XsYwnRSj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725502780; 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=2MFBqQdy5a6XuM/Adgjobnf2AgZQzbSd8x2uLCg7mMw=; b=XsYwnRSj/ySb7HLeowduorrDKTeXQ9HMn3I7H9LvdXJNN8qGauvPGAXoB2uJcCakyRhYf0 u3xY8sBD2YBcpyd0Rp5kP1Q6/nPCRZE18r008Kao0VujGaLZX5MKvRlewNNcl9mPW7iPDW v+rwTtk6FW0EJdp3ttfk+jcK1xnuuAs= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-k4598A0VP2q1g5gnbWOzhg-1; Wed, 04 Sep 2024 22:19:39 -0400 X-MC-Unique: k4598A0VP2q1g5gnbWOzhg-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-45683a483e1so3030401cf.3 for ; Wed, 04 Sep 2024 19:19:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725502778; x=1726107578; 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=2MFBqQdy5a6XuM/Adgjobnf2AgZQzbSd8x2uLCg7mMw=; b=awfIj4Vm/69Vj7J8swkV6dTW6d0LUF87dOErXbYJncgGqdNcJkoZK8C/DbbNXu6qCf IdMmYt5pbLSwUzF3cUtEz0HBno1SS+GKbjw/IGLzPXMsHSriegZJHlqonCL1LiI4bLjK fHxAAxHxeEbBJVoB1d3/JNUhkFvmxIeK7edJNbOnON/YX4/b3OsPdcaysCDx3GLk5HKl 5Di7rENRbY8KaUM4avJixJSg+bvQmlwJRAENgTRLUOMRoH3n8KqtE60Wxy2w64bJ4NQ3 QFsucE4XiyFjdHlO35N1+3ybEhc8M0hiNlxedtKlkqe1J3RdOyIj0sjTzOdFua/qkBl9 UAqQ== X-Forwarded-Encrypted: i=1; AJvYcCWUXbcYBdrebNUGL1qfI8h3Z01AtjHVaYJ3UzsXntXE+n/02iZspte7+Q8BvhazZzceeMWy+LR8Sw==@vger.kernel.org X-Gm-Message-State: AOJu0YwS7b/lz9fV5w9vlwisZUpaiFc7LlW2am6ELTteyYCXzyEiuJXo NCZABnpXHIo9GtGCDUueMjrHOD+S7PYLYpJvk9wuo/ZPN5bwsGU39gqDOwVL9/wsEke28KZLJIv RyZD+6URHCFdLK/tccHBL2Fs15QDEOImmKFeYAi0+O5Eymt0bJG/TjipM X-Received: by 2002:a05:622a:5588:b0:456:7cc9:af0e with SMTP id d75a77b69052e-456966802b5mr249894101cf.50.1725502778609; Wed, 04 Sep 2024 19:19:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHn9YkJ4WCWDspPOUrJpuM6yCNEI2Xex29jY5uZPJ90kTU/Agzmk8L3e6RGqn2gru1XRZ1aLQ== X-Received: by 2002:a05:622a:5588:b0:456:7cc9:af0e with SMTP id d75a77b69052e-456966802b5mr249893701cf.50.1725502778122; Wed, 04 Sep 2024 19:19:38 -0700 (PDT) Received: from rhfedora.redhat.com ([71.217.47.229]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45801db22b5sm3531181cf.72.2024.09.04.19.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 19:19: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 , "Rafael J. Wysocki" , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v3 3/4] pm:cpupower: Include test_raw_pylibcpupower.py Date: Wed, 4 Sep 2024 22:19:10 -0400 Message-ID: <20240905021916.15938-4-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905021916.15938-1-jwyatt@redhat.com> References: <20240905021916.15938-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 v3: - Small puncations below fixed. - Reordered patch series for cpupower stub implementation to be first. - Added pm:cpupower prefix to header and Rafael to Cc. 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 Thu Sep 5 02:19:11 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: 13791610 X-Patchwork-Delegate: shuah@kernel.org 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 48F3613D638 for ; Thu, 5 Sep 2024 02:19:41 +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=1725502783; cv=none; b=bQPvAvljFbkCu0tuUDVr+socUXfMSMi9QTsZ8ePHGUE/k4wW3fY2tVl3zDtMFWm7IyM5g//85K/9JoxIuYvFXxi6Mue2RTPMhqkFBaXRp6P1Ps2+gqj5UMe8j9C6TBcO24fE86SVJ66+BcdfWNDgl91Ie/ZvchX0JOodCZYEVoA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725502783; c=relaxed/simple; bh=0JZp6F7jXSJoimpiUanwdTLHTrfCIMCDBYBHZ2Za8jo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OyaOpOdl0WC5nidtF/K0xpuksglQ3JAjoPJU92n3W3mtb2NIW0/P0IMAZzqV4FC9JQJPHi7bITCcX7DhVelXZGAW4sxztRoaexFOp/Uef6b7SgKneEPGwtig2AnmCh7ruG5vKlDrlfkFANO38IaJTNX+vDBedcWf9pHIQSuHv24= 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=E4l1Qs1H; 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="E4l1Qs1H" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725502781; 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=beVLnoDxWzvoQew2okb3by/wDJsJF7xaNIcc2Q2qxxw=; b=E4l1Qs1Hfo0il8qYsJYXpPcxW4GO8HQV+jrKxReVc5FTV75s95tocJa9bk0R43f0ugValV 8v2I/XbNCfm528twLSg3lXQK9vcDBhQKXUQ1GXxMMeJfP0vTouigOXvzIkQl+6O73QKvZG KEPdJea83KpoHRjYuuzWlwu/T5ZpX5U= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-381-ktHezcpDPZyn217XQNqsuQ-1; Wed, 04 Sep 2024 22:19:40 -0400 X-MC-Unique: ktHezcpDPZyn217XQNqsuQ-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-454e94467ceso3900671cf.1 for ; Wed, 04 Sep 2024 19:19:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725502779; x=1726107579; 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=beVLnoDxWzvoQew2okb3by/wDJsJF7xaNIcc2Q2qxxw=; b=gB1KHQJPKIRAf0KIRRDfFhaTZXnw1OXBShY7E7E1msC2ZKeawwfwRp4AVj0vEh10V6 CY0kei7owcjVTCQkIgmImcFpIJErKS/20Pv2+xQKHUjNhRt5SsZIgd+6It1Dn7zzwZgP dadYms2IECeNPg0nUMu3N8s0ok4YuGVe4pXSJmNfwsySHAhIVT7MvHhTFIYi+vZpcLdA 3MCvEDJ62eN/XdpZOCogNWQAdEA+rJFEhkqTh8B6PQwYHMEstpL/NUPIec2W+aKNFwv5 dKh2ifYmX0s94LHo7LUTwd6kXMTapp2657TsTSlQIKUML9XRDW6xeCSLfloAIcPbPz54 glJA== X-Forwarded-Encrypted: i=1; AJvYcCUp+6RjP6OLijL97N0hHHIFrkysRgYDVxwzdx7mmXW8BDb/KMSQf0rwlzNu/zfn0M474XVlv+7CnA==@vger.kernel.org X-Gm-Message-State: AOJu0YwUb4Mvu5GoHKB/i7+5FP6qN6aXRrcYBYufsTL9qjXZLraUS+kG 5DP5GYbHPbSo9RO9Qd4OBx0fu9DCEhpraFUehI/7+lz3qH5pE01RhrMbnJ8H0AyJItN0LGcIUzc l1KpArZxOTWrx2UID1+14LGf5Fj6CViXXVsbBGVzUEQxVr1V7QPYXZkfb X-Received: by 2002:ac8:73c9:0:b0:456:8080:df14 with SMTP id d75a77b69052e-4568080f696mr201923231cf.5.1725502779443; Wed, 04 Sep 2024 19:19:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnVAKYcljkHf9Pw9I0bXS8vwDTxO2Rebu6KULzSRIp3ra+aRj2o1z/JmNgPBf8gKe1PnRaCQ== X-Received: by 2002:ac8:73c9:0:b0:456:8080:df14 with SMTP id d75a77b69052e-4568080f696mr201923001cf.5.1725502779095; Wed, 04 Sep 2024 19:19:39 -0700 (PDT) Received: from rhfedora.redhat.com ([71.217.47.229]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45801db22b5sm3531181cf.72.2024.09.04.19.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 19:19: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 , "Rafael J. Wysocki" , Linus Torvalds , linux-kernel@vger.kernel.org, John Kacur , Tomas Glozar , Arnaldo Melo , Greg Kroah-Hartman , "John B. Wyatt IV" Subject: [PATCH v3 4/4] MAINTAINERS: Add Maintainers for SWIG Python bindings Date: Wed, 4 Sep 2024 22:19:11 -0400 Message-ID: <20240905021916.15938-5-jwyatt@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905021916.15938-1-jwyatt@redhat.com> References: <20240905021916.15938-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 v3: - Added Rafael to Cc. Changes in v2: - Added as requested. --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 62a00f9471c1..1b2bbc8c5adb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5821,6 +5821,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/