smp-cps.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2013 Imagination Technologies
  3. * Author: Paul Burton <paul.burton@imgtec.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #ifndef __MIPS_ASM_SMP_CPS_H__
  11. #define __MIPS_ASM_SMP_CPS_H__
  12. #ifndef __ASSEMBLY__
  13. struct vpe_boot_config {
  14. unsigned long pc;
  15. unsigned long sp;
  16. unsigned long gp;
  17. };
  18. struct core_boot_config {
  19. atomic_t vpe_mask;
  20. struct vpe_boot_config *vpe_config;
  21. };
  22. extern struct core_boot_config *mips_cps_core_bootcfg;
  23. extern void mips_cps_core_entry(void);
  24. extern void mips_cps_core_init(void);
  25. extern void mips_cps_boot_vpes(struct core_boot_config *cfg, unsigned vpe);
  26. extern void mips_cps_pm_save(void);
  27. extern void mips_cps_pm_restore(void);
  28. #ifdef CONFIG_MIPS_CPS
  29. extern bool mips_cps_smp_in_use(void);
  30. #else /* !CONFIG_MIPS_CPS */
  31. static inline bool mips_cps_smp_in_use(void) { return false; }
  32. #endif /* !CONFIG_MIPS_CPS */
  33. #else /* __ASSEMBLY__ */
  34. .extern mips_cps_bootcfg;
  35. #endif /* __ASSEMBLY__ */
  36. #endif /* __MIPS_ASM_SMP_CPS_H__ */