Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp743386pxj; Thu, 17 Jun 2021 12:48:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysmMM88FXDpjpF8fZ7XvSEA17cxzNdF7Z54ihfxkLR5di8i18+YBP7Bd4URAq0FzqDN36S X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr6930828ejj.16.1623959300684; Thu, 17 Jun 2021 12:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623959300; cv=none; d=google.com; s=arc-20160816; b=NOVHgW87YHNjbDCrvpf/kt7PAE1jenQEqeS7CbXgrElgV2B0ynqp+OqBZ2nGVUsK1k filDpIbpz7JOuzfwX5JfEi0V4eTulPNPtQAd//kcO2TiVALvHG/qLTx3zG3KyP31jOl/ zWCATh2YcBigKP7g/MPUOAmyj/nLiZnSGaN2zKBDPJS0ptu1IQSTuDLaFJ1Toax1kOBT Xrl8umK//z9RgqbDyZ1eYK0vDqVRbujd+Xo3BIlrc+54urG5IHWO1vO67nVdxIKnMJOb 8k1U+psXAtIvxY0jvj10SStqO7BqNL+oLoaA9KI4PlnOQSb8v/Hgs0VXucmxrp1ASIgz Z+nQ== 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=H+nvBYOaZkiaieq/nC7fNeNwKfqamZqVN9mIWwvMRNE=; b=U4ic/v7JQZfBzp2Oz5P4rJe8uGEy73KsHrp7KAk3xYXoW1wVmrEXVOm9UdDT38jyEG TDqCqGP3vS2NCRQXx5XyMowokVGoGNUquat8mgGCwCfyVn7aC3Z5bkKAVdYNpj4XrVP1 AAEm21uSlun8krGAsswrveAMF70Vimo6ujfG79B9v+UsYkKAVbIVQ/qugC+BSxI87rA+ waSLaGqcc64xXP8eclZXTW35ix5R9BVt+/PkTXg6OjjBMqGcBvrcU3MMs94OPtEAQbWz tpQGDU1foyZ6qhfjFQ4oCgGuhvkoMyMxHv95CM7BRWbHhwbmdIBwtII3Zb69QsKqxgdK 43Lg== 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 h14si6116954edr.463.2021.06.17.12.47.57; Thu, 17 Jun 2021 12:48:20 -0700 (PDT) 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 S233369AbhFQSCB (ORCPT + 99 others); Thu, 17 Jun 2021 14:02:01 -0400 Received: from foss.arm.com ([217.140.110.172]:57616 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233152AbhFQSBo (ORCPT ); Thu, 17 Jun 2021 14:01:44 -0400 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 38F561424; Thu, 17 Jun 2021 10:59:36 -0700 (PDT) Received: from merodach.members.linode.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 61DD63F694; Thu, 17 Jun 2021 10:59:34 -0700 (PDT) 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 , lcherian@marvell.com Subject: [PATCH v5 15/24] x86/resctrl: Rename update_domains() resctrl_arch_update_domains() Date: Thu, 17 Jun 2021 17:58:11 +0000 Message-Id: <20210617175820.24037-16-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210617175820.24037-1-james.morse@arm.com> References: <20210617175820.24037-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 update_domains() merges the staged configuration changes into the arch codes configuration array. Rename to make it clear its part of the arch code interface to resctrl. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- No changes since v3. Changes since v2: * Shuffled commit message, Changes since v1: * The closid is no longer staged as from resctrl its always going to be the same number even with CDP. --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++-- arch/x86/kernel/cpu/resctrl/internal.h | 1 - arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +- include/linux/resctrl.h | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index f29848f98846..8cde76df888a 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -259,7 +259,7 @@ static void apply_config(struct rdt_hw_domain *hw_dom, } } -int update_domains(struct rdt_resource *r, int closid) +int resctrl_arch_update_domains(struct rdt_resource *r, u32 closid) { struct resctrl_staged_config *cfg; struct rdt_hw_domain *hw_dom; @@ -380,7 +380,7 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of, list_for_each_entry(s, &resctrl_schema_all, list) { r = s->res; - ret = update_domains(r, rdtgrp->closid); + ret = resctrl_arch_update_domains(r, rdtgrp->closid); if (ret) goto out; } diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index f0846b7584d3..402991a249ac 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -525,7 +525,6 @@ void rdt_pseudo_lock_release(void); int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp); void rdtgroup_pseudo_lock_remove(struct rdtgroup *rdtgrp); struct rdt_domain *get_domain_from_cpu(int cpu, struct rdt_resource *r); -int update_domains(struct rdt_resource *r, int closid); int closids_supported(void); void closid_free(int closid); int alloc_rmid(void); diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 9f1354cb94e9..4b6de76493d6 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2870,7 +2870,7 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp) return ret; } - ret = update_domains(r, rdtgrp->closid); + ret = resctrl_arch_update_domains(r, rdtgrp->closid); if (ret < 0) { rdt_last_cmd_puts("Failed to initialize allocations\n"); return ret; diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 600ade0cdc96..215a18d49539 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -199,5 +199,6 @@ struct resctrl_schema { /* The number of closid supported by this resource regardless of CDP */ u32 resctrl_arch_get_num_closid(struct rdt_resource *r); +int resctrl_arch_update_domains(struct rdt_resource *r, u32 closid); #endif /* _RESCTRL_H */ -- 2.30.2