lkml.org 
[lkml]   [2018]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v7 03/13] arch/x86: Re-arrange RDT init code
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.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2018-11-14 20:07    [W:0.209 / U:8.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site