From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 2167F48EC93 for ; Fri, 11 Sep 2026 15:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789141762; cv=none; b=gw0NvOGfpvV/JKFW+gfw1UOO0tzfdRwlIkEmu8MYq99jQ/L9ZR2miVUnmu5x3UhHnmFVxac8yvPS4RYm6wgIiABtnNfLPxJ36lhsh+pb7HsEGT9t/ShTYh30SdKIOViKulXZsWJ2XiOfje6zoABwDNDtsKzzWf6QvnyaxmuNTWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789141762; c=relaxed/simple; bh=h3eMWJQof+BEE9qbTJ26Dhc6XNmGS8T8rQIJpk57RgY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SlZVIQkCaEhzojFrX4xLlWe+eW5FI2LqxLVF8qukDWBY56qDDeQJJV7zRzURb9f60mfpZuVR6TturI0v3YQfNz4dGpMfdbgvBBRUNfXrMcfXvkRR4g6EWn6zdxlTSl/u8fk/iyCGiepuhg36pkfmvuJ/KyJH6uaAv2CA80tuRzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=pT8ViQ3N; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JqIDkrR3; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="pT8ViQ3N"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JqIDkrR3" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68BFfoQK921696 for ; Fri, 11 Sep 2026 15:49:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 8NDDdvoYHs190m47RDoEDy27qgENvTmnobjNZZXHynA=; b=pT8ViQ3NUpr5d/eN 3caiQXDKFST6POa1lg4w/suHXCz+ClCJ4lBOcoqqYHUHmSp1l3VKI4pT+TB4SI0v rGqXN8sVB393edka5R3gyyTgeIfh4HLIxqbaMkaffkA/4ZVyjG3/9yU29CGDoIPf +RyJS9s3P3Dp45HahKegmVAeTaGTaccOZIF8MKflDFv/YXKRwEnrzUa9Qsm7Db82 a5E+iQQFmuKBSMZA7+12IJEOjjrik2h0AMzaYh/LJTb8TR5UANedbTRbwTp2/zp+ AcngG/EVw/GbB1jbFAZHrHpQ56e5E5iyBBOppaK6zABRfRjCmNZMCc/SSOWqAjpz y3DF9Q== Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gmmgv00vf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 11 Sep 2026 15:49:19 +0000 (GMT) Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-97e9e2deaa4so930821241.1 for ; Fri, 11 Sep 2026 08:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1789141759; x=1789746559; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8NDDdvoYHs190m47RDoEDy27qgENvTmnobjNZZXHynA=; b=JqIDkrR3v6J8rsvgkHVbkYITTs2TFDvMZQ354ZAtyQ0PJ4C9lUPfY72rPe3s1Wn3D0 XBbWMxW4BLKkfdEtWvVUR7XXJIG04pWhRxlZWWRe2iaICxSBjXZIcRde24mAhcS018W7 fd6z3KLmqVrhHFN2L0SKyFs5TtcbClVcWwD8OPCofbMpzvITRh12vkqzl7X1+5IUSOD3 /031cD9CSmyQrTAr1FfNY+S2jtcUpma1i7ccA0EQFJBsP2suyfMswqoctdRGtgIxHb+q QS4a4kLSHTe+GOul/WnFNnGWYPRiscx5N0sXiz3uFxqk1RIG5ZDSXhnmY3q1fQSBKSnR g7ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789141759; x=1789746559; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8NDDdvoYHs190m47RDoEDy27qgENvTmnobjNZZXHynA=; b=AYFGTFljLaO/aY44t5Dv+9wtZV/KNrRppXEKp+mXO1OXCqTdq08rMoH+xxQQhgU9yC mikpnH73uU1xBv35XKXOkJb39bu/Ms8P0zcNEhpQPxfns5Zhban6X/NWWuEBY+LUoPJW w17/ssyRaiDZdeYncjVtWG7CcQ7hXW1u8Bd/zAeUKfT/OXVW0GWUxrIGM5Sb9Buu2PJ0 8m7HILmX33+wFI56GPze0y+iJQpHiKTvlf2AsL6jq0XgipwAXsqH6oiWSGRVBafmEb5R 0mEcU6BXV3QCVreMV5fnotRasKvu7h9G+XiultkhsQULGLWu+1/3K2FJnJixt7Ka91xF SSMA== X-Forwarded-Encrypted: i=1; AKwUvBwdnavbLz7+g9GjU5zcI86y4qHpqi5MLRvS0+PABBPz3Fe+JX1+uPA/WnmpmkIrlcq4ynLnrbo33KbbyYI=@vger.kernel.org X-Gm-Message-State: AFuF++n/FRPzjQkkE6zMmj2AcK9f3TfKCnbm4COn0/uELVhTc+DMTQUX /GZqHHqikXUOO1K+y4lHsqgzkTv5hvY69NjmaI5NnvShwO0jUs1K2HTV8AMpwe7yNMmB6MtJ5Xq XDloPDfzFf2hMm0YAsiGaU6yJyMo2WOt6pTf895/jlEJ/EfOp6+P1WM28xawl4sv/FKU= X-Gm-Gg: AYBFou0myRgzfvvxn8SB0PYH39Uf5nR3k3ULpFd0hfsgUUU660aBnkrUT8+7UHdtM1H SUDIcP28oJLRXU3QgbhTpRXmeHG5TNbrJpHOJ8qvRc0MglZ62FOxn70dxdT4+tIcbv86uVSEPto crseF3m1Vi7+TaAcnanDbyaua1P6dCFzhI+rdb83In4PzE3qlJVSd5GtjYKBYNjKuBR2OTK4U/b XrtZ014X2FOdKzwa/Epqo3gRF9F5cGPhMd2LNAo/LZIulMsdiJ+9BoI7SLeU9gPuQirNX4h5+yM Vk9THTv/8budXH0UmpLkdpJPqzncKe36guPRxUhNbNBNhDEWDvetusU06ZxoYGkXzz0lJ06xaKA daZgc+5KAMgVRMZPJioFbzwbilmx46+wiL9FSriqs6+xL08cUQhM1VHLKmEXneTToiNUG X-Received: by 2002:a05:6102:a213:10b0:778:f972:32eb with SMTP id ada2fe7eead31-792abd1e476mr3313590137.12.1789141758859; Fri, 11 Sep 2026 08:49:18 -0700 (PDT) X-Received: by 2002:a05:6102:a213:10b0:778:f972:32eb with SMTP id ada2fe7eead31-792abd1e476mr3313511137.12.1789141758404; Fri, 11 Sep 2026 08:49:18 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:8c8f:9796:a455:585e? ([2a05:6e02:1041:c10:8c8f:9796:a455:585e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e5765152asm117401745e9.11.2026.09.11.08.49.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2026 08:49:17 -0700 (PDT) Message-ID: <715f4ee6-7f08-4189-8b7f-4374eaee5602@oss.qualcomm.com> Date: Fri, 11 Sep 2026 17:48:12 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] powercap: Introduce generic hierarchy helpers and selftests To: Manaf Meethalavalappu Pallikunhi , rafael@kernel.org Cc: linux-pm@vger.kernel.org, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20260806110159.69690-1-daniel.lezcano@oss.qualcomm.com> <908bb1c3-c9b2-4275-a8f5-55b51ac84988@oss.qualcomm.com> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <908bb1c3-c9b2-4275-a8f5-55b51ac84988@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: XPuQdCOdRpC6ZeocuzOJmxm--PgFIncH X-Proofpoint-Spam-Info: AW1haW4tMjYwOTExMDIyMCBTYWx0ZWRfX/pn7yoxUBsCF REGQX7W6TZZBFaWtSqHP/w6EPVVdIKOiIgKISjm50oLHSMMI/n696SCPMInp3ufeFuj50b6pvJJ AODI3/s7vhF+JfOvb+QNJ8P45L7cQ+c= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTExMDIyMCBTYWx0ZWRfX9Lw0GBZ3zm7l I1d+KSYPKCOmuNA6dasq7hzyHvImuWJ7oS+Tx8pjvEYqB5lYyuERBMgWO7pS1TucLGfrKp6UBKs zYnnxAdYqArAjUPFEOf9lQyh9rj+65oYDNypbFVbdyUQBxBLnCx8wdsNMlnIh5GMVSvrX1kYatN Kj9ZWKFPuGmqO0a5jSD0TUVqRkFYw2Q4GBVOvCqAKt0nXw1iwO6BQCL5wjnekzErXFh0l19KPdh HC3xA0X6PQbte0edZUi5YksM5fxn0Aa1q445ELP3x1NMFS4ml6CGT4kYIjgCatq0hGSLqkWXAmV 2PMXtQNoxC7F97ya/R4i2RLQqU9u+FnndmgTDVEicajp+bGAXuKzNYGDqFUoJQ2ZC5MMdzPOBWi nT+bKIYvHQUkZZ90VWvg/dPS3uy3PVW9KIWVmuVY6dg07M3IqFDrmIUtLbARcCJ2gvTu9zLSVvZ nS5IV/dQbYfPecAPDDg== X-Proofpoint-ORIG-GUID: XPuQdCOdRpC6ZeocuzOJmxm--PgFIncH X-Authority-Analysis: v=2.4 cv=EfFd0/mC c=1 sm=1 tr=0 ts=6aa422ff cx=c_pps a=UbhLPJ621ZpgOD2l3yZY1w==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=zqZC_6FzlEIiEw2tXyAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=TOPH6uDL9cOC6tEoww4z:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-11_05,2026-09-11_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 phishscore=0 spamscore=0 clxscore=1015 impostorscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609110220 Le 11/09/2026 à 17:44, Manaf Meethalavalappu Pallikunhi a écrit : > Hi Daniel, > > On 9/7/2026 3:33 PM, Daniel Lezcano wrote: >> >> Hi Rafael, >> >> On 8/6/26 13:01, Daniel Lezcano wrote: >>> Powercap controllers frequently expose a hierarchy of power zones (for >>> example package, clusters and CPUs). Until now, each driver had to >>> implement its own hierarchy traversal, parent lookup, error handling and >>> teardown logic. >>> >>> This series introduces a generic hierarchy description and helper >>> functions allowing a controller to instantiate and destroy an entire >>> powercap hierarchy from a static description. The framework takes >>> care of >>> duplicating the hierarchy description, rebasing parent pointers, >>> creating zones in dependency order and performing the appropriate >>> rollback and cleanup on errors. >>> >>> The series also adds a kselftest exercising the new API by creating a >>> synthetic hierarchy, validating the exported sysfs hierarchy and >>> attributes, and ensuring that all resources are correctly released when >>> the hierarchy is destroyed. >>> >>> The patches are organized as follows: >>> >>> 1. powercap: Add generic zone hierarchy creation helpers >>> 2. selftests/powercap: Add powercap hierarchy creation API tests >>> >>> The API was primarily motivated by the recently posted SPEL series and >>> also provides a migration path for DTPM to use the same generic >>> infrastructure instead of maintaining its own hierarchy handling. >>> >>> Link: SPEL cover letter >> qcom_spel_driver_upstream-v3-0-434d50f0c5b0@oss.qualcomm.com/> >>> >>> Daniel Lezcano (2): >>> powercap: Add generic zone hierarchy creation helpers >>> selftests/powercap: Add powercap hierarchy creation API tests >>> >>> -- >> It was easy to migrate DTPM to this API and AFAICT Manaf was able to >> migrate also its series to this new API. > > Yes, I rebased my Qualcomm SPEL powercap driver series on top of this > patch and migrated the series without any issues. > These APIs significantly simplify the driver code for creating and > managing the powercap hierarchy. > > Tested-by: Manaf Meethalavalappu Pallikunhi > Great! Thanks Manaf