Lines Matching +full:cpu +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Based on arch/arm/mach-vexpress/platsmp.c, Copyright (C) 2002 ARM Ltd.
23 void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) in hi3xxx_set_cpu_jump() argument
25 cpu = cpu_logical_map(cpu); in hi3xxx_set_cpu_jump()
26 if (!cpu || !ctrl_base) in hi3xxx_set_cpu_jump()
28 writel_relaxed(__pa_symbol(jump_addr), ctrl_base + ((cpu - 1) << 2)); in hi3xxx_set_cpu_jump()
31 int hi3xxx_get_cpu_jump(int cpu) in hi3xxx_get_cpu_jump() argument
33 cpu = cpu_logical_map(cpu); in hi3xxx_get_cpu_jump()
34 if (!cpu || !ctrl_base) in hi3xxx_get_cpu_jump()
36 return readl_relaxed(ctrl_base + ((cpu - 1) << 2)); in hi3xxx_get_cpu_jump()
59 u32 offset = 0; in hi3xxx_smp_prepare_cpus() local
74 if (of_property_read_u32(np, "smp-offset", &offset) < 0) { in hi3xxx_smp_prepare_cpus()
76 pr_err("failed to find smp-offset property\n"); in hi3xxx_smp_prepare_cpus()
79 ctrl_base += offset; in hi3xxx_smp_prepare_cpus()
84 static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle) in hi3xxx_boot_secondary() argument
86 hi3xxx_set_cpu(cpu, true); in hi3xxx_boot_secondary()
87 hi3xxx_set_cpu_jump(cpu, secondary_startup); in hi3xxx_boot_secondary()
88 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); in hi3xxx_boot_secondary()
112 writel_relaxed(0xe51ff004, virt); /* ldr pc, [pc, #-4] */ in hix5hd2_set_scu_boot_addr()
117 static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle) in hix5hd2_boot_secondary() argument
123 hix5hd2_set_cpu(cpu, true); in hix5hd2_boot_secondary()
124 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); in hix5hd2_boot_secondary()
152 static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle) in hip01_boot_secondary() argument
162 node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl"); in hip01_boot_secondary()
164 return -1; in hip01_boot_secondary()
175 hip01_set_cpu(cpu, true); in hip01_boot_secondary()
185 CPU_METHOD_OF_DECLARE(hi3xxx_smp, "hisilicon,hi3620-smp", &hi3xxx_smp_ops);
186 CPU_METHOD_OF_DECLARE(hix5hd2_smp, "hisilicon,hix5hd2-smp", &hix5hd2_smp_ops);
187 CPU_METHOD_OF_DECLARE(hip01_smp, "hisilicon,hip01-smp", &hip01_smp_ops);