public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gaurav Kohli <gkohli@codeaurora.org>
To: will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	neeraju@codeaurora.org, Gaurav Kohli <gkohli@codeaurora.org>
Subject: [PATCH] arm64: Skip apply SSBS call for non SSBS system
Date: Tue,  4 Aug 2020 19:44:42 +0530	[thread overview]
Message-ID: <1596550484-11029-1-git-send-email-gkohli@codeaurora.org> (raw)

In a system where no cpu's implement SSBS, for
them no need to set pstate. This might help to save
few cpu cycles during context switch.

Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>

diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 6089638..79f80f1 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -477,6 +477,13 @@ static void ssbs_thread_switch(struct task_struct *next)
 	struct pt_regs *regs = task_pt_regs(next);
 
 	/*
+	 * For Targets which don't have SSBS support, they
+	 * can return from here.
+	 */
+	if (!IS_ENABLED(CONFIG_ARM64_SSBD))
+		return;
+
+	/*
 	 * Nothing to do for kernel threads, but 'regs' may be junk
 	 * (e.g. idle task) so check the flags and bail early.
 	 */
-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project


             reply	other threads:[~2020-08-04 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 14:14 Gaurav Kohli [this message]
2019-04-15 16:40 ` [PATCH] nvmem: core: add NVMEM_SYSFS Kconfig Srinivas Kandagatla
2019-04-16  5:19   ` Gaurav Kohli
2019-04-16  9:34     ` Mika Westerberg
2019-04-16  9:44       ` Srinivas Kandagatla
2019-04-16  9:47         ` Mika Westerberg
2020-08-04 14:26   ` Gaurav Kohli
2020-08-04 14:14 ` [PATCH] nvmem: core: add support to NVMEM_NO_SYSFS_ENTRY Gaurav Kohli
2020-08-04 14:25   ` Gaurav Kohli
2020-08-11  4:48 ` [PATCH] arm64: Skip apply SSBS call for non SSBS system Gaurav Kohli
2020-08-12 13:30 ` Will Deacon
2020-08-12 14:15   ` Gaurav Kohli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1596550484-11029-1-git-send-email-gkohli@codeaurora.org \
    --to=gkohli@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=neeraju@codeaurora.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox