27 Jan, 2009

1 commit


21 Jan, 2009

1 commit


16 Jan, 2009

6 commits


15 Jan, 2009

2 commits

  • Requested by Sam.

    Signed-off-by: Andi Kleen
    Signed-off-by: Sam Ravnborg

    Andi Kleen
     
  • This reverts commit ad7a953c522ceb496611d127e51e278bfe0ff483.

    And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL")
    9bb482476c6c9d1ae033306440c51ceac93ea80c

    These stripping patches has caused a set of issues:

    1) People have reported compatibility issues with binutils due to
    lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2
    Reported by: Wenji
    2) ccache and distcc no longer works as expeced
    Reported by: Ted, Roland, + others
    3) The installed modules increased a lot in size
    Reported by: Ted, Davej + others

    Reported-by: Wenji Huang
    Reported-by: "Theodore Ts'o"
    Reported-by: Dave Jones
    Reported-by: Roland McGrath
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

13 Jan, 2009

1 commit

  • There has been some light flamewar on lkml about decoding oopses
    in modules (as part of the crashdump flamewar).

    Now this isn't rocket science, just the markup_oops.pl script
    cheaped out and didn't handle modules. But really; a flamewar
    all about that?? What happened to C++ in the kernel or reading
    files from inside the kernel?

    This patch adds module support to markup_oops.pl; it's not the
    most pretty perl but it works for my testcases...

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

11 Jan, 2009

1 commit


08 Jan, 2009

4 commits

  • I often change single options in .config files. Instead of using
    an editor or one of the frontends it's convenient to do this from
    the command line. It's also useful to do from automated build scripts
    when building different variants from a base config file.

    I extracted most of the CONFIG manipulation code from one of my
    build scripts into a new shell script scripts/config

    The script is not integrated with the normal Kconfig machinery
    and doesn't do any checking against Kconfig files, but just manipulates
    that text format. This is always done at make time anyways.

    I believe this script would be a useful standard addition for scripts/*

    Sample usage:

    ./scripts/config --disable smp
    Disable SMP in .config file

    ./scripts/config --file otherdir/.config --module e1000e
    Enable E1000E as module in otherdir/.config

    ./scripts/config --state smp
    y
    Check state of config option CONFIG_SMP

    After merging into git please make scripts/config executable

    Signed-off-by: Andi Kleen
    Signed-off-by: Sam Ravnborg

    Andi Kleen
     
  • This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/
    cscope targets. The Kbuild previously has this feature, but after
    moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears.

    It's something like this:

    $ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope

    Signed-off-by: Jike Song
    Signed-off-by: Sam Ravnborg

    Jike Song
     
  • Dave Jones, in his blog, had some feedback about the bootchart script:
    Primarily his complaint was that shorter delays weren't visualized.

    The reason for that was that too small delays will have their labels
    mixed up in the graph in an unreadable mess.

    This patch has a fix for this; for one, it makes the output wider,
    so more will fit.
    The second part is that smaller delays are now shown with a
    much smaller font for the label; while this isn't per se
    readable at a 1:1 zoom, at least you can zoom in with most SVG
    viewing applications and see what it is you are looking at.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Sam Ravnborg

    Arjan van de Ven
     
  • Rafael reported:

    I get the following error from 'make modules_install' on my test boxes:

    HOSTCC firmware/ihex2fw
    /home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system
    compilation terminated.
    make[3]: *** [firmware/ihex2fw] Error 1
    make[2]: *** [_modinst_post] Error 2
    make[1]: *** [sub-make] Error 2
    make: *** [all] Error 2

    where the configuration is that the kernel is compiled on a build box
    with 'make O= -j5' and then is mounted over NFS read-only by
    each test box (full path to this directory is the same on the build box and on
    the test boxes). Then, I cd into , run 'make modules_install' and get
    the error above.

    The issue turns out to be that we when we install firmware pick
    up the list of firmware blobs from firmware/Makefile.
    And this triggers the Makefile rules to update ihex2fw.

    There were two solutions for this issue:
    1) Move the list of firmware blobs to a separate file
    2) Avoid ihex2fw rebuild by moving it to scripts

    As I seriously beleive that the list of firmware blobs should be
    done in a fundamental different way solution 2) was selected.

    Reported-and-tested-by: "Rafael J. Wysocki"
    Signed-off-by: Sam Ravnborg
    Cc: David Woodhouse

    Sam Ravnborg
     

07 Jan, 2009

22 commits

  • Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Clean up checkpatch using perlcritic.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • In the general use case struct file_operations should be a const object.
    Check for and warn where it is not. As suggested by Steven and Ingo.

    Acked-by: Steven Rostedt
    Cc: Ingo Molnar
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When checking for assignments within if conditionals we check the whole of
    the condition, but the match is performed using a line constrained regular
    expression. This means we can miss split conditionals or those on the
    second line. Allow the check to span lines.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Ensure we do not report identifiers containing the word static as static
    declarations. For example this should not be reported as an unecessary
    assignement of 0:

    long nr_static = 0;

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When picking up a complete statement or block for analysis we cannot
    simply track open/close/etc parenthesis we must take into account
    preprocessor section boundaries.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • We are miscategorising a continuation fragment following an operator
    which may lead to us thinking that there is a space after it when there is
    not. Fix this up.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Loosen spacing checks to correctly detect this valid use of a typedef:

    typedef struct rcu_data *(*get_data_func)(int);

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Seems like every other release we have someone who updates vmlinux.lds.h
    and adds C-visible symbols without VMLINUX_SYMBOL() around them. So start
    checking the file and reject assignments which have plain symbols on
    either side.

    [apw@canonical.com: soften the check, add tests]
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • It seems to be a common idiom to include braces on conditionals in all
    contexts including return. Allow this exception to the return is not a
    function checks. Reported by Kay Sievers.

    Cc: Kay Sievers
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Some people work internally with -p0-patches which has the danger that one
    forgets to convert them to -p1 before mainlining. Bitten myself and seen
    p0-patches in mailing lists occasionally, this patch adds a warning to
    checkpatch.pl in case a patch is -p0. If you really want, you can fool
    this check to generate false positives, this is why it just spits a
    warning. Making the check 100% proof is trickier than it looks, so let's
    start with a version which catches the cases of real use.

    [apw@canonical.com: update message language, handle null prefix, add tests]
    Signed-off-by: Wolfram Sang
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Disallow spaces within multiple pointer stars (*) in both casts and
    definitions. Both of these would now be reported:

    (char * *)
    char * *foo;

    Also now consistently detects and reports the attributes within these
    structures making the error report itself clearer.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When we are detecting whether a comment is open when we start a hunk we
    check for the first comment edge in the hunk and assume its inverse.
    However if the hunk contains something like below, then we will assume
    that a comment was open. Update this heuristic to see if the comment edge
    is obviously within double quotes and ignore it if so:

    foo(" */);

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Detect the colons (:) which make up secondary bitfield declarations and
    apply binary colon checks. For example the following is common idiom:

    int foo:1,
    bar:1;

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Add __weak as an official attribute. This tends to be used in a location
    where the automated attribute detector misses it.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Ensure we do not trigger the complex macros checks on structure member
    assignment, for example:

    #define foo .bar = 10

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Some people use double star '**' as a comment continuation, and start
    comments with complete lines of stars. Widen the implied comment
    detection to pick these up.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When detecting implied comments from leading stars we may incorrectly
    think we have detected an edge one way or the other when we have not if we
    drop off the end of the last hunk. Fix this up.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • in_atomic() is not for driver use so report any such use as an ERROR.
    Also in_atomic() is often used to determine if we may sleep, but it is not
    reliable in this use model therefore strongly discourage its use.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • We're struggling all the time to figure out where the code came from that
    oopsed.. The script below (a adaption from a script used by
    kerneloops.org) can help developers quite a bit, at least for non-module
    cases.

    It works and looks like this:

    [/home/arjan/linux]$ dmesg | perl scripts/markup_oops.pl vmlinux
    {
    struct agp_memory *memory;

    memory = agp_allocate_memory(agp_bridge, pg_count, type);
    c055c10f: 89 c2 mov %eax,%edx
    if (memory == NULL)
    c055c111: 74 19 je c055c12c
    /* This function must only be called when current_controller != NULL */
    static void agp_insert_into_pool(struct agp_memory * temp)
    {
    struct agp_memory *prev;

    prev = agp_fe.current_controller->pool;
    c055c113: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
    *c055c118: 8b 40 10 mov 0x10(%eax),%eax
    prev->prev = temp;
    c055c11f: 89 50 04 mov %edx,0x4(%eax)
    temp->next = prev;
    c055c122: 89 02 mov %eax,(%edx)
    }
    agp_fe.current_controller->pool = temp;
    c055c124: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
    c055c129: 89 50 10 mov %edx,0x10(%eax)
    if (memory == NULL)
    return NULL;

    agp_insert_into_pool(memory);

    so in this case, we faulted while dereferencing agp_fe.current_controller
    pointer, and we get to see exactly which function and line it affects...
    Personally I find this very useful, and I can see value for having this
    script in the kernel for more-than-just-me to use.

    Caveats:
    * It only works for oopses not-in-modules
    * It only works nicely for kernels compiled with CONFIG_DEBUG_INFO
    * It's not very fast.
    * It only works on x86

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

03 Jan, 2009

2 commits