01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

23 Oct, 2010

2 commits

  • Fix the following sparse warnings:

    kdb_main.c:328:5: warning: symbol 'kdbgetu64arg' was not declared. Should it be static?
    kgdboc.c:246:12: warning: symbol 'kgdboc_early_init' was not declared. Should it be static?
    kgdb.c:652:26: warning: incorrect type in argument 1 (different address spaces)
    kgdb.c:652:26: expected void const *ptr
    kgdb.c:652:26: got struct perf_event *[noderef] *pev

    The one in kgdb.c required the (void * __force) because of the return
    code from register_wide_hw_breakpoint looking like:

    return (void __percpu __force *)ERR_PTR(err);

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • In order to allow kernel modules to dynamically add a command to the
    kdb shell the kdb_register, kdb_register_repeat, kdb_unregister, and
    kdb_printf need to be exported as GPL symbols.

    Any kernel module that adds a dynamic kdb shell function should only
    need to include linux/kdb.h.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

05 Aug, 2010

1 commit

  • The kernel console interface stores the number of lines it is
    configured to use. The kdb debugger can greatly benefit by knowing how
    many lines there are on the console for the pager functionality
    without having the end user compile in the setting or have to
    repeatedly change it at run time.

    Signed-off-by: Jason Wessel
    Signed-off-by: Jesse Barnes
    CC: David Airlie
    CC: Andrew Morton

    Jason Wessel
     

21 May, 2010

3 commits

  • Certain calls from the kdb shell will call out to printk(), and any of
    these calls should get vectored back to the kdb_printf() so that the
    kdb pager and processing can be used, as well as to properly channel
    I/O to the polled I/O devices.

    CC: Randy Dunlap
    Signed-off-by: Jason Wessel
    Acked-by: Andrew Morton

    Jason Wessel
     
  • The design of the kdb shell requires that every device that can
    provide input to kdb have a polling routine that exits immediately if
    there is no character available. This is required in order to get the
    page scrolling mechanism working.

    Changing the kernel debugger I/O API to require all polling character
    routines to exit immediately if there is no data allows the kernel
    debugger to process multiple input channels.

    NO_POLL_CHAR will be the return code to the polling routine when ever
    there is no character available.

    CC: linux-serial@vger.kernel.org
    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • This patch contains only the kdb core. Because the change set was
    large, it was split. The next patch in the series includes the
    instrumentation into the core kernel which are mainly helper functions
    for kdb.

    This work is directly derived from kdb v4.4 found at:

    ftp://oss.sgi.com/projects/kdb/download/v4.4/

    The kdb internals have been re-organized to make them mostly platform
    independent and to connect everything to the debug core which is used by
    gdbstub (which has long been known as kgdb).

    The original version of kdb was 58,000 lines worth of changes to
    support x86. From that implementation only the kdb shell, and basic
    commands for memory access, runcontrol, lsmod, and dmesg where carried
    forward.

    This is a generic implementation which aims to cover all the current
    architectures using the kgdb core: ppc, arm, x86, mips, sparc, sh and
    blackfin. More archictectures can be added by implementing the
    architecture specific kgdb functions.

    [mort@sgi.com: Compile fix with hugepages enabled]
    [mort@sgi.com: Clean breakpoint code renaming kdba_ -> kdb_]
    [mort@sgi.com: fix new line after printing registers]
    [mort@sgi.com: Remove the concept of global vs. local breakpoints]
    [mort@sgi.com: Rework kdb_si_swapinfo to use more generic name]
    [mort@sgi.com: fix the information dump macros, remove 'arch' from the names]
    [sfr@canb.auug.org.au: include fixup to include linux/slab.h]

    CC: linux-arch@vger.kernel.org
    Signed-off-by: Jason Wessel
    Signed-off-by: Martin Hicks

    Jason Wessel