Re: [tip:x86/mm] x86, mm: Redesign get_user with a __builtin_choose_expr hack

2013-02-12 Thread H. Peter Anvin
On 02/12/2013 03:49 PM, Linus Torvalds wrote: > On Tue, Feb 12, 2013 at 3:19 PM, H. Peter Anvin wrote: >> >> Yes, but there doesn't seem to be any other way to do this. gcc won't >> even allow "=cd" even if we know the variable is 64 bits, even though >> "=A" is documented to be equivalent to "=d

Re: [tip:x86/mm] x86, mm: Redesign get_user with a __builtin_choose_expr hack

2013-02-12 Thread Linus Torvalds
On Tue, Feb 12, 2013 at 3:19 PM, H. Peter Anvin wrote: > > Yes, but there doesn't seem to be any other way to do this. gcc won't > even allow "=cd" even if we know the variable is 64 bits, even though > "=A" is documented to be equivalent to "=da". No, "=da" means value "in edx _or_ %eax". Not t

Re: [tip:x86/mm] x86, mm: Redesign get_user with a __builtin_choose_expr hack

2013-02-12 Thread Russell King - ARM Linux
On Tue, Feb 12, 2013 at 03:06:51PM -0800, Linus Torvalds wrote: > So this looks clean, but I noticed something (that was true even of > the old 64-bit accesses) > > On Tue, Feb 12, 2013 at 12:55 PM, tip-bot for H. Peter Anvin > wrote: > > + register __inttype(*(ptr)) __val_gu asm("%edx");

Re: [tip:x86/mm] x86, mm: Redesign get_user with a __builtin_choose_expr hack

2013-02-12 Thread H. Peter Anvin
On 02/12/2013 03:06 PM, Linus Torvalds wrote: > So this looks clean, but I noticed something (that was true even of > the old 64-bit accesses) > > On Tue, Feb 12, 2013 at 12:55 PM, tip-bot for H. Peter Anvin > wrote: >> + register __inttype(*(ptr)) __val_gu asm("%edx");\ >

Re: [tip:x86/mm] x86, mm: Redesign get_user with a __builtin_choose_expr hack

2013-02-12 Thread Linus Torvalds
So this looks clean, but I noticed something (that was true even of the old 64-bit accesses) On Tue, Feb 12, 2013 at 12:55 PM, tip-bot for H. Peter Anvin wrote: > + register __inttype(*(ptr)) __val_gu asm("%edx");\ How does gcc even alllow this? On x86-32, you cannot put a