diff options
author | Abhishek Singh Tomar <abhishek@linux.ibm.com> | 2022-01-24 19:26:12 +0530 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-02-04 08:35:25 +0100 |
commit | a9bc782c843250a17255236acc210fbbe16ddf78 (patch) | |
tree | a1e47431d10c638dea932bc3574d38f4365e482e /hw | |
parent | 095cef27f0f4aad58266516846e65363418cf7f1 (diff) | |
download | skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.zip skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.tar.gz skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.tar.bz2 |
Fix array-bound compilation warnings
Resolves : the warray bounds warning during compilation
/build/libc/include/string.h:34:16: warning: '__builtin_memset' offset [0, 2097151] is out of the bounds [0, 0] [-Warray-bounds]
34 | #define memset __builtin_memset
hw/fsp/fsp.c:1855:9: note: in expansion of macro 'memset'
1855 | memset(fsp_tce_table, 0, PSI_TCE_TABLE_SIZE);
use volatile pointer to avoid optimization introduced with gcc-11 on constant
address assignment to pointer.
Signed-off-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/fsp/fsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 2c5f9d7..2fd9e5f 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -91,7 +91,7 @@ static enum ipl_state ipl_state = ipl_initial; static struct fsp *first_fsp; static struct fsp *active_fsp; static u16 fsp_curseq = 0x8000; -static __be64 *fsp_tce_table; +static __be64 *skiboot_constant_addr fsp_tce_table; #define FSP_INBOUND_SIZE 0x00100000UL static void *fsp_inbound_buf = NULL; |