1. 29 9月, 2009 1 次提交
    • A
      x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy · ff60fab7
      Arjan van de Ven 提交于
      GCC provides reasonable memset/memcpy functions itself, with __builtin_memset
      and __builtin_memcpy. For the "unknown" cases, it'll fall back to our
      current existing functions, but for fixed size versions it'll inline
      something smart. Quite often that will be the same as we have now,
      but sometimes it can do something smarter (for example, if the code
      then sets the first member of a struct, it can do a shorter memset).
      
      In addition, and this is more important, gcc knows which registers and
      such are not clobbered (while for our asm version it pretty much
      acts like a compiler barrier), so for various cases it can avoid reloading
      values.
      
      The effect on codesize is shown below on my typical laptop .config:
      
         text	   data	    bss	    dec	    hex	filename
      5605675	2041100	6525148	14171923	 d83f13	vmlinux.before
      5595849	2041668	6525148	14162665	 d81ae9	vmlinux.after
      
      Due to some not-so-good behavior in the gcc 3.x series, this change
      is only done for GCC 4.x and above.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      LKML-Reference: <20090928142122.6fc57e9c@infradead.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ff60fab7
  2. 21 9月, 2009 1 次提交
    • F
      x86: Trivial whitespace cleanups · 878f4f53
      Felipe Contreras 提交于
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Vegard Nossum <vegardno@ifi.uio.no>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alok N Kataria <akataria@vmware.com>
      Cc: "Tan Wei Chong" <wei.chong.tan@intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Bob Moore <robert.moore@intel.com>
      LKML-Reference: <1253137123-18047-2-git-send-email-felipe.contreras@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      878f4f53
  3. 15 6月, 2009 1 次提交
    • V
      x86: add hooks for kmemcheck · f8561296
      Vegard Nossum 提交于
      The hooks that we modify are:
      - Page fault handler (to handle kmemcheck faults)
      - Debug exception handler (to hide pages after single-stepping
        the instruction that caused the page fault)
      
      Also redefine memset() to use the optimized version if kmemcheck is
      enabled.
      
      (Thanks to Pekka Enberg for minimizing the impact on the page fault
      handler.)
      
      As kmemcheck doesn't handle MMX/SSE instructions (yet), we also disable
      the optimized xor code, and rely instead on the generic C implementation
      in order to avoid false-positive warnings.
      Signed-off-by: NVegard Nossum <vegardno@ifi.uio.no>
      
      [whitespace fixlet]
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      
      [rebased for mainline inclusion]
      Signed-off-by: NVegard Nossum <vegardno@ifi.uio.no>
      f8561296
  4. 23 10月, 2008 2 次提交
  5. 23 7月, 2008 1 次提交
    • V
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum 提交于
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  6. 27 5月, 2008 1 次提交
  7. 25 5月, 2008 1 次提交
  8. 17 4月, 2008 1 次提交
  9. 04 2月, 2008 1 次提交
  10. 18 10月, 2007 1 次提交
  11. 11 10月, 2007 1 次提交
  12. 22 7月, 2007 1 次提交
    • A
      i386: Move all simple string operations out of line · b520b85a
      Andi Kleen 提交于
      The compiler generally generates reasonable inline code for the simple
      cases and for the rest it's better for code size for them to be out of line.
      Also there they can be potentially optimized more in the future.
      
      In fact they probably should be in a .S file because they're all pure
      assembly, but that's for another day.
      
      Also some code style cleanup on them while I was on it (this seems
      to be the last untouched really early Linux code)
      
      This saves ~12k text for a defconfig kernel with gcc 4.1.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b520b85a
  13. 26 4月, 2006 1 次提交
  14. 15 1月, 2006 1 次提交
  15. 25 6月, 2005 1 次提交
    • L
      Add "memory" clobbers to the x86 inline asm of strncmp and friends · 793ae774
      Linus Torvalds 提交于
      They don't actually clobber memory, but gcc doesn't even know they
      _read_ memory, so can apparently re-order memory accesses around them.
      
      Which obviously does the wrong thing if the memory access happens to
      change the memory that the compare function is accessing..
      
      Verified to fix a strange boot problem by Jens Axboe.
      793ae774
  16. 01 5月, 2005 1 次提交
  17. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4