From f3b302527e8e004d392dfc5f7df9c94ef735a3a4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 5 Sep 2003 19:10:57 +0100 Subject: [PATCH] [ARM] Don't sleep in cpufreq code if IRQs are disabled (during resume.) --- arch/arm/mach-sa1100/cpu-sa1110.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 87a0d789e34ad..edb5eb8c9cd5a 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c @@ -270,8 +270,12 @@ static int sa1110_target(struct cpufreq_policy *policy, * We wait 20ms to be safe. */ sdram_set_refresh(2); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(20 * HZ / 1000); + if (!irqs_disabled()) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(20 * HZ / 1000); + } else { + mdelay(20); + } /* * Reprogram the DRAM timings with interrupts disabled, and -- 2.53.0