| 1 |
/* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2013 Imagination Technologies |
| 4 |
* Author: Paul Burton <[email protected]> |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef __MIPS_ASM_SMP_CPS_H__ |
| 8 |
#define __MIPS_ASM_SMP_CPS_H__ |
| 9 |
|
| 10 |
#define CPS_ENTRY_PATCH_INSNS 6 |
| 11 |
|
| 12 |
#ifndef __ASSEMBLER__ |
| 13 |
|
| 14 |
struct vpe_boot_config { |
| 15 |
unsigned long pc; |
| 16 |
unsigned long sp; |
| 17 |
unsigned long gp; |
| 18 |
}; |
| 19 |
|
| 20 |
struct core_boot_config { |
| 21 |
atomic_t vpe_mask; |
| 22 |
struct vpe_boot_config *vpe_config; |
| 23 |
}; |
| 24 |
|
| 25 |
struct cluster_boot_config { |
| 26 |
unsigned long *core_power; |
| 27 |
struct cpumask cpumask; |
| 28 |
struct core_boot_config *core_config; |
| 29 |
}; |
| 30 |
|
| 31 |
extern struct cluster_boot_config *mips_cps_cluster_bootcfg; |
| 32 |
|
| 33 |
extern void mips_cps_core_boot(int cca, void __iomem *gcr_base); |
| 34 |
extern void mips_cps_core_init(void); |
| 35 |
|
| 36 |
extern void mips_cps_boot_vpes(struct core_boot_config *cfg, unsigned vpe); |
| 37 |
|
| 38 |
extern void mips_cps_pm_save(void); |
| 39 |
extern void mips_cps_pm_restore(void); |
| 40 |
|
| 41 |
extern void excep_tlbfill(void); |
| 42 |
extern void excep_xtlbfill(void); |
| 43 |
extern void excep_cache(void); |
| 44 |
extern void excep_genex(void); |
| 45 |
extern void excep_intex(void); |
| 46 |
extern void excep_ejtag(void); |
| 47 |
|
| 48 |
#ifdef CONFIG_MIPS_CPS |
| 49 |
|
| 50 |
extern bool mips_cps_smp_in_use(void); |
| 51 |
|
| 52 |
#else /* !CONFIG_MIPS_CPS */ |
| 53 |
|
| 54 |
static inline bool mips_cps_smp_in_use(void) { return false; } |
| 55 |
|
| 56 |
#endif /* !CONFIG_MIPS_CPS */ |
| 57 |
|
| 58 |
#else /* __ASSEMBLER__ */ |
| 59 |
|
| 60 |
.extern mips_cps_bootcfg; |
| 61 |
|
| 62 |
#endif /* __ASSEMBLER__ */ |
| 63 |
#endif /* __MIPS_ASM_SMP_CPS_H__ */ |