]> git.baikalelectronics.ru Git - kernel.git/commit
perf, hw_breakpoint, kgdb: Do not take mutex for kernel debugger
authorJason Wessel <jason.wessel@windriver.com>
Thu, 28 Jan 2010 23:04:43 +0000 (17:04 -0600)
committerIngo Molnar <mingo@elte.hu>
Sat, 30 Jan 2010 07:42:21 +0000 (08:42 +0100)
commit7197bb214cc8b9f1fa39609745f51fe73e13fc79
tree95bab4d28f7c91bc5b7e79b3e1c879dfe96c52b9
parent0759404a90579ce122dbc9006b59481fad21db4e
perf, hw_breakpoint, kgdb: Do not take mutex for kernel debugger

This patch fixes the regression in functionality where the
kernel debugger and the perf API do not nicely share hw
breakpoint reservations.

The kernel debugger cannot use any mutex_lock() calls because it
can start the kernel running from an invalid context.

A mutex free version of the reservation API needed to get
created for the kernel debugger to safely update hw breakpoint
reservations.

The possibility for a breakpoint reservation to be concurrently
processed at the time that kgdb interrupts the system is
improbable. Should this corner case occur the end user is
warned, and the kernel debugger will prohibit updating the
hardware breakpoint reservations.

Any time the kernel debugger reserves a hardware breakpoint it
will be a system wide reservation.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: torvalds@linux-foundation.org
LKML-Reference: <1264719883-7285-3-git-send-email-jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/kgdb.c
include/linux/hw_breakpoint.h
kernel/hw_breakpoint.c