diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-25 08:27:46 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-25 08:27:46 +0100 |
commit | 95f66b3770d6d0755b4a2d818c237574ffd74e4c (patch) | |
tree | 61889ead58d8e262e6451c75194c3c68a21c4181 /arch/x86/include/asm | |
parent | 46cb27f5169d37be38be8e5729b9a0100e989fa8 (diff) | |
parent | 9f331119a4f95a44d918fe6d5e85998fabf99b72 (diff) |
Merge branch 'x86/asm' into x86/mm
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/irq_vectors.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/uaccess_64.h | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index b07278c55e9..8a285f356f8 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h @@ -128,7 +128,7 @@ #ifndef __ASSEMBLY__ static inline int invalid_vm86_irq(int irq) { - return irq < 3 || irq > 15; + return irq < FIRST_VM86_IRQ || irq > LAST_VM86_IRQ; } #endif diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 84210c479fc..987a2c10fe2 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -192,14 +192,26 @@ static inline int __copy_from_user_nocache(void *dst, const void __user *src, unsigned size) { might_sleep(); - return __copy_user_nocache(dst, src, size, 1); + /* + * In practice this limit means that large file write()s + * which get chunked to 4K copies get handled via + * non-temporal stores here. Smaller writes get handled + * via regular __copy_from_user(): + */ + if (likely(size >= PAGE_SIZE)) + return __copy_user_nocache(dst, src, size, 1); + else + return __copy_from_user(dst, src, size); } static inline int __copy_from_user_inatomic_nocache(void *dst, const void __user *src, unsigned size) { - return __copy_user_nocache(dst, src, size, 0); + if (likely(size >= PAGE_SIZE)) + return __copy_user_nocache(dst, src, size, 0); + else + return __copy_from_user_inatomic(dst, src, size); } unsigned long |