Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1368342pxb; Fri, 1 Oct 2021 09:11:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU/s51yZkS2ThyVC0FDtHRioAc019J08zpBNYK/FaNGfLXflBY4KFUcJYHPUAEjNuZGHNH X-Received: by 2002:aa7:d64e:: with SMTP id v14mr15312893edr.381.1633104666210; Fri, 01 Oct 2021 09:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633104666; cv=none; d=google.com; s=arc-20160816; b=dMOJnUzMyKG4jhEV4ZUsWGMdU7tr6FbXx+VrKj7TpePCyfmToeZ5MqeNt19I/HAekG WEuuVxy0N8hrofEOInTb/asybiqhVaE+0uqf437aThBftOUyTZfmzyVSlGIFHuptyn7e UzdP0PWMleH45+xWEuPhfVvuFyl6i2rZKxp9IO9ymqEQIPaS9uiMFxR0goBcX8LHLeDg EXjHwwC+EHPiXWwpXNiA8y7xhVwbc5KzL4cg72Nge+oWjMYOXNlt2+aFCRyhRe98x9JD pcLx2QD3lmlGB4BqdmC9UGEHqyR8cxgX9LOe2i/HyDDeMahI4HDc5dfcFiAmcZnafK8q uQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=6L+1EFcfcTNgCgYIrjJhcX/4VrYI85bndrT4jciehz4=; b=pWvpUBhpR0SN/pvDCi/siQHeEGePexvkkLu4mH3/x3uBx8QHXgC7IGEq7moT9N0om9 TJa3fC/Gcnt14uFat6rpKNxF6JhjrTBjtizS2ix9si0GQjWcv54iYdsGKSEQpE5oNnY0 nTK9cx147fJP/SX+jbsny5yqRBWT8MOUIEIZFY1e7oqwhiZAnyQBtjorYZCRVfJzoXTM p2wS1rl0IplIv3d2Vk8XLOebOnhwK/NMMFFyguX07MK5rfPjZShZFnN30cI9lfP6Rw0f Zn0PkGAUdeYQ4bpmCwuskNeNOAyBIzBJBh547whVa6vANcM3iqHCbe1qCPOpT9LkUpD/ odKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr2si6416833ejb.201.2021.10.01.09.10.40; Fri, 01 Oct 2021 09:11:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355152AbhJAQDW (ORCPT + 99 others); Fri, 1 Oct 2021 12:03:22 -0400 Received: from foss.arm.com ([217.140.110.172]:46238 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355164AbhJAQDU (ORCPT ); Fri, 1 Oct 2021 12:03:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A0DA4113E; Fri, 1 Oct 2021 09:01:35 -0700 (PDT) Received: from [10.1.196.28] (eglon.cambridge.arm.com [10.1.196.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF75C3F766; Fri, 1 Oct 2021 09:01:33 -0700 (PDT) Subject: Re: [PATCH v1 09/20] x86/resctrl: Abstract and use supports_mba_mbps() To: "tan.shaopeng@fujitsu.com" , "'x86@kernel.org'" , "'linux-kernel@vger.kernel.org'" Cc: 'Fenghua Yu' , 'Reinette Chatre' , 'Thomas Gleixner' , 'Ingo Molnar' , 'Borislav Petkov' , 'H Peter Anvin' , 'Babu Moger' , "'shameerali.kolothum.thodi@huawei.com'" , 'Jamie Iles' , 'D Scott Phillips OS' , "'lcherian@marvell.com'" , "'bobo.shaobowang@huawei.com'" References: <20210729223610.29373-10-james.morse@arm.com> From: James Morse Message-ID: <21e71153-a134-b553-785d-2264fa3f0327@arm.com> Date: Fri, 1 Oct 2021 17:01:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-2022-jp Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shaopeng Tan, On 24/09/2021 07:23, tan.shaopeng@fujitsu.com wrote: >> To determine whether the mba_mbps option to resctrl should be supported, >> resctrl tests the boot cpus' x86_vendor. >> >> This isn't portable, and needs abstracting behind a helper so this check can be >> part of the filesystem code that moves to /fs/. >> >> Re-use the tests set_mba_sc() does to determine if the mba_sc is supported >> on this system. An 'alloc_capable' test is added so that this property isn't >> implied by 'linear'. >> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> b/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> index e321ea5de562..4388685548a0 100644 >> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> @@ -2317,7 +2326,7 @@ static int rdt_parse_param(struct fs_context *fc, >> struct fs_parameter *param) >> ctx->enable_cdpl2 = true; >> return 0; >> case Opt_mba_mbps: >> - if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) >> + if (supports_mba_mbps()) >> return -EINVAL; > I think if(!supports_mba_mbps()) is correct, isn't it? Ooops! (looks like I messed this up when fixing the name) Thanks, James