1. 30 6月, 2010 1 次提交
  2. 02 11月, 2009 1 次提交
    • L
      compiler: Introduce __always_unused · 7b2a3513
      Li Zefan 提交于
      I wrote some code which is used as compile-time checker, and the
      code should be elided after compile.
      
      So I need to annotate the code as "always unused", compared to
      "maybe unused".
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <4AEE2CEC.8040206@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7b2a3513
  3. 13 3月, 2009 1 次提交
  4. 10 1月, 2009 1 次提交
  5. 03 1月, 2009 1 次提交
    • L
      Sanitize gcc version header includes · f153b821
      Linus Torvalds 提交于
       - include the gcc version-dependent header files from the generic gcc
         header file, rather than the other way around (iow: don't make the
         non-gcc header file have to know about gcc versions)
      
       - don't include compiler-gcc4.h for gcc 5 (for whenever it gets
         released).  That's just confusing and made us do odd things in the
         gcc4 header file (testing that we really had version 4!)
      
       - generate the name from the __GNUC__ version directly, rather than
         having a mess of #if conditionals.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f153b821
  6. 30 4月, 2008 1 次提交
  7. 26 4月, 2008 2 次提交
    • I
      generic: make optimized inlining arch-opt-in · 765c68bd
      Ingo Molnar 提交于
      Stephen Rothwell reported that linux-next did not build on powerpc64.
      
      make optimized inlining dependent on architecture opt-in.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      765c68bd
    • I
      x86: add optimized inlining · 60a3cdd0
      Ingo Molnar 提交于
      add CONFIG_OPTIMIZE_INLINING=y.
      
      allow gcc to optimize the kernel image's size by uninlining
      functions that have been marked 'inline'. Previously gcc was
      forced by Linux to always-inline these functions via a gcc
      attribute:
      
       #define inline	inline __attribute__((always_inline))
      
      Especially when the user has already selected
      CONFIG_OPTIMIZE_FOR_SIZE=y this can make a huge difference in
      kernel image size (using a standard Fedora .config):
      
         text    data     bss     dec           hex filename
         5613924  562708 3854336 10030968    990f78 vmlinux.before
         5486689  562708 3854336  9903733    971e75 vmlinux.after
      
      that's a 2.3% text size reduction (!).
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60a3cdd0
  8. 19 10月, 2007 1 次提交
  9. 17 10月, 2007 1 次提交
  10. 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
  11. 08 5月, 2007 1 次提交
  12. 12 2月, 2007 1 次提交
    • R
      [PATCH] extend the set of "__attribute__" shortcut macros · 82ddcb04
      Robert P. J. Day 提交于
      Extend the set of "__attribute__" shortcut macros, and remove identical
      (and now superfluous) definitions from a couple of source files.
      
      based on a page at robert love's blog:
      
      	http://rlove.org/log/2005102601
      
      extend the set of shortcut macros defined in compiler-gcc.h with the
      following:
      
      #define __packed                       __attribute__((packed))
      #define __weak                         __attribute__((weak))
      #define __naked                        __attribute__((naked))
      #define __noreturn                     __attribute__((noreturn))
      #define __pure                         __attribute__((pure))
      #define __aligned(x)                   __attribute__((aligned(x)))
      #define __printf(a,b)                  __attribute__((format(printf,a,b)))
      
      Once these are in place, it's up to subsystem maintainers to decide if they
      want to take advantage of them.  there is already a strong precedent for
      using shortcuts like this in the source tree.
      
      The ones that might give people pause are "__aligned" and "__printf", but
      shortcuts for both of those are already in use, and in some ways very
      confusingly.  note the two very different definitions for a macro named
      "ALIGNED":
      
        drivers/net/sgiseeq.c:#define ALIGNED(x) ((((unsigned long)(x)) + 0xf) & ~(0xf))
        drivers/scsi/ultrastor.c:#define ALIGNED(x) __attribute__((aligned(x)))
      
      also:
      
        include/acpi/platform/acgcc.h:
          #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1)))
      
      Given the precedent, then, it seems logical to at least standardize on a
      consistent set of these macros.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      82ddcb04
  13. 11 1月, 2006 1 次提交
  14. 09 1月, 2006 1 次提交
  15. 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