Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1464143pxf; Fri, 12 Mar 2021 10:04:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNi1ZzyLcgpwkBdwfB7B/jylES8xmDG0TTgiPpNWhGPAfJzLLZXvJkrMoFfZJHxEsOteeS X-Received: by 2002:a17:906:ecf3:: with SMTP id qt19mr9722827ejb.467.1615572247281; Fri, 12 Mar 2021 10:04:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615572247; cv=none; d=google.com; s=arc-20160816; b=F/v0p9LGbFECek66byfC2yL6Q3Q6j19XR8gFaDRfaw1K9HiUbSeH+OtoxOhCec0n6O vHbvvrw+J3/SkpuUIe4Ui0QsbmC/Ggj6CQWrpisn4dfDHxe2JKqsnImWB5s7Zbz3Hi8q qx76tQ4MRg1VfW/nuJZO2pKnpA7gW1wioQQsF5K5w4nc/wrRU0AmNGnwP0sU5M8DZQ8i e8IBvk8K9ogyboMjyMAQyFgFwpOM3cIrsCjLK1UZZSVG5XpoLiH2IbmlMHYiBM1//hhf VvsyLcaFytqAKr9f7Qg0DN9HOZDtNy9GGszydu8lPOGLPf8NbMo+7th103Nz4UyX1Kvf brAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+Bx8trQtCPHrZDIAxXwMiT/OBjEaYjgZXINbZZy8d+E=; b=MdeTZ/IBS/8LndbJ2zkjnk9OyQbAaoCOuK/yrFAWxcD05L/xJ0pYKmwHdyilIQvY5O 9WuThDl+ANkNyR9bJU+2pM1PwzANOxJMW0sG7rjMUtDM6g3dhf2cG852PfdpKLvJdkwi bU7b6EMSlT07nwW6OFEFtDGLLKaQZAGxIe3mb/uFiVV2rBckNPQaTe16fN869prCqGwk Zt4UDY2KY2WhMXD1CvKimsOkDz3WbG2LA3JupWCyJt8uVeiGcldBqtHyzHJ58eZLXrAU 5Z3NLuclofwNFJZYl/8Vye74M8x7CCTb7pCg1VO13VImoFW9LbE84qV3NwWcJQNU9Lvd 9Yjg== 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 l1si4622685ejb.137.2021.03.12.10.03.44; Fri, 12 Mar 2021 10:04:07 -0800 (PST) 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 S233281AbhCLSAs (ORCPT + 99 others); Fri, 12 Mar 2021 13:00:48 -0500 Received: from foss.arm.com ([217.140.110.172]:58732 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232985AbhCLSAX (ORCPT ); Fri, 12 Mar 2021 13:00:23 -0500 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 59166106F; Fri, 12 Mar 2021 10:00:23 -0800 (PST) Received: from merodach.members.linode.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8C9173F7D7; Fri, 12 Mar 2021 10:00:21 -0800 (PST) From: James Morse To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , James Morse , shameerali.kolothum.thodi@huawei.com, Jamie Iles , D Scott Phillips OS Subject: [PATCH v2 17/24] x86/resctrl: Use cdp_enabled in rdt_domain_reconfigure_cdp() Date: Fri, 12 Mar 2021 17:58:42 +0000 Message-Id: <20210312175849.8327-18-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312175849.8327-1-james.morse@arm.com> References: <20210312175849.8327-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rdt_domain_reconfigure_cdp() infers whether CDP is enabled by checking the alloc_capable and alloc_enabled flags of the data resources. Now that we have an explicit cdp_enabled, use that. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- 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 55c17adf763c..378cad0020da 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -1933,14 +1933,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.30.0