/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (c) 2020 Western Digital Corporation or its affiliates.3* Based on arch/arm64/include/asm/cpu_ops.h4*/5#ifndef __ASM_CPU_OPS_H6#define __ASM_CPU_OPS_H78#include <linux/init.h>9#include <linux/sched.h>10#include <linux/threads.h>1112/**13* struct cpu_operations - Callback operations for hotplugging CPUs.14*15* @cpu_start: Boots a cpu into the kernel.16* @cpu_stop: Makes a cpu leave the kernel. Must not fail. Called from17* the cpu being stopped.18* @cpu_is_stopped: Ensures a cpu has left the kernel. Called from another19* cpu.20*/21struct cpu_operations {22int (*cpu_start)(unsigned int cpu,23struct task_struct *tidle);24#ifdef CONFIG_HOTPLUG_CPU25void (*cpu_stop)(void);26int (*cpu_is_stopped)(unsigned int cpu);27#endif28};2930extern const struct cpu_operations cpu_ops_spinwait;31extern const struct cpu_operations *cpu_ops;32void __init cpu_set_ops(void);3334#endif /* ifndef __ASM_CPU_OPS_H */353637