refresh printk-Convert-logbuf_lock-to-raw_spinlock.patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/printk-Convert-logbuf_lock-to-raw_spinlock.patch b/printk-Convert-logbuf_lock-to-raw_spinlock.patch
index b99ede5..174a605 100644
--- a/printk-Convert-logbuf_lock-to-raw_spinlock.patch
+++ b/printk-Convert-logbuf_lock-to-raw_spinlock.patch
@@ -1,4 +1,4 @@
-From 4b9dbd4180a4c6b98b3940eaddde326ebdb458f4 Mon Sep 17 00:00:00 2001
+From 3a8d3deb2f4d330d3073aa1b0daf008a41153daf Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sat, 25 Jul 2009 17:50:36 +0200
Subject: [PATCH] printk: Convert logbuf_lock to raw_spinlock
@@ -9,10 +9,10 @@
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/kernel/printk.c b/kernel/printk.c
-index 8ae415b..31871ef 100644
+index 53011ba..5b4ce9f 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
-@@ -102,7 +102,7 @@ static int console_locked, console_suspended;
+@@ -101,7 +101,7 @@ static int console_locked, console_suspended;
* It is also used in interesting ways to provide interlocking in
* release_console_sem().
*/
@@ -39,7 +39,7 @@
printk(KERN_NOTICE "log_buf_len: %d\n", log_buf_len);
}
-@@ -305,18 +305,18 @@ int do_syslog(int type, char __user *buf, int len)
+@@ -290,18 +290,18 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
if (error)
goto out;
i = 0;
@@ -62,7 +62,7 @@
if (!error)
error = i;
break;
-@@ -337,7 +337,7 @@ int do_syslog(int type, char __user *buf, int len)
+@@ -324,7 +324,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
count = len;
if (count > log_buf_len)
count = log_buf_len;
@@ -71,7 +71,7 @@
if (count > logged_chars)
count = logged_chars;
if (do_clear)
-@@ -354,12 +354,12 @@ int do_syslog(int type, char __user *buf, int len)
+@@ -341,12 +341,12 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
if (j + log_buf_len < log_end)
break;
c = LOG_BUF(j);
@@ -87,7 +87,7 @@
if (error)
break;
error = i;
-@@ -542,7 +542,7 @@ static void zap_locks(void)
+@@ -535,7 +535,7 @@ static void zap_locks(void)
oops_timestamp = jiffies;
/* If a crash is occurring, make sure we can't deadlock */
@@ -96,7 +96,7 @@
/* And make sure that we print immediately */
semaphore_init(&console_sem);
}
-@@ -646,7 +646,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
+@@ -639,7 +639,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
}
}
printk_cpu = UINT_MAX;
@@ -105,7 +105,7 @@
return retval;
}
static const char recursion_bug_msg [] =
-@@ -704,7 +704,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
+@@ -697,7 +697,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
}
lockdep_off();
@@ -114,7 +114,7 @@
printk_cpu = this_cpu;
if (recursion_bug) {
-@@ -1053,14 +1053,14 @@ void release_console_sem(void)
+@@ -1046,14 +1046,14 @@ void release_console_sem(void)
console_may_schedule = 0;
for ( ; ; ) {
@@ -131,7 +131,7 @@
stop_critical_timings(); /* don't trace print latency */
call_console_drivers(_con_start, _log_end);
start_critical_timings();
-@@ -1068,7 +1068,7 @@ void release_console_sem(void)
+@@ -1061,7 +1061,7 @@ void release_console_sem(void)
}
console_locked = 0;
up(&console_sem);
@@ -140,7 +140,7 @@
if (wake_klogd)
wake_up_klogd();
}
-@@ -1286,9 +1286,9 @@ void register_console(struct console *newcon)
+@@ -1279,9 +1279,9 @@ void register_console(struct console *newcon)
* release_console_sem() will print out the buffered messages
* for us.
*/
@@ -152,7 +152,7 @@
}
release_console_sem();
-@@ -1497,10 +1497,10 @@ void kmsg_dump(enum kmsg_dump_reason reason)
+@@ -1490,10 +1490,10 @@ void kmsg_dump(enum kmsg_dump_reason reason)
/* Theoretically, the log could move on after we do this, but
there's not a lot we can do about that. The new messages
will overwrite the start of what we dump. */
@@ -166,19 +166,19 @@
if (logged_chars > end) {
s1 = log_buf + log_buf_len - logged_chars + end;
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
-index 09f5ce1..39588b3 100644
+index 027a03f..c96d500 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
-@@ -34,7 +34,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
+@@ -39,7 +39,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
* in addition to the one that will be printed by
* the entity that is holding the lock already:
*/
- if (!spin_trylock_irqsave(&rs->lock, flags))
+ if (!raw_spin_trylock_irqsave(&rs->lock, flags))
- return 1;
+ return 0;
if (!rs->begin)
-@@ -55,7 +55,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
+@@ -60,7 +60,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
rs->missed++;
ret = 0;
}