lkml.org 
[lkml]   [2018]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 03/13] arch/x86: Re-arrange RDT init code
Date
Boris,

On 11/14/18 1:05 PM, Borislav Petkov wrote:
> On Fri, Nov 09, 2018 at 08:52:29PM +0000, Moger, Babu wrote:
>> Separate the call sequence for rdt_quirks and MBA feature.
>> This is in preparation to handle vendor differences in these
>> call sequences.
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
>> arch/x86/kernel/cpu/resctrl.c | 29 +++++++++++++++++++++++------
>> 1 file changed, 23 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/x86/kernel/cpu/resctrl.c b/arch/x86/kernel/cpu/resctrl.c
>> index 5d526dc45751..fd5320dddddc 100644
>> --- a/arch/x86/kernel/cpu/resctrl.c
>> +++ b/arch/x86/kernel/cpu/resctrl.c
>> @@ -794,6 +794,16 @@ static bool __init rdt_cpu_has(int flag)
>> return ret;
>> }
>>
>> +static __init bool rdt_mba_config(void)
>> +{
>> + if (rdt_cpu_has(X86_FEATURE_MBA)) {
>> + if (rdt_get_mem_config(&rdt_resources_all[RDT_RESOURCE_MBA]))
>> + return true;
>
> Or simpler:
>
> if (rdt_cpu_has(X86_FEATURE_MBA))
> return rdt_get_mem_config(&rdt_resources_all[RDT_RESOURCE_MBA]);
>
> return false;
>
> as rdt_get_mem_config() already returns bool.
>

Yes. We could do that. Will modify it.
\
 
 \ /
  Last update: 2018-11-14 21:07    [W:0.064 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site