powerpc/epapr: add "memory" as a clobber to all hypercalls
authorTimur Tabi <timur@freescale.com>
Thu, 15 Mar 2012 22:41:02 +0000 (17:41 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 29 Mar 2012 13:14:14 +0000 (08:14 -0500)
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 <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/include/asm/epapr_hcalls.h

index f3b0c2cc9fea0ce611d07eb7fde72541d62860fa..976835d8f22e2a378f6166ff3ef20b37f7e1e6f9 100644 (file)
  * 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"
This page took 0.026589 seconds and 5 git commands to generate.