Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (C) 2013 Imagination Technologies
4 * Author: Paul Burton <paul.burton@mips.com>
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 __ASSEMBLY__
13
14struct vpe_boot_config {
15 unsigned long pc;
16 unsigned long sp;
17 unsigned long gp;
18};
19
20struct core_boot_config {
21 atomic_t vpe_mask;
22 struct vpe_boot_config *vpe_config;
23};
24
25struct cluster_boot_config {
26 unsigned long *core_power;
27 struct core_boot_config *core_config;
28};
29
30extern struct cluster_boot_config *mips_cps_cluster_bootcfg;
31
32extern void mips_cps_core_boot(int cca, void __iomem *gcr_base);
33extern void mips_cps_core_init(void);
34
35extern void mips_cps_boot_vpes(struct core_boot_config *cfg, unsigned vpe);
36
37extern void mips_cps_pm_save(void);
38extern void mips_cps_pm_restore(void);
39
40extern void excep_tlbfill(void);
41extern void excep_xtlbfill(void);
42extern void excep_cache(void);
43extern void excep_genex(void);
44extern void excep_intex(void);
45extern void excep_ejtag(void);
46
47#ifdef CONFIG_MIPS_CPS
48
49extern bool mips_cps_smp_in_use(void);
50
51#else /* !CONFIG_MIPS_CPS */
52
53static inline bool mips_cps_smp_in_use(void) { return false; }
54
55#endif /* !CONFIG_MIPS_CPS */
56
57#else /* __ASSEMBLY__ */
58
59.extern mips_cps_bootcfg;
60
61#endif /* __ASSEMBLY__ */
62#endif /* __MIPS_ASM_SMP_CPS_H__ */