linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memblock: Add missing debug code to memblock_add_node()
@ 2021-08-11  8:54 Geert Uytterhoeven
  2021-08-11  9:36 ` David Hildenbrand
  2021-08-11 13:05 ` Mike Rapoport
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-08-11  8:54 UTC (permalink / raw)
  To: Mike Rapoport, Andrew Morton; +Cc: linux-mm, linux-kernel, Geert Uytterhoeven

All other memblock APIs built on top of memblock_add_range() contain
debug code to print their parameters.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 mm/memblock.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index de7b553baa50004c..57a9849a5d820c34 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -665,6 +665,11 @@ static int __init_memblock memblock_add_range(struct memblock_type *type,
 int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size,
 				       int nid)
 {
+	phys_addr_t end = base + size - 1;
+
+	memblock_dbg("%s: [%pa-%pa] nid=%d %pS\n", __func__,
+		     &base, &end, nid, (void *)_RET_IP_);
+
 	return memblock_add_range(&memblock.memory, base, size, nid, 0);
 }
 
-- 
2.25.1



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

* Re: [PATCH] memblock: Add missing debug code to memblock_add_node()
  2021-08-11  8:54 [PATCH] memblock: Add missing debug code to memblock_add_node() Geert Uytterhoeven
@ 2021-08-11  9:36 ` David Hildenbrand
  2021-08-11 13:05 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-08-11  9:36 UTC (permalink / raw)
  To: Geert Uytterhoeven, Mike Rapoport, Andrew Morton; +Cc: linux-mm, linux-kernel

On 11.08.21 10:54, Geert Uytterhoeven wrote:
> All other memblock APIs built on top of memblock_add_range() contain
> debug code to print their parameters.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>   mm/memblock.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index de7b553baa50004c..57a9849a5d820c34 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -665,6 +665,11 @@ static int __init_memblock memblock_add_range(struct memblock_type *type,
>   int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size,
>   				       int nid)
>   {
> +	phys_addr_t end = base + size - 1;
> +
> +	memblock_dbg("%s: [%pa-%pa] nid=%d %pS\n", __func__,
> +		     &base, &end, nid, (void *)_RET_IP_);
> +
>   	return memblock_add_range(&memblock.memory, base, size, nid, 0);
>   }
>   
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



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

* Re: [PATCH] memblock: Add missing debug code to memblock_add_node()
  2021-08-11  8:54 [PATCH] memblock: Add missing debug code to memblock_add_node() Geert Uytterhoeven
  2021-08-11  9:36 ` David Hildenbrand
@ 2021-08-11 13:05 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Rapoport @ 2021-08-11 13:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Andrew Morton, David Hildenbrand, linux-mm, linux-kernel

On Wed, Aug 11, 2021 at 10:54:36AM +0200, Geert Uytterhoeven wrote:
> All other memblock APIs built on top of memblock_add_range() contain
> debug code to print their parameters.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied for 5.15,
Thanks!

-- 
Sincerely yours,
Mike.


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

end of thread, other threads:[~2021-08-11 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  8:54 [PATCH] memblock: Add missing debug code to memblock_add_node() Geert Uytterhoeven
2021-08-11  9:36 ` David Hildenbrand
2021-08-11 13:05 ` Mike Rapoport

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).