mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-03 21:01:50 +00:00
[PATCH] Type checking for write_pda()
I just added type checking for assignments the PDA in the i386 PDA code. Here's the x86-64 equivalent. (Obviously this doesn't contain the latest x86-64 PDA change.) Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
parent
baf5695dd1
commit
85691f135d
1 changed files with 2 additions and 1 deletions
|
@ -49,6 +49,7 @@ extern struct x8664_pda _proxy_pda;
|
||||||
|
|
||||||
#define pda_to_op(op,field,val) do { \
|
#define pda_to_op(op,field,val) do { \
|
||||||
typedef typeof(_proxy_pda.field) T__; \
|
typedef typeof(_proxy_pda.field) T__; \
|
||||||
|
if (0) { T__ tmp__; tmp__ = (val); } \
|
||||||
switch (sizeof(_proxy_pda.field)) { \
|
switch (sizeof(_proxy_pda.field)) { \
|
||||||
case 2: \
|
case 2: \
|
||||||
asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : \
|
asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue