From: guoren@kernel.org
To: guoren@kernel.org, arnd@arndb.de
Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
linux-arch@vger.kernel.org, Guo Ren <guoren@linux.alibaba.com>
Subject: [PATCH 03/13] csky: Add cpu feature register hint for smp
Date: Sat, 1 Aug 2020 01:14:03 +0000 [thread overview]
Message-ID: <1596244453-98575-4-git-send-email-guoren@kernel.org> (raw)
In-Reply-To: <1596244453-98575-1-git-send-email-guoren@kernel.org>
From: Guo Ren <guoren@linux.alibaba.com>
CPU features registers are setup by customers' bootloader, but
Linux must help transfer them from the primary to secondary cores.
This patch add hint2 CPU feature register supported.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/csky/kernel/smp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c
index b5c5bc3..1945fb2 100644
--- a/arch/csky/kernel/smp.c
+++ b/arch/csky/kernel/smp.c
@@ -156,6 +156,7 @@ void __init setup_smp(void)
extern void _start_smp_secondary(void);
volatile unsigned int secondary_hint;
+volatile unsigned int secondary_hint2;
volatile unsigned int secondary_ccr;
volatile unsigned int secondary_stack;
@@ -168,6 +169,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
secondary_stack =
(unsigned int) task_stack_page(tidle) + THREAD_SIZE - 8;
secondary_hint = mfcr("cr31");
+ secondary_hint2 = mfcr("cr<21, 1>");
secondary_ccr = mfcr("cr18");
secondary_msa1 = read_mmu_msa1();
@@ -209,6 +211,7 @@ void csky_start_secondary(void)
unsigned int cpu = smp_processor_id();
mtcr("cr31", secondary_hint);
+ mtcr("cr<21, 1>", secondary_hint2);
mtcr("cr18", secondary_ccr);
mtcr("vbr", vec_base);
--
2.7.4
next prev parent reply other threads:[~2020-08-01 1:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 1:14 [PATCH 00/13] Update csky subsystem for linux-5.9-rc1 guoren
2020-08-01 1:14 ` [PATCH 01/13] csky: remove unusued thread_saved_pc and *_segments functions/macros guoren
2020-08-01 1:14 ` [PATCH 02/13] csky: Add SECCOMP_FILTER supported guoren
2020-08-01 1:14 ` guoren [this message]
2020-08-01 1:14 ` [PATCH 04/13] csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE guoren
2020-08-01 1:14 ` [PATCH 05/13] csky: Fixup kprobes handler couldn't change pc guoren
2020-08-01 1:14 ` [PATCH 06/13] csky: Add support for function error injection guoren
2020-08-01 1:14 ` [PATCH 07/13] csky: Optimize the trap processing flow guoren
2020-08-01 1:14 ` [PATCH 08/13] csky: Use top-down mmap layout guoren
2020-08-01 1:14 ` [PATCH 09/13] csky: Set CONFIG_NR_CPU 4 as default guoren
2020-08-01 1:14 ` [PATCH 10/13] csky: Fixup warning by EXPORT_SYMBOL(kmap) guoren
2020-08-01 1:14 ` [PATCH 11/13] csky: Add irq_work support guoren
2020-08-01 1:14 ` [PATCH 12/13] csky: Add arch_show_interrupts for IPI interrupts guoren
2020-08-01 1:14 ` [PATCH 13/13] csky: Add context tracking support guoren
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=1596244453-98575-4-git-send-email-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=arnd@arndb.de \
--cc=guoren@linux.alibaba.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).