summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arc/include/asm/global_data.h2
-rw-r--r--arch/arm/include/asm/global_data.h6
-rw-r--r--arch/arm/mach-imx/hab.c2
-rw-r--r--arch/arm/mach-imx/imx9/scmi/soc.c4
-rw-r--r--arch/arm/mach-imx/romapi.c6
-rw-r--r--arch/m68k/include/asm/global_data.h7
-rw-r--r--arch/microblaze/include/asm/global_data.h2
-rw-r--r--arch/mips/include/asm/global_data.h2
-rw-r--r--arch/powerpc/include/asm/global_data.h2
-rw-r--r--arch/riscv/include/asm/global_data.h2
-rw-r--r--lib/efi_loader/efi_boottime.c2
-rw-r--r--lib/trace.c4
12 files changed, 18 insertions, 23 deletions
diff --git a/arch/arc/include/asm/global_data.h b/arch/arc/include/asm/global_data.h
index fd9b7fb5f8d..4c3a25996fc 100644
--- a/arch/arc/include/asm/global_data.h
+++ b/arch/arc/include/asm/global_data.h
@@ -20,6 +20,6 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r25")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r25")
#endif /* __ASM_ARC_GLOBAL_DATA_H */
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 45401d5e3c8..b2ec450f900 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -133,13 +133,13 @@ static inline gd_t *get_gd(void)
#else
#ifdef CONFIG_ARM64
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("x18")
#else
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r9")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r9")
#endif
#endif
-static inline void set_gd(volatile gd_t *gd_ptr)
+static inline void set_gd(gd_t *gd_ptr)
{
#ifdef CONFIG_ARM64
__asm__ volatile("ldr x18, %0\n" : : "m"(gd_ptr));
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 600092389a3..ab5861578e5 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -74,7 +74,7 @@ static int verify_ivt_header(struct ivt_header *ivt_hdr)
#define FSL_SIP_HAB_REPORT_STATUS 0x04
#define FSL_SIP_HAB_FAILSAFE 0x05
#define FSL_SIP_HAB_CHECK_TARGET 0x06
-static volatile gd_t *gd_save;
+static gd_t *gd_save;
#endif
static inline void save_gd(void)
diff --git a/arch/arm/mach-imx/imx9/scmi/soc.c b/arch/arm/mach-imx/imx9/scmi/soc.c
index d2b0455bff9..d68a1166deb 100644
--- a/arch/arm/mach-imx/imx9/scmi/soc.c
+++ b/arch/arm/mach-imx/imx9/scmi/soc.c
@@ -67,7 +67,7 @@ int mmc_get_env_dev(void)
u16 boot_type;
u8 boot_instance;
- volatile gd_t *pgd = gd;
+ gd_t *pgd = gd;
rom_passover_t *rdata;
#if IS_ENABLED(CONFIG_XPL_BUILD)
@@ -675,7 +675,7 @@ enum imx9_soc_voltage_mode soc_target_voltage_mode(void)
#if IS_ENABLED(CONFIG_SCMI_FIRMWARE)
enum boot_device get_boot_device(void)
{
- volatile gd_t *pgd = gd;
+ gd_t *pgd = gd;
int ret;
u16 boot_type;
u8 boot_instance;
diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx/romapi.c
index ff0522c2d11..c6fe4d8858e 100644
--- a/arch/arm/mach-imx/romapi.c
+++ b/arch/arm/mach-imx/romapi.c
@@ -9,7 +9,7 @@ DECLARE_GLOBAL_DATA_PTR;
u32 rom_api_download_image(u8 *dest, u32 offset, u32 size)
{
u32 xor = (uintptr_t)dest ^ offset ^ size;
- volatile gd_t *sgd = gd;
+ gd_t *sgd = gd;
u32 ret;
ret = g_rom_api->download_image(dest, offset, size, xor);
@@ -21,7 +21,7 @@ u32 rom_api_download_image(u8 *dest, u32 offset, u32 size)
u32 rom_api_query_boot_infor(u32 info_type, u32 *info)
{
u32 xor = info_type ^ (uintptr_t)info;
- volatile gd_t *sgd = gd;
+ gd_t *sgd = gd;
u32 ret;
ret = g_rom_api->query_boot_infor(info_type, info, xor);
@@ -34,7 +34,7 @@ extern struct rom_api *g_rom_api;
enum boot_device get_boot_device(void)
{
- volatile gd_t *pgd = gd;
+ gd_t *pgd = gd;
int ret;
u32 boot;
u16 boot_type;
diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h
index 4ac886933c6..aea2ccabe08 100644
--- a/arch/m68k/include/asm/global_data.h
+++ b/arch/m68k/include/asm/global_data.h
@@ -32,11 +32,6 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
-#if 0
-extern gd_t *global_data;
-#define DECLARE_GLOBAL_DATA_PTR gd_t *gd = global_data
-#else
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("d7")
-#endif
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("d7")
#endif /* __ASM_GBL_DATA_H */
diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h
index bb4112f22a3..f7922fac41c 100644
--- a/arch/microblaze/include/asm/global_data.h
+++ b/arch/microblaze/include/asm/global_data.h
@@ -18,7 +18,7 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r31")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r31")
#define gd_cpuinfo() ((struct microblaze_cpuinfo *)&gd->arch.cpuinfo)
diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h
index 147a95ecea8..265dd2a3ec4 100644
--- a/arch/mips/include/asm/global_data.h
+++ b/arch/mips/include/asm/global_data.h
@@ -44,6 +44,6 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("k0")
#endif /* __ASM_GBL_DATA_H */
diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index cc2ce617350..26cbc7854d9 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -93,7 +93,7 @@ struct arch_global_data {
#include <asm-generic/global_data.h>
-#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
+#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r2")
#include <asm/u-boot.h>
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
index 47b5e2cfc8f..33f2b5ec5c8 100644
--- a/arch/riscv/include/asm/global_data.h
+++ b/arch/riscv/include/asm/global_data.h
@@ -68,7 +68,7 @@ static inline gd_t *get_gd(void)
#endif
-static inline void set_gd(volatile gd_t *gd_ptr)
+static inline void set_gd(gd_t *gd_ptr)
{
#ifdef CONFIG_64BIT
asm volatile("ld gp, %0\n" : : "m"(gd_ptr));
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 24b0e52a2a2..754bc6a6519 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -58,7 +58,7 @@ static efi_handle_t current_image;
* restriction so we need to manually swap its and our view of that register on
* EFI callback entry/exit.
*/
-static volatile gd_t *efi_gd, *app_gd;
+static gd_t *efi_gd, *app_gd;
#endif
efi_status_t efi_uninstall_protocol
diff --git a/lib/trace.c b/lib/trace.c
index 1d5f7dec979..3d54dfaddc0 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -66,7 +66,7 @@ static inline uintptr_t __attribute__((no_instrument_function))
/**
* trace_gd - the value of the gd register
*/
-static volatile gd_t *trace_gd;
+static gd_t *trace_gd;
/**
* trace_save_gd() - save the value of the gd register
@@ -86,7 +86,7 @@ static void notrace trace_save_gd(void)
*/
static void notrace trace_swap_gd(void)
{
- volatile gd_t *temp_gd = trace_gd;
+ gd_t *temp_gd = trace_gd;
trace_gd = gd;
set_gd(temp_gd);