smpboot.c (e205ceeb253723f4e4bdce619844ed678ae48276) smpboot.c (fcdc65375186a5cd69cc2eedfb498b86f4f5a21e)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * SMP initialisation and IPI support
4 * Based on arch/arm64/kernel/smp.c
5 *
6 * Copyright (C) 2012 ARM Ltd.
7 * Copyright (C) 2015 Regents of the University of California
8 * Copyright (C) 2017 SiFive

--- 10 unchanged lines hidden (view full) ---

19#include <linux/cpu.h>
20#include <linux/percpu.h>
21#include <linux/delay.h>
22#include <linux/err.h>
23#include <linux/irq.h>
24#include <linux/of.h>
25#include <linux/sched/task_stack.h>
26#include <linux/sched/mm.h>
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * SMP initialisation and IPI support
4 * Based on arch/arm64/kernel/smp.c
5 *
6 * Copyright (C) 2012 ARM Ltd.
7 * Copyright (C) 2015 Regents of the University of California
8 * Copyright (C) 2017 SiFive

--- 10 unchanged lines hidden (view full) ---

19#include <linux/cpu.h>
20#include <linux/percpu.h>
21#include <linux/delay.h>
22#include <linux/err.h>
23#include <linux/irq.h>
24#include <linux/of.h>
25#include <linux/sched/task_stack.h>
26#include <linux/sched/mm.h>
27#include <asm/clint.h>
27#include <asm/irq.h>
28#include <asm/mmu_context.h>
29#include <asm/tlbflush.h>
30#include <asm/sections.h>
31#include <asm/sbi.h>
32#include <asm/smp.h>
33
34#include "head.h"

--- 97 unchanged lines hidden (view full) ---

132
133/*
134 * C entry point for a secondary processor.
135 */
136asmlinkage __visible void __init smp_callin(void)
137{
138 struct mm_struct *mm = &init_mm;
139
28#include <asm/irq.h>
29#include <asm/mmu_context.h>
30#include <asm/tlbflush.h>
31#include <asm/sections.h>
32#include <asm/sbi.h>
33#include <asm/smp.h>
34
35#include "head.h"

--- 97 unchanged lines hidden (view full) ---

133
134/*
135 * C entry point for a secondary processor.
136 */
137asmlinkage __visible void __init smp_callin(void)
138{
139 struct mm_struct *mm = &init_mm;
140
141 if (!IS_ENABLED(CONFIG_RISCV_SBI))
142 clint_clear_ipi(cpuid_to_hartid_map(smp_processor_id()));
143
140 /* All kernel threads share the same mm context. */
141 mmgrab(mm);
142 current->active_mm = mm;
143
144 trap_init();
145 notify_cpu_starting(smp_processor_id());
146 update_siblings_masks(smp_processor_id());
147 set_cpu_online(smp_processor_id(), 1);

--- 14 unchanged lines hidden ---
144 /* All kernel threads share the same mm context. */
145 mmgrab(mm);
146 current->active_mm = mm;
147
148 trap_init();
149 notify_cpu_starting(smp_processor_id());
150 update_siblings_masks(smp_processor_id());
151 set_cpu_online(smp_processor_id(), 1);

--- 14 unchanged lines hidden ---