mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 04:04:19 +00:00
cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle
For all cpuidle drivers that use CPUIDLE_FLAG_RCU_IDLE, ensure that all functions that call ct_cpuidle_enter() are marked __cpuidle. ( due to lack of noinstr validation on these platforms it is entirely possible this isn't complete ) Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230112195542.274096325@infradead.org
This commit is contained in:
parent
17cc2b5525
commit
69e26b4f43
@ -17,7 +17,7 @@
|
|||||||
static int num_idle_cpus = 0;
|
static int num_idle_cpus = 0;
|
||||||
static DEFINE_RAW_SPINLOCK(cpuidle_lock);
|
static DEFINE_RAW_SPINLOCK(cpuidle_lock);
|
||||||
|
|
||||||
static int imx6q_enter_wait(struct cpuidle_device *dev,
|
static __cpuidle int imx6q_enter_wait(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int index)
|
struct cpuidle_driver *drv, int index)
|
||||||
{
|
{
|
||||||
raw_spin_lock(&cpuidle_lock);
|
raw_spin_lock(&cpuidle_lock);
|
||||||
|
@ -30,7 +30,7 @@ static int imx6sx_idle_finish(unsigned long val)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int imx6sx_enter_wait(struct cpuidle_device *dev,
|
static __cpuidle int imx6sx_enter_wait(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int index)
|
struct cpuidle_driver *drv, int index)
|
||||||
{
|
{
|
||||||
imx6_set_lpm(WAIT_UNCLOCKED);
|
imx6_set_lpm(WAIT_UNCLOCKED);
|
||||||
|
@ -224,7 +224,7 @@ static void __init save_l2x0_context(void)
|
|||||||
* 2 - CPUx L1 and logic lost + GIC lost: MPUSS OSWR
|
* 2 - CPUx L1 and logic lost + GIC lost: MPUSS OSWR
|
||||||
* 3 - CPUx L1 and logic lost + GIC + L2 lost: DEVICE OFF
|
* 3 - CPUx L1 and logic lost + GIC + L2 lost: DEVICE OFF
|
||||||
*/
|
*/
|
||||||
int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state,
|
__cpuidle int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state,
|
||||||
bool rcuidle)
|
bool rcuidle)
|
||||||
{
|
{
|
||||||
struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu);
|
struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu);
|
||||||
|
@ -175,7 +175,7 @@ static int omap34xx_do_sram_idle(unsigned long save_state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void omap_sram_idle(bool rcuidle)
|
__cpuidle void omap_sram_idle(bool rcuidle)
|
||||||
{
|
{
|
||||||
/* Variable to tell what needs to be saved and restored
|
/* Variable to tell what needs to be saved and restored
|
||||||
* in omap_sram_idle*/
|
* in omap_sram_idle*/
|
||||||
|
@ -62,7 +62,7 @@ int acpi_processor_ffh_lpi_probe(unsigned int cpu)
|
|||||||
return psci_acpi_cpu_init_idle(cpu);
|
return psci_acpi_cpu_init_idle(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
__cpuidle int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||||
{
|
{
|
||||||
u32 state = lpi->address;
|
u32 state = lpi->address;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
* Called from the CPUidle framework to program the device to the
|
* Called from the CPUidle framework to program the device to the
|
||||||
* specified target state selected by the governor.
|
* specified target state selected by the governor.
|
||||||
*/
|
*/
|
||||||
static int arm_enter_idle_state(struct cpuidle_device *dev,
|
static __cpuidle int arm_enter_idle_state(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx)
|
struct cpuidle_driver *drv, int idx)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -122,7 +122,7 @@ static int notrace bl_powerdown_finisher(unsigned long arg)
|
|||||||
* Called from the CPUidle framework to program the device to the
|
* Called from the CPUidle framework to program the device to the
|
||||||
* specified target state selected by the governor.
|
* specified target state selected by the governor.
|
||||||
*/
|
*/
|
||||||
static int bl_enter_powerdown(struct cpuidle_device *dev,
|
static __cpuidle int bl_enter_powerdown(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx)
|
struct cpuidle_driver *drv, int idx)
|
||||||
{
|
{
|
||||||
cpu_pm_enter();
|
cpu_pm_enter();
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
static int (*mvebu_v7_cpu_suspend)(int);
|
static int (*mvebu_v7_cpu_suspend)(int);
|
||||||
|
|
||||||
static int mvebu_v7_enter_idle(struct cpuidle_device *dev,
|
static __cpuidle int mvebu_v7_enter_idle(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv,
|
struct cpuidle_driver *drv,
|
||||||
int index)
|
int index)
|
||||||
{
|
{
|
||||||
|
@ -49,12 +49,7 @@ static inline u32 psci_get_domain_state(void)
|
|||||||
return __this_cpu_read(domain_state);
|
return __this_cpu_read(domain_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int psci_enter_state(int idx, u32 state)
|
static __cpuidle int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
|
||||||
{
|
|
||||||
return CPU_PM_CPU_IDLE_ENTER_PARAM(psci_cpu_suspend_enter, idx, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
|
|
||||||
struct cpuidle_driver *drv, int idx,
|
struct cpuidle_driver *drv, int idx,
|
||||||
bool s2idle)
|
bool s2idle)
|
||||||
{
|
{
|
||||||
@ -192,12 +187,12 @@ static void psci_idle_init_cpuhp(void)
|
|||||||
pr_warn("Failed %d while setup cpuhp state\n", err);
|
pr_warn("Failed %d while setup cpuhp state\n", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int psci_enter_idle_state(struct cpuidle_device *dev,
|
static __cpuidle int psci_enter_idle_state(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx)
|
struct cpuidle_driver *drv, int idx)
|
||||||
{
|
{
|
||||||
u32 *state = __this_cpu_read(psci_cpuidle_data.psci_states);
|
u32 *state = __this_cpu_read(psci_cpuidle_data.psci_states);
|
||||||
|
|
||||||
return psci_enter_state(idx, state[idx]);
|
return CPU_PM_CPU_IDLE_ENTER_PARAM(psci_cpu_suspend_enter, idx, state[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id psci_idle_state_match[] = {
|
static const struct of_device_id psci_idle_state_match[] = {
|
||||||
|
@ -58,7 +58,7 @@ static int qcom_cpu_spc(struct spm_driver_data *drv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spm_enter_idle_state(struct cpuidle_device *dev,
|
static __cpuidle int spm_enter_idle_state(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx)
|
struct cpuidle_driver *drv, int idx)
|
||||||
{
|
{
|
||||||
struct cpuidle_qcom_spm_data *data = container_of(drv, struct cpuidle_qcom_spm_data,
|
struct cpuidle_qcom_spm_data *data = container_of(drv, struct cpuidle_qcom_spm_data,
|
||||||
|
@ -93,7 +93,7 @@ static int sbi_suspend(u32 state)
|
|||||||
return sbi_suspend_finisher(state, 0, 0);
|
return sbi_suspend_finisher(state, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sbi_cpuidle_enter_state(struct cpuidle_device *dev,
|
static __cpuidle int sbi_cpuidle_enter_state(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx)
|
struct cpuidle_driver *drv, int idx)
|
||||||
{
|
{
|
||||||
u32 *states = __this_cpu_read(sbi_cpuidle_data.states);
|
u32 *states = __this_cpu_read(sbi_cpuidle_data.states);
|
||||||
@ -106,7 +106,7 @@ static int sbi_cpuidle_enter_state(struct cpuidle_device *dev,
|
|||||||
idx, state);
|
idx, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __sbi_enter_domain_idle_state(struct cpuidle_device *dev,
|
static __cpuidle int __sbi_enter_domain_idle_state(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int idx,
|
struct cpuidle_driver *drv, int idx,
|
||||||
bool s2idle)
|
bool s2idle)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ static int tegra_cpuidle_coupled_barrier(struct cpuidle_device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tegra_cpuidle_state_enter(struct cpuidle_device *dev,
|
static __cpuidle int tegra_cpuidle_state_enter(struct cpuidle_device *dev,
|
||||||
int index, unsigned int cpu)
|
int index, unsigned int cpu)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@ -226,7 +226,7 @@ static int tegra_cpuidle_adjust_state_index(int index, unsigned int cpu)
|
|||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tegra_cpuidle_enter(struct cpuidle_device *dev,
|
static __cpuidle int tegra_cpuidle_enter(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv,
|
struct cpuidle_driver *drv,
|
||||||
int index)
|
int index)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user