aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/pda.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2006-09-26 04:52:39 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:39 -0400
commit85691f135db78f3548107a0abe383dfab3bc38fa (patch)
tree5bde2c801824b4c3d7e7d3def97b6a89ab178a1e /include/asm-x86_64/pda.h
parentbaf5695dd1a49bb48a3daf08726d7f243f42e97e (diff)
[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>
Diffstat (limited to 'include/asm-x86_64/pda.h')
-rw-r--r--include/asm-x86_64/pda.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h
index c2aac96ac323..5dadb201f769 100644
--- a/include/asm-x86_64/pda.h
+++ b/include/asm-x86_64/pda.h
@@ -49,7 +49,8 @@ extern struct x8664_pda _proxy_pda;
49 49
50#define pda_to_op(op,field,val) do { \ 50#define pda_to_op(op,field,val) do { \
51 typedef typeof(_proxy_pda.field) T__; \ 51 typedef typeof(_proxy_pda.field) T__; \
52 switch (sizeof(_proxy_pda.field)) { \ 52 if (0) { T__ tmp__; tmp__ = (val); } \
53 switch (sizeof(_proxy_pda.field)) { \
53case 2: \ 54case 2: \
54asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : \ 55asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : \
55 "ri" ((T__)val),"i"(pda_offset(field))); break; \ 56 "ri" ((T__)val),"i"(pda_offset(field))); break; \