[PATCH master 2/7] include: zero_page: hide possibly NULL pointer variable from optimizer
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon May 22 23:46:18 PDT 2023
On 22.05.23 07:22, Ahmad Fatoum wrote:
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> include/zero_page.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/zero_page.h b/include/zero_page.h
> index 26a12246f155..a71c0e0b8733 100644
> --- a/include/zero_page.h
> +++ b/include/zero_page.h
> @@ -44,6 +44,8 @@ static inline void *zero_page_memcpy(void *dest, const void *src, size_t count)
> {
> void *ret;
>
> + OPTIMIZER_HIDE_VAR(dest);
> +
> zero_page_access();
> ret = memcpy(dest, src, count);
> zero_page_faulting();
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list