smtc.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _ASM_SMTC_MT_H
  2. #define _ASM_SMTC_MT_H
  3. /*
  4. * Definitions for SMTC multitasking on MIPS MT cores
  5. */
  6. #include <asm/mips_mt.h>
  7. /*
  8. * System-wide SMTC status information
  9. */
  10. extern unsigned int smtc_status;
  11. #define SMTC_TLB_SHARED 0x00000001
  12. #define SMTC_MTC_ACTIVE 0x00000002
  13. /*
  14. * TLB/ASID Management information
  15. */
  16. #define MAX_SMTC_TLBS 2
  17. #define MAX_SMTC_ASIDS 256
  18. #if NR_CPUS <= 8
  19. typedef char asiduse;
  20. #else
  21. #if NR_CPUS <= 16
  22. typedef short asiduse;
  23. #else
  24. typedef long asiduse;
  25. #endif
  26. #endif
  27. extern asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS];
  28. void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu);
  29. void smtc_flush_tlb_asid(unsigned long asid);
  30. extern int mipsmt_build_cpu_map(int startslot);
  31. extern void mipsmt_prepare_cpus(void);
  32. extern void smtc_smp_finish(void);
  33. extern void smtc_boot_secondary(int cpu, struct task_struct *t);
  34. /*
  35. * Sharing the TLB between multiple VPEs means that the
  36. * "random" index selection function is not allowed to
  37. * select the current value of the Index register. To
  38. * avoid additional TLB pressure, the Index registers
  39. * are "parked" with an non-Valid value.
  40. */
  41. #define PARKED_INDEX ((unsigned int)0x80000000)
  42. #endif /* _ASM_SMTC_MT_H */