All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] of/fdt: failed to mark hotplug range message
@ 2016-12-22  5:34 Heinrich Schuchardt
       [not found] ` <20161222053405.27190-1-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Heinrich Schuchardt @ 2016-12-22  5:34 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree, linux-kernel, Heinrich Schuchardt

If marking a hotplug range fails a message
"failed to mark hotplug range" is written.

The end address is base + size - 1.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/of/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c9b5cac03b36..fd129b6e5396 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
 
 		if (early_init_dt_mark_hotplug_memory_arch(base, size))
 			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
-				base, base + size);
+				base, base + size - 1);
 	}
 
 	return 0;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
  2016-12-22  5:34 [PATCH 1/1] of/fdt: failed to mark hotplug range message Heinrich Schuchardt
@ 2016-12-22  5:52     ` Heinrich Schuchardt
  0 siblings, 0 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2016-12-22  5:52 UTC (permalink / raw)
  To: Reza Arbab, Balbir Singh
  Cc: Rob Herring, Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

scripts/get_maintainers.pl did not show the people involved in creating
the code to be changed.

On 12/22/2016 06:34 AM, Heinrich Schuchardt wrote:
> If marking a hotplug range fails a message
> "failed to mark hotplug range" is written.
> 
> The end address is base + size - 1.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
> ---
>  drivers/of/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index c9b5cac03b36..fd129b6e5396 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>  
>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
> -				base, base + size);
> +				base, base + size - 1);
>  	}
>  
>  	return 0;
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
@ 2016-12-22  5:52     ` Heinrich Schuchardt
  0 siblings, 0 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2016-12-22  5:52 UTC (permalink / raw)
  To: Reza Arbab, Balbir Singh
  Cc: Rob Herring, Frank Rowand, devicetree, linux-kernel

scripts/get_maintainers.pl did not show the people involved in creating
the code to be changed.

On 12/22/2016 06:34 AM, Heinrich Schuchardt wrote:
> If marking a hotplug range fails a message
> "failed to mark hotplug range" is written.
> 
> The end address is base + size - 1.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/of/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index c9b5cac03b36..fd129b6e5396 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>  
>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
> -				base, base + size);
> +				base, base + size - 1);
>  	}
>  
>  	return 0;
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
  2016-12-22  5:52     ` Heinrich Schuchardt
@ 2016-12-22 21:31         ` Frank Rowand
  -1 siblings, 0 replies; 9+ messages in thread
From: Frank Rowand @ 2016-12-22 21:31 UTC (permalink / raw)
  To: Heinrich Schuchardt, Reza Arbab, Balbir Singh, Andrew Morton
  Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

And the patch to be fixed was merged via akpm, so adding him.

Fixes: 41a9ada3e6b4 ("of/fdt: mark hotpluggable memory")

-Frank

On 12/21/16 21:52, Heinrich Schuchardt wrote:
> scripts/get_maintainers.pl did not show the people involved in creating
> the code to be changed.
> 
> On 12/22/2016 06:34 AM, Heinrich Schuchardt wrote:
>> If marking a hotplug range fails a message
>> "failed to mark hotplug range" is written.
>>
>> The end address is base + size - 1.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
>> ---
>>  drivers/of/fdt.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index c9b5cac03b36..fd129b6e5396 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>>  
>>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
>> -				base, base + size);
>> +				base, base + size - 1);
>>  	}
>>  
>>  	return 0;
>>
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
@ 2016-12-22 21:31         ` Frank Rowand
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Rowand @ 2016-12-22 21:31 UTC (permalink / raw)
  To: Heinrich Schuchardt, Reza Arbab, Balbir Singh, Andrew Morton
  Cc: Rob Herring, devicetree, linux-kernel

And the patch to be fixed was merged via akpm, so adding him.

Fixes: 41a9ada3e6b4 ("of/fdt: mark hotpluggable memory")

-Frank

On 12/21/16 21:52, Heinrich Schuchardt wrote:
> scripts/get_maintainers.pl did not show the people involved in creating
> the code to be changed.
> 
> On 12/22/2016 06:34 AM, Heinrich Schuchardt wrote:
>> If marking a hotplug range fails a message
>> "failed to mark hotplug range" is written.
>>
>> The end address is base + size - 1.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>  drivers/of/fdt.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index c9b5cac03b36..fd129b6e5396 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>>  
>>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
>> -				base, base + size);
>> +				base, base + size - 1);
>>  	}
>>  
>>  	return 0;
>>
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
  2016-12-22  5:52     ` Heinrich Schuchardt
@ 2016-12-22 21:49         ` Reza Arbab
  -1 siblings, 0 replies; 9+ messages in thread
From: Reza Arbab @ 2016-12-22 21:49 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Balbir Singh, Rob Herring, Frank Rowand, Andrew Morton,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, Dec 22, 2016 at 06:52:45AM +0100, Heinrich Schuchardt wrote:
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index c9b5cac03b36..fd129b6e5396 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>
>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
> -				base, base + size);
> +				base, base + size - 1);
>  	}
>
>  	return 0;

Isn't it implied that ranges printed this way are [start, end)?

If not, the entire file should be fixed, not just this occurrence.

-- 
Reza Arbab

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
@ 2016-12-22 21:49         ` Reza Arbab
  0 siblings, 0 replies; 9+ messages in thread
From: Reza Arbab @ 2016-12-22 21:49 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Balbir Singh, Rob Herring, Frank Rowand, Andrew Morton,
	devicetree, linux-kernel

On Thu, Dec 22, 2016 at 06:52:45AM +0100, Heinrich Schuchardt wrote:
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index c9b5cac03b36..fd129b6e5396 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>
>  		if (early_init_dt_mark_hotplug_memory_arch(base, size))
>  			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
> -				base, base + size);
> +				base, base + size - 1);
>  	}
>
>  	return 0;

Isn't it implied that ranges printed this way are [start, end)?

If not, the entire file should be fixed, not just this occurrence.

-- 
Reza Arbab

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
  2016-12-22 21:49         ` Reza Arbab
@ 2016-12-22 22:58             ` Heinrich Schuchardt
  -1 siblings, 0 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2016-12-22 22:58 UTC (permalink / raw)
  To: Reza Arbab
  Cc: Balbir Singh, Rob Herring, Frank Rowand, Andrew Morton,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 12/22/2016 10:49 PM, Reza Arbab wrote:
> On Thu, Dec 22, 2016 at 06:52:45AM +0100, Heinrich Schuchardt wrote:
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index c9b5cac03b36..fd129b6e5396 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned
>> long node, const char *uname,
>>
>>          if (early_init_dt_mark_hotplug_memory_arch(base, size))
>>              pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
>> -                base, base + size);
>> +                base, base + size - 1);
>>      }
>>
>>      return 0;
> 
> Isn't it implied that ranges printed this way are [start, end)?
> 
> If not, the entire file should be fixed, not just this occurrence.
> 
The output in the file drivers/of/fdt.c is currently inconsistent.
Alternative output formats are

pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n",
                  &base, &size, nomap ? " (nomap)" : "");

and

pr_debug("Reserved memory: reserved region for node '%s': base %pa, size
%ld MiB\n", uname, &base, (unsigned long)size / SZ_1M);

(Here we will see size = 0 for values less then 1 MiB.)

I expect intervals to be closed and not half open if not explicitly
indicated otherwise.

So I suggest we change all occurrences of interval output in
drivers/of/fdt.c to
0xfirstbyte - 0xlastbyte
where firstbyte = base and lastbyte = base + size - 1.

Using the %pa format code ensures that the length of the output matches
the bitness of address pointers in the system.

Best regards

Heinrich Schuchardt
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
@ 2016-12-22 22:58             ` Heinrich Schuchardt
  0 siblings, 0 replies; 9+ messages in thread
From: Heinrich Schuchardt @ 2016-12-22 22:58 UTC (permalink / raw)
  To: Reza Arbab
  Cc: Balbir Singh, Rob Herring, Frank Rowand, Andrew Morton,
	devicetree, linux-kernel

On 12/22/2016 10:49 PM, Reza Arbab wrote:
> On Thu, Dec 22, 2016 at 06:52:45AM +0100, Heinrich Schuchardt wrote:
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index c9b5cac03b36..fd129b6e5396 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned
>> long node, const char *uname,
>>
>>          if (early_init_dt_mark_hotplug_memory_arch(base, size))
>>              pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
>> -                base, base + size);
>> +                base, base + size - 1);
>>      }
>>
>>      return 0;
> 
> Isn't it implied that ranges printed this way are [start, end)?
> 
> If not, the entire file should be fixed, not just this occurrence.
> 
The output in the file drivers/of/fdt.c is currently inconsistent.
Alternative output formats are

pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n",
                  &base, &size, nomap ? " (nomap)" : "");

and

pr_debug("Reserved memory: reserved region for node '%s': base %pa, size
%ld MiB\n", uname, &base, (unsigned long)size / SZ_1M);

(Here we will see size = 0 for values less then 1 MiB.)

I expect intervals to be closed and not half open if not explicitly
indicated otherwise.

So I suggest we change all occurrences of interval output in
drivers/of/fdt.c to
0xfirstbyte - 0xlastbyte
where firstbyte = base and lastbyte = base + size - 1.

Using the %pa format code ensures that the length of the output matches
the bitness of address pointers in the system.

Best regards

Heinrich Schuchardt

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-22 22:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-22  5:34 [PATCH 1/1] of/fdt: failed to mark hotplug range message Heinrich Schuchardt
     [not found] ` <20161222053405.27190-1-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2016-12-22  5:52   ` Fwd: " Heinrich Schuchardt
2016-12-22  5:52     ` Heinrich Schuchardt
     [not found]     ` <5251e7ef-cadf-7833-9a7e-66ebf78e2e94-Mmb7MZpHnFY@public.gmane.org>
2016-12-22 21:31       ` Frank Rowand
2016-12-22 21:31         ` Frank Rowand
2016-12-22 21:49       ` Reza Arbab
2016-12-22 21:49         ` Reza Arbab
     [not found]         ` <20161222214917.7g6ldgkdvrlqsyq3-qNY8G7rN0TWMBe/gKFfDyNwqlRwYtuWJQQ4Iyu8u01E@public.gmane.org>
2016-12-22 22:58           ` Heinrich Schuchardt
2016-12-22 22:58             ` Heinrich Schuchardt

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.