On Tue, Jun 17, 2014 at 5:18 PM, Luis R. Rodriguez <mcg...@suse.com> wrote:
> @@ -828,29 +829,68 @@ 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)
> +/*
> + * CONFIG_LOG_BUF_SHIFT would be architecture aligned, anything > than it and
> + * a multiple of two of it upkeeps the alignment.
> + */
> +static void __init log_buf_len_align(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_align(size);
>
>         return 0;
>  }
>  early_param("log_buf_len", log_buf_len_setup);

This could go as a separate patch first too, which would make the
addition very clean.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to