From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9089742B9F; Fri, 26 May 2023 18:51:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68DEC40DDA; Fri, 26 May 2023 18:51:51 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 81C154068E for ; Fri, 26 May 2023 18:51:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685119909; x=1716655909; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=2McgZhIER+zMMY4FKjX/E7rnMy/R1AYz6U+Frl124dA=; b=NoZ8LE+bZRaLk38X+wuzDSVSbJDE4EddDkdfOHX1uPYhcHhHU9XYEnDD 8mwoq9gHhn/po38PsTqtWHeoZYzGw3A5MQ3C7S1ZeDBIxxgOmOG33aCE0 bA0pxLSTfvRJPmAoYVeCjr5BtHEitHM21qkCdgFS4YDv76nYqzfZO5fja tu7cAKWMY4kWJpiCKKWFC6qx+mthSy6eVGD2eoiZCL4xaK2UTZmME30Hy 1hqkjXnoG/zQG5iuS4rPUUlmcE//E7kIkmN9I0q60nj83vyKyWicMH0AK EWqLfxyPb5Bk7jSiRKLOMz85W9/EfWmvHYvDAAtZce+jYxkAFQ60UPWoV g==; X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="420008203" X-IronPort-AV: E=Sophos;i="6.00,194,1681196400"; d="scan'208";a="420008203" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2023 09:51:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="655698215" X-IronPort-AV: E=Sophos;i="6.00,194,1681196400"; d="scan'208";a="655698215" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 26 May 2023 09:51:27 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 26 May 2023 09:51:26 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Fri, 26 May 2023 09:51:26 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Fri, 26 May 2023 09:51:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxLVMk0iYCvw10KolEQy2zGWeg7u197othZYnWeUuyP9exn2x80xH8U74P4RiUGBlUZTmEvW6RN7oitXgLgx2BLwp8POXggbq4SUEOC/MEzOHDRW4juT2Fl0dezuhru1cA2YdFPhVJ0SkxILfZcEFGEK06ik+qOVmvvaWzaEH/DvfdQsLb2m1ZxIFItZCbJphhuYe4b/7YmloFnJlj6qM3olk+k0x7dLrOzNI4KMzPYLJ4CCbAQOWEqx/UlLGtpNJzygB4bxaFPmigubnWJGeWmXUk6I4re4SnrDDHsKrT7iMdOsvoRb6jHb0gFH7l1gCIhELl9qTFSXLhomqgeyWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9+S5FAavD6xZpXgo4Ryh+Aq0YXz/Dg5MBvByqydnV74=; b=CXZEbFAVag1Ajve8Gy7pp456iZzCjn7A+KQnbmPc3uhnVVyrkPr1VgNWwp9WUhOAnfbsSHkvQSexZd55ON8hkZUjcNUBXmkP0yUEP759NsoWRGa6uOQsGTmM9WH7YqchEngphYWksPkOc4YKnw1kCVpaXQivNb72IuhU0w/aCr3YG8drf15K4QvgIN+ohZ55cOvOmSEtBftMbHjuQR75YWDV0iJ3Z4UMQKT93YVDFuFWtfIHpmlVfB3PWfQmJpEluv2iEj5N6JALm1+BnNSuwSlZVvrfUmuHkt65fh8ddOsPtawpZp8fog4VzhhbJvHYsA4fxZyGW12oPpDYESBqyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by BL1PR11MB5304.namprd11.prod.outlook.com (2603:10b6:208:316::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.19; Fri, 26 May 2023 16:51:24 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718%5]) with mapi id 15.20.6433.017; Fri, 26 May 2023 16:51:23 +0000 Message-ID: Date: Fri, 26 May 2023 17:51:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH v1] power: support amd-pstate cpufreq driver Content-Language: en-US To: Thomas Monjalon , Sivaprasad Tummala CC: , , , "Laatz, Kevin" References: <20230412095244.967182-1-Sivaprasad.Tummala@amd.com> <3000723.687JKscXgg@thomas> From: "Burakov, Anatoly" In-Reply-To: <3000723.687JKscXgg@thomas> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0242.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::14) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|BL1PR11MB5304:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d4b192d-241c-433e-bf3c-08db5e096fd3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QUfJeCTDaFNjma1KTGHY3X73PBrfs3knizb9d/5TWcYG48Mm1IHKT3KlrFIUJxOB44vGSjkfbg+ONnZBW1EDrD1NKyr0ubXlnlEc7/dB/tvzZMd6Wy/odsnyRt2NOdYyJMW0fwHBleBbFIpKGR1H/a8TRU3ChH2FJ9DPCOHDEiw3sQNsuh2v3LcmC1LcN54LoZXqu4EZdFgZ4pKy4wIyrrWZDUkgCwFHsnwg6NCoUdtb23CcNkoQormQAq7Jl/markUmzEgIU+6Pp0I1cwtrJV+dNf4/gBFwIXcLc5UrlvdoJsD0qE5hvbMakSXPfDudHMQVMvAFtPC7oMaOoEOo/Z3/XY83opMsMBUBz3RAwkyj98fuxcJeYTj/QKKo2GxoAnA3lIFHwtKyHLHS9XCn1lx2SHCX1iEn35kxyRwFEDJgs+lP9c2tT7PvoYOstEjJUqyBxmjSd0CxC0CnTrcZ/NLcmyer/CanbPX9Z3KALWNdMi/tYvml71hbytT1hA3OFRlXjyS0HdhpyG4nLgmbaRnCFf4ca2wi4HW87mr9Xpu0G771J8SowDSySB7SpA7n0FGx2UbdlOmpxhDuy+ScIlarxMpRqD1kIa/+ANII4s7FIE43bhcylzsHMSJGl374Idkj8WliOD1r26v+YSrxrA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(396003)(346002)(376002)(366004)(136003)(451199021)(38100700002)(107886003)(8936002)(5660300002)(8676002)(478600001)(110136005)(6486002)(316002)(6666004)(41300700001)(66946007)(4326008)(66556008)(66476007)(82960400001)(36756003)(86362001)(2616005)(186003)(2906002)(31686004)(31696002)(83380400001)(6506007)(6512007)(53546011)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UXpjZnA0QTZyY1JoRDYyMVFoaStDdG8vaDc1dUJLUEtSQ3ViRzVXMWNWVUFn?= =?utf-8?B?cFZEYmJzaXFYTmErSTFjS09sMHdjcUlxeTRrdW9DQTlDWlo2WGx4YmFuaTNl?= =?utf-8?B?dWZtTllxbGhleEgwYmVIWjFPbFQ2RHZsOElZanpvT2FFeHRZczJhOHpzd3Rv?= =?utf-8?B?NmlTL0E0VXYrbWQ1RTdwR0hVZldjLysxc1F4ellvRVZPeGxEbE5ZT1dnWCtu?= =?utf-8?B?SXJ3VS9LdzlMNjNLU1Z6b2dJOUprSER6QUNpdjVsaG44WlZETjc1R1NGUHNl?= =?utf-8?B?SzhNTkVJVkJYN2RyY1I1RkwwOU1Hbm10c21JbWJYTnRvc083MjJ0UjdUSHBP?= =?utf-8?B?TVRNODFTYVJSR2NSMnRmMjZOUVN3QzhIcnZEWmNVdFNONlVXZnI1emMxZVFa?= =?utf-8?B?Vy9tNWNJVzJFaGZPYVM3OGRlZzlwNkJJRlpiUnRvVUJzdHFqRmV4U3oxYjly?= =?utf-8?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R1bE53cVMrdTB2NVpp?= =?utf-8?B?Yks5Q3dPRi9qcENxcG5keko2ejBTanU2cTU4anpLd2RZeGgybGs0TVVDNFFN?= =?utf-8?B?TlFBVXFQMUJTV3pKb1orQlZDWnJSK204a25kZHU2ZzhUaU0ydzhiSW43UTVh?= =?utf-8?B?aXp5LzN0NVJCSUdJeCs5aFRhdGYxemJRWmUxRXZ3WEIxYVpFbjlCSDFlL25Z?= =?utf-8?B?eG5NOWNhd042djBSU2NqZG5udVd4UitTZkdLbUJaUEZObjkvaVBvOUZldDRB?= =?utf-8?B?MmZ1UkVlN3ZRMG96MUY0eTFqc3h5cHFPODBKYW9vcFl4UUt6azhVTGhoZE1G?= =?utf-8?B?MXpMR2txdzVVZVowRXB2eFhkMllmUFhnRnZUSkw5aUtyaitwUjg2MUh1RVZw?= =?utf-8?B?U0RsREtCNUNCM1RjMkMraXowMktSS0RpYXlseVdYckhFZmU4eW9TVFdoSFR1?= =?utf-8?B?QXZLVEVnSklVbE1yc2dyU1U3R1hud2xHb1JTV2JxR09INWVrblNiSmVUZkN2?= =?utf-8?B?cFhLdGhJNzdKNG8yUnhNK3JpS1RicDZSVUFqbXAxWlI3VHZ4WklVbnBvR2Jx?= =?utf-8?B?d1A1MVVPbXZqL2hidGNaUUh5NjBxZlZnTksxWmE1L0puenlyQWN4V0Rza25M?= =?utf-8?B?T3hTdTExL0ZQMnNSbUdqL2ZCTVlCRjZYZTUvem0zYnl3Y1p1T0FIeWNuWVcx?= =?utf-8?B?WkhCVWxVcytzODVTTW82RUJ4M0plUHRBcjUrc3JsSDdVL05xZUF6VzkyYUYy?= =?utf-8?B?bjc2b0NWK2xYd0NiUlNIRE02VjJURFNMOXNJeHEzNE9pYlUyYVh4OThNOEJ4?= =?utf-8?B?MXc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4d4b192d-241c-433e-bf3c-08db5e096fd3 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2023 16:51:22.9465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WOb1NQeSFUIyanOrdoUYyXj4mysiwu5WvdLouYwIoWE0s7CGLlpH9hH/gjSVqmzB1avIt65BILi64zlVWm9gzxgwLe1Gy3gOMGZPytS2rEg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5304 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 5/24/2023 7:46 PM, Thomas Monjalon wrote: > 12/04/2023 11:52, Sivaprasad Tummala: >> amd-pstate introduces a new CPU frequency control mechanism for AMD >> processors using the ACPI Collaborative Performance Power Control >> feature for a finer grained frequency management. >> >> Patch to add support for amd-pstate driver. >> >> Signed-off-by: Sivaprasad Tummala >> --- >> app/test/test_power.c | 1 + >> app/test/test_power_cpufreq.c | 5 +- >> doc/guides/rel_notes/release_23_07.rst | 3 + >> examples/l3fwd-power/main.c | 1 + >> lib/power/meson.build | 1 + >> lib/power/power_amd_pstate_cpufreq.c | 698 +++++++++++++++++++++++++ >> lib/power/power_amd_pstate_cpufreq.h | 219 ++++++++ >> lib/power/rte_power.c | 26 + >> lib/power/rte_power.h | 3 +- >> lib/power/rte_power_pmd_mgmt.c | 6 +- >> 10 files changed, 958 insertions(+), 5 deletions(-) > > I'm not comfortable to merge this patch without a word from David Hunt. > Given there is 0 review, what do we do? > > >> Also, make sure to start the actual text at the margin. >> ======================================================= >> >> + * **Added amd-pstate driver support to power management library.** >> + >> + Added support for amd-pstate driver which works on AMD Zen processors. > > Looks like the indent is not correct. > >> 'power_pstate_cpufreq.c', >> + 'power_amd_pstate_cpufreq.c', > > Can you say briefly why AMD has a different pstate? > Does it mean power_pstate_cpufreq.c should be renamed > power_intel_pstate_cpufreq.c? > >> +++ b/lib/power/power_amd_pstate_cpufreq.c >> @@ -0,0 +1,698 @@ >> +/* SPDX-License-Identifier: BSD-3-Clause >> + * Copyright(c) 2010-2021 Intel Corporation >> + * Copyright(c) 2021 Arm Limited > > Why is there copyright for Intel and Arm? > Does it mean you copied some code and did not try > to keep common code in a common place? > Yes, most of it appears to be copied from Intel pstate code, so the copyright would be correct here. I don't know if we can merge these into one, to be honest - while a lot of it is shared (like, a lot), there are some subtle differences in code that might prevent us from sharing the code paths - joys of C. -- Thanks, Anatoly