mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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>
This commit is contained in:
parent
2a78aeb107
commit
3b588c7efc
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue