spinlock_debug: Move crash to qcom_cpu_vendor_hooks
Reset spinlock_debug.c to commit0fad51fcb6
("Snap for 7316566 froma5293ea1ab
to android12-5.10-keystone-qcom-release"). Add a hook to crash the kernel on a spinlock bug. To avoid having to create a new tracepoint-based hook for a debug feature, a kretprobe is used and vendor_hooks will mimic the initial dump that spin_bug would do. Change-Id: Ic5bec3e905df0adecb175bb74a0f49b8e4ca92ab Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
#include <linux/debug_locks.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/bug.h>
|
||||
#include <soc/qcom/watchdog.h>
|
||||
|
||||
void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
|
||||
struct lock_class_key *key, short inner)
|
||||
@@ -66,12 +64,6 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg)
|
||||
owner ? owner->comm : "<none>",
|
||||
owner ? task_pid_nr(owner) : -1,
|
||||
READ_ONCE(lock->owner_cpu));
|
||||
|
||||
#ifdef CONFIG_DEBUG_SPINLOCK_BITE_ON_BUG
|
||||
qcom_wdt_trigger_bite();
|
||||
#elif defined(CONFIG_DEBUG_SPINLOCK_PANIC_ON_BUG)
|
||||
BUG();
|
||||
#endif
|
||||
dump_stack();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user