ARM64: dts: rk3399: prevent out of bounds accesses to array
authorChen Liang <cl@rock-chips.com>
Mon, 11 Jul 2016 09:41:31 +0000 (17:41 +0800)
committerChen Liang <cl@rock-chips.com>
Mon, 11 Jul 2016 09:41:31 +0000 (17:41 +0800)
commit91b9817e6d74782b7c234a80d5182050b0f05209
tree0a41e9cda72218a765d8656754eae83d48ede02a
parentd4773e1407b6d59a202bd4ce8acc83deaceafa29
ARM64: dts: rk3399: prevent out of bounds accesses to array

It will return state++ when get the idle state, so we need fill
anothor idle power(=WFI) in the parameter of EAS, code as below:

static int group_idle_state(struct sched_group *sg)
{
        int i, state = INT_MAX;

        /* Find the shallowest idle state in the sched group. */
        for_each_cpu(i, sched_group_cpus(sg))
                state = min(state, idle_get_state_idx(cpu_rq(i)));

        /* Take non-cpuidle idling into account (active idle/arch_cpu_idle()) */
        state++;

        return state;
}

Change-Id: I9293da1379746768823df4e75a7478aa50fc0e87
Signed-off-by: Chen Liang <cl@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi
arch/arm64/boot/dts/rockchip/rk3399-sched-energy.dtsi