1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2deae26bfSKyle McMartin #ifndef __ASM_SMP_H 3deae26bfSKyle McMartin #define __ASM_SMP_H 4deae26bfSKyle McMartin 5a7e6601fSHelge Deller extern int init_per_cpu(int cpuid); 6deae26bfSKyle McMartin 7deae26bfSKyle McMartin #if defined(CONFIG_SMP) 8deae26bfSKyle McMartin 9deae26bfSKyle McMartin /* Page Zero Location PDC will look for the address to branch to when we poke 10deae26bfSKyle McMartin ** slave CPUs still in "Icache loop". 11deae26bfSKyle McMartin */ 12deae26bfSKyle McMartin #define PDC_OS_BOOT_RENDEZVOUS 0x10 13deae26bfSKyle McMartin #define PDC_OS_BOOT_RENDEZVOUS_HI 0x28 14deae26bfSKyle McMartin 15deae26bfSKyle McMartin #ifndef ASSEMBLY 16deae26bfSKyle McMartin #include <linux/bitops.h> 17deae26bfSKyle McMartin #include <linux/threads.h> /* for NR_CPUS */ 18deae26bfSKyle McMartin #include <linux/cpumask.h> 19deae26bfSKyle McMartin typedef unsigned long address_t; 20deae26bfSKyle McMartin 21deae26bfSKyle McMartin 22deae26bfSKyle McMartin /* 23deae26bfSKyle McMartin * Private routines/data 24deae26bfSKyle McMartin * 25deae26bfSKyle McMartin * physical and logical are equivalent until we support CPU hotplug. 26deae26bfSKyle McMartin */ 27deae26bfSKyle McMartin #define cpu_number_map(cpu) (cpu) 28deae26bfSKyle McMartin #define cpu_logical_map(cpu) (cpu) 29deae26bfSKyle McMartin 30deae26bfSKyle McMartin extern void smp_send_all_nop(void); 31deae26bfSKyle McMartin 32deae26bfSKyle McMartin extern void arch_send_call_function_single_ipi(int cpu); 3391887a36SRusty Russell extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 34deae26bfSKyle McMartin 352a2e8202SArd Biesheuvel #define raw_smp_processor_id() (current_thread_info()->cpu) 362a2e8202SArd Biesheuvel 37deae26bfSKyle McMartin #endif /* !ASSEMBLY */ 38deae26bfSKyle McMartin 39deae26bfSKyle McMartin #else /* CONFIG_SMP */ 40deae26bfSKyle McMartin smp_send_all_nop(void)41deae26bfSKyle McMartinstatic inline void smp_send_all_nop(void) { return; } 42deae26bfSKyle McMartin 43deae26bfSKyle McMartin #endif 44deae26bfSKyle McMartin 45deae26bfSKyle McMartin #define NO_PROC_ID 0xFF /* No processor magic marker */ 46deae26bfSKyle McMartin #define ANY_PROC_ID 0xFF /* Any processor magic marker */ 47*88b3aac6SHelge Deller int __cpu_disable(void); 48*88b3aac6SHelge Deller void __cpu_die(unsigned int cpu); 49deae26bfSKyle McMartin 50deae26bfSKyle McMartin #endif /* __ASM_SMP_H */ 51