]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: add preemption point after each opcode parse
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Thu, 25 Sep 2008 17:40:30 +0000 (21:40 +0400)
committerLen Brown <len.brown@intel.com>
Thu, 23 Oct 2008 03:14:41 +0000 (23:14 -0400)
Reference: http://marc.info/?l=linux-acpi&m=122236382701062&w=2

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/parser/psloop.c
include/acpi/acmacros.h
include/acpi/platform/aclinux.h

index c06238e55d98bebd1582536a684949e194c74229..4647039a0d8a2c7183f1cc25653a673cf7657ff4 100644 (file)
@@ -719,6 +719,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
                *op = NULL;
        }
 
+       ACPI_PREEMPTION_POINT();
+
        return_ACPI_STATUS(AE_OK);
 }
 
index 2106f9136cce1520582f5a066b1747ab8242e4d8..a1e3240bf460ba10950014559edf267eaa563a01 100644 (file)
@@ -685,4 +685,9 @@ struct acpi_integer_overlay {
 
 #endif                         /* ACPI_DBG_TRACK_ALLOCATIONS */
 
+/* Preemption point */
+#ifndef ACPI_PREEMPTION_POINT
+#define ACPI_PREEMPTION_POINT() /* no preemption */
+#endif
+
 #endif                         /* ACMACROS_H */
index 9af4645986829bbf00ea5b77d3aeae2f818763ed..029c8c06c151ab4f7153d4aeb143bb51ed4d258c 100644 (file)
@@ -53,6 +53,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/ctype.h>
+#include <linux/sched.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/div64.h>
@@ -137,4 +138,9 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
 #define ACPI_ALLOCATE_ZEROED(a)        acpi_os_allocate_zeroed(a)
 #define ACPI_FREE(a)           kfree(a)
 
+/*
+ * We need to show where it is safe to preempt execution of ACPICA
+ */
+#define ACPI_PREEMPTION_POINT()        cond_resched()
+
 #endif                         /* __ACLINUX_H__ */