hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/cpuidle/cpuidle-powernv.c
....@@ -56,13 +56,10 @@
5656 return default_snooze_timeout;
5757
5858 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)
6360 continue;
6461
65
- return s->target_residency * tb_ticks_per_usec;
62
+ return drv->states[i].target_residency * tb_ticks_per_usec;
6663 }
6764
6865 return default_snooze_timeout;
....@@ -144,7 +141,7 @@
144141 struct cpuidle_driver *drv,
145142 int index)
146143 {
147
- power9_idle_type(stop_psscr_table[index].val,
144
+ arch300_idle_type(stop_psscr_table[index].val,
148145 stop_psscr_table[index].mask);
149146 return index;
150147 }
....@@ -245,20 +242,6 @@
245242 /* For power8 and below psscr_* will be 0 */
246243 stop_psscr_table[index].val = psscr_val;
247244 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;
262245 }
263246
264247 extern u32 pnv_get_supported_cpuidle_states(void);