Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2692381imm; Fri, 24 Aug 2018 03:49:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY7zJ64DoMhPOx0o9ehFDe11xN+y0aG7GJ+bNfo7vwX8gI97pRYeK2C2NceRsFYNmkRZQyn X-Received: by 2002:a63:4506:: with SMTP id s6-v6mr1198702pga.422.1535107761603; Fri, 24 Aug 2018 03:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535107761; cv=none; d=google.com; s=arc-20160816; b=vOUXhAFU5O1rcAiaMdtrZRewRLxTEHsW7DMUaZ0zHJN7gH5GIEMpv2mjv6qPZtl05w /Tj9/KK7qtjUXzem4pG+IFG+oiiwQKb0lCEu9+z+1btYjEuSZmKxr3IQKiK8Q5+LLdRi WxzoosbsO7OrIv7CJwLdOUOP374oj6tm+qD8VHmzIvjImXouT4qubfkE8gRyl1ewevZ9 cc5cDV7xTFCAS42Eyn7WeEWbHFAuRPxMqP+apgDTHm3UJ8OGmdih+rKPPe/EFwmRrJ9W fe8tF7CdXcL5Dx8JY8h2jqOQWn7XuZnUVn0Z37oWsKT/zFwdqt4FmqwaDiozNg0BKWVb hbXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=wNeCJcTE4eTrVHeFBhvSX0elkR4WkF+mLEYbMLWN3Zo=; b=XrHi8+V2paneL89gIezLrhawD2K2lGlGHhess7rAYh4YFy/gpG7w4PZVzPDjrhnpAR +0onmVFuszTxfIISrF6dIJZEocllVyKzRv3yE4miJ6LgMiFz/0hHVvLV9v+VnnreYpiK 6MOs3GC20x0rrMIPG1fBDzQHUFN1XS04jiq21p4/oab/zQEYamsPN/g8eFBcJJMEIn3e 1Zkqyd2XaY+kU4+zEuQ+phjmYN6EzYjyXSnZKFYr5nVHvxSdHzkw0QGwgu3q5FOJHq33 rlPkN2UZAaP6YHS56NtmdOXIgWc/f+5tZNv56GngnDq/lWUFZxB3C2Hrt3AEqAA9X08i vIjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q32-v6si6418083pgk.399.2018.08.24.03.49.06; Fri, 24 Aug 2018 03:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbeHXOVa (ORCPT + 99 others); Fri, 24 Aug 2018 10:21:30 -0400 Received: from foss.arm.com ([217.140.101.70]:55516 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727694AbeHXOUR (ORCPT ); Fri, 24 Aug 2018 10:20:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 159A81682; Fri, 24 Aug 2018 03:46:13 -0700 (PDT) Received: from melchizedek.Emea.Arm.com (melchizedek.emea.arm.com [10.4.12.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6D5FD3F5A0; Fri, 24 Aug 2018 03:46:11 -0700 (PDT) From: James Morse To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, Thomas Gleixner , Fenghua Yu , Tony Luck , Ingo Molnar , H Peter Anvin , Reinette Chatre , Vikas Shivappa Subject: [RFC PATCH 07/20] x86/intel_rdt: Expose update_domains() as an arch helper Date: Fri, 24 Aug 2018 11:45:06 +0100 Message-Id: <20180824104519.11203-8-james.morse@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180824104519.11203-1-james.morse@arm.com> References: <20180824104519.11203-1-james.morse@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org update_domains() applies the staged configuration to the hw_dom's configuration array and updates the hardware. Make it part of the interface between resctrl and the arch code. Signed-off-by: James Morse --- arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 4 ++-- include/linux/resctrl.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c index ec3c15ee3473..766c3e62ad91 100644 --- a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +++ b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c @@ -193,7 +193,7 @@ static void apply_config(struct rdt_hw_domain *hw_dom, } } -static int update_domains(struct rdt_resource *r) +int resctrl_arch_update_domains(struct rdt_resource *r) { struct resctrl_staged_config *cfg; struct rdt_hw_domain *hw_dom; @@ -312,7 +312,7 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of, } for_each_alloc_enabled_rdt_resource(r) { - ret = update_domains(r); + ret = resctrl_arch_update_domains(r); if (ret) goto out; } diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 03d9fbc230af..9fe7d7de53d7 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -125,6 +125,7 @@ struct rdt_resource { }; +int resctrl_arch_update_domains(struct rdt_resource *r); void resctrl_arch_get_config(struct rdt_resource *r, struct rdt_domain *d, u32 closid, u32 *value); -- 2.18.0