Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1462145pxf; Fri, 12 Mar 2021 10:01:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyss4qaak5cXwPEa7+3SbNOtV/tXVfeOR1wgSex4tPYuImMcCJrwr53AHLF5KMSx/s5nt6v X-Received: by 2002:a05:6402:704:: with SMTP id w4mr16299539edx.175.1615572116640; Fri, 12 Mar 2021 10:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615572116; cv=none; d=google.com; s=arc-20160816; b=I/srQ+3n1OUP/SEUDBrHbWZMsRG4G1oHGCkXWLWZbSrvbMVCkoZzq9/qIf00L5D0Ho vW4qHRQF7l9KMLVXBllE0HnrzODK9lTicAPtgbX5vqoQfjBjQr3gpEIbe8k1+w1jIoYG CdNY+TR2R5+DBBvAK3GRfeqgPb+DtP/zRe4LdP2DFIJ75KJsw564esMhWiJFgpfl2Pyg r3cZkTx3aenWMFrV0dMipBClGXiHqDlQxgBidvQ6791xnwoggb4zmVbNBRYe3odczN1a 1HmCULqjslYUixp01K9QDGMLsbdveZi922O+M8LiRdDKFuP4BCD01CD8iEuw0O2v+3Ze ouRA== 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=HT3d4K0irUrpHyn43fq2UAQxwgZsSpjEzKm/KDxFfRU=; b=fJoqfoMh/2+ItM/sxZ9c7ZFlv1Hm3gil5wlwgiGXno2U5HD5OoWx2SBCF4sjViaBCt 9m1gzhyDyvn4w4hB+yjuS5fQHYluZa6ac+oPsodijBtdQwYQ0BbZpPMD0ovA9wfqX9TG jzGq2XUxErSkUQvE3Nzg7oF+VLwxayAsqHFIZrrLeQnhEbeoglgMy3/G4qQtyYSHds40 EB53o5mUZQCtu/paoFHRc4it09A5SpRUMhylDRYRm6gDpJqytyPno5gG16MHoDxW6Mgn 2F5CUIvKQD2B6jFNrWMs3EBOnY4kF5Sx+wA++7TH5HlQVIFlekqVzYskuAgeGVMN3taH fVVg== 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 p10si4520557eji.76.2021.03.12.10.01.31; Fri, 12 Mar 2021 10:01:56 -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 S233189AbhCLSAo (ORCPT + 99 others); Fri, 12 Mar 2021 13:00:44 -0500 Received: from foss.arm.com ([217.140.110.172]:58664 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232398AbhCLSAQ (ORCPT ); Fri, 12 Mar 2021 13:00:16 -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 B1A43ED1; Fri, 12 Mar 2021 10:00:15 -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 E38893F7D7; Fri, 12 Mar 2021 10:00:13 -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 14/24] x86/resctrl: Rename update_domains() resctrl_arch_update_domains() Date: Fri, 12 Mar 2021 17:58:39 +0000 Message-Id: <20210312175849.8327-15-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 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 --- 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 c46300bce210..271f5d28412a 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 34b24a89eb6d..ff1d58dee66b 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -498,7 +498,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 f89cdb107297..a103ed4f29fa 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2847,7 +2847,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 06654f9346a2..a6d2d7a25293 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -190,5 +190,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.0