aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/epapr_hcalls.h
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2012-03-15 18:41:02 -0400
committerKumar Gala <galak@kernel.crashing.org>2012-03-29 09:14:14 -0400
commit3b588c7efc84f15548afdda6a0d2f892fe83babc (patch)
tree0978d6ec180f899259b5a4a8f8569e29cc6bef7d /arch/powerpc/include/asm/epapr_hcalls.h
parent2a78aeb1078994f6dab0173c2ecf5d9803ef0e8e (diff)
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 <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/epapr_hcalls.h')
-rw-r--r--arch/powerpc/include/asm/epapr_hcalls.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
index f3b0c2cc9fea..976835d8f22e 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -134,10 +134,15 @@
134 * whether they will be clobbered. 134 * whether they will be clobbered.
135 * 135 *
136 * Note that r11 can be used as an output parameter. 136 * Note that r11 can be used as an output parameter.
137 *
138 * The "memory" clobber is only necessary for hcalls where the Hypervisor
139 * will read or write guest memory. However, we add it to all hcalls because
140 * the impact is minimal, and we want to ensure that it's present for the
141 * hcalls that need it.
137*/ 142*/
138 143
139/* List of common clobbered registers. Do not use this macro. */ 144/* List of common clobbered registers. Do not use this macro. */
140#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc" 145#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
141 146
142#define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS 147#define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS
143#define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10" 148#define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10"