* [PATCH] ramoops: make it possible to change mem_type param.
@ 2015-03-27 9:19 Wang Long
2015-03-30 16:31 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Wang Long @ 2015-03-27 9:19 UTC (permalink / raw)
To: keescook, ccross, anton, tony.luck, tony
Cc: linux-kernel, long.wanglong, peifeiyue, morgan.wang, sergiu,
salyzyn, anton.vorontsov, marco.stornelli
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)");
@@ -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;
--
1.8.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ramoops: make it possible to change mem_type param.
2015-03-27 9:19 [PATCH] ramoops: make it possible to change mem_type param Wang Long
@ 2015-03-30 16:31 ` Tony Lindgren
2015-03-31 1:22 ` long.wanglong
0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2015-03-30 16:31 UTC (permalink / raw)
To: Wang Long
Cc: keescook, ccross, anton, tony.luck, linux-kernel, peifeiyue,
morgan.wang, sergiu, salyzyn, anton.vorontsov, marco.stornelli
* 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ramoops: make it possible to change mem_type param.
2015-03-30 16:31 ` Tony Lindgren
@ 2015-03-31 1:22 ` long.wanglong
0 siblings, 0 replies; 3+ messages in thread
From: long.wanglong @ 2015-03-31 1:22 UTC (permalink / raw)
To: Tony Lindgren
Cc: keescook, ccross, anton, tony.luck, linux-kernel, peifeiyue,
morgan.wang, sergiu, salyzyn, anton.vorontsov, marco.stornelli
On 2015/3/31 0:31, Tony Lindgren wrote:
> * 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.
>
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 <tony@atomide.com>
>
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-31 1:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27 9:19 [PATCH] ramoops: make it possible to change mem_type param Wang Long
2015-03-30 16:31 ` Tony Lindgren
2015-03-31 1:22 ` long.wanglong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.