| .. | .. |
|---|
| 28 | 28 | #define threads_per_core 1 |
|---|
| 29 | 29 | #define threads_per_subcore 1 |
|---|
| 30 | 30 | #define threads_shift 0 |
|---|
| 31 | +#define has_big_cores 0 |
|---|
| 31 | 32 | #define threads_core_mask (*get_cpu_mask(0)) |
|---|
| 32 | 33 | #endif |
|---|
| 33 | 34 | |
|---|
| .. | .. |
|---|
| 97 | 98 | return cpu | (threads_per_core - 1); |
|---|
| 98 | 99 | } |
|---|
| 99 | 100 | |
|---|
| 101 | +/* |
|---|
| 102 | + * tlb_thread_siblings are siblings which share a TLB. This is not |
|---|
| 103 | + * architected, is not something a hypervisor could emulate and a future |
|---|
| 104 | + * CPU may change behaviour even in compat mode, so this should only be |
|---|
| 105 | + * used on PowerNV, and only with care. |
|---|
| 106 | + */ |
|---|
| 107 | +static inline int cpu_first_tlb_thread_sibling(int cpu) |
|---|
| 108 | +{ |
|---|
| 109 | + if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8)) |
|---|
| 110 | + return cpu & ~0x6; /* Big Core */ |
|---|
| 111 | + else |
|---|
| 112 | + return cpu_first_thread_sibling(cpu); |
|---|
| 113 | +} |
|---|
| 114 | + |
|---|
| 115 | +static inline int cpu_last_tlb_thread_sibling(int cpu) |
|---|
| 116 | +{ |
|---|
| 117 | + if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8)) |
|---|
| 118 | + return cpu | 0x6; /* Big Core */ |
|---|
| 119 | + else |
|---|
| 120 | + return cpu_last_thread_sibling(cpu); |
|---|
| 121 | +} |
|---|
| 122 | + |
|---|
| 123 | +static inline int cpu_tlb_thread_sibling_step(void) |
|---|
| 124 | +{ |
|---|
| 125 | + if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8)) |
|---|
| 126 | + return 2; /* Big Core */ |
|---|
| 127 | + else |
|---|
| 128 | + return 1; |
|---|
| 129 | +} |
|---|
| 130 | + |
|---|
| 100 | 131 | static inline u32 get_tensr(void) |
|---|
| 101 | 132 | { |
|---|
| 102 | 133 | #ifdef CONFIG_BOOKE |
|---|