aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-09-25 13:40:30 -0400
committerLen Brown <len.brown@intel.com>2008-10-22 23:14:41 -0400
commit8bd108d14604d9c95000751e6c6ecbd11ea6ed40 (patch)
treeaf101e1f12330fe76d5a973851ea84fb1c2eb220
parenteec935490172dbfa1a32647f9deb2b66a66f2741 (diff)
ACPICA: add preemption point after each opcode parse
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>
-rw-r--r--drivers/acpi/parser/psloop.c2
-rw-r--r--include/acpi/acmacros.h5
-rw-r--r--include/acpi/platform/aclinux.h6
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c
index c06238e55d98..4647039a0d8a 100644
--- a/drivers/acpi/parser/psloop.c
+++ b/drivers/acpi/parser/psloop.c
@@ -719,6 +719,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
719 *op = NULL; 719 *op = NULL;
720 } 720 }
721 721
722 ACPI_PREEMPTION_POINT();
723
722 return_ACPI_STATUS(AE_OK); 724 return_ACPI_STATUS(AE_OK);
723} 725}
724 726
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 2106f9136cce..a1e3240bf460 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -685,4 +685,9 @@ struct acpi_integer_overlay {
685 685
686#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 686#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
687 687
688/* Preemption point */
689#ifndef ACPI_PREEMPTION_POINT
690#define ACPI_PREEMPTION_POINT() /* no preemption */
691#endif
692
688#endif /* ACMACROS_H */ 693#endif /* ACMACROS_H */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 9af464598682..029c8c06c151 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -53,6 +53,7 @@
53#include <linux/kernel.h> 53#include <linux/kernel.h>
54#include <linux/module.h> 54#include <linux/module.h>
55#include <linux/ctype.h> 55#include <linux/ctype.h>
56#include <linux/sched.h>
56#include <asm/system.h> 57#include <asm/system.h>
57#include <asm/atomic.h> 58#include <asm/atomic.h>
58#include <asm/div64.h> 59#include <asm/div64.h>
@@ -137,4 +138,9 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
137#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) 138#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
138#define ACPI_FREE(a) kfree(a) 139#define ACPI_FREE(a) kfree(a)
139 140
141/*
142 * We need to show where it is safe to preempt execution of ACPICA
143 */
144#define ACPI_PREEMPTION_POINT() cond_resched()
145
140#endif /* __ACLINUX_H__ */ 146#endif /* __ACLINUX_H__ */