Lines Matching full:states
33 u32 *states; member
80 u32 *states = __this_cpu_read(sbi_cpuidle_data.states); in sbi_cpuidle_enter_state() local
81 u32 state = states[idx]; in sbi_cpuidle_enter_state()
95 u32 *states = data->states; in __sbi_enter_domain_idle_state() local
115 state = states[idx]; in __sbi_enter_domain_idle_state()
221 * of a shared state for the domain, assumes the domain states are all in sbi_dt_cpu_init_topology()
222 * deeper states. in sbi_dt_cpu_init_topology()
224 drv->states[state_count - 1].flags |= CPUIDLE_FLAG_RCU_IDLE; in sbi_dt_cpu_init_topology()
225 drv->states[state_count - 1].enter = sbi_enter_domain_idle_state; in sbi_dt_cpu_init_topology()
226 drv->states[state_count - 1].enter_s2idle = in sbi_dt_cpu_init_topology()
240 u32 *states; in sbi_cpuidle_dt_init_states() local
247 states = devm_kcalloc(dev, state_count, sizeof(*states), GFP_KERNEL); in sbi_cpuidle_dt_init_states()
248 if (!states) in sbi_cpuidle_dt_init_states()
257 ret = sbi_dt_parse_state_node(state_node, &states[i]); in sbi_cpuidle_dt_init_states()
263 pr_debug("sbi-state %#x index %d\n", states[i], i); in sbi_cpuidle_dt_init_states()
273 /* Store states in the per-cpu struct. */ in sbi_cpuidle_dt_init_states()
274 data->states = states; in sbi_cpuidle_dt_init_states()
302 drv->states[0].enter = sbi_cpuidle_enter_state; in sbi_cpuidle_init_cpu()
303 drv->states[0].exit_latency = 1; in sbi_cpuidle_init_cpu()
304 drv->states[0].target_residency = 1; in sbi_cpuidle_init_cpu()
305 drv->states[0].power_usage = UINT_MAX; in sbi_cpuidle_init_cpu()
306 strcpy(drv->states[0].name, "WFI"); in sbi_cpuidle_init_cpu()
307 strcpy(drv->states[0].desc, "RISC-V WFI"); in sbi_cpuidle_init_cpu()
310 * If no DT idle states are detected (ret == 0) let the driver in sbi_cpuidle_init_cpu()
318 pr_debug("HART%ld: failed to parse DT idle states\n", in sbi_cpuidle_init_cpu()
324 /* Initialize idle states from DT. */ in sbi_cpuidle_init_cpu()
327 pr_err("HART%ld: failed to init idle states\n", in sbi_cpuidle_init_cpu()
348 * topology, hence it's fine to allow domain states to be picked. in sbi_cpuidle_domain_sync_state()
357 struct genpd_power_state *state = &pd->states[pd->state_idx]; in sbi_cpuidle_pd_power_off()
403 /* Use governor for CPU PM domains if it has some states to manage. */ in sbi_pd_init()
404 pd_gov = pd->states ? &pm_domain_cpu_gov : NULL; in sbi_pd_init()