1/2 2.5.45 cleanup & add original copy_ro/from_user
PATCH 1/1 1/2 2.5.45 cleanup & add original copy_ro/from_user
The original copy_to/from_user routine, existed for long time, was deleted in 2.5.45 when the new faster_intel_copy went in. But it was very compact and was also optimal for old none-heavily-pipelined CPU, such as, i386/486/clasic pentium.
This patch will:
1) If it is not X86_MPENTIUMIII or 4, use the original copy routines, which does not exist in 2.5.45.
2) Cleanup. (Now it is easy to add faster copy for other CPU) The uaccess.h is separeted to uaccess.h uaccess-intel.h to avoid #ifdef stuff in usercopy.c. If we keep adding the different version of copy-to-user() for each CPU into usercopy.c, it will make it vary crummy.
Instead, header will solves the problem.
(Please somebody make uaccess-crusoe.h or could be SSE, Currently I am making for amd.)
Please apply both patches. They are against 2.5.45. *NO feature is deleted from these two patches*
Here comes the first patch, which is purely cleanup for uaccess.h and usercopy.c.
arch/i386/kernel/cpu/intel.c +0 -25
@@ -14,13 +14,6 @@static int disable_P4_HT__initdata =0 ;extern int trap_init_f00f_bug (void ); -#ifdef CONFIG_X86_INTEL_USERCOPY -/* -* Alignment at which movsl is preferred for bulk memory copies. -*/ -struct movsl_mask movsl_mask; -#endif -/* * Early probe support logic for ppro memory erratum #50 *
@@ -356,24 +349,6 @@/* Work around errata */ Intel_errata_workarounds (c); - -#ifdef CONFIG_X86_INTEL_USERCOPY -/* -* Set up the preferred alignment for movsl bulk memory moves -*/ -switch (c->x86) { -case 4 :/* 486: untested */ -break ; -case 5 :/* Old Pentia: untested */ -break ; -case 6 :/* PII/PIII only like movsl with 8-byte alignment */ - movsl_mask.mask =7 ; -break ; -case 15 :/* P4 is OK down to 8-byte alignment */ - movsl_mask.mask =7 ; -break ; - } -#endif }
arch/i386/kernel/i386_ksyms.c +1 -3
@@ -116,13 +116,11 @@EXPORT_SYMBOL (strncpy_from_user);EXPORT_SYMBOL (__strncpy_from_user); +EXPORT_SYMBOL (strnlen_user);EXPORT_SYMBOL (clear_user);EXPORT_SYMBOL (__clear_user);EXPORT_SYMBOL (copy_from_user); -EXPORT_SYMBOL (__copy_from_user);EXPORT_SYMBOL (copy_to_user); -EXPORT_SYMBOL (__copy_to_user); -EXPORT_SYMBOL (strnlen_user);EXPORT_SYMBOL (pci_alloc_consistent);EXPORT_SYMBOL (pci_free_consistent);
arch/i386/lib/usercopy.c +13 -302
338 lines not on this page · raw message
include/asm-i386/uaccess.h +101 -15
133 lines not on this page · raw message
Binary files linux-2.5.45/scripts/kconfig/mconf and linux-2.5.45-aki/scripts/kconfig/mconf differ