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.mo...@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.

Reply via email to