summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-02-12 11:47:31 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-12 12:46:40 -0800
commit3578baaed4613a9fc09bab9f79f6ce2ac682e8a3 (patch)
tree2f58dbf5dcc6325fd87f17ccafd00f08bed741d8 /arch/x86/include/asm/processor.h
parent16640165c9079e2cf36fdcfca093f29663a716f7 (diff)
x86, mm: Redesign get_user with a __builtin_choose_expr hack
Instead of using a bitfield, use an odd little trick using typeof, __builtin_choose_expr, and sizeof. __builtin_choose_expr is explicitly defined to not convert its type (its argument is required to be a constant expression) so this should be well-defined. The code is still not 100% preturbation-free versus the baseline before 64-bit get_user(), but the differences seem to be very small, mostly related to padding and to gcc deciding when to spill registers. Cc: Jamie Lokier <jamie@shareable.org> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/511A8922.6050908@zytor.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions