Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33f8c40a authored by Vegard Nossum's avatar Vegard Nossum Committed by Ingo Molnar
Browse files

x86: add memory clobber in switch_to()



Segment registers are reloaded, so we should add a memory clobber. The
generated assembly code is identical in my tests, but this doesn't mean
it is necessarily true for all configurations/compilers.

x86_64 already has the memory clobber.

Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3e6de5a3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -64,7 +64,10 @@ do { \
		       							\
		       /* regparm parameters for __switch_to(): */	\
		       [prev]     "a" (prev),				\
		       [next]     "d" (next));				\
		       [next]     "d" (next)				\
									\
		     : /* reloaded segment registers */			\
			"memory");					\
} while (0)

/*