Commit f6771b69 authored by Ma Wupeng's avatar Ma Wupeng Committed by Wupeng Ma
Browse files

arm64: mm: Pass pbha-performance-only bit under chosen node

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I96IZH



--------------------------------

Pass pbha-performance-only under chosen node to slove booting problem.

Fixes: f43933b3 ("arm64: cpufeature: Enable PBHA for stage1 early via FDT")
Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
parent dbbaf94c
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1802,14 +1802,24 @@ void __init early_pbha_init(void)
	if (!fdt)
		goto unlock;

	/* arm,pbha-performance-only may exist in both chosen and cpus node */
	node = fdt_path_offset(fdt, "/chosen");
	if (node < 0)
		goto unlock;

	prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size);
	if (prop)
		goto found;

	node = fdt_path_offset(fdt, "/cpus");
	if (node < 0)
		goto unlock;

	prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size);
	if (!prop)
	if (prop)
		goto unlock;

found:
	if (!cpu_has_pbha())
		goto unlock;

+0 −7
Original line number Diff line number Diff line
@@ -57,13 +57,6 @@ static efi_status_t fdt_init_hbm_mode(void *fdt, int node)
	if (status)
		return EFI_LOAD_ERROR;

	node = fdt_subnode_offset(fdt, 0, "cpus");
	if (node < 0) {
		node = fdt_add_subnode(fdt, 0, "cpus");
		if (node < 0)
			return EFI_LOAD_ERROR;
	}

	/* Current PBHA bit59 is need to enable PBHA bit0 mode. */
	status = fdt_setprop_var(fdt, node, "arm,pbha-performance-only", arr);
	if (status) {