1. 17 Apr, 2008 17 commits
    • Andrew Morton's avatar
      kgdb: Kconfig fix · 4a1b5502
      Andrew Morton authored
      ERROR: "uart_parse_options" [drivers/serial/serial_core.ko] undefined!
      
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4a1b5502
    • Jason Wessel's avatar
      kgdb: add kgdb internal test suite · e8d31c20
      Jason Wessel authored
      This patch adds regression tests for testing the kgdb core and arch
      specific implementation.
      
      The kgdb test suite is designed to be built into the kernel and not as
      a module because it uses a number of low level kernel and kgdb
      primitives which should not be exported externally.
      
      The kgdb test suite is designed as a KGDB I/O module which
      simulates the communications that a debugger would have with kgdb.
      The tests are broken up in to a line by line and referenced here as
      a "get" which is kgdb requesting input and "put" which is kgdb
      sending a response.
      
      The kgdb suite can be invoked from the kernel command line
      arguments system or executed dynamically at run time.  The test
      suite uses the variable "kgdbts" to obtain the information about
      which tests to run and to configure the verbosity level.  The
      following are the various characters you can use with the kgdbts=
      line:
      
      When using the "kgdbts=" you only choose one of the following core
      test types:
      A = Run all the core tests silently
      V1 = Run all the core tests with minimal output
      V2 = Run all the core tests in debug mode
      
      You can also specify optional tests:
      N## = Go to sleep with interrupts of for ## seconds
            to test the HW NMI watchdog
      F## = Break at do_fork for ## iterations
      S## = Break at sys_open for ## iterations
      
      NOTE: that the do_fork and sys_open tests are mutually exclusive.
      
      To invoke the kgdb test suite from boot you use a kernel start
      argument as follows:
      	kgdbts=V1 kgdbwait
      Or if you wanted to perform the NMI test for 6 seconds and do_fork
      test for 100 forks, you could use:
      	kgdbts=V1N6F100 kgdbwait
      
      The test suite can also be invoked at run time with:
      echo kgdbts=V1N6F100 > /sys/module/kgdbts/parameters/kgdbts
      Or as another example:
      echo kgdbts=V2 > /sys/module/kgdbts/parameters/kgdbts
      
      When developing a new kgdb arch specific implementation or
      using these tests for the purpose of regression testing,
      several invocations are required.
      
      1) Boot with the test suite enabled by using the kernel arguments
            "kgdbts=V1F100 kgdbwait"
         ## If kgdb arch specific implementation has NMI use
            "kgdbts=V1N6F100
      
      2) After the system boot run the basic test.
      echo kgdbts=V1 > /sys/module/kgdbts/parameters/kgdbts
      
      3) Run the concurrency tests.  It is best to use n+1
         while loops where n is the number of cpus you have
         in your system.  The example below uses only two
         loops.
      
      ## This tests break points on sys_open
      while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
      while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
      echo kgdbts=V1S10000 > /sys/module/kgdbts/parameters/kgdbts
      fg # and hit control-c
      fg # and hit control-c
      ## This tests break points on do_fork
      while [ 1 ] ; do date > /dev/null ; done &
      while [ 1 ] ; do date > /dev/null ; done &
      echo kgdbts=V1F1000 > /sys/module/kgdbts/parameters/kgdbts
      fg # and hit control-c
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e8d31c20
    • Jason Wessel's avatar
      kgdb: fix several kgdb regressions · 737a460f
      Jason Wessel authored
      kgdb core fixes:
      - Check to see that mm->mmap_cache is not null before calling
        flush_cache_range(), else on arch=ARM it will cause a fatal
        fault.
      
      - Breakpoints should only be restored if they are in the BP_ACTIVE
        state.
      
      - Fix a typo in comments to "kgdb_register_io_module"
      
      x86 kgdb fixes:
      - Fix the x86 arch handler such that on a kill or detach that the
        appropriate cleanup on the single stepping flags gets run.
      
      - Add in the DIE_NMIWATCHDOG call for x86_64
      
      - Touch the nmi watchdog before returning the system to normal
        operation after performing any kind of kgdb operation, else
        the possibility exists to trigger the watchdog.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      737a460f
    • Jason Wessel's avatar
      kgdb: kgdboc pl011 I/O module · 84b5ae15
      Jason Wessel authored
      Implement the serial polling hooks for the pl011 uart for use with
      kgdboc.
      
      This patch was specifically tested on the ARM Versatile AB reference
      platform.
      
      [ mingo@elte.hu: minor cleanups. ]
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      84b5ae15
    • Jason Wessel's avatar
      kgdb: fix optional arch functions and probe_kernel_* · b4b8ac52
      Jason Wessel authored
      Fix two regressions dealing with the kgdb core.
      
      1) kgdb_skipexception and kgdb_post_primary_code are optional
      functions that are only required on archs that need special exception
      fixups.
      
      2) The kernel address space scope must be set on any probe_kernel_*
      function or archs such as ARCH=arm will not allow access to the kernel
      memory space.  As an example, it is required to allow the full kernel
      address space is when you the kernel debugger to inspect a system
      call.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b4b8ac52
    • Jason Wessel's avatar
      kgdb: add x86 HW breakpoints · 64e9ee30
      Jason Wessel authored
      Add HW breakpoints into the arch specific portion of x86 kgdb.  In the
      current x86 kernel.org kernels HW breakpoints are changed out in lazy
      fashion because there is no infrastructure around changing them when
      changing to a kernel task or entering the kernel mode via a system
      call.  This lazy approach means that if a user process uses HW
      breakpoints the kgdb will loose out.  This is an acceptable trade off
      because the developer debugging the kernel is assumed to know what is
      going on system wide and would be aware of this trade off.
      
      There is a minor bug fix to the kgdb core so as to correctly call the
      hw breakpoint functions with a valid value from the enum.
      
      There is also a minor change to the x86_64 startup code when using
      early HW breakpoints.  When the debugger is connected, the cpu startup
      code must not zero out the HW breakpoint registers or you cannot hit
      the breakpoints you are interested in, in the first place.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      64e9ee30
    • Jason Wessel's avatar
      kgdb: print breakpoint removed on exception · 67baf94c
      Jason Wessel authored
      If kgdb does remove a breakpoint that had a problem on the recursion
      check, it should also print the address of the breakpoint.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      67baf94c
    • Jason Wessel's avatar
      kgdb: clocksource watchdog · 7c3078b6
      Jason Wessel authored
      In order to not trip the clocksource watchdog, kgdb must touch the
      clocksource watchdog on the return to normal system run state.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7c3078b6
    • Jason Wessel's avatar
      kgdb: fix NMI hangs · d3597524
      Jason Wessel authored
      This patch fixes the hang regression with kgdb when the NMI interrupt
      comes in while the master core is returning from an exception.
      
      Adjust the NMI logic such that KGDB will not stop NMI exceptions from
      occurring by in general returning NOTIFY_DONE.  It is not possible to
      distinguish the debug NMI sync vs the normal NMI apic interrupt so
      kgdb needs to catch the unknown NMI if it the debugger was previously
      active on one of the cpus.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d3597524
    • Jason Wessel's avatar
      kgdb: fix kgdboc dynamic module configuration · c191e5ad
      Jason Wessel authored
      Fix the run time configuration of kgdboc such that it does not default
      to 9600 baud if you use the "echo" command to configure the sysfs
      module paramater.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c191e5ad
    • Jason Wessel's avatar
      kgdb: document parameters · 6cdf6e06
      Jason Wessel authored
      document the kgdboc module/boot parameter.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6cdf6e06
    • Ingo Molnar's avatar
      x86: kgdb support · 82da3ff8
      Ingo Molnar authored
      simplified and streamlined kgdb support on x86, both 32-bit and 64-bit,
      based on patch from:
      
        Subject: kgdb: core-lite
        From: Jason Wessel <jason.wessel@windriver.com>
      
      [ and countless other authors - see the patch for details. ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      82da3ff8
    • Jason Wessel's avatar
      consoles: polling support, kgdboc · f2d937f3
      Jason Wessel authored
      polled console handling support, to access a console in an irq-less
      way while in debug or irq context.
      
      absolutely zero impact as long as CONFIG_CONSOLE_POLL is disabled.
      (which is the default)
      
      [ jan.kiszka@siemens.com: lots of cleanups ]
      [ mingo@elte.hu: redesign, splitups, cleanups. ]
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f2d937f3
    • Jason Wessel's avatar
      kgdb: core · dc7d5527
      Jason Wessel authored
      kgdb core code. Handles the protocol and the arch details.
      
      [ mingo@elte.hu: heavily modified, simplified and cleaned up. ]
      [ xemul@openvz.org: use find_task_by_pid_ns ]
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      dc7d5527
    • Ingo Molnar's avatar
      uaccess: add probe_kernel_write() · c33fa9f5
      Ingo Molnar authored
      add probe_kernel_read() and probe_kernel_write().
      
      Uninlined and restricted to kernel range memory only, as suggested
      by Linus.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c33fa9f5
    • Linus Torvalds's avatar
      Linux 2.6.25 · 4b119e21
      Linus Torvalds authored
      4b119e21
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · c970d5a3
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
        it821x: do not describe noraid parameter with its value
        Pb1200/DBAu1200: fix bad IDE resource size
        Au1200: IDE driver build fix
        Au1200: kill IDE driver function prototypes
        avr32 mustn't select HAVE_IDE
      c970d5a3
  2. 16 Apr, 2008 23 commits