Skip to content

Commit 8077e66

Browse files
committed
csky: Add cpu feature register hint for smp
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 <[email protected]> Cc: Arnd Bergmann <[email protected]>
1 parent e95a4f8 commit 8077e66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/csky/kernel/smp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ void __init setup_smp(void)
156156
extern void _start_smp_secondary(void);
157157

158158
volatile unsigned int secondary_hint;
159+
volatile unsigned int secondary_hint2;
159160
volatile unsigned int secondary_ccr;
160161
volatile unsigned int secondary_stack;
161162

@@ -168,6 +169,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
168169
secondary_stack =
169170
(unsigned int) task_stack_page(tidle) + THREAD_SIZE - 8;
170171
secondary_hint = mfcr("cr31");
172+
secondary_hint2 = mfcr("cr<21, 1>");
171173
secondary_ccr = mfcr("cr18");
172174
secondary_msa1 = read_mmu_msa1();
173175

@@ -209,6 +211,7 @@ void csky_start_secondary(void)
209211
unsigned int cpu = smp_processor_id();
210212

211213
mtcr("cr31", secondary_hint);
214+
mtcr("cr<21, 1>", secondary_hint2);
212215
mtcr("cr18", secondary_ccr);
213216

214217
mtcr("vbr", vec_base);

0 commit comments

Comments
 (0)