1. 22 7月, 2007 1 次提交
    • A
      x86: Support __attribute__((__cold__)) in gcc 4.3 · a586df06
      Andi Kleen 提交于
      gcc 4.3 supports a new __attribute__((__cold__)) to mark functions cold. Any
      path directly leading to a call of this function will be unlikely. And gcc
      will try to generate smaller code for the function itself.
      
      Please use with care. The code generation advantage isn't large and in most
      cases it is not worth uglifying code with this.
      
      This patch marks some common error functions like panic(), printk()
      as cold.  This will longer term make many unlikely()s unnecessary, although
      we can keep them for now for older compilers.
      
      BUG is not marked cold because there is currently no way to tell
      gcc to mark a inline function told.
      
      Also all __init and __exit functions are marked cold. With a non -Os
      build this will tell the compiler to generate slightly smaller code
      for them. I think it currently only uses less alignments for labels,
      but that might change in the future.
      
      One disadvantage over *likely() is that they cannot be easily instrumented
      to verify them.
      
      Another drawback is that only the latest gcc 4.3 snapshots support this.
      Unfortunately we cannot detect this using the preprocessor. This means older
      snapshots will fail now. I don't think that's a problem because they are
      unreleased compilers that nobody should be using.
      
      gcc also has a __hot__ attribute, but I don't see any sense in using
      this in the kernel right now. But someday I hope gcc will be able
      to use more aggressive optimizing for hot functions even in -Os,
      if that happens it should be added.
      
      Includes compile fix from Thomas Gleixner.
      
      Cc: Jan Hubicka <jh@suse.cz>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a586df06
  2. 22 5月, 2007 1 次提交
  3. 10 5月, 2007 1 次提交
    • D
      compiler: introduce __used and __maybe_unused · 0d7ebbbc
      David Rientjes 提交于
      __used is defined to be __attribute__((unused)) for all pre-3.3 gcc
      compilers to suppress warnings for unused functions because perhaps they
      are referenced only in inline assembly.  It is defined to be
      __attribute__((used)) for gcc 3.3 and later so that the code is still
      emitted for such functions.
      
      __maybe_unused is defined to be __attribute__((unused)) for both function
      and variable use if it could possibly be unreferenced due to the evaluation
      of preprocessor macros.  Function prototypes shall be marked with
      __maybe_unused if the actual definition of the function is dependant on
      preprocessor macros.
      
      No update to compiler-intel.h is necessary because ICC supports both
      __attribute__((used)) and __attribute__((unused)) as specified by the gcc
      manual.
      
      __attribute_used__ is deprecated and will be removed once all current
      code is converted to using __used.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0d7ebbbc
  4. 27 3月, 2007 1 次提交
  5. 13 12月, 2006 1 次提交
  6. 01 10月, 2006 1 次提交
  7. 30 9月, 2006 1 次提交
  8. 26 9月, 2006 1 次提交
  9. 04 5月, 2006 1 次提交
  10. 02 5月, 2006 1 次提交
  11. 09 1月, 2006 1 次提交
    • A
      [PATCH] Abandon gcc-2.95.x · fd285bb5
      Andrew Morton 提交于
      There's one scsi driver which doesn't compile due to weird __VA_ARGS__ tricks
      and the rather useful scsi/sd.c is currently getting an ICE.  None of the new
      SAS code compiles, due to extensive use of anonymous unions.  The V4L guys are
      very good at exploiting the gcc-2.95.x macro expansion bug (_why_ does each
      driver need to implement its own debug macros?) and various people keep on
      sneaking in anonymous unions, which are rather nice.
      
      Plus anonymous unions are rather useful.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fd285bb5
  12. 01 5月, 2005 1 次提交
  13. 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