diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-06-14 20:42:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-06-14 20:42:33 +0000 |
commit | f88360279f91387dc61725226ad38c3c95d3790a (patch) | |
tree | 66d21f3483914eb7e674c45f3497ab8912094ac0 /target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch | |
parent | a6d8f8be9e06c5ffb03f815c8c76ba743c64aa3d (diff) | |
download | mtk-20170518-f88360279f91387dc61725226ad38c3c95d3790a.zip mtk-20170518-f88360279f91387dc61725226ad38c3c95d3790a.tar.gz mtk-20170518-f88360279f91387dc61725226ad38c3c95d3790a.tar.bz2 |
add the 'goldfish' target, useful for experimenting with virtual phone hardware (includes the emulator)
SVN-Revision: 16459
Diffstat (limited to 'target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch')
-rw-r--r-- | target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch b/target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch new file mode 100644 index 0000000..126cac0 --- /dev/null +++ b/target/linux/goldfish/patches-2.6.30/0058-sched-Enable-might_sleep-before-initializing-driver.patch @@ -0,0 +1,43 @@ +From 10276fd993c6e4c92d8086a6ccd0c9e0ff53b053 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com> +Date: Wed, 10 Dec 2008 20:06:28 -0800 +Subject: [PATCH 058/134] sched: Enable might_sleep before initializing drivers. +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +This allows detection of init bugs in built-in drivers. + +Signed-off-by: Arve Hjønnevåg <arve@android.com> +--- + kernel/sched.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -9064,13 +9064,23 @@ void __init sched_init(void) + } + + #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP ++static int __might_sleep_init_called; ++int __init __might_sleep_init(void) ++{ ++ __might_sleep_init_called = 1; ++ return 0; ++} ++early_initcall(__might_sleep_init); ++ + void __might_sleep(char *file, int line) + { + #ifdef in_atomic + static unsigned long prev_jiffy; /* ratelimiting */ + +- if ((!in_atomic() && !irqs_disabled()) || +- system_state != SYSTEM_RUNNING || oops_in_progress) ++ if ((!in_atomic() && !irqs_disabled()) || oops_in_progress) ++ return; ++ if (system_state != SYSTEM_RUNNING && ++ (!__might_sleep_init_called || system_state != SYSTEM_BOOTING)) + return; + if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy) + return; |