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 4764342B9F; Fri, 26 May 2023 18:54:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD79540DDA; Fri, 26 May 2023 18:54:16 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 870904068E for ; Fri, 26 May 2023 18:54:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685120055; x=1716656055; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=M/vlvYA/pQFS9oKH7wCNQU+bL4LC/zadyQNSfQ4E/sI=; b=RFS+kMXlX7i3DKI4LxbgWeyNIVAVPNYsPY5XxZxriVbDWa+Bz0Dsmv6X qgZUq69PfVq2uJL1F6BOipCm5M1oeuOpXXpHctJ4vRUP3/ZY/Tf9IUPca kTfKFezb13ghYPRHNhOKMtAhDx2A5dB6SAbT7Mbz/mPjpeWySr9SfIYW/ FVrJLYrVV6x+ZuO4f5sa05n9PwzGAJt7Ct/rrZIlpiILEfBJMJHQLqpq+ XeWgeivH5TjCTpKZzpCRd3Msd3znEVLEWJc5eJhK9w8XcZxFi0bi/12Zr Ssd3EubHRSb+a/2SXSYsNb+sqSmL4Ug9DgPXHf6y0IUZrYV/PTNy0We8u A==; X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="357499676" X-IronPort-AV: E=Sophos;i="6.00,194,1681196400"; d="scan'208";a="357499676" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2023 09:54:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="849625463" X-IronPort-AV: E=Sophos;i="6.00,194,1681196400"; d="scan'208";a="849625463" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga001.fm.intel.com with ESMTP; 26 May 2023 09:54:13 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:54:13 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Fri, 26 May 2023 09:54:12 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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:54:12 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (192.55.55.71) 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:54:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NnhnCxYC6v82CYeQyoa2a+Hi233xcQmlMdKHb4/zIFj00JjXDKHzIMohEQmovh2cenhxrMb7OmJMWM6hlqP5JLQM+QNusyW3dMTfIyOLClm9q9Af3ZqySeKq1ivWYAUOlDFhBM08EowqZbkHZgughNHfAf7X5WeTJYybBQvnIh9MRFAJ/SzdGl7Be2pu6U15ucvBQUXbpCNhETwdQwJrH6p6ObtJqvM5tbKP4gZQEU0sy+W9Cr3Jl3+8aL61rS5qhaABjvW1pFd/mBmH3Eh37NLMQMNzhbddMln7FqdWRRyKrJVBl72p0oSWkF7M4rHNGsAv6LChLvwDsBz1oFG26w== 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=6FR9eem0QvMF80erhbrIupNSk9NScnIkqYNy1tThjj8=; b=C3jSQoVjBPlGwgw/JFBFbVgVGgtzpWOUB1M5nkZpWmlAEpHRg1q6+UUtBzfNSSm/LP7lkPBHfqKdOQ7o+BsZzRQ2/hwtKC0tmnhmrSBGJeSxpuO/5LimooeofmakghhQ6FKNyI3Xpqxloy8wjLmh+oWb4hfuyu6xVAOnph3XQbTnIMrtnxyFzPXSgT44HvoP3J27yHRBFGFSI6sJxMYRDrYRFuKGE74Wz9hOHNAuKW3kl3EqlFXzNKYMmMYxGNs3oS2fSeQ7YIebOI8bLigYs4Zi869yj51tJDoNBK+E4mknyJUBDc5WIu8zEbk7bBJdESGlFzphQJJqfP79He4ddw== 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 CY8PR11MB7243.namprd11.prod.outlook.com (2603:10b6:930:96::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16; Fri, 26 May 2023 16:54:10 +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:54:10 +0000 Message-ID: <1df9c419-623b-d922-e3cc-019c8cc751ba@intel.com> Date: Fri, 26 May 2023 17:54:05 +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: Sivaprasad Tummala , CC: References: <20230412095244.967182-1-Sivaprasad.Tummala@amd.com> From: "Burakov, Anatoly" In-Reply-To: <20230412095244.967182-1-Sivaprasad.Tummala@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0261.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::33) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|CY8PR11MB7243:EE_ X-MS-Office365-Filtering-Correlation-Id: fffdb12f-2968-4358-cd6f-08db5e09d369 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bWrhnKyAQjciW+jZ8191sCJwYLknMYwCMoffM9TnhY8qKAcUTrA7/H7eFqCSQhF7yX7+5/4rkWWglcvFauK7ewoUMk+D4y+02yXX4drrGQzKhJnWihYe3nNUkV0RGpZuDgtUY5asrPC7zCYzDmEJ8GU6yMDXfjoOLLAYkmtC7NzwZuJibrR6j+1BGGDAeeR46Eg7P91XfXmznhcjWXYMdQnLqht0yZaEmSgqud8nR4wpDc1wKkS/y6xxms1VT6wMvKh4IMrdiXYQHfUY853Cawkttojv79bzjzj1Ibd6pb3hFn8sIUMQqe1HI4Uwtj+qLRb7nfXl6CR4JwhIV/H5iyvfitnXSuU5NfbStHdWrlcXZIaO421E1lQsbsKfWXu7w2nDQ9cJHhiDXSHtjnbRkU7LGlTRmZlkntriY5M3HNuDG1ankn22/itVPG4laBNZHkkmVeApvd94nV0o1TOjdr69jKbpNypV58err7KGOF0+bJhLl1VG0ibMh3t68k0zh3EuljuvkyCU74iigiX8zdaCirnjRSHTU3VOFGDS8OF7Lo7cs7Xf3i7ZOCOUGyyEAWxL9Y0R6oyjxFmxtKOigw71/sTiOnFEog/W9DBACwegGpWwLjvafAYdR8+ieaZsJ19krxft7qudE9j2gm1XFA== 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)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199021)(31686004)(6512007)(26005)(8676002)(8936002)(2616005)(186003)(86362001)(53546011)(6506007)(4326008)(41300700001)(36756003)(4744005)(2906002)(66946007)(66556008)(6636002)(66476007)(316002)(83380400001)(6486002)(31696002)(38100700002)(478600001)(5660300002)(82960400001)(6666004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cndSZXhnZ3dyTEhjUW1yUjFqKzJkWXBkaUpQenRhQWRWNm56SWRkRVo0MnFU?= =?utf-8?B?ZkhibkJkaXE4NkovbHptNlQvVHdlcXc0YVBzMjJLTy9hMk1zcE4ydE0ycW5J?= =?utf-8?B?NnU2bXdlMzNYUmUvS1EzanJ2L2pFMThud2pZWkpvbGdEcDlnVUdDcytBd2x5?= =?utf-8?B?RWJwL2txYy8zLzZ6djkrdlRqcERuWWM1U1I4ZHp6bW4vMFB0QmNmbVRGOHI4?= =?utf-8?B?Q0k4bFd4Vm9nbUhHaVVqN2VOa2VObk1sWHlQcVRKOWtuMWxHSVpOakdKMXdJ?= =?utf-8?B?R1lHb3NXMDFqWU9YMEJmYzYyRGxEdHduMHMxU2NTd2hxaWdLW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XVTdFg0d2lURE5uYkZzYWVCRUtMNmZRMWl4S2luNDJv?= =?utf-8?B?V0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: fffdb12f-2968-4358-cd6f-08db5e09d369 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:54:10.0400 (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: ClSmOAYBcNuHPfsga2lq313ONE2QkKfX4lID4Msz0QfBmqZhhBp+GyeYQXGCdtC0TxJOqGKEWvL/zRogoQCMs7QcgmBPpTefEY8jUcL0jlc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7243 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 4/12/2023 10:52 AM, Sivaprasad Tummala wrote: > 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 > --- I don't have an AMD machine handy so I can't test this, but code wise, LGTM bar one nitpick below. Acked-by: Anatoly Burakov > + } > + > + ret = read_core_sysfs_u32(f_nom, &nominal_freq); > + if (ret < 0) { > + RTE_LOG(ERR, POWER, "Failed to read %s\n", > + POWER_SYSFILE_NOMINAL_FREQ); > + goto out; > + } > + > + power_check_turbo(pi); > + > + if (scaling_max_freq < scaling_min_freq) It would be nice if this produced an error message of some kind. -- Thanks, Anatoly