|
@@ -828,15 +828,21 @@ void log_buf_kexec_setup(void)
|
|
|
/* requested log_buf_len from kernel cmdline */
|
|
|
static unsigned long __initdata new_log_buf_len;
|
|
|
|
|
|
-/* save requested log_buf_len since it's too early to process it */
|
|
|
-static int __init log_buf_len_setup(char *str)
|
|
|
+/* we practice scaling the ring buffer by powers of 2 */
|
|
|
+static void __init log_buf_len_update(unsigned size)
|
|
|
{
|
|
|
- unsigned size = memparse(str, &str);
|
|
|
-
|
|
|
if (size)
|
|
|
size = roundup_pow_of_two(size);
|
|
|
if (size > log_buf_len)
|
|
|
new_log_buf_len = size;
|
|
|
+}
|
|
|
+
|
|
|
+/* save requested log_buf_len since it's too early to process it */
|
|
|
+static int __init log_buf_len_setup(char *str)
|
|
|
+{
|
|
|
+ unsigned size = memparse(str, &str);
|
|
|
+
|
|
|
+ log_buf_len_update(size);
|
|
|
|
|
|
return 0;
|
|
|
}
|