13 Jan, 2012

1 commit

  • module_ref contains two "unsigned int" fields.

    Thats now too small, since some machines can open more than 2^32 files.

    Check commit 518de9b39e8 (fs: allow for more than 2^31 files) for
    reference.

    We can add an aligned(2 * sizeof(unsigned long)) attribute to force
    alloc_percpu() allocating module_ref areas in single cache lines.

    Signed-off-by: Eric Dumazet
    CC: Rusty Russell
    CC: Tejun Heo
    CC: Robin Holt
    CC: David Miller
    Signed-off-by: Rusty Russell

    Eric Dumazet
     

12 Dec, 2011

1 commit


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

2 commits


02 Aug, 2011

5 commits


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
     

31 Mar, 2011

1 commit


26 Mar, 2011

3 commits


19 Mar, 2011

1 commit

  • Notify GDB of the machine halting, rebooting or powering off by sending it an
    exited command (remote protocol command 'W'). This is done by calling:

    void gdbstub_exit(int status)

    from the arch's machine_{halt,restart,power_off}() functions with an
    appropriate exit status to be reported to GDB.

    Signed-off-by: David Howells

    David Howells
     

23 Dec, 2010

1 commit


18 Nov, 2010

2 commits


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

30 Oct, 2010

3 commits

  • The kgdb_disable_hw_debug() was an architecture specific function for
    disabling all hardware breakpoints on a per cpu basis when entering
    the debug core.

    This patch will remove the weak function kdbg_disable_hw_debug() and
    change it into a call back which lives with the rest of hw breakpoint
    call backs in struct kgdb_arch.

    Signed-off-by: Dongdong Deng
    Signed-off-by: Jason Wessel

    Dongdong Deng
     
  • The kdb_current legally be equal to NULL in the early boot of the x86
    arch. The problem pcan be observed by booting with the kernel arguments:

    earlyprintk=vga ekgdboc=kbd kgdbwait

    The kdb shell will oops on entry and recursively fault because it
    cannot get past the final stage of shell initialization.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Rusty pointed out that the per_cpu command uses up lots of space on
    the stack and the cpu supress mask is probably not needed.

    This patch removes the need for the supress mask as well as fixing up
    the following problems with the kdb per_cpu command:
    * The per_cpu command should allow an address as an argument
    * When you have more data than can be displayed on one screen allow
    the user to break out of the print loop.

    Reported-by: Rusty Russell
    Signed-off-by: Jason Wessel

    Jason Wessel
     

23 Oct, 2010

8 commits

  • The kdb shell needs to enforce switching back to the original CPU that
    took the exception before restoring normal kernel execution. Resuming
    from a different CPU than what took the original exception will cause
    problems with spin locks that are freed from the a different processor
    than had taken the lock.

    The special logic in dbg_cpu_switch() can go away entirely with
    because the state of what cpus want to be masters or slaves will
    remain unchanged between entry and exit of the debug_core exception
    context.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • For quite some time there have been problems with memory barriers and
    various races with NMI on multi processor systems using the kernel
    debugger. The algorithm for entering the kernel debug core and
    resuming kernel execution was racy and had several known edge case
    problems with attempting to debug something on a heavily loaded system
    using breakpoints that are hit repeatedly and quickly.

    The prior "locking" design entry worked as follows:

    * The atomic counter kgdb_active was used with atomic exchange in
    order to elect a master cpu out of all the cpus that may have
    taken a debug exception.
    * The master cpu increments all elements of passive_cpu_wait[].
    * The master cpu issues the round up cpus message.
    * Each "slave cpu" that enters the debug core increments its own
    element in cpu_in_kgdb[].
    * Each "slave cpu" spins on passive_cpu_wait[] until it becomes 0.
    * The master cpu debugs the system.

    The new scheme removes the two arrays of atomic counters and replaces
    them with 2 single counters. One counter is used to count the number
    of cpus waiting to become a master cpu (because one or more hit an
    exception). The second counter is use to indicate how many cpus have
    entered as slave cpus.

    The new entry logic works as follows:

    * One or more cpus enters via kgdb_handle_exception() and increments
    the masters_in_kgdb. Each cpu attempts to get the spin lock called
    dbg_master_lock.
    * The master cpu sets kgdb_active to the current cpu.
    * The master cpu takes the spinlock dbg_slave_lock.
    * The master cpu asks to round up all the other cpus.
    * Each slave cpu that is not already in kgdb_handle_exception()
    will enter and increment slaves_in_kgdb. Each slave will now spin
    try_locking on dbg_slave_lock.
    * The master cpu waits for the sum of masters_in_kgdb and slaves_in_kgdb
    to be equal to the sum of the online cpus.
    * The master cpu debugs the system.

    In the new design the kgdb_active can only be changed while holding
    dbg_master_lock. Stress testing has not turned up any further
    entry/exit races that existed in the prior locking design. The prior
    locking design suffered from atomic variables not being truly atomic
    (in the capacity as used by kgdb) along with memory barrier races.

    Signed-off-by: Jason Wessel
    Acked-by: Dongdong Deng

    Jason Wessel
     
  • The slave cpus do not have the hw breakpoints disabled upon entry to
    the debug_core and as a result could cause unrecoverable recursive
    faults on badly placed breakpoints, or get out of sync with the arch
    specific hw breakpoint operations.

    This patch addresses the problem by invoking kgdb_disable_hw_debug()
    earlier in kgdb_enter_cpu for each cpu that enters the debug core.

    The hw breakpoint dis/enable flow should be:

    master_debug_cpu slave_debug_cpu
    \ /
    kgdb_cpu_enter
    |
    kgdb_disable_hw_debug --> uninstall pre-enabled hw_breakpoint
    |
    do add/rm dis/enable operates to hw_breakpoints on master_debug_cpu..
    |
    correct_hw_break --> correct/install the enabled hw_breakpoint
    |
    leave_kgdb

    Signed-off-by: Dongdong Deng
    Signed-off-by: Jason Wessel

    Dongdong Deng
     
  • 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
     
  • Nothing should try to use kdb_commands directly as sometimes it is
    null. Instead, use the for_each_kdbcmd() iterator.

    This particular problem dates back to the initial kdb merge (2.6.35),
    but at that point nothing was dynamically unregistering commands from
    the kdb shell.

    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
     
  • When returning from the kernel debugger reset the rcu jiffies_stall
    value to prevent the rcu stall detector from sending NMI events which
    invoke a stack dump for each cpu in the system.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Move the various clock and watch dog syncs to a single function in
    advance of adding another sync for the rcu stall detector.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

09 Sep, 2010

1 commit


05 Sep, 2010

1 commit


29 Aug, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: pxa27x_keypad - remove input_free_device() in pxa27x_keypad_remove()
    Input: mousedev - fix regression of inverting axes
    Input: uinput - add devname alias to allow module on-demand load
    Input: hil_kbd - fix compile error
    USB: drop tty argument from usb_serial_handle_sysrq_char()
    Input: sysrq - drop tty argument form handle_sysrq()
    Input: sysrq - drop tty argument from sysrq ops handlers

    Linus Torvalds
     

21 Aug, 2010

1 commit

  • Sysrq operations do not accept tty argument anymore so no need to pass
    it to us.

    [Stephen Rothwell : fix build breakage in drm code
    caused by sysrq using bool but not including linux/types.h]

    [Sachin Sant : fix build breakage in s390 keyboadr
    driver]

    Acked-by: Alan Cox
    Acked-by: Jason Wessel
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

20 Aug, 2010

1 commit


17 Aug, 2010

1 commit

  • If CONFIG_KGDB_KDB is set and CONFIG_KALLSYMS is not set the kernel
    will fail to build with the error:

    kernel/built-in.o: In function `kallsyms_symbol_next':
    kernel/debug/kdb/kdb_support.c:237: undefined reference to `kdb_walk_kallsyms'
    kernel/built-in.o: In function `kallsyms_symbol_complete':
    kernel/debug/kdb/kdb_support.c:193: undefined reference to `kdb_walk_kallsyms'

    The kdb_walk_kallsyms needs a #ifdef proper header to match the C
    implementation. This patch also fixes the compiler warnings in
    kdb_support.c when compiling without CONFIG_KALLSYMS set. The
    compiler warnings are a result of the kallsyms_lookup() macro not
    initializing the two of the pass by reference variables.

    Signed-off-by: Jason Wessel
    Reported-by: Michal Simek

    Jason Wessel
     

07 Aug, 2010

1 commit

  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     

06 Aug, 2010

2 commits

  • * 'kms-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    kgdb,docs: Update the kgdb docs to include kms
    drm_fb_helper: Preserve capability to use atomic kms
    i915: when kgdb is active display compression should be off
    drm/i915: use new fb debug hooks
    drm: add KGDB/KDB support
    fb: add hooks to handle KDB enter/exit
    kgdboc: Add call backs to allow kernel mode switching
    vt,console,kdb: automatically set kdb LINES variable
    vt,console,kdb: implement atomic console enter/leave functions

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    debug_core,kdb: fix crash when arch does not have single step
    kgdb,x86: use macro HBP_NUM to replace magic number 4
    kgdb,mips: remove unused kgdb_cpu_doing_single_step operations
    mm,kdb,kgdb: Add a debug reference for the kdb kmap usage
    KGDB: Remove set but unused newPC
    ftrace,kdb: Allow dumping a specific cpu's buffer with ftdump
    ftrace,kdb: Extend kdb to be able to dump the ftrace buffer
    kgdb,powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE
    arm,kgdb: Add ability to trap into debugger on notify_die
    gdbstub: do not directly use dbg_reg_def[] in gdb_cmd_reg_set()
    gdbstub: Implement gdbserial 'p' and 'P' packets
    kgdb,arm: Individual register get/set for arm
    kgdb,mips: Individual register get/set for mips
    kgdb,x86: Individual register get/set for x86
    kgdb,kdb: individual register set and and get API
    gdbstub: Optimize kgdb's "thread:" response for the gdb serial protocol
    kgdb: remove custom hex_to_bin()implementation

    Linus Torvalds