1. 25 1月, 2012 1 次提交
  2. 13 12月, 2011 1 次提交
  3. 27 11月, 2011 1 次提交
  4. 17 10月, 2011 2 次提交
  5. 02 10月, 2011 1 次提交
  6. 08 8月, 2011 1 次提交
    • L
      arm: remove "optimized" SHA1 routines · 4d448714
      Linus Torvalds 提交于
      Since commit 1eb19a12 ("lib/sha1: use the git implementation of
      SHA-1"), the ARM SHA1 routines no longer work.  The reason? They
      depended on the larger 320-byte workspace, and now the sha1 workspace is
      just 16 words (64 bytes).  So the assembly version would overwrite the
      stack randomly.
      
      The optimized asm version is also probably slower than the new improved
      C version, so there's no reason to keep it around.  At least that was
      the case in git, where what appears to be the same assembly language
      version was removed two years ago because the optimized C BLK_SHA1 code
      was faster.
      Reported-and-tested-by: NJoachim Eastwood <manabian@gmail.com>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d448714
  7. 13 7月, 2011 1 次提交
  8. 28 5月, 2011 1 次提交
  9. 22 2月, 2011 1 次提交
  10. 20 2月, 2011 1 次提交
  11. 03 2月, 2011 2 次提交
  12. 11 1月, 2011 1 次提交
  13. 25 11月, 2010 1 次提交
  14. 04 11月, 2010 1 次提交
    • C
      ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs · 247055aa
      Catalin Marinas 提交于
      This patch removes the domain switching functionality via the set_fs and
      __switch_to functions on cores that have a TLS register.
      
      Currently, the ioremap and vmalloc areas share the same level 1 page
      tables and therefore have the same domain (DOMAIN_KERNEL). When the
      kernel domain is modified from Client to Manager (via the __set_fs or in
      the __switch_to function), the XN (eXecute Never) bit is overridden and
      newer CPUs can speculatively prefetch the ioremap'ed memory.
      
      Linux performs the kernel domain switching to allow user-specific
      functions (copy_to/from_user, get/put_user etc.) to access kernel
      memory. In order for these functions to work with the kernel domain set
      to Client, the patch modifies the LDRT/STRT and related instructions to
      the LDR/STR ones.
      
      The user pages access rights are also modified for kernel read-only
      access rather than read/write so that the copy-on-write mechanism still
      works. CPU_USE_DOMAINS gets disabled only if the hardware has a TLS register
      (CPU_32v6K is defined) since writing the TLS value to the high vectors page
      isn't possible.
      
      The user addresses passed to the kernel are checked by the access_ok()
      function so that they do not point to the kernel space.
      Tested-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      247055aa
  15. 26 7月, 2010 1 次提交
  16. 24 6月, 2010 1 次提交
  17. 08 5月, 2010 1 次提交
  18. 21 4月, 2010 1 次提交
    • R
      ARM: fix build error in arch/arm/kernel/process.c · 4260415f
      Russell King 提交于
      /tmp/ccJ3ssZW.s: Assembler messages:
      /tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'
      
      This is caused because:
      
      	.section .data
      	.section .text
      	.section .text
      	.previous
      
      does not return us to the .text section, but the .data section; this
      makes use of .previous dangerous if the ordering of previous sections
      is not known.
      
      Fix up the other users of .previous; .pushsection and .popsection are
      a safer pairing to use than .section and .previous.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4260415f
  19. 30 3月, 2010 2 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
    • C
      ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds · fd522a8d
      Catalin Marinas 提交于
      When compiling the kernel to Thumb-2, using a 16-bit NOP in the
      memmove() implementation causes the preceding ADD PC instruction to
      branch incorrectly in the middle of a 32-bit LDR or STR instruction. The
      memmove() code is now similar to the memcpy() template.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fd522a8d
  20. 16 9月, 2009 2 次提交
  21. 14 8月, 2009 1 次提交
  22. 24 7月, 2009 2 次提交
  23. 30 5月, 2009 4 次提交
    • N
      [ARM] alternative copy_to_user: more precise fallback threshold · c626e3f5
      Nicolas Pitre 提交于
      Previous size thresholds were guessed from various user space benchmarks
      using a kernel with and without the alternative uaccess option.  This
      is however not as precise as a kernel based test to measure the real
      speed of each method.
      
      This adds a simple test bench to show the time needed for each method.
      With this, the optimal size treshold for the alternative implementation
      can be determined with more confidence.  It appears that the optimal
      threshold for both copy_to_user and clear_user is around 64 bytes. This
      is not a surprise knowing that the memcpy and memset implementations
      need at least 64 bytes to achieve maximum throughput.
      
      One might suggest that such test be used to determine the optimal
      threshold at run time instead, but results are near enough to 64 on
      tested targets concerned by this alternative copy_to_user implementation,
      so adding some overhead associated with a variable threshold is probably
      not worth it for now.
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      c626e3f5
    • N
      [ARM] lower overhead with alternative copy_to_user for small copies · cb9dc92c
      Nicolas Pitre 提交于
      Because the alternate copy_to_user implementation has a higher setup cost
      than the standard implementation, the size of the memory area to copy
      is tested and the standard implementation invoked instead when that size
      is too small.  Still, that test is made after the processor has preserved
      a bunch of registers on the stack which have to be reloaded right away
      needlessly in that case, causing a measurable performance regression
      compared to plain usage of the standard implementation only.
      
      To make the size test overhead negligible, let's factorize it out of
      the alternate copy_to_user function where it is clear to the compiler
      that no stack frame is needed.  Thanks to CONFIG_ARM_UNWIND allowing
      for frame pointers to be disabled and tail call optimization to kick in,
      the overhead in the small copy case becomes only 3 assembly instructions.
      
      A similar trick is applied to clear_user as well.
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      cb9dc92c
    • L
      [ARM] alternative copy_to_user/clear_user implementation · 39ec58f3
      Lennert Buytenhek 提交于
      This implements {copy_to,clear}_user() by faulting in the userland
      pages and then using the regular kernel mem{cpy,set}() to copy the
      data (while holding the page table lock).  This is a win if the regular
      mem{cpy,set}() implementations are faster than the user copy functions,
      which is the case e.g. on Feroceon, where 8-word STMs (which memcpy()
      uses under the right conditions) give significantly higher memory write
      throughput than a sequence of individual 32bit stores.
      
      Here are numbers for page sized buffers on some Feroceon cores:
      
       - copy_to_user on Orion5x goes from 51 MB/s to 83 MB/s
       - clear_user on Orion5x goes from 89MB/s to 314MB/s
       - copy_to_user on Kirkwood goes from 240 MB/s to 356 MB/s
       - clear_user on Kirkwood goes from 367 MB/s to 1108 MB/s
       - copy_to_user on Disco-Duo goes from 248 MB/s to 398 MB/s
       - clear_user on Disco-Duo goes from 328 MB/s to 1741 MB/s
      
      Because the setup cost is non negligible, this is worthwhile only if
      the amount of data to copy is large enough.  The operation falls back
      to the standard implementation when the amount of data is below a certain
      threshold. This threshold was determined empirically, however some targets
      could benefit from a lower runtime determined value for optimal results
      eventually.
      
      In the copy_from_user() case, this technique does not provide any
      worthwhile performance gain due to the fact that any kind of read access
      allocates the cache and subsequent 32bit loads are just as fast as the
      equivalent 8-word LDM.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      Tested-by: NMartin Michlmayr <tbm@cyrius.com>
      39ec58f3
    • N
      [ARM] allow for alternative __copy_to_user/__clear_user implementations · a1f98849
      Nicolas Pitre 提交于
      This allows for optional alternative implementations of __copy_to_user
      and __clear_user, with a possible runtime fallback to the standard
      version when the alternative provides no gain over that standard
      version. This is done by making the standard __copy_to_user into a weak
      alias for the symbol __copy_to_user_std.  Same thing for __clear_user.
      
      Those two functions are particularly good candidates to have alternative
      implementations for, since they rely on the STRT instruction which has
      lower performances than STM instructions on some CPU cores such as
      the ARM1176 and Marvell Feroceon.
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      a1f98849
  24. 29 5月, 2009 1 次提交
  25. 27 11月, 2008 2 次提交
  26. 01 9月, 2008 3 次提交
  27. 29 8月, 2008 1 次提交
  28. 07 8月, 2008 2 次提交