Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp607223lqp; Thu, 21 Mar 2024 10:04:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVllSWEBiWkPeLWhemaSIHdAeNTWSy19Yl1CJpB3V3eym03RvheUF36TBpeREIznvgX6a5VKB4kLiFZyNtTrYSfylKIGZHXxGJ2P0iJrg== X-Google-Smtp-Source: AGHT+IGTLQaNHcZvMbtHUnM0Tn8KQDWOwyWwx9ia6FNhi9Q3Aj68xsdinOI68+cwMmstMdGcqCZm X-Received: by 2002:a17:906:3509:b0:a46:13a9:b78e with SMTP id r9-20020a170906350900b00a4613a9b78emr22534eja.2.1711040676402; Thu, 21 Mar 2024 10:04:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711040676; cv=pass; d=google.com; s=arc-20160816; b=MpgR1qvrIZf25zWN/BVOa/uYUHTZC/dbEiVn64dUgYeOIarODKDeVbPSvp8HLJrj3X 2jzxY5RLUtuLoCH3iwtw85LFczeZ6DM1r/AiwgPdIeK9PM2JgA5l9az+Hauf/lW3NmDJ KU19vnDs4ezKx+f+OatCu4/LIvl+kPjiKvZybBTDGFu7BGRB0OogRs4QkxUVNG9vpXLw AMao/p5iMj74S9wsYcCmnn1EpC9IUV1CUyykhW7Ftq0aYfwOvf3rgoxrymlux6Wswbq1 Iab39PvA0+y3BbORSs/GY9WMKMhv1fPLJT64h2lHREkz+QwpeG7aAOfodi4T0ZBCkKkU YggA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=MA9Vpqd6tGiBduYS9Xg+tRy+iz1LoLHzZQFGFbnILLo=; fh=knouHfhWmUABu+sT2q0nnGKUzC7/WRiZH1KSpGv7uFs=; b=0GSPNTonUP3O/aEQZ7jG2bFwrrobSqeVzVqF/sOEg19qxqxRXecGjn5H2qgAFUkDTH iDUE78CuvXp1NVB+Onue+Ajzs0UDl92CWb8XXL0qMkPM87tlqn7SuI+bWrjgdB6JIO7c stsAhhLjSIXID9Fhmiz2ztbcHFrISp6ZJJRfNkHLOa63G3qSsiTIBLurX7ladd275lkx h+aXFricnJognXQDPYo8pa/ADCN6ons9F4LFZu8NysMRTBuuHry4xkYwAmfjL5NwA6iz tvqipwyM/CS+X6hLJ/r62TCRAEKD3VkC4n4ykLk6kAACosEgUsIR+10ooEATLWPDX7qO snkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-110444-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p17-20020a170906605100b00a4665390543si95167ejj.938.2024.03.21.10.04.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 10:04:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110444-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-110444-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 20C6F1F23231 for ; Thu, 21 Mar 2024 17:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC409142621; Thu, 21 Mar 2024 16:52:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A45A11428E0 for ; Thu, 21 Mar 2024 16:52:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711039979; cv=none; b=n4mMAQ4QeVvMgAU5+hdouVetJz37/OXSg9A2RagEQRhDOhqsAPLaGMlvWoJIpDpx1DcZljxjPrRLqH52tTbhGD2XQglFGDijq0bAipL35uDGqZ46/YipqWIWTm2yWwK5wpgPLrTcvy7fOMk0PM9Y7HLFAz1gQYStCtUKVwHgwoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711039979; c=relaxed/simple; bh=k8jKQVqR+zKJGU+pxA21CtfTD1PgxUut3UIgZbSWYxg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PFlzVNL6M3U8a69u/glJG9+0OiWWm8aBkvCgy6BQKVj5f0S8BmfPREiVugBYLH8J1Wz/OZOB0hRpqooiSpwQrvJ4/aAbhH84+x7TcExQ4qpxen3nNBSlgFe3/jxcSwStmVdSqxMB9LXZAi9QXgomMOE/AOl6seti1SBDDh81ifA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 519471063; Thu, 21 Mar 2024 09:53:31 -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 139F13F67D; Thu, 21 Mar 2024 09:52:53 -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, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie , Dave Martin Subject: [PATCH v1 27/31] x86/resctrl: Rename resctrl_sched_in() to begin resctrl_arch_ Date: Thu, 21 Mar 2024 16:51:02 +0000 Message-Id: <20240321165106.31602-28-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240321165106.31602-1-james.morse@arm.com> References: <20240321165106.31602-1-james.morse@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit resctrl_sched_in() loads the architecture specific CPU MSRs with the CLOSID and RMID values. This function was named before resctrl was split to have architecture specific code, and generic filesystem code. This function is obviously architecture specific, but does not begin with 'resctrl_arch_', making it the odd one out in the functions an architecture needs to support to enable resctrl. Rename it for concistency. This is purely cosmetic. Signed-off-by: James Morse --- arch/x86/include/asm/resctrl.h | 4 ++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 ++++++------ arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h index 9940398e367e..491342f56811 100644 --- a/arch/x86/include/asm/resctrl.h +++ b/arch/x86/include/asm/resctrl.h @@ -177,7 +177,7 @@ static inline bool resctrl_arch_match_rmid(struct task_struct *tsk, u32 ignored, return READ_ONCE(tsk->rmid) == rmid; } -static inline void resctrl_sched_in(struct task_struct *tsk) +static inline void resctrl_arch_sched_in(struct task_struct *tsk) { if (static_branch_likely(&rdt_enable_key)) __resctrl_sched_in(tsk); @@ -220,7 +220,7 @@ void resctrl_cpu_detect(struct cpuinfo_x86 *c); #else -static inline void resctrl_sched_in(struct task_struct *tsk) {} +static inline void resctrl_arch_sched_in(struct task_struct *tsk) {} static inline void resctrl_cpu_detect(struct cpuinfo_x86 *c) {} #endif /* CONFIG_X86_CPU_RESCTRL */ diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 085fb9c2333a..218aebd6387f 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -359,7 +359,7 @@ static int rdtgroup_cpus_show(struct kernfs_open_file *of, } /* - * This is safe against resctrl_sched_in() called from __switch_to() + * This is safe against resctrl_arch_sched_in() called from __switch_to() * because __switch_to() is executed with interrupts disabled. A local call * from update_closid_rmid() is protected against __switch_to() because * preemption is disabled. @@ -378,7 +378,7 @@ void resctrl_arch_sync_cpu_defaults(void *info) * executing task might have its own closid selected. Just reuse * the context switch code. */ - resctrl_sched_in(current); + resctrl_arch_sched_in(current); } /* @@ -605,7 +605,7 @@ static void _update_task_closid_rmid(void *task) * Otherwise, the MSR is updated when the task is scheduled in. */ if (task == current) - resctrl_sched_in(task); + resctrl_arch_sched_in(task); } static void update_task_closid_rmid(struct task_struct *t) @@ -663,7 +663,7 @@ static int __rdtgroup_move_task(struct task_struct *tsk, * Ensure the task's closid and rmid are written before determining if * the task is current that will decide if it will be interrupted. * This pairs with the full barrier between the rq->curr update and - * resctrl_sched_in() during context switch. + * resctrl_arch_sched_in() during context switch. */ smp_mb(); @@ -2946,8 +2946,8 @@ static void rdt_move_group_tasks(struct rdtgroup *from, struct rdtgroup *to, /* * Order the closid/rmid stores above before the loads * in task_curr(). This pairs with the full barrier - * between the rq->curr update and resctrl_sched_in() - * during context switch. + * between the rq->curr update and + * resctrl_arch_sched_in() during context switch. */ smp_mb(); diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 0917c7f25720..8697b02dabf1 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -211,7 +211,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) switch_fpu_finish(next_p); /* Load the Intel cache allocation PQR MSR. */ - resctrl_sched_in(next_p); + resctrl_arch_sched_in(next_p); return prev_p; } diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 7062b84dd467..d1cf885e8930 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -707,7 +707,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) } /* Load the Intel cache allocation PQR MSR. */ - resctrl_sched_in(next_p); + resctrl_arch_sched_in(next_p); return prev_p; } -- 2.39.2