All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
@ 2021-04-16 12:46 Sourabh Jain
  2021-04-16 15:27   ` kernel test robot
  2021-04-16 18:08 ` Hari Bathini
  0 siblings, 2 replies; 4+ messages in thread
From: Sourabh Jain @ 2021-04-16 12:46 UTC (permalink / raw)
  To: mpe; +Cc: mahesh, bauerman, hbathini, linuxppc-dev

kexec_file_load uses initial_boot_params in setting up the device-tree
for the kernel to be loaded. Though initial_boot_params holds info
about CPUs at the time of boot, it doesn't account for hot added CPUs.

So, kexec'ing with kexec_file_load syscall would leave the kexec'ed
kernel with inaccurate CPU info. Also, if kdump kernel is loaded with
kexec_file_load syscall and the system crashes on a hot added CPU,
capture kernel hangs failing to identify the boot CPU.

 Kernel panic - not syncing: sysrq triggered crash
 CPU: 24 PID: 6065 Comm: echo Kdump: loaded Not tainted 5.12.0-rc5upstream #54
 Call Trace:
 [c0000000e590fac0] [c0000000007b2400] dump_stack+0xc4/0x114 (unreliable)
 [c0000000e590fb00] [c000000000145290] panic+0x16c/0x41c
 [c0000000e590fba0] [c0000000008892e0] sysrq_handle_crash+0x30/0x40
 [c0000000e590fc00] [c000000000889cdc] __handle_sysrq+0xcc/0x1f0
 [c0000000e590fca0] [c00000000088a538] write_sysrq_trigger+0xd8/0x178
 [c0000000e590fce0] [c0000000005e9b7c] proc_reg_write+0x10c/0x1b0
 [c0000000e590fd10] [c0000000004f26d0] vfs_write+0xf0/0x330
 [c0000000e590fd60] [c0000000004f2aec] ksys_write+0x7c/0x140
 [c0000000e590fdb0] [c000000000031ee0] system_call_exception+0x150/0x290
 [c0000000e590fe10] [c00000000000ca5c] system_call_common+0xec/0x278
 --- interrupt: c00 at 0x7fff905b9664
 NIP:  00007fff905b9664 LR: 00007fff905320c4 CTR: 0000000000000000
 REGS: c0000000e590fe80 TRAP: 0c00   Not tainted  (5.12.0-rc5upstream)
 MSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 28000242
       XER: 00000000
 IRQMASK: 0
 GPR00: 0000000000000004 00007ffff5fedf30 00007fff906a7300 0000000000000001
 GPR04: 000001002a7355b0 0000000000000002 0000000000000001 00007ffff5fef616
 GPR08: 0000000000000001 0000000000000000 0000000000000000 0000000000000000
 GPR12: 0000000000000000 00007fff9073a160 0000000000000000 0000000000000000
 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
 GPR20: 0000000000000000 00007fff906a4ee0 0000000000000002 0000000000000001
 GPR24: 00007fff906a0898 0000000000000000 0000000000000002 000001002a7355b0
 GPR28: 0000000000000002 00007fff906a1790 000001002a7355b0 0000000000000002
 NIP [00007fff905b9664] 0x7fff905b9664
 LR [00007fff905320c4] 0x7fff905320c4
 --- interrupt: c00

To avoid this from happening, extract current CPU info from of_root
device node and use it for setting up the fdt in kexec_file_load case.

Fixes: 6ecd0163d360 ("powerpc/kexec_file: Add appropriate regions for memory reserve map")

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 arch/powerpc/kexec/file_load_64.c | 98 +++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

 ---
Changelog:

v1 -> v2
  - fdt should be updated regardless of kexec type
  - updated commit message and title

 ---

diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 02b9e4d0dc40..21d2f0e172ed 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -960,6 +960,99 @@ unsigned int kexec_fdt_totalsize_ppc64(struct kimage *image)
 	return fdt_size;
 }
 
+/**
+ * add_node_prop - Read property from device node structure and add
+ *			them to fdt.
+ * @fdt:		Flattened device tree of the kernel
+ * @node_offset:	offset of the node to add a property at
+ * np:			device node pointer
+ *
+ * Returns 0 on success, negative errno on error.
+ */
+int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
+{
+	int ret = 0;
+	struct property *pp;
+	unsigned long flags;
+
+	if (!np)
+		return -EINVAL;
+
+	raw_spin_lock_irqsave(&devtree_lock, flags);
+	for (pp = np->properties; pp; pp = pp->next) {
+		ret = fdt_setprop(fdt, node_offset, pp->name,
+				  pp->value, pp->length);
+		if (ret < 0) {
+			pr_err("Unable to add %s property: %s\n",
+				pp->name, fdt_strerror(ret));
+			goto out;
+		}
+	}
+out:
+	raw_spin_unlock_irqrestore(&devtree_lock, flags);
+	return ret;
+}
+
+/**
+ * update_cpus_node - Update cpus node of flattened device-tree using of_root
+ *			device node.
+ * @fdt:		Flattened device tree of the kernel.
+ *
+ * Returns 0 on success, negative errno on error.
+ */
+int update_cpus_node(void *fdt)
+{
+	struct device_node *cpus_node, *dn;
+	int cpus_offset, cpus_subnode_off, ret = 0;
+
+	cpus_offset = fdt_path_offset(fdt, "/cpus");
+	if (cpus_offset == -FDT_ERR_NOTFOUND || cpus_offset > 0) {
+		if (cpus_offset > 0) {
+			ret = fdt_del_node(fdt, cpus_offset);
+			if (ret < 0) {
+				pr_err("Error deleting /cpus node: %s\n",
+				       fdt_strerror(ret));
+				return -EINVAL;
+			}
+		}
+
+		/* Add cpus node to fdt */
+		cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
+					      "cpus");
+		if (cpus_offset < 0) {
+			pr_err("Error creating /cpus node: %s\n",
+			       fdt_strerror(cpus_offset));
+			return -EINVAL;
+		}
+
+		/* Add cpus node properties */
+		cpus_node = of_find_node_by_path("/cpus");
+		ret = add_node_prop(fdt, cpus_offset, cpus_node);
+		if (ret < 0)
+			return ret;
+
+		/* Loop through all subnodes of cpus and add them to fdt */
+		for_each_node_by_type(dn, "cpu") {
+			cpus_subnode_off = fdt_add_subnode(fdt,
+							   cpus_offset,
+							   dn->full_name);
+			if (cpus_subnode_off < 0) {
+				pr_err("Unable to add %s subnode: %s\n",
+				       dn->full_name, fdt_strerror(cpus_subnode_off));
+				return cpus_subnode_off;
+			}
+			ret = add_node_prop(fdt, cpus_subnode_off, dn);
+			if (ret < 0)
+				return ret;
+		}
+	} else if (cpus_offset < 0) {
+		pr_err("Malformed device tree: error reading /cpus node: %s\n",
+		       fdt_strerror(cpus_offset));
+	}
+
+	return ret;
+}
+
 /**
  * setup_new_fdt_ppc64 - Update the flattend device-tree of the kernel
  *                       being loaded.
@@ -1020,6 +1113,11 @@ int setup_new_fdt_ppc64(const struct kimage *image, void *fdt,
 		}
 	}
 
+	/* Update cpus nodes information to account hotplug CPUs. */
+	ret =  update_cpus_node(fdt);
+	if (ret < 0)
+		return ret;
+
 	/* Update memory reserve map */
 	ret = get_reserved_memory_ranges(&rmem);
 	if (ret)
-- 
2.26.3


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

* Re: [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
  2021-04-16 12:46 [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT Sourabh Jain
@ 2021-04-16 15:27   ` kernel test robot
  2021-04-16 18:08 ` Hari Bathini
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-04-16 15:27 UTC (permalink / raw)
  To: Sourabh Jain, mpe; +Cc: mahesh, kbuild-all, hbathini, bauerman, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 5194 bytes --]

Hi Sourabh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on linus/master v5.12-rc7 next-20210416]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/c4f40243a6928fb16798b2b98c5371815b49e4cc
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
        git checkout c4f40243a6928fb16798b2b98c5371815b49e4cc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/powerpc/kexec/file_load_64.c:972:5: warning: no previous prototype for 'add_node_prop' [-Wmissing-prototypes]
     972 | int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
         |     ^~~~~~~~~~~~~
>> arch/powerpc/kexec/file_load_64.c:1003:5: warning: no previous prototype for 'update_cpus_node' [-Wmissing-prototypes]
    1003 | int update_cpus_node(void *fdt)
         |     ^~~~~~~~~~~~~~~~


vim +/add_node_prop +972 arch/powerpc/kexec/file_load_64.c

   962	
   963	/**
   964	 * add_node_prop - Read property from device node structure and add
   965	 *			them to fdt.
   966	 * @fdt:		Flattened device tree of the kernel
   967	 * @node_offset:	offset of the node to add a property at
   968	 * np:			device node pointer
   969	 *
   970	 * Returns 0 on success, negative errno on error.
   971	 */
 > 972	int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
   973	{
   974		int ret = 0;
   975		struct property *pp;
   976		unsigned long flags;
   977	
   978		if (!np)
   979			return -EINVAL;
   980	
   981		raw_spin_lock_irqsave(&devtree_lock, flags);
   982		for (pp = np->properties; pp; pp = pp->next) {
   983			ret = fdt_setprop(fdt, node_offset, pp->name,
   984					  pp->value, pp->length);
   985			if (ret < 0) {
   986				pr_err("Unable to add %s property: %s\n",
   987					pp->name, fdt_strerror(ret));
   988				goto out;
   989			}
   990		}
   991	out:
   992		raw_spin_unlock_irqrestore(&devtree_lock, flags);
   993		return ret;
   994	}
   995	
   996	/**
   997	 * update_cpus_node - Update cpus node of flattened device-tree using of_root
   998	 *			device node.
   999	 * @fdt:		Flattened device tree of the kernel.
  1000	 *
  1001	 * Returns 0 on success, negative errno on error.
  1002	 */
> 1003	int update_cpus_node(void *fdt)
  1004	{
  1005		struct device_node *cpus_node, *dn;
  1006		int cpus_offset, cpus_subnode_off, ret = 0;
  1007	
  1008		cpus_offset = fdt_path_offset(fdt, "/cpus");
  1009		if (cpus_offset == -FDT_ERR_NOTFOUND || cpus_offset > 0) {
  1010			if (cpus_offset > 0) {
  1011				ret = fdt_del_node(fdt, cpus_offset);
  1012				if (ret < 0) {
  1013					pr_err("Error deleting /cpus node: %s\n",
  1014					       fdt_strerror(ret));
  1015					return -EINVAL;
  1016				}
  1017			}
  1018	
  1019			/* Add cpus node to fdt */
  1020			cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
  1021						      "cpus");
  1022			if (cpus_offset < 0) {
  1023				pr_err("Error creating /cpus node: %s\n",
  1024				       fdt_strerror(cpus_offset));
  1025				return -EINVAL;
  1026			}
  1027	
  1028			/* Add cpus node properties */
  1029			cpus_node = of_find_node_by_path("/cpus");
  1030			ret = add_node_prop(fdt, cpus_offset, cpus_node);
  1031			if (ret < 0)
  1032				return ret;
  1033	
  1034			/* Loop through all subnodes of cpus and add them to fdt */
  1035			for_each_node_by_type(dn, "cpu") {
  1036				cpus_subnode_off = fdt_add_subnode(fdt,
  1037								   cpus_offset,
  1038								   dn->full_name);
  1039				if (cpus_subnode_off < 0) {
  1040					pr_err("Unable to add %s subnode: %s\n",
  1041					       dn->full_name, fdt_strerror(cpus_subnode_off));
  1042					return cpus_subnode_off;
  1043				}
  1044				ret = add_node_prop(fdt, cpus_subnode_off, dn);
  1045				if (ret < 0)
  1046					return ret;
  1047			}
  1048		} else if (cpus_offset < 0) {
  1049			pr_err("Malformed device tree: error reading /cpus node: %s\n",
  1050			       fdt_strerror(cpus_offset));
  1051		}
  1052	
  1053		return ret;
  1054	}
  1055	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 72716 bytes --]

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

* Re: [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
@ 2021-04-16 15:27   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-04-16 15:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5331 bytes --]

Hi Sourabh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on linus/master v5.12-rc7 next-20210416]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/c4f40243a6928fb16798b2b98c5371815b49e4cc
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sourabh-Jain/powerpc-kexec_file-use-current-CPU-info-while-setting-up-FDT/20210416-204821
        git checkout c4f40243a6928fb16798b2b98c5371815b49e4cc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/powerpc/kexec/file_load_64.c:972:5: warning: no previous prototype for 'add_node_prop' [-Wmissing-prototypes]
     972 | int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
         |     ^~~~~~~~~~~~~
>> arch/powerpc/kexec/file_load_64.c:1003:5: warning: no previous prototype for 'update_cpus_node' [-Wmissing-prototypes]
    1003 | int update_cpus_node(void *fdt)
         |     ^~~~~~~~~~~~~~~~


vim +/add_node_prop +972 arch/powerpc/kexec/file_load_64.c

   962	
   963	/**
   964	 * add_node_prop - Read property from device node structure and add
   965	 *			them to fdt.
   966	 * @fdt:		Flattened device tree of the kernel
   967	 * @node_offset:	offset of the node to add a property at
   968	 * np:			device node pointer
   969	 *
   970	 * Returns 0 on success, negative errno on error.
   971	 */
 > 972	int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
   973	{
   974		int ret = 0;
   975		struct property *pp;
   976		unsigned long flags;
   977	
   978		if (!np)
   979			return -EINVAL;
   980	
   981		raw_spin_lock_irqsave(&devtree_lock, flags);
   982		for (pp = np->properties; pp; pp = pp->next) {
   983			ret = fdt_setprop(fdt, node_offset, pp->name,
   984					  pp->value, pp->length);
   985			if (ret < 0) {
   986				pr_err("Unable to add %s property: %s\n",
   987					pp->name, fdt_strerror(ret));
   988				goto out;
   989			}
   990		}
   991	out:
   992		raw_spin_unlock_irqrestore(&devtree_lock, flags);
   993		return ret;
   994	}
   995	
   996	/**
   997	 * update_cpus_node - Update cpus node of flattened device-tree using of_root
   998	 *			device node.
   999	 * @fdt:		Flattened device tree of the kernel.
  1000	 *
  1001	 * Returns 0 on success, negative errno on error.
  1002	 */
> 1003	int update_cpus_node(void *fdt)
  1004	{
  1005		struct device_node *cpus_node, *dn;
  1006		int cpus_offset, cpus_subnode_off, ret = 0;
  1007	
  1008		cpus_offset = fdt_path_offset(fdt, "/cpus");
  1009		if (cpus_offset == -FDT_ERR_NOTFOUND || cpus_offset > 0) {
  1010			if (cpus_offset > 0) {
  1011				ret = fdt_del_node(fdt, cpus_offset);
  1012				if (ret < 0) {
  1013					pr_err("Error deleting /cpus node: %s\n",
  1014					       fdt_strerror(ret));
  1015					return -EINVAL;
  1016				}
  1017			}
  1018	
  1019			/* Add cpus node to fdt */
  1020			cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
  1021						      "cpus");
  1022			if (cpus_offset < 0) {
  1023				pr_err("Error creating /cpus node: %s\n",
  1024				       fdt_strerror(cpus_offset));
  1025				return -EINVAL;
  1026			}
  1027	
  1028			/* Add cpus node properties */
  1029			cpus_node = of_find_node_by_path("/cpus");
  1030			ret = add_node_prop(fdt, cpus_offset, cpus_node);
  1031			if (ret < 0)
  1032				return ret;
  1033	
  1034			/* Loop through all subnodes of cpus and add them to fdt */
  1035			for_each_node_by_type(dn, "cpu") {
  1036				cpus_subnode_off = fdt_add_subnode(fdt,
  1037								   cpus_offset,
  1038								   dn->full_name);
  1039				if (cpus_subnode_off < 0) {
  1040					pr_err("Unable to add %s subnode: %s\n",
  1041					       dn->full_name, fdt_strerror(cpus_subnode_off));
  1042					return cpus_subnode_off;
  1043				}
  1044				ret = add_node_prop(fdt, cpus_subnode_off, dn);
  1045				if (ret < 0)
  1046					return ret;
  1047			}
  1048		} else if (cpus_offset < 0) {
  1049			pr_err("Malformed device tree: error reading /cpus node: %s\n",
  1050			       fdt_strerror(cpus_offset));
  1051		}
  1052	
  1053		return ret;
  1054	}
  1055	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 72716 bytes --]

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

* Re: [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT
  2021-04-16 12:46 [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT Sourabh Jain
  2021-04-16 15:27   ` kernel test robot
@ 2021-04-16 18:08 ` Hari Bathini
  1 sibling, 0 replies; 4+ messages in thread
From: Hari Bathini @ 2021-04-16 18:08 UTC (permalink / raw)
  To: Sourabh Jain, mpe; +Cc: mahesh, bauerman, linuxppc-dev



On 16/04/21 6:16 pm, Sourabh Jain wrote:
> kexec_file_load uses initial_boot_params in setting up the device-tree
> for the kernel to be loaded. Though initial_boot_params holds info
> about CPUs at the time of boot, it doesn't account for hot added CPUs.
> 
> So, kexec'ing with kexec_file_load syscall would leave the kexec'ed
> kernel with inaccurate CPU info. Also, if kdump kernel is loaded with
> kexec_file_load syscall and the system crashes on a hot added CPU,
> capture kernel hangs failing to identify the boot CPU.
> 
>   Kernel panic - not syncing: sysrq triggered crash
>   CPU: 24 PID: 6065 Comm: echo Kdump: loaded Not tainted 5.12.0-rc5upstream #54
>   Call Trace:
>   [c0000000e590fac0] [c0000000007b2400] dump_stack+0xc4/0x114 (unreliable)
>   [c0000000e590fb00] [c000000000145290] panic+0x16c/0x41c
>   [c0000000e590fba0] [c0000000008892e0] sysrq_handle_crash+0x30/0x40
>   [c0000000e590fc00] [c000000000889cdc] __handle_sysrq+0xcc/0x1f0
>   [c0000000e590fca0] [c00000000088a538] write_sysrq_trigger+0xd8/0x178
>   [c0000000e590fce0] [c0000000005e9b7c] proc_reg_write+0x10c/0x1b0
>   [c0000000e590fd10] [c0000000004f26d0] vfs_write+0xf0/0x330
>   [c0000000e590fd60] [c0000000004f2aec] ksys_write+0x7c/0x140
>   [c0000000e590fdb0] [c000000000031ee0] system_call_exception+0x150/0x290
>   [c0000000e590fe10] [c00000000000ca5c] system_call_common+0xec/0x278
>   --- interrupt: c00 at 0x7fff905b9664
>   NIP:  00007fff905b9664 LR: 00007fff905320c4 CTR: 0000000000000000
>   REGS: c0000000e590fe80 TRAP: 0c00   Not tainted  (5.12.0-rc5upstream)
>   MSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 28000242
>         XER: 00000000
>   IRQMASK: 0
>   GPR00: 0000000000000004 00007ffff5fedf30 00007fff906a7300 0000000000000001
>   GPR04: 000001002a7355b0 0000000000000002 0000000000000001 00007ffff5fef616
>   GPR08: 0000000000000001 0000000000000000 0000000000000000 0000000000000000
>   GPR12: 0000000000000000 00007fff9073a160 0000000000000000 0000000000000000
>   GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>   GPR20: 0000000000000000 00007fff906a4ee0 0000000000000002 0000000000000001
>   GPR24: 00007fff906a0898 0000000000000000 0000000000000002 000001002a7355b0
>   GPR28: 0000000000000002 00007fff906a1790 000001002a7355b0 0000000000000002
>   NIP [00007fff905b9664] 0x7fff905b9664
>   LR [00007fff905320c4] 0x7fff905320c4
>   --- interrupt: c00
> 
> To avoid this from happening, extract current CPU info from of_root
> device node and use it for setting up the fdt in kexec_file_load case.
> 
> Fixes: 6ecd0163d360 ("powerpc/kexec_file: Add appropriate regions for memory reserve map")

Missed marking stable@vger.kernel.org on Cc for this fix..


> +int add_node_prop(void *fdt, int node_offset, const struct device_node *np)
> +{

<SNIP>

> +int update_cpus_node(void *fdt)
> +{

I think the above two new functions should be marked 'static'...

Thanks
Hari

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

end of thread, other threads:[~2021-04-16 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 12:46 [PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT Sourabh Jain
2021-04-16 15:27 ` kernel test robot
2021-04-16 15:27   ` kernel test robot
2021-04-16 18:08 ` Hari Bathini

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.