diff options
| author | Tom Rini <[email protected]> | 2025-06-13 16:57:34 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-06-13 16:57:34 -0600 |
| commit | 2556caa89caba6c3d4df7910828119bc65beb1f0 (patch) | |
| tree | 1381f1957105fca50895e85b74101adcd75f6f6f /arch/powerpc/include | |
| parent | f73450918d66565c5efacf2bb57227ba94bdaa40 (diff) | |
| parent | ae86cd8c59fe08c9a37d14dbd6e42190dda2a0d4 (diff) | |
Merge patch series "drop volatile from global data"
Rasmus Villemoes <[email protected]> says:
There's really no reason for the gd pointer to have the volatile
qualifier.
In fact, I claim that it's completely unnecessary and just pessimizes
code generation and forces ugly casts in lots of places. For example,
see the casts in drivers/core/tag.c where elements are added to
gd->dm_taglist, or a helper such as cyclic_get_list() that should not
be needed.
Also, it is what ends up standing in the way of an otherwise
innocent code cleanup of list.h:
https://lore.kernel.org/u-boot/20250522165656.GB2179216@bill-the-cat/
Note that riscv, x86 as well as arm64 with LTO enabled has not had
this volatile qualifier, so it's unlikely there's any generic code
that depends on it.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/include')
| -rw-r--r-- | arch/powerpc/include/asm/global_data.h | 2 |
1 files changed, 1 insertions, 1 deletions
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> |
