public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: ranxiaokai627@163.com
Cc: graf@amazon.com, akpm@linux-foundation.org, pratyush@kernel.org,
	pasha.tatashin@soleen.com, jasonmiu@google.com,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	ran.xiaokai@zte.com.cn
Subject: Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
Date: Mon, 9 Mar 2026 10:10:24 +0200	[thread overview]
Message-ID: <aa6AcCJJZ-NN0ea_@kernel.org> (raw)
In-Reply-To: <20260309033530.244508-1-ranxiaokai627@163.com>

On Mon, Mar 09, 2026 at 03:35:30AM +0000, ranxiaokai627@163.com wrote:
> From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> 
> Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
> kho debugfs code still hard-coded the "fdt" string when parsing the
> device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
> fail to parse child nodes correctly.
> 
> Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
> instead of the hard-coded string.
> 
> Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
>  kernel/liveupdate/kexec_handover_debugfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
> index 3f395fbd978f..acf368222682 100644
> --- a/kernel/liveupdate/kexec_handover_debugfs.c
> +++ b/kernel/liveupdate/kexec_handover_debugfs.c
> @@ -13,6 +13,7 @@
>  #include <linux/io.h>
>  #include <linux/libfdt.h>
>  #include <linux/mm.h>
> +#include <linux/kho/abi/kexec_handover.h>
>  #include "kexec_handover_internal.h"
>  
>  static struct dentry *debugfs_root;
> @@ -121,7 +122,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)
>  		const char *name = fdt_get_name(fdt, child, NULL);
>  		const u64 *fdt_phys;
>  
> -		fdt_phys = fdt_getprop(fdt, child, "fdt", &len);
> +		fdt_phys = fdt_getprop(fdt, child, KHO_FDT_SUB_TREE_PROP_NAME, &len);
>  		if (!fdt_phys)
>  			continue;
>  		if (len != sizeof(*fdt_phys)) {
> -- 
> 2.25.1
> 

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2026-03-09  8:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09  3:35 [PATCH] kho: fix child node parsing for debugfs in/sub_fdts ranxiaokai627
2026-03-09  8:10 ` Mike Rapoport [this message]
2026-03-13 10:02 ` Pratyush Yadav
2026-03-14 22:46   ` Andrew Morton
2026-03-17  9:09     ` Pratyush Yadav
2026-03-17 21:08       ` Andrew Morton
2026-03-20 10:20         ` Pratyush Yadav

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=aa6AcCJJZ-NN0ea_@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=graf@amazon.com \
    --cc=jasonmiu@google.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=ranxiaokai627@163.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