27 Jul, 2007

1 commit


22 Jul, 2007

1 commit

  • 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
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

22 May, 2007

1 commit


10 May, 2007

1 commit

  • __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
    Cc: Adrian Bunk
    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

27 Mar, 2007

1 commit

  • Change prototypes for __chk_user_ptr and __chk_io_ptr to take const
    void* instead of void*, so that code can pass "const void *" to them.

    (Right now sparse does not warn about passing const void* to void*
    functions, but that is a separate bug that I believe Josh is working on,
    and once sparse does check this, the changed prototypes will be
    necessary.)

    Signed-off-by: Russ Cox
    Signed-off-by: Josh Triplett
    Acked-by: Christopher Li
    Signed-off-by: Linus Torvalds

    Russ Cox
     

13 Dec, 2006

1 commit


01 Oct, 2006

1 commit

  • The lock annotation macros __acquires, __releases, __acquire, and __release
    all currently throw away the lock expression passed as an argument. Now
    that sparse can parse __context__ and __attribute__((context)) with a
    context expression, pass the lock expression down to sparse as the context
    expression. This requires a version of sparse from GIT commit
    37475a6c1c3e66219e68d912d5eb833f4098fd72 or later.

    Signed-off-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     

30 Sep, 2006

1 commit


26 Sep, 2006

1 commit


04 May, 2006

1 commit


02 May, 2006

1 commit


09 Jan, 2006

1 commit

  • 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: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

01 May, 2005

1 commit

  • Add a deprecated_for_modules macro that allows symbols to be deprecated only
    when used by modules, as suggested by Andrew Morton some months back.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     

17 Apr, 2005

1 commit

  • 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!

    Linus Torvalds