smp.h (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) | smp.h (67626fadd26977aca76d3540b80ce99233399cdf) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright IBM Corp. 1999, 2012 4 * Author(s): Denis Joseph Barrow, 5 * Martin Schwidefsky <schwidefsky@de.ibm.com>, 6 * Heiko Carstens <heiko.carstens@de.ibm.com>, 7 */ 8#ifndef __ASM_SMP_H 9#define __ASM_SMP_H 10 11#include <asm/sigp.h> | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright IBM Corp. 1999, 2012 4 * Author(s): Denis Joseph Barrow, 5 * Martin Schwidefsky <schwidefsky@de.ibm.com>, 6 * Heiko Carstens <heiko.carstens@de.ibm.com>, 7 */ 8#ifndef __ASM_SMP_H 9#define __ASM_SMP_H 10 11#include <asm/sigp.h> |
12 13#ifdef CONFIG_SMP 14 | |
15#include <asm/lowcore.h> 16 17#define raw_smp_processor_id() (S390_lowcore.cpu_nr) 18 19extern struct mutex smp_cpu_state_mutex; 20extern unsigned int smp_cpu_mt_shift; 21extern unsigned int smp_cpu_mtid; 22extern __vector128 __initdata boot_cpu_vector_save_area[__NUM_VXRS]; --- 12 unchanged lines hidden (view full) --- 35extern void smp_save_dump_cpus(void); 36extern int smp_vcpu_scheduled(int cpu); 37extern void smp_yield_cpu(int cpu); 38extern void smp_cpu_set_polarization(int cpu, int val); 39extern int smp_cpu_get_polarization(int cpu); 40extern void smp_fill_possible_mask(void); 41extern void smp_detect_cpus(void); 42 | 12#include <asm/lowcore.h> 13 14#define raw_smp_processor_id() (S390_lowcore.cpu_nr) 15 16extern struct mutex smp_cpu_state_mutex; 17extern unsigned int smp_cpu_mt_shift; 18extern unsigned int smp_cpu_mtid; 19extern __vector128 __initdata boot_cpu_vector_save_area[__NUM_VXRS]; --- 12 unchanged lines hidden (view full) --- 32extern void smp_save_dump_cpus(void); 33extern int smp_vcpu_scheduled(int cpu); 34extern void smp_yield_cpu(int cpu); 35extern void smp_cpu_set_polarization(int cpu, int val); 36extern int smp_cpu_get_polarization(int cpu); 37extern void smp_fill_possible_mask(void); 38extern void smp_detect_cpus(void); 39 |
43#else /* CONFIG_SMP */ 44 45#define smp_cpu_mtid 0 46 47static inline void smp_call_ipl_cpu(void (*func)(void *), void *data) 48{ 49 func(data); 50} 51 52static inline void smp_call_online_cpu(void (*func)(void *), void *data) 53{ 54 func(data); 55} 56 57static inline void smp_emergency_stop(void) 58{ 59} 60 61static inline int smp_find_processor_id(u16 address) { return 0; } 62static inline int smp_store_status(int cpu) { return 0; } 63static inline int smp_vcpu_scheduled(int cpu) { return 1; } 64static inline void smp_yield_cpu(int cpu) { } 65static inline void smp_fill_possible_mask(void) { } 66static inline void smp_detect_cpus(void) { } 67 68#endif /* CONFIG_SMP */ 69 | |
70static inline void smp_stop_cpu(void) 71{ 72 u16 pcpu = stap(); 73 74 for (;;) { 75 __pcpu_sigp(pcpu, SIGP_STOP, 0, NULL); 76 cpu_relax(); 77 } --- 19 unchanged lines hidden --- | 40static inline void smp_stop_cpu(void) 41{ 42 u16 pcpu = stap(); 43 44 for (;;) { 45 __pcpu_sigp(pcpu, SIGP_STOP, 0, NULL); 46 cpu_relax(); 47 } --- 19 unchanged lines hidden --- |