Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2659998pxb; Mon, 18 Apr 2022 05:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA7J0oeRUhqNXrVHdEhWosQK8ABebjTkvVwwS9q7cLtl5t6s8GjL72ZEQbH0qIXXVC7Tls X-Received: by 2002:a17:907:6e9e:b0:6ec:db9:a10d with SMTP id sh30-20020a1709076e9e00b006ec0db9a10dmr9284549ejc.158.1650286066385; Mon, 18 Apr 2022 05:47:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650286066; cv=pass; d=google.com; s=arc-20160816; b=KeY/c3gS6izgxI7H7tykg3enPbktHahe6KwKFFn8mVhCXlpw8fD7mo8mqtSMZ9ZkYf 7bfj3tLUWqssaLo52K+ZszfQ1Umws0IQmUh8O9vnDNrH5RfrqIs1RlUaTX1WuI45AH/S Lr7RKsw6HeCcX6RQqGZhXhLMeCLowIFvrudY2H6lwAtqpd0bQb7iqtb/LQEshnxWOTLE HA//6YFe1S2E2TFEkLYbHOvcmIMFz09+rTQtUbYIoUsQo9Vq6t92PhyNE4DIuhwTxOro BNuklaz7e8qrlQV+ao1MxVDhr1cWePnbLQsbEzdom4v6jc4F+B9F9Ynwc6UU7N3L9Vm+ 01vA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GL8lTbwD6Eb7G+BAtPNEXHnYpmq4jP76qxAT2SPcZAc=; b=fi5i5jysxyGoIiWoB1GQXNAFsYurjGq+0PtRFd8ZpeixuoEJcZNXfZ4yeP5LSOYJho daH1NY11TNdy41UbYX5DbJpQgCHoL4ICcyfwUou+aUWegWNCcyYB3n0VSGFoJYuuJp8h umBf5TNX3eosJnQIwkQ2oyLGsCoE6wPAkDPkgPAwG36XQ+UUjtXHkIAoVO5HZ8Z3fCF0 gHQvHEfKMqjaAAkiZkM/y2JJ3C+aK62YiyyhqJWHhiMB9ZjIcrPm440Svm2/YX/MDMOX f6m45epa7kYNMb5Z2n8Es5wAuAsTY/aam822LgGRvH73QukMweR7FUS70IaHLynNswpq 6D0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=rLtdzCkY; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a170906434300b006ef921c9ae3si3160553ejm.310.2022.04.18.05.47.18; Mon, 18 Apr 2022 05:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=rLtdzCkY; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233269AbiDQCMx (ORCPT + 99 others); Sat, 16 Apr 2022 22:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233264AbiDQCMv (ORCPT ); Sat, 16 Apr 2022 22:12:51 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAC2C329A4; Sat, 16 Apr 2022 19:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gcq8vPvwYIlH2F4Ejun9Hk2g67P1qpjkJT2jtl4nXNMuIKavxUnVdkiKr7x7aIEioMMOIX1fo5vWCcqRnhr8C4OhGoEEL9AU6lbaUWpf/4veMbNoNrfJt3Q0LXB1N9bmGE8OWYhbRWsD5F1whPO+cVpc0LufooZ2Q5dDqew5kj+pVWmP4f+SRMeL+oO4PDq3PVG6gcv+OShrWToxd9kVTeFpDDR3VSd8w47USqAXFu7S4l8+/fSuwWnDgZfHuQN/wtr5cGYFvfi5mJEuOQJqKzehLl80mgTBrGeG0sxMb7D6hN7c4qrrj0HQf2ThOQ9OtEdbV8RCZ80mSNbno1wkqg== 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=GL8lTbwD6Eb7G+BAtPNEXHnYpmq4jP76qxAT2SPcZAc=; b=Ckvd2LTI5wjHhmfF4h9LUyu7koL1pjioaSVHVh3vwVcnz0NQVi3+5Xe/whj5rb3HyKGt9rTLXi4K0MffCPPLcnVq+owuApOYnchNsoU4UKHJTpkphf7BzrpEJx20fVodmPelto1vCdyhlH4T7kUAFOwxg0x8sn8lSHRzyywbZ1NRDc9v/j8Fw4AFfkmQtXJ2PW/VfJy/FggOv5FlEF9Nkae2oKcpueVlcdRfjKGvD1I1lmifnTWOtTUBfwWl0EIALEkjMudgWSFoRQFRMT506Tni4FA7cs9LpdZS6B+EJqF1T4ff8iH1ysWIMRBKNqdiRZZzONrKCHZU/TrAEbWNGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GL8lTbwD6Eb7G+BAtPNEXHnYpmq4jP76qxAT2SPcZAc=; b=rLtdzCkY58cZmUTE1LHgaN61RF/5W+wSHd9LcZGrLWQCgMMQCEao2a1X3ba6KQJqQW2JCx7Jmu0O03Ef2bk+XhvvmO6sDWqCrhYfKt9WAwljPTA3tvnxYwWgp0L9Pm5ymGajlXKDo4c47kElkYTGD3eDZyazFtc5WuOLSOmn3q0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) by SJ0PR12MB5453.namprd12.prod.outlook.com (2603:10b6:a03:37f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18; Sun, 17 Apr 2022 02:10:09 +0000 Received: from DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::2c60:61b2:4a7c:2d7e]) by DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::2c60:61b2:4a7c:2d7e%5]) with mapi id 15.20.5164.020; Sun, 17 Apr 2022 02:10:09 +0000 Date: Sun, 17 Apr 2022 10:09:47 +0800 From: Huang Rui To: Meng Li Cc: Shuah Khan , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Nathan Fontenot , Deepak Sharma , Alex Deucher , Mario Limonciello , Jinzhou Su , Perry Yuan , Xiaojian Du , Viresh Kumar , Borislav Petkov , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] cpufreq: amd-pstate: Expose struct amd_cpudata Message-ID: References: <20220413090510.4039589-1-li.meng@amd.com> <20220413090510.4039589-2-li.meng@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220413090510.4039589-2-li.meng@amd.com> X-ClientProxiedBy: HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) To DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54018266-a54c-4743-8143-08da201765c3 X-MS-TrafficTypeDiagnostic: SJ0PR12MB5453:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Iu1h0LBB59LeC0wlEjPVieW28Ulv2Ff/02uN4rboTBHVbiHVhyeAIcV0cui8CFqyWhmymlOJ10WDIQynVNTSwh0ksWlkfUp+u4hhM5TWWTh9/mvYsNY7g5Ab5VTYXHsf9UYmLdUm1FUs8zR178uYa8D83EobhyTZTpHd8KgpcoPor4QyehZJM0B02pcrq/Kq9NI6r6YUzrE6UkqKBavq4QkfjCZtsJ/fptsAX0LFIY1ChXDOrI3EDYwTEQkzMdaDiePmFczm5wRGZxEODCVfhjDVty3F6E15R5egV0YnyJNdgU0BCKs2ez2Gs6+w5cqvR8E+F/Ete5BIS+QYl2smPY7IHCvN8lC461fUhKKQ4vVZSxtjPD5yOTixRroR1ZaiLJoyP7CM2JQU5ffsY1LIvcpD8MLapFKmk+TsKeldKbBlig82uuNSnOZj7o6w2n30nX933GkT44wtdNx8KDGpXzHtPHezr4yuFUy9zsU1Exl7l1VHlHfCwWF4uI2agZ/CHV5xkhk+9FTgOgqkohqHPVOHtGIfQ/gztJr1JRX9V12ZIkXpU/npANTnoAzU+k2mPtqxPXjzchw6yachbKYPAVQG9xF/AFoFlN3Ml1oFTzyQkJwtslcS/Hhjo5JCkxLm+w58RXkfZ3gAJeQb3rqjzw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB2504.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(5660300002)(6666004)(38100700002)(6506007)(6636002)(6512007)(37006003)(54906003)(8936002)(4326008)(316002)(66476007)(66556008)(2906002)(83380400001)(6862004)(8676002)(86362001)(6486002)(2616005)(66946007)(508600001)(186003)(26005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?czYiT1zskVXhNXEmncG0OWBWPtDOpZOcJ0wbfgEr9BjTSEZUuCl3UHF3eXUa?= =?us-ascii?Q?y3x5PibJvX2MJSusGW68xU813Pn3w2lMCDNL8A6Pqfa9eMv0dMtf97CqdSmx?= =?us-ascii?Q?abbVwP+h01qaFih9QcFzw4u0hyCej3A6UgQB8dzvOGkKm6Dc2ZxX43mleeDR?= =?us-ascii?Q?p6mvZ7q1oF91mSCJTG3HmL8bB3fF9WHSntb6VdyKVfpFTp+mqTMx/SOeUFQe?= =?us-ascii?Q?b+WZKSdBleh1Ka+nWddYjRNT+PQG7SmhsCsjsCZVjBp3mG0QHg0Xcv7kNAMj?= =?us-ascii?Q?79Gkv2WtG5Q9FrGHoNr/O4RDDIoCOr6t7cZFO703ePDt4/SPhungtY/Nya6Y?= =?us-ascii?Q?P3qpmJMajmxiK/p5XtSyIQ8v6u0VH+zO/gmiEGQ36dysKLqlCk62r2RuKW1t?= =?us-ascii?Q?eRygsBUISQYG4pyRb1zgoHLVpdAd1kUrgA+L+BvV/m1QJOI7lRpsXYwY7mvn?= =?us-ascii?Q?7a95gL0oXrNomJpffJPpKZgZqVOlSaWp4pHNGsIjFIRhCyVuCLtnl78Z7Uox?= =?us-ascii?Q?Px+6275jOrQYOIJRPBBfxVMn7qPibHQuYMfhDvBxvFGyhC2TIgGBLObbQZWO?= =?us-ascii?Q?N9MNJs3Edlwgr+CsrK7rQrQj+yi6gWNnkAX+SfqRvTB9vXOV/WgTiRjdSOn9?= =?us-ascii?Q?0J4tm7meVnx9vH1RPvc204H5cyH4QlQJrouUkqKtXA/NzluPebz8FA1aVVXh?= =?us-ascii?Q?IH6obL4ZSNi9YVtKbduKZIskQ1fhtP275n9F1vFbc37DKF2Ih3UgVMEoED5x?= =?us-ascii?Q?N3yKb4VUBgs2rmsv//PXpS++pTWuoRfATl6ljx5Y1BopzJHkAeoRg4RvHWyC?= =?us-ascii?Q?rKhOKRFXXYyXVjYCJKLvy7RHC1+8oVxWRprGlT6IqTLYAyXmVZDjoBiysLi1?= =?us-ascii?Q?xWi1a/Hqc1wFq41qydkgpcGQ7hEmWPz4pOQA5zZVPSab+mBi8ksE/CsLN9iv?= =?us-ascii?Q?cgr3RbbiDwpRW6vkQ+/Svqg/Rgo7lVgZAzB1moWTmUq17SI+md6nd7pFkzyZ?= =?us-ascii?Q?7xY7lcM2B5O+FIhcFnr1WmQl9ctOUKjSxTHoGYnBk3dQm/TJfDJX3LLEzWN7?= =?us-ascii?Q?Vifun0Oep0S3mzkogcXac6mh0ZGSHw01yF3ATb2Z20lYGWZDikCxA2wa3/mP?= =?us-ascii?Q?g4b/2qbmwWNgvdw+pFZWUBS3HAIw14X56B37Jt9OxEJOLtd6PXmGwcQ75QIK?= =?us-ascii?Q?eZpdF9toXx18I6EzhS//JJC8l/Kz5r/1+EvTek+Ms6q7xx1g40LwX3X54yGr?= =?us-ascii?Q?/QElLQv36xsFXFJbSEml4VJNthX2eP2BUo6j3nCNy5B90I6oC24DrV579jTk?= =?us-ascii?Q?eHjky4xoxxMRvm/yYXEomDWNnBH4MijHEwcPJE9sEuSntrcC6vgQn48WraXb?= =?us-ascii?Q?oetSdG3r9z6PRK5EoiDdAGJeWECU9h/S/yS8U23RN/zalMXfPLIwqYZecBuh?= =?us-ascii?Q?StcSrMBbnhd1eHR9CX7mtPYvSzlRpmk/zMcADCrD4FUi2shTKFmlDpKuu9MD?= =?us-ascii?Q?OU+XBeH3WkKyuD9nA7Hhkg6qdAlVCMAcy8Q/l/yIOUVfR2zYvogeWG8m3T8q?= =?us-ascii?Q?ggeclKGf5JeuhRh26EMV4PRX/aRAS0VBq04TlIrpLWJKqa2P+6h7uVaYUVhm?= =?us-ascii?Q?MAAIWxaXTye2vqBwBBCkM69IhHK5/PahXQAbDImITWp2Tzv6MSp8OVA5iuHM?= =?us-ascii?Q?ddkez+rr52nCXJOXnm5mrtNyuw4W4HwlKjl/lw4k3tqwRbdvCd5G5RhNTrME?= =?us-ascii?Q?RTvH2Ch4XQ=3D=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54018266-a54c-4743-8143-08da201765c3 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2504.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2022 02:10:09.1244 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vNVZCld01tRglLVecamweiZy9KwIWaZNDiFoip6rnVVwyzMm1r8tQH0dEFxpvf4d7MRkb6DOwk5STrJs9VT3cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5453 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 05:05:08PM +0800, Meng Li wrote: > Expose struct amd_cpudata to AMD P-State unit test module. > > This data struct will be used on the following AMD P-State unit test > (amd-pstate-ut) module. The amd-pstate-ut module can get some AMD > infomations by this data struct. For example: highest perf, > nominal perf, boost supported etc. > > Signed-off-by: Meng Li Acked-by: Huang Rui > --- > MAINTAINERS | 1 + > drivers/cpufreq/amd-pstate.c | 60 +---------------------------- > include/linux/amd-pstate.h | 74 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 76 insertions(+), 59 deletions(-) > create mode 100644 include/linux/amd-pstate.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index 9832b607e2e2..f108e83ba851 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1003,6 +1003,7 @@ S: Supported > F: Documentation/admin-guide/pm/amd-pstate.rst > F: drivers/cpufreq/amd-pstate* > F: tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py > +F: include/linux/amd-pstate.h > > AMD PTDMA DRIVER > M: Sanjay R Mehta > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c > index 7be38bc6a673..5f7a00a64f76 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -65,65 +66,6 @@ MODULE_PARM_DESC(shared_mem, > > static struct cpufreq_driver amd_pstate_driver; > > -/** > - * struct amd_aperf_mperf > - * @aperf: actual performance frequency clock count > - * @mperf: maximum performance frequency clock count > - * @tsc: time stamp counter > - */ > -struct amd_aperf_mperf { > - u64 aperf; > - u64 mperf; > - u64 tsc; > -}; > - > -/** > - * struct amd_cpudata - private CPU data for AMD P-State > - * @cpu: CPU number > - * @req: constraint request to apply > - * @cppc_req_cached: cached performance request hints > - * @highest_perf: the maximum performance an individual processor may reach, > - * assuming ideal conditions > - * @nominal_perf: the maximum sustained performance level of the processor, > - * assuming ideal operating conditions > - * @lowest_nonlinear_perf: the lowest performance level at which nonlinear power > - * savings are achieved > - * @lowest_perf: the absolute lowest performance level of the processor > - * @max_freq: the frequency that mapped to highest_perf > - * @min_freq: the frequency that mapped to lowest_perf > - * @nominal_freq: the frequency that mapped to nominal_perf > - * @lowest_nonlinear_freq: the frequency that mapped to lowest_nonlinear_perf > - * @cur: Difference of Aperf/Mperf/tsc count between last and current sample > - * @prev: Last Aperf/Mperf/tsc count value read from register > - * @freq: current cpu frequency value > - * @boost_supported: check whether the Processor or SBIOS supports boost mode > - * > - * The amd_cpudata is key private data for each CPU thread in AMD P-State, and > - * represents all the attributes and goals that AMD P-State requests at runtime. > - */ > -struct amd_cpudata { > - int cpu; > - > - struct freq_qos_request req[2]; > - u64 cppc_req_cached; > - > - u32 highest_perf; > - u32 nominal_perf; > - u32 lowest_nonlinear_perf; > - u32 lowest_perf; > - > - u32 max_freq; > - u32 min_freq; > - u32 nominal_freq; > - u32 lowest_nonlinear_freq; > - > - struct amd_aperf_mperf cur; > - struct amd_aperf_mperf prev; > - > - u64 freq; > - bool boost_supported; > -}; > - > static inline int pstate_enable(bool enable) > { > return wrmsrl_safe(MSR_AMD_CPPC_ENABLE, enable); > diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h > new file mode 100644 > index 000000000000..790b04c9000b > --- /dev/null > +++ b/include/linux/amd-pstate.h > @@ -0,0 +1,74 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * linux/include/linux/amd-pstate.h > + * > + * Copyright (C) 2007-2010 Advanced Micro Devices, Inc. > + * Author: Meng Li > + */ > +#ifndef _LINUX_AMD_PSTATE_H > +#define _LINUX_AMD_PSTATE_H > + > +#include > +/********************************************************************* > + * AMD P-state INTERFACE * > + *********************************************************************/ > +/** > + * struct amd_aperf_mperf > + * @aperf: actual performance frequency clock count > + * @mperf: maximum performance frequency clock count > + * @tsc: time stamp counter > + */ > +struct amd_aperf_mperf { > + u64 aperf; > + u64 mperf; > + u64 tsc; > +}; > + > +/** > + * struct amd_cpudata - private CPU data for AMD P-State > + * @cpu: CPU number > + * @req: constraint request to apply > + * @cppc_req_cached: cached performance request hints > + * @highest_perf: the maximum performance an individual processor may reach, > + * assuming ideal conditions > + * @nominal_perf: the maximum sustained performance level of the processor, > + * assuming ideal operating conditions > + * @lowest_nonlinear_perf: the lowest performance level at which nonlinear power > + * savings are achieved > + * @lowest_perf: the absolute lowest performance level of the processor > + * @max_freq: the frequency that mapped to highest_perf > + * @min_freq: the frequency that mapped to lowest_perf > + * @nominal_freq: the frequency that mapped to nominal_perf > + * @lowest_nonlinear_freq: the frequency that mapped to lowest_nonlinear_perf > + * @cur: Difference of Aperf/Mperf/tsc count between last and current sample > + * @prev: Last Aperf/Mperf/tsc count value read from register > + * @freq: current cpu frequency value > + * @boost_supported: check whether the Processor or SBIOS supports boost mode > + * > + * The amd_cpudata is key private data for each CPU thread in AMD P-State, and > + * represents all the attributes and goals that AMD P-State requests at runtime. > + */ > +struct amd_cpudata { > + int cpu; > + > + struct freq_qos_request req[2]; > + u64 cppc_req_cached; > + > + u32 highest_perf; > + u32 nominal_perf; > + u32 lowest_nonlinear_perf; > + u32 lowest_perf; > + > + u32 max_freq; > + u32 min_freq; > + u32 nominal_freq; > + u32 lowest_nonlinear_freq; > + > + struct amd_aperf_mperf cur; > + struct amd_aperf_mperf prev; > + > + u64 freq; > + bool boost_supported; > +}; > + > +#endif /* _LINUX_AMD_PSTATE_H */ > -- > 2.25.1 >