Received: by 10.223.164.202 with SMTP id h10csp203474wrb; Mon, 13 Nov 2017 16:46:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMbns8HwOuT6BZLIbIltC0L2+Df1uYknSLL8No/wi9q1nD9S+h1/v9TAlE52K+JURxrngBmo X-Received: by 10.84.168.227 with SMTP id f90mr1523877plb.320.1510620400257; Mon, 13 Nov 2017 16:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510620400; cv=none; d=google.com; s=arc-20160816; b=cHO2nqDcU2n8Vdb0Ej/u2mXctga6D3csM81nENDFnPENaxXECp1LUNqfCHQU8hy5Q0 mz7U+mNRBv5TjTimIEz0uYeIezBBnOUZORd5ij7HMRLfVIGtTduXrOup650u7NNP8zFN WhD6xZsKxFG1N63lfjSykextU0Kyy3X/PD3pZE0gnOk475sdhun6aES2g59uduHLxVGm a9A7+uXsW35+vhZ2ORSkyouISCzrKl9mx2s3lZpPYp7TyXLz6ngSSL4gZ9rhpxpEhC4j z7rzCoaPQ+hpgiGtn5P0c4sNNTw4ZiYMAkzcMNs72/0uXIJ48zErDZ2hC3taFq5meWJz vjwg== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tFAbzeMc+2V9tEKL18RxzXLHjFMF1mxsCdHJK5UEr3g=; b=DHZ/CSbwVC9rVuwQ7HRBfqZEX5ITuYPEc1KX93bebaK7PiUC9tU3Lfl9VnJ+auukn3 kcXKktAT+TI82N3BlagEKDi8z19V8KPHpRq4YyhDWlQsE3TGLhTeQb7kMHFRm6EsqpE5 rXiaeJTje/6kkLW/x72xRKWuHAtUsgfP7Isbd9ZN9mDCKj66CTRB/4ZZtHLxpSJI4cQj 54Ut/BYqajnr6AhW0C6ekpd+a3/ZY6sEiLnMAADhGgdu4aJtwRxgXFElnFxZCMnCjvIP Tk8/nlvEqUyjlX225ty3IWfazyIFqdmqCHbKzaP18s9RIRYtPPpiI9ofz3JoYSzPwYCP XeGg== 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 1si14977220plw.796.2017.11.13.16.46.27; Mon, 13 Nov 2017 16:46:40 -0800 (PST) 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 S1753233AbdKNAmw (ORCPT + 90 others); Mon, 13 Nov 2017 19:42:52 -0500 Received: from mga01.intel.com ([192.55.52.88]:37793 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752386AbdKNAmS (ORCPT ); Mon, 13 Nov 2017 19:42:18 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2017 16:42:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,392,1505804400"; d="scan'208";a="2288255" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by fmsmga001.fm.intel.com with ESMTP; 13 Nov 2017 16:42:16 -0800 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com Cc: vikas.shivappa@linux.intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre Subject: [RFC PATCH 02/20] x86/intel_rdt: Make useful functions available internally Date: Mon, 13 Nov 2017 08:39:25 -0800 Message-Id: X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for support of pseudo-locking we move some static functions to be available for sharing amongst all RDT components. Signed-off-by: Reinette Chatre --- arch/x86/kernel/cpu/intel_rdt.h | 5 +++++ arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 2 +- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h index 3397244984f5..8cb42523894e 100644 --- a/arch/x86/kernel/cpu/intel_rdt.h +++ b/arch/x86/kernel/cpu/intel_rdt.h @@ -425,7 +425,12 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off); int rdtgroup_schemata_show(struct kernfs_open_file *of, struct seq_file *s, void *v); +int rdtgroup_add_files(struct kernfs_node *kn, unsigned long fflags); +int rdtgroup_kn_set_ugid(struct kernfs_node *kn); struct rdt_domain *get_domain_from_cpu(int cpu, struct rdt_resource *r); +int closid_alloc(void); +void closid_free(int closid); +int update_domains(struct rdt_resource *r, int closid); int alloc_rmid(void); void free_rmid(u32 rmid); int rdt_get_mon_l3_config(struct rdt_resource *r); diff --git a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c index 30aeb267cbd2..d2bb1a30c6a1 100644 --- a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +++ b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c @@ -174,7 +174,7 @@ static int parse_line(char *line, struct rdt_resource *r) return -EINVAL; } -static int update_domains(struct rdt_resource *r, int closid) +int update_domains(struct rdt_resource *r, int closid) { struct msr_param msr_param; cpumask_var_t cpu_mask; diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 64c5ff97ee0d..f8dc41e15d13 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -109,7 +109,7 @@ static void closid_init(void) closid_free_map &= ~1; } -static int closid_alloc(void) +int closid_alloc(void) { u32 closid = ffs(closid_free_map); @@ -121,13 +121,13 @@ static int closid_alloc(void) return closid; } -static void closid_free(int closid) +void closid_free(int closid) { closid_free_map |= 1 << closid; } /* set uid and gid of rdtgroup dirs and files to that of the creator */ -static int rdtgroup_kn_set_ugid(struct kernfs_node *kn) +int rdtgroup_kn_set_ugid(struct kernfs_node *kn) { struct iattr iattr = { .ia_valid = ATTR_UID | ATTR_GID, .ia_uid = current_fsuid(), @@ -855,7 +855,7 @@ static struct rftype res_common_files[] = { }, }; -static int rdtgroup_add_files(struct kernfs_node *kn, unsigned long fflags) +int rdtgroup_add_files(struct kernfs_node *kn, unsigned long fflags) { struct rftype *rfts, *rft; int ret, len; -- 2.13.5 From 1584112554519057780@xxx Wed Nov 15 06:30:57 +0000 2017 X-GM-THRID: 1580988354149806204 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread