diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2011-01-06 22:48:57 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-01-06 22:48:57 -0500 |
commit | 0735ac1f2551d9f9d356126aaf3b1110150918e6 (patch) | |
tree | 4be8cf2b220bcd51053da2f67101f6ca4ceaf1aa /drivers/char | |
parent | dffa18449a334cf436c1fabfb2fcf7d4240c994b (diff) |
hwrng: via_rng - Fix asm constraints
The inline asm to invoke xstore did not specify the constraints
correctly. In particular, dx/di should have been marked as output
registers as well as input as they're modified by xstore.
Thanks to Mario Holbe for creating this patch and testing it.
Tested-by: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/via-rng.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c index 794aacb715c1..7f86666bb393 100644 --- a/drivers/char/hw_random/via-rng.c +++ b/drivers/char/hw_random/via-rng.c | |||
@@ -81,8 +81,7 @@ static inline u32 xstore(u32 *addr, u32 edx_in) | |||
81 | ts_state = irq_ts_save(); | 81 | ts_state = irq_ts_save(); |
82 | 82 | ||
83 | asm(".byte 0x0F,0xA7,0xC0 /* xstore %%edi (addr=%0) */" | 83 | asm(".byte 0x0F,0xA7,0xC0 /* xstore %%edi (addr=%0) */" |
84 | :"=m"(*addr), "=a"(eax_out) | 84 | : "=m" (*addr), "=a" (eax_out), "+d" (edx_in), "+D" (addr)); |
85 | :"D"(addr), "d"(edx_in)); | ||
86 | 85 | ||
87 | irq_ts_restore(ts_state); | 86 | irq_ts_restore(ts_state); |
88 | return eax_out; | 87 | return eax_out; |