Skip to content

Commit

Permalink
[PATCH] Type checking for write_pda()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Andi Kleen committed Sep 26, 2006
1 parent baf5695 commit 85691f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-x86_64/pda.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ extern struct x8664_pda _proxy_pda;

#define pda_to_op(op,field,val) do { \
typedef typeof(_proxy_pda.field) T__; \
switch (sizeof(_proxy_pda.field)) { \
if (0) { T__ tmp__; tmp__ = (val); } \
switch (sizeof(_proxy_pda.field)) { \
case 2: \
asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : \
"ri" ((T__)val),"i"(pda_offset(field))); break; \
Expand Down

0 comments on commit 85691f1

Please sign in to comment.