From: Timur Tabi Date: Thu, 15 Mar 2012 22:41:02 +0000 (-0500) Subject: powerpc/epapr: add "memory" as a clobber to all hypercalls X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3b588c7efc84f15548afdda6a0d2f892fe83babc;p=mv-sheeva.git powerpc/epapr: add "memory" as a clobber to all hypercalls The "memory" clobber tells the compiler to ensure that all writes to memory are committed before the hypercall is made. "memory" is only necessary for hcalls where the Hypervisor will read or write guest memory. However, we add it to all hcalls because the impact is minimal, and we want to ensure that it's present for the hcalls that need it. Signed-off-by: Timur Tabi Signed-off-by: Kumar Gala --- diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h index f3b0c2cc9fe..976835d8f22 100644 --- a/arch/powerpc/include/asm/epapr_hcalls.h +++ b/arch/powerpc/include/asm/epapr_hcalls.h @@ -134,10 +134,15 @@ * whether they will be clobbered. * * Note that r11 can be used as an output parameter. + * + * The "memory" clobber is only necessary for hcalls where the Hypervisor + * will read or write guest memory. However, we add it to all hcalls because + * the impact is minimal, and we want to ensure that it's present for the + * hcalls that need it. */ /* List of common clobbered registers. Do not use this macro. */ -#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc" +#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory" #define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS #define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10"