From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754075AbbCaB0T (ORCPT ); Mon, 30 Mar 2015 21:26:19 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:48104 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753579AbbCaB0P (ORCPT ); Mon, 30 Mar 2015 21:26:15 -0400 Message-ID: <5519F6DF.1000701@huawei.com> Date: Tue, 31 Mar 2015 09:22:39 +0800 From: "long.wanglong" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Tony Lindgren CC: , , , , , , , , , , Subject: Re: [PATCH] ramoops: make it possible to change mem_type param. References: <1427447958-42138-1-git-send-email-long.wanglong@huawei.com> <20150330163108.GH10805@atomide.com> In-Reply-To: <20150330163108.GH10805@atomide.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.88.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/3/31 0:31, Tony Lindgren wrote: > * Wang Long [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 >> >> --- >> 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. > OK, thanks. i will drop this change. >> @@ -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 > > . >