aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorAbhishek Singh Tomar <abhishek@linux.ibm.com>2022-01-24 19:26:12 +0530
committerCédric Le Goater <clg@kaod.org>2022-02-04 08:35:25 +0100
commita9bc782c843250a17255236acc210fbbe16ddf78 (patch)
treea1e47431d10c638dea932bc3574d38f4365e482e /hdata
parent095cef27f0f4aad58266516846e65363418cf7f1 (diff)
downloadskiboot-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 'hdata')
-rw-r--r--hdata/spira.c2
-rw-r--r--hdata/spira.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 1a35146..fbb14b0 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -236,7 +236,7 @@ __section(".spirah.data") struct spirah spirah = {
};
/* The service processor SPIRA-S structure */
-struct spiras *spiras;
+struct spiras *skiboot_constant_addr spiras;
/* Overridden for testing. */
#ifndef spira_check_ptr
diff --git a/hdata/spira.h b/hdata/spira.h
index 8def23b..c0eb2a0 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -150,7 +150,7 @@ struct spiras {
u8 reserved[0x180];
} __packed __align(0x100);
-extern struct spiras *spiras;
+extern struct spiras *skiboot_constant_addr spiras;
/* This macro can be used to check the validity of a pointer returned