smp-cps.h 998 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2013 Imagination Technologies
  4. * Author: Paul Burton <[email protected]>
  5. */
  6. #ifndef __MIPS_ASM_SMP_CPS_H__
  7. #define __MIPS_ASM_SMP_CPS_H__
  8. #ifndef __ASSEMBLY__
  9. struct vpe_boot_config {
  10. unsigned long pc;
  11. unsigned long sp;
  12. unsigned long gp;
  13. };
  14. struct core_boot_config {
  15. atomic_t vpe_mask;
  16. struct vpe_boot_config *vpe_config;
  17. };
  18. extern struct core_boot_config *mips_cps_core_bootcfg;
  19. extern void mips_cps_core_entry(void);
  20. extern void mips_cps_core_init(void);
  21. extern void mips_cps_boot_vpes(struct core_boot_config *cfg, unsigned vpe);
  22. extern void mips_cps_pm_save(void);
  23. extern void mips_cps_pm_restore(void);
  24. #ifdef CONFIG_MIPS_CPS
  25. extern bool mips_cps_smp_in_use(void);
  26. #else /* !CONFIG_MIPS_CPS */
  27. static inline bool mips_cps_smp_in_use(void) { return false; }
  28. #endif /* !CONFIG_MIPS_CPS */
  29. #else /* __ASSEMBLY__ */
  30. .extern mips_cps_bootcfg;
  31. #endif /* __ASSEMBLY__ */
  32. #endif /* __MIPS_ASM_SMP_CPS_H__ */