lkml.org 
[lkml]   [2020]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/24] x86/resctrl: Use cdp_enabled in rdt_domain_reconfigure_cdp()
Date
rdt_domain_reconfigure_cdp() infers whether CDP is enabled by
checking the alloc_capable and alloc_enabled flags of the data
resources.

Now that there is an explicit cdp_enabled, use that.

Signed-off-by: James Morse <james.morse@arm.com>
---
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 6e150560c3c1..eeedafa7d5e7 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -1944,14 +1944,16 @@ static int set_cache_qos_cfg(int level, bool enable)
/* Restore the qos cfg state when a domain comes online */
void rdt_domain_reconfigure_cdp(struct rdt_resource *r)
{
- if (!r->alloc_capable)
+ struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r);
+
+ if (!hw_res->cdp_capable)
return;

if (r == &rdt_resources_all[RDT_RESOURCE_L2DATA].resctrl)
- l2_qos_cfg_update(&r->alloc_enabled);
+ l2_qos_cfg_update(&hw_res->cdp_enabled);

if (r == &rdt_resources_all[RDT_RESOURCE_L3DATA].resctrl)
- l3_qos_cfg_update(&r->alloc_enabled);
+ l3_qos_cfg_update(&hw_res->cdp_enabled);
}

/*
--
2.28.0
\
 
 \ /
  Last update: 2020-10-30 17:13    [W:0.308 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site