.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/cpuidle.h> |
---|
.. | .. |
---|
27 | 24 | imx6_set_lpm(WAIT_UNCLOCKED); |
---|
28 | 25 | raw_spin_unlock(&cpuidle_lock); |
---|
29 | 26 | |
---|
| 27 | + rcu_idle_enter(); |
---|
30 | 28 | cpu_do_idle(); |
---|
| 29 | + rcu_idle_exit(); |
---|
31 | 30 | |
---|
32 | 31 | raw_spin_lock(&cpuidle_lock); |
---|
33 | 32 | if (num_idle_cpus-- == num_online_cpus()) |
---|
.. | .. |
---|
47 | 46 | { |
---|
48 | 47 | .exit_latency = 50, |
---|
49 | 48 | .target_residency = 75, |
---|
50 | | - .flags = CPUIDLE_FLAG_TIMER_STOP, |
---|
| 49 | + .flags = CPUIDLE_FLAG_TIMER_STOP | CPUIDLE_FLAG_RCU_IDLE, |
---|
51 | 50 | .enter = imx6q_enter_wait, |
---|
52 | 51 | .name = "WAIT", |
---|
53 | 52 | .desc = "Clock off", |
---|
.. | .. |
---|
65 | 64 | */ |
---|
66 | 65 | void imx6q_cpuidle_fec_irqs_used(void) |
---|
67 | 66 | { |
---|
68 | | - imx6q_cpuidle_driver.states[1].disabled = true; |
---|
| 67 | + cpuidle_driver_state_disabled(&imx6q_cpuidle_driver, 1, true); |
---|
69 | 68 | } |
---|
70 | 69 | EXPORT_SYMBOL_GPL(imx6q_cpuidle_fec_irqs_used); |
---|
71 | 70 | |
---|
72 | 71 | void imx6q_cpuidle_fec_irqs_unused(void) |
---|
73 | 72 | { |
---|
74 | | - imx6q_cpuidle_driver.states[1].disabled = false; |
---|
| 73 | + cpuidle_driver_state_disabled(&imx6q_cpuidle_driver, 1, false); |
---|
75 | 74 | } |
---|
76 | 75 | EXPORT_SYMBOL_GPL(imx6q_cpuidle_fec_irqs_unused); |
---|
77 | 76 | |
---|