From: Wu Fengguang Date: Wed, 26 Nov 2008 06:35:22 +0000 (+0800) Subject: ACPI: don't cond_resched() when irqs_disabled() X-Git-Url: http://git.maemo.org/git/?p=h-e-n;a=commitdiff_plain;h=abe1dfab60e1839d115930286cb421f5a5b193f3 ACPI: don't cond_resched() when irqs_disabled() The ACPI interpreter usually runs with irqs enabled. However, during suspend/resume it runs with irqs disabled to evaluate _GTS/_BFS, as well as by irqrouter_resume() which evaluates _CRS, _PRS, _SRS. http://bugzilla.kernel.org/show_bug.cgi?id=12252 Signed-off-by: Wu Fengguang Signed-off-by: Len Brown --- diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 029c8c0..0515e75 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -141,6 +141,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) /* * We need to show where it is safe to preempt execution of ACPICA */ -#define ACPI_PREEMPTION_POINT() cond_resched() +#define ACPI_PREEMPTION_POINT() \ + do { \ + if (!irqs_disabled()) \ + cond_resched(); \ + } while (0) #endif /* __ACLINUX_H__ */