1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2013 Imagination Technologies
4 * Author: Paul Burton <paul.burton@mips.com>
7 #ifndef __MIPS_ASM_SMP_CPS_H__
8 #define __MIPS_ASM_SMP_CPS_H__
10 #define CPS_ENTRY_PATCH_INSNS 6
14 struct vpe_boot_config
{
20 struct core_boot_config
{
22 struct vpe_boot_config
*vpe_config
;
25 extern struct core_boot_config
*mips_cps_core_bootcfg
;
27 extern void mips_cps_core_boot(int cca
, void __iomem
*gcr_base
);
28 extern void mips_cps_core_init(void);
30 extern void mips_cps_boot_vpes(struct core_boot_config
*cfg
, unsigned vpe
);
32 extern void mips_cps_pm_save(void);
33 extern void mips_cps_pm_restore(void);
35 extern void excep_tlbfill(void);
36 extern void excep_xtlbfill(void);
37 extern void excep_cache(void);
38 extern void excep_genex(void);
39 extern void excep_intex(void);
40 extern void excep_ejtag(void);
42 #ifdef CONFIG_MIPS_CPS
44 extern bool mips_cps_smp_in_use(void);
46 #else /* !CONFIG_MIPS_CPS */
48 static inline bool mips_cps_smp_in_use(void) { return false; }
50 #endif /* !CONFIG_MIPS_CPS */
52 #else /* __ASSEMBLY__ */
54 .extern mips_cps_bootcfg
;
56 #endif /* __ASSEMBLY__ */
57 #endif /* __MIPS_ASM_SMP_CPS_H__ */