linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Wang Long <long.wanglong@huawei.com>
Cc: keescook@chromium.org, ccross@android.com, anton@enomsg.org,
	tony.luck@intel.com, linux-kernel@vger.kernel.org,
	peifeiyue@huawei.com, morgan.wang@huawei.com,
	sergiu@chromium.org, salyzyn@android.com,
	anton.vorontsov@linaro.org, marco.stornelli@gmail.com
Subject: Re: [PATCH] ramoops: make it possible to change mem_type param.
Date: Mon, 30 Mar 2015 09:31:09 -0700	[thread overview]
Message-ID: <20150330163108.GH10805@atomide.com> (raw)
In-Reply-To: <1427447958-42138-1-git-send-email-long.wanglong@huawei.com>

* Wang Long <long.wanglong@huawei.com> [150327 02:43]:
> If we set ramoops.mem_type=1 in command line, the current
> code can not change mem_type to 1, because it is assigned
> to 0 in function ramoops_register_dummy.
> 
> This patch make it possible to change mem_type parameter
> in command line.
> 
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
>
> ---
>  fs/pstore/ram.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
> index 44a549b..65e0532 100644
> --- a/fs/pstore/ram.c
> +++ b/fs/pstore/ram.c
> @@ -65,7 +65,7 @@ module_param(mem_size, ulong, 0400);
>  MODULE_PARM_DESC(mem_size,
>  		"size of reserved RAM used to store oops/panic logs");
>  
> -static unsigned int mem_type;
> +static unsigned int mem_type = 0;
>  module_param(mem_type, uint, 0600);
>  MODULE_PARM_DESC(mem_type,
>  		"set to 1 to try to use unbuffered memory (default 0)");

The BSS gets cleared during init so no need to initialize the mem_type
separately here and you can drop the change above AFAIK.

> @@ -608,7 +608,7 @@ static void ramoops_register_dummy(void)
>  
>  	dummy_data->mem_size = mem_size;
>  	dummy_data->mem_address = mem_address;
> -	dummy_data->mem_type = 0;
> +	dummy_data->mem_type = mem_type;
>  	dummy_data->record_size = record_size;
>  	dummy_data->console_size = ramoops_console_size;
>  	dummy_data->ftrace_size = ramoops_ftrace_size;

For this change sounds like a bug. Sorry I was not able to test
that with the hardware I have here. Good thing you have been able
to verify it with your hardware. If you drop the first part and
repost, please also feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

  reply	other threads:[~2015-03-30 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  9:19 [PATCH] ramoops: make it possible to change mem_type param Wang Long
2015-03-30 16:31 ` Tony Lindgren [this message]
2015-03-31  1:22   ` long.wanglong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150330163108.GH10805@atomide.com \
    --to=tony@atomide.com \
    --cc=anton.vorontsov@linaro.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=long.wanglong@huawei.com \
    --cc=marco.stornelli@gmail.com \
    --cc=morgan.wang@huawei.com \
    --cc=peifeiyue@huawei.com \
    --cc=salyzyn@android.com \
    --cc=sergiu@chromium.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).