
From: Ma Wupeng <mawupeng1@huawei.com> hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/IBHLGK -------------------------------- Update PBHA related variable to a suitable one. Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> --- drivers/firmware/efi/libstub/fdt.c | 10 +++++----- drivers/soc/hisilicon/pbha.c | 4 +--- include/linux/pbha.h | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index 30aeb2b54569..caa1b0deb6ff 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -31,7 +31,7 @@ static void fdt_update_cell_size(void *fdt) #ifdef CONFIG_ARM64_PBHA extern bool efi_pbha; -static efi_status_t fdt_init_hbm_mode(void *fdt, int node) +static efi_status_t fdt_init_moc_mode(void *fdt, int node) { efi_guid_t oem_config_guid = EFI_OEMCONFIG_VARIABLE_GUID; unsigned long size; @@ -44,12 +44,12 @@ static efi_status_t fdt_init_hbm_mode(void *fdt, int node) if (!efi_pbha) goto out; - efi_status = get_efi_var(L"HBMMode", &oem_config_guid, NULL, &size, + efi_status = get_efi_var(L"MemoryOnChipMode", &oem_config_guid, NULL, &size, &hbm_mode); if (efi_status != EFI_SUCCESS) goto out; - if (hbm_mode != HBM_MODE_CACHE) + if (hbm_mode != MOC_MODE_CACHE) goto out; fdt_val32 = 1; @@ -68,7 +68,7 @@ static efi_status_t fdt_init_hbm_mode(void *fdt, int node) return EFI_SUCCESS; } #else -static inline efi_status_t fdt_init_hbm_mode(void *fdt, int node) +static inline efi_status_t fdt_init_moc_mode(void *fdt, int node) { return EFI_SUCCESS; } @@ -195,7 +195,7 @@ static efi_status_t update_fdt(void *orig_fdt, unsigned long orig_fdt_size, } } - if (fdt_init_hbm_mode(fdt, node) != EFI_SUCCESS) + if (fdt_init_moc_mode(fdt, node) != EFI_SUCCESS) goto fdt_set_fail; /* Shrink the FDT back to its minimum size: */ diff --git a/drivers/soc/hisilicon/pbha.c b/drivers/soc/hisilicon/pbha.c index 9e385c93bab5..6fc96ea89205 100644 --- a/drivers/soc/hisilicon/pbha.c +++ b/drivers/soc/hisilicon/pbha.c @@ -15,8 +15,6 @@ #include <asm/setup.h> -#define HBM_MODE_CACHE 1 - __ro_after_init DEFINE_STATIC_KEY_FALSE(pbha_bit0_enabled); __ro_after_init DEFINE_STATIC_KEY_FALSE(pbha_bit0_kernel_enabled); @@ -43,7 +41,7 @@ void __init early_pbha_bit0_init(void) prop = fdt_getprop(fdt, node, "linux,pbha-bit0", NULL); if (!prop) return; - if (*prop == HBM_MODE_CACHE) + if (*prop == MOC_MODE_CACHE) pbha_enabled_phase_1 = true; } diff --git a/include/linux/pbha.h b/include/linux/pbha.h index a8ac441628bd..bf4abf4d55f9 100644 --- a/include/linux/pbha.h +++ b/include/linux/pbha.h @@ -16,8 +16,8 @@ EFI_GUID(0x21f3b3c5, 0x946d, 0x41c1, 0x83, 0x8c, 0x19, 0x4e, 0x48, \ 0xaa, 0x41, 0xe2) -#define HBM_MODE_MEMORY 0 -#define HBM_MODE_CACHE 1 +#define MOC_MODE_MEMORY 0 +#define MOC_MODE_CACHE 1 #ifdef CONFIG_ARM64_PBHA DECLARE_STATIC_KEY_FALSE(pbha_bit0_enabled); -- 2.43.0