| .. | .. |
|---|
| 56 | 56 | return default_snooze_timeout; |
|---|
| 57 | 57 | |
|---|
| 58 | 58 | for (i = index + 1; i < drv->state_count; i++) { |
|---|
| 59 | | - struct cpuidle_state *s = &drv->states[i]; |
|---|
| 60 | | - struct cpuidle_state_usage *su = &dev->states_usage[i]; |
|---|
| 61 | | - |
|---|
| 62 | | - if (s->disabled || su->disable) |
|---|
| 59 | + if (dev->states_usage[i].disable) |
|---|
| 63 | 60 | continue; |
|---|
| 64 | 61 | |
|---|
| 65 | | - return s->target_residency * tb_ticks_per_usec; |
|---|
| 62 | + return drv->states[i].target_residency * tb_ticks_per_usec; |
|---|
| 66 | 63 | } |
|---|
| 67 | 64 | |
|---|
| 68 | 65 | return default_snooze_timeout; |
|---|
| .. | .. |
|---|
| 144 | 141 | struct cpuidle_driver *drv, |
|---|
| 145 | 142 | int index) |
|---|
| 146 | 143 | { |
|---|
| 147 | | - power9_idle_type(stop_psscr_table[index].val, |
|---|
| 144 | + arch300_idle_type(stop_psscr_table[index].val, |
|---|
| 148 | 145 | stop_psscr_table[index].mask); |
|---|
| 149 | 146 | return index; |
|---|
| 150 | 147 | } |
|---|
| .. | .. |
|---|
| 245 | 242 | /* For power8 and below psscr_* will be 0 */ |
|---|
| 246 | 243 | stop_psscr_table[index].val = psscr_val; |
|---|
| 247 | 244 | stop_psscr_table[index].mask = psscr_mask; |
|---|
| 248 | | -} |
|---|
| 249 | | - |
|---|
| 250 | | -/* |
|---|
| 251 | | - * Returns 0 if prop1_len == prop2_len. Else returns -1 |
|---|
| 252 | | - */ |
|---|
| 253 | | -static inline int validate_dt_prop_sizes(const char *prop1, int prop1_len, |
|---|
| 254 | | - const char *prop2, int prop2_len) |
|---|
| 255 | | -{ |
|---|
| 256 | | - if (prop1_len == prop2_len) |
|---|
| 257 | | - return 0; |
|---|
| 258 | | - |
|---|
| 259 | | - pr_warn("cpuidle-powernv: array sizes don't match for %s and %s\n", |
|---|
| 260 | | - prop1, prop2); |
|---|
| 261 | | - return -1; |
|---|
| 262 | 245 | } |
|---|
| 263 | 246 | |
|---|
| 264 | 247 | extern u32 pnv_get_supported_cpuidle_states(void); |
|---|