sandbox: Correct guard around readq/writeq

In include/linux/io.h the declarations of ioread64 and iowrite64
which make use of readq/writeq are guarded with CONFIG_64BIT so
guard the sandbox declarations of readq and writeq also with
CONFIG_64BIT.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2024-12-16 18:07:33 +00:00
committed by Tom Rini
parent afbc1fa5f1
commit 99afa58e6d

View File

@@ -39,13 +39,13 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size);
#define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8) #define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8)
#define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16) #define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16)
#define readl(addr) sandbox_read((const void *)addr, SB_SIZE_32) #define readl(addr) sandbox_read((const void *)addr, SB_SIZE_32)
#ifdef CONFIG_SANDBOX64 #ifdef CONFIG_64BIT
#define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64) #define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64)
#endif #endif
#define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8) #define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8)
#define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16) #define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16)
#define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32) #define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32)
#ifdef CONFIG_SANDBOX64 #ifdef CONFIG_64BIT
#define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64) #define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64)
#endif #endif