Message ID | 166990900117.17806.4506067708943298894.stgit@bmoger-ubuntu |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp338555wrr; Thu, 1 Dec 2022 07:58:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf6YF9OEd2zvZnBR8rZNSZnYZBiSsolh/i3xWbMyfTA1TN4HT8gOmgFuPs/0Tb54iJW5NdgQ X-Received: by 2002:a63:f00e:0:b0:477:5e25:6d4c with SMTP id k14-20020a63f00e000000b004775e256d4cmr42896879pgh.159.1669910293837; Thu, 01 Dec 2022 07:58:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669910293; cv=pass; d=google.com; s=arc-20160816; b=ZTBqpxh8nh+2zQS2kwXwC2W7hVsEYSjj++HDgiJibPSRFofsxCESMCBrjzNBgzDiza Wn0Moq0kmwVYRmv1MQPcqWrVAD0lAge/qiTwd3q3PeNmDQc+f30hs2wOWl+ahJnGBbvR +ZRdbkG4vS3dHeh82puo5Uw8pLF3prgAcpvxr2PtWkeRNODMtw81CBLsaBh7Mprzd4Hz ipAu9cBoxsf+oqKUV8R+DsP16aATvYYE057BmDIjF9ugPSOzR+R9OeQ50IZCYXPQFhGi 3cklho7xMsznJf/OH8eLIYXg2wh9HL/RTkonq38Q5jq52KT6gLNu0WTDIAyLR+FGkE+G hT1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=YhymE8J2J2VKrJKj+eoQdxHpbz1Uz67GFmgMCMjBxeQ=; b=HSIeRrD6tX7CoxdzHHDe8NrO0l3MaY7qdXD6vt+A+uIzk4buDRj7GD8iHF7Yw6+PsL yVjpdGxJfbBKgF8X8VVcYjR9BhhmhtHVdzAk6dBqluogR/CJchvEjJeo4gao4ds6gPHb WhQJBse1BBHqHn/X+7opeOg7j6xf9EmNcZ/xGB5BycjrSgBxD+VgryBcMgBFDZ+/98dX RqHUDPtHAmkqlwT4+/gkuO0YyOSkzUdkiQLu3IzkNRTOTQWbLJINjEwTUgjVanSDhy2U yrlCKPrSSapnH5/vv9PTxRj1w8UHkU5VswFa6gBr5UfOROGqdjJDUjI000Q7tmSJ/BX3 LL7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Kihilvyb; arc=pass (i=1 spf=pass spfdomain=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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm9-20020a17090b3ec900b002190ba4112dsi5204353pjb.94.2022.12.01.07.57.56; Thu, 01 Dec 2022 07:58:13 -0800 (PST) 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=Kihilvyb; arc=pass (i=1 spf=pass spfdomain=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 S232085AbiLAPix (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Thu, 1 Dec 2022 10:38:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231998AbiLAPgs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Dec 2022 10:36:48 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430688D649; Thu, 1 Dec 2022 07:36:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WtX/1umaSO58/yBN/I//OsPMQt4OQQ05FutZl1k3wZahCmbst2PE+/JckY8Hyg3pSXxn5qRqxwGjC1XvCflT8yVyjhxFVvk43wYXaNiE69a276AYHxr7KQTFiW91C94ygwTnnb9C8XmPUQLon8yIrvyYBKfY1cPV9KHSgt8HXfhBuGE7s9/NmRVQHyiU+O62UD9Dn1x7yNFXCltLurIjXVEuo1C4GQGdkGL9C/iVoaAlbPVVUOZLKz4F9egHfkZE4q02Xi2dI1dvLZFskm/ihsr3lckeLBjtdkqWvFMEDG41bOAoABMBrd6HvXp51CgI8pcK1NARCO/17rfmBAOuvA== 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=YhymE8J2J2VKrJKj+eoQdxHpbz1Uz67GFmgMCMjBxeQ=; b=g17tJ3POxoOdL4cOseOzhGsRCyjElo14uvuF5vlW2EmYlaSqqWRqM3nq0cadMvg7D7gY2de4nrx1DdJDXfK3/Ntec0mKeOnwhiCFeEvluk/OsX0ifWbq1NVG1/iSKiSVVYL31VqRpFX9fQhAHgysJ3E9jByDKvtGGrnQTmfPL43F7Fq4OQTn7OCo3vYh8PKl07dt8KMUFarg/FhEXC6A9874JcgaW0M5Dq3HMRYV8jm8iBpZvIbw7tL49fN6QraxjqWIelFvzDVW86Yb8iW3ztNJW5nQKj4v1IJ87I3/qTvxiPnuMrb4ulofHOVOpZWQlJI81+X+yucq9Gk5szYa9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linutronix.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=YhymE8J2J2VKrJKj+eoQdxHpbz1Uz67GFmgMCMjBxeQ=; b=KihilvybwvmCs2l9PpV7NN6dCYfq3HE4UNhRBUnGihOx264nbtjeuL3z5ncLMWoeCP+LdzwbQ2IAgcx8BCpcOoAKwd5bgIFESf7vhJ4fl/tldlgBNiX0rpRmxhpiSeEAFBLx7Vg+ww9crLPOJNS47PuIB2JnVTSrAsHG9UXfwVw= Received: from MW3PR05CA0022.namprd05.prod.outlook.com (2603:10b6:303:2b::27) by PH8PR12MB6865.namprd12.prod.outlook.com (2603:10b6:510:1c8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 15:36:44 +0000 Received: from CO1NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::8a) by MW3PR05CA0022.outlook.office365.com (2603:10b6:303:2b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 15:36:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT011.mail.protection.outlook.com (10.13.175.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5880.8 via Frontend Transport; Thu, 1 Dec 2022 15:36:44 +0000 Received: from [127.0.1.1] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 1 Dec 2022 09:36:41 -0600 Subject: [PATCH v9 06/13] x86/resctrl: Add __init attribute to rdt_get_mon_l3_config() From: Babu Moger <babu.moger@amd.com> To: <corbet@lwn.net>, <reinette.chatre@intel.com>, <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de> CC: <fenghua.yu@intel.com>, <dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>, <paulmck@kernel.org>, <akpm@linux-foundation.org>, <quic_neeraju@quicinc.com>, <rdunlap@infradead.org>, <damien.lemoal@opensource.wdc.com>, <songmuchun@bytedance.com>, <peterz@infradead.org>, <jpoimboe@kernel.org>, <pbonzini@redhat.com>, <babu.moger@amd.com>, <chang.seok.bae@intel.com>, <pawan.kumar.gupta@linux.intel.com>, <jmattson@google.com>, <daniel.sneddon@linux.intel.com>, <sandipan.das@amd.com>, <tony.luck@intel.com>, <james.morse@arm.com>, <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <bagasdotme@gmail.com>, <eranian@google.com>, <christophe.leroy@csgroup.eu>, <pawan.kumar.gupta@linux.intel.com>, <jarkko@kernel.org>, <adrian.hunter@intel.com>, <quic_jiles@quicinc.com>, <peternewman@google.com> Date: Thu, 1 Dec 2022 09:36:41 -0600 Message-ID: <166990900117.17806.4506067708943298894.stgit@bmoger-ubuntu> In-Reply-To: <166990882621.17806.16780480657453071426.stgit@bmoger-ubuntu> References: <166990882621.17806.16780480657453071426.stgit@bmoger-ubuntu> User-Agent: StGit/1.1.dev103+g5369f4c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT011:EE_|PH8PR12MB6865:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e0b8140-a62f-425e-2186-08dad3b1d9e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vJFR55M4jFpguM2lXfcE33iVFauBpUa6+SyasIkQ9Il1hGeaRoJ4WnGg73j7Yeukgg39TN+mfn+W8QMYo6CEJWcEyaaOqFbB9Ve4WWLi7Swb+ztjf5UQkupYeHtju8sfgUARJewFG81zLZBKXwEc4bC39ozyhFLD7eXZKDKi0unbA54BHTgX4t/gNyUdT+T/L1RgeSC7iMbq3wv+8nGgFLhn3mcwQdPuNcTv3BRCRre9S7FaBGVT4h9vZBXfXNZvgS+W+yavlxQZQGNEo1IEu4Kip/GPU07RXA87cvyY2df/uHxFT3XvnmcwVhdptp73CdKmo/8F0yVsJxMqyRm5hvdWK6Yk7hKRkStstAN+JXwA+/23hkigOmiqogmlKMCroNPUDK7oL994B61YHPl0LvjBs0s0BSUG7umkpVHMw0OTRf1FVOp1tb2utZq1niPs4SW3Tg06tEnw2JZijBkzRxDE321QT14PR9vbTtkyRp41H+cpiMZ1WCW+zRCJDMbq1A7xINBKq69GQW7qHd4nv7pv0U3qoY6C6zGe/+hnAhWspNN1MY25NzoaOq6gThzt3AzF3s3l48hlX2q6uiQP/Xv8gkW6iumEeE3XxIVud9sJHUNQV3qisMvUwvAR6THNqu5WKjRdIflafU2oCXuw35+SpR8TkQgmIKrbGFgAPxkXDWfQS/NyjHEdQaasnLXHVjXKcu341JkoW0In6ifaBrddRoDIBSXmfkp0cowxA+B5Z2rUT0biBMuwsxOGP2V02YzD4RHDc7HM4jB57AmfSQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(7916004)(4636009)(136003)(346002)(39860400002)(376002)(396003)(451199015)(40470700004)(36840700001)(46966006)(83380400001)(36860700001)(2906002)(186003)(70586007)(70206006)(16526019)(336012)(40460700003)(41300700001)(7406005)(86362001)(40480700001)(82740400003)(26005)(110136005)(54906003)(81166007)(103116003)(82310400005)(5660300002)(8676002)(7416002)(47076005)(426003)(16576012)(356005)(4326008)(33716001)(44832011)(478600001)(9686003)(316002)(8936002)(71626007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 15:36:44.2997 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e0b8140-a62f-425e-2186-08dad3b1d9e3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6865 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_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751027856341634527?= X-GMAIL-MSGID: =?utf-8?q?1751027856341634527?= |
Series |
Support for AMD QoS new features
|
|
Commit Message
Moger, Babu
Dec. 1, 2022, 3:36 p.m. UTC
The function rdt_get_mon_l3_config() needs to call rdt_cpu_has() to
query the monitor related features. It cannot be called right now
because rdt_cpu_has() has the __init attribute but rdt_get_mon_l3_config()
doesn't. So, add the __init attribute to rdt_get_mon_l3_config() to
resolve it.
Also, make the function rdt_cpu_has() available outside core.c file.
Signed-off-by: Babu Moger <babu.moger@amd.com>
---
arch/x86/kernel/cpu/resctrl/core.c | 2 +-
arch/x86/kernel/cpu/resctrl/internal.h | 1 +
arch/x86/kernel/cpu/resctrl/monitor.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
Comments
Hi Babu, On 12/1/2022 7:36 AM, Babu Moger wrote: > The function rdt_get_mon_l3_config() needs to call rdt_cpu_has() to No need to say "The function" ... by using () after a name it is clear that it is a function. To support this change it could perhaps be: "In an upcoming change rdt_get_mon_l3_config() needs to call rdt_cpu_has() to ..." > query the monitor related features. It cannot be called right now > because rdt_cpu_has() has the __init attribute but rdt_get_mon_l3_config() > doesn't. So, add the __init attribute to rdt_get_mon_l3_config() to > resolve it. Please place the solution description in a new paragraph and drop the "So,". The description could also be expanded to support this change. For example: "Add the __init attribute to rdt_get_mon_l3_config() that is only called by get_rdt_mon_resources() that already has the __init attribute. Also make rdt_cpu_has() available to by rdt_get_mon_l3_config() via the internal header file." > > Also, make the function rdt_cpu_has() available outside core.c file. > > Signed-off-by: Babu Moger <babu.moger@amd.com> > --- > arch/x86/kernel/cpu/resctrl/core.c | 2 +- > arch/x86/kernel/cpu/resctrl/internal.h | 1 + > arch/x86/kernel/cpu/resctrl/monitor.c | 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > index b4fc851f6489..030d3b409768 100644 > --- a/arch/x86/kernel/cpu/resctrl/core.c > +++ b/arch/x86/kernel/cpu/resctrl/core.c > @@ -728,7 +728,7 @@ static int __init set_rdt_options(char *str) > } > __setup("rdt", set_rdt_options); > > -static bool __init rdt_cpu_has(int flag) > +bool __init rdt_cpu_has(int flag) > { > bool ret = boot_cpu_has(flag); > struct rdt_options *o; > diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h > index fdbbf66312ec..7bbfc10094b6 100644 > --- a/arch/x86/kernel/cpu/resctrl/internal.h > +++ b/arch/x86/kernel/cpu/resctrl/internal.h > @@ -512,6 +512,7 @@ void closid_free(int closid); > int alloc_rmid(void); > void free_rmid(u32 rmid); > int rdt_get_mon_l3_config(struct rdt_resource *r); > +bool rdt_cpu_has(int flag); Please also add __init attribute here by using the same style as the other functions in this file that need __init. > void mon_event_count(void *info); > int rdtgroup_mondata_show(struct seq_file *m, void *arg); > void mon_event_read(struct rmid_read *rr, struct rdt_resource *r, > diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c > index efe0c30d3a12..e33e8d8bd796 100644 > --- a/arch/x86/kernel/cpu/resctrl/monitor.c > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c > @@ -746,7 +746,7 @@ static void l3_mon_evt_init(struct rdt_resource *r) > list_add_tail(&mbm_local_event.list, &r->evt_list); > } > > -int rdt_get_mon_l3_config(struct rdt_resource *r) > +int __init rdt_get_mon_l3_config(struct rdt_resource *r) > { > unsigned int mbm_offset = boot_cpu_data.x86_cache_mbm_width_offset; > struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r); > > Thank you Reinette
[AMD Official Use Only - General] Hi Reinette, > -----Original Message----- > From: Reinette Chatre <reinette.chatre@intel.com> > Sent: Thursday, December 15, 2022 11:17 AM > To: Moger, Babu <Babu.Moger@amd.com>; corbet@lwn.net; > tglx@linutronix.de; mingo@redhat.com; bp@alien8.de > Cc: fenghua.yu@intel.com; dave.hansen@linux.intel.com; x86@kernel.org; > hpa@zytor.com; paulmck@kernel.org; akpm@linux-foundation.org; > quic_neeraju@quicinc.com; rdunlap@infradead.org; > damien.lemoal@opensource.wdc.com; songmuchun@bytedance.com; > peterz@infradead.org; jpoimboe@kernel.org; pbonzini@redhat.com; > chang.seok.bae@intel.com; pawan.kumar.gupta@linux.intel.com; > jmattson@google.com; daniel.sneddon@linux.intel.com; Das1, Sandipan > <Sandipan.Das@amd.com>; tony.luck@intel.com; james.morse@arm.com; > linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org; > bagasdotme@gmail.com; eranian@google.com; christophe.leroy@csgroup.eu; > jarkko@kernel.org; adrian.hunter@intel.com; quic_jiles@quicinc.com; > peternewman@google.com > Subject: Re: [PATCH v9 06/13] x86/resctrl: Add __init attribute to > rdt_get_mon_l3_config() > > Hi Babu, > > On 12/1/2022 7:36 AM, Babu Moger wrote: > > The function rdt_get_mon_l3_config() needs to call rdt_cpu_has() to > > No need to say "The function" ... by using () after a name it is clear that it is a > function. Ok > > To support this change it could perhaps be: > "In an upcoming change rdt_get_mon_l3_config() needs to call > rdt_cpu_has() to ..." Sure. > > > query the monitor related features. It cannot be called right now > > because rdt_cpu_has() has the __init attribute but > > rdt_get_mon_l3_config() doesn't. So, add the __init attribute to > > rdt_get_mon_l3_config() to resolve it. > > Please place the solution description in a new paragraph and drop the "So,". > The description could also be expanded to support this change. For example: > > "Add the __init attribute to rdt_get_mon_l3_config() that is only called by > get_rdt_mon_resources() that already has the __init attribute. Also make > rdt_cpu_has() available to by rdt_get_mon_l3_config() via the internal header > file." > Sure. > > > > > Also, make the function rdt_cpu_has() available outside core.c file. > > > > Signed-off-by: Babu Moger <babu.moger@amd.com> > > --- > > arch/x86/kernel/cpu/resctrl/core.c | 2 +- > > arch/x86/kernel/cpu/resctrl/internal.h | 1 + > > arch/x86/kernel/cpu/resctrl/monitor.c | 2 +- > > 3 files changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/kernel/cpu/resctrl/core.c > > b/arch/x86/kernel/cpu/resctrl/core.c > > index b4fc851f6489..030d3b409768 100644 > > --- a/arch/x86/kernel/cpu/resctrl/core.c > > +++ b/arch/x86/kernel/cpu/resctrl/core.c > > @@ -728,7 +728,7 @@ static int __init set_rdt_options(char *str) } > > __setup("rdt", set_rdt_options); > > > > -static bool __init rdt_cpu_has(int flag) > > +bool __init rdt_cpu_has(int flag) > > { > > bool ret = boot_cpu_has(flag); > > struct rdt_options *o; > > diff --git a/arch/x86/kernel/cpu/resctrl/internal.h > > b/arch/x86/kernel/cpu/resctrl/internal.h > > index fdbbf66312ec..7bbfc10094b6 100644 > > --- a/arch/x86/kernel/cpu/resctrl/internal.h > > +++ b/arch/x86/kernel/cpu/resctrl/internal.h > > @@ -512,6 +512,7 @@ void closid_free(int closid); int > > alloc_rmid(void); void free_rmid(u32 rmid); int > > rdt_get_mon_l3_config(struct rdt_resource *r); > > +bool rdt_cpu_has(int flag); > > Please also add __init attribute here by using the same style as the other > functions in this file that need __init. Ok Thanks Babu > > > void mon_event_count(void *info); > > int rdtgroup_mondata_show(struct seq_file *m, void *arg); void > > mon_event_read(struct rmid_read *rr, struct rdt_resource *r, diff > > --git a/arch/x86/kernel/cpu/resctrl/monitor.c > > b/arch/x86/kernel/cpu/resctrl/monitor.c > > index efe0c30d3a12..e33e8d8bd796 100644 > > --- a/arch/x86/kernel/cpu/resctrl/monitor.c > > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c > > @@ -746,7 +746,7 @@ static void l3_mon_evt_init(struct rdt_resource *r) > > list_add_tail(&mbm_local_event.list, &r->evt_list); } > > > > -int rdt_get_mon_l3_config(struct rdt_resource *r) > > +int __init rdt_get_mon_l3_config(struct rdt_resource *r) > > { > > unsigned int mbm_offset = > boot_cpu_data.x86_cache_mbm_width_offset; > > struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r); > > > > > > Thank you > > Reinette
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index b4fc851f6489..030d3b409768 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -728,7 +728,7 @@ static int __init set_rdt_options(char *str) } __setup("rdt", set_rdt_options); -static bool __init rdt_cpu_has(int flag) +bool __init rdt_cpu_has(int flag) { bool ret = boot_cpu_has(flag); struct rdt_options *o; diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index fdbbf66312ec..7bbfc10094b6 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -512,6 +512,7 @@ void closid_free(int closid); int alloc_rmid(void); void free_rmid(u32 rmid); int rdt_get_mon_l3_config(struct rdt_resource *r); +bool rdt_cpu_has(int flag); void mon_event_count(void *info); int rdtgroup_mondata_show(struct seq_file *m, void *arg); void mon_event_read(struct rmid_read *rr, struct rdt_resource *r, diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c index efe0c30d3a12..e33e8d8bd796 100644 --- a/arch/x86/kernel/cpu/resctrl/monitor.c +++ b/arch/x86/kernel/cpu/resctrl/monitor.c @@ -746,7 +746,7 @@ static void l3_mon_evt_init(struct rdt_resource *r) list_add_tail(&mbm_local_event.list, &r->evt_list); } -int rdt_get_mon_l3_config(struct rdt_resource *r) +int __init rdt_get_mon_l3_config(struct rdt_resource *r) { unsigned int mbm_offset = boot_cpu_data.x86_cache_mbm_width_offset; struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r);