mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 12:34:41 +08:00
1eeb66a1bb
This patch moves the die notifier handling to common code. Previous various architectures had exactly the same code for it. Note that the new code is compiled unconditionally, this should be understood as an appel to the other architecture maintainer to implement support for it aswell (aka sprinkling a notify_die or two in the proper place) arm had a notifiy_die that did something totally different, I renamed it to arm_notify_die as part of the patch and made it static to the file it's declared and used at. avr32 used to pass slightly less information through this interface and I brought it into line with the other architectures. [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix vmalloc_sync_all bustage] [bryan.wu@analog.com: fix vmalloc_sync_all in nommu] Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: <linux-arch@vger.kernel.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
74 lines
2.0 KiB
C
74 lines
2.0 KiB
C
/* $Id: kdebug.h,v 1.11 2000/06/04 06:23:53 anton Exp $
|
|
* kdebug.h: Defines and definitions for debugging the Linux kernel
|
|
* under various kernel debuggers.
|
|
*
|
|
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
|
|
*/
|
|
#ifndef _SPARC_KDEBUG_H
|
|
#define _SPARC_KDEBUG_H
|
|
|
|
#include <asm/openprom.h>
|
|
#include <asm/vaddrs.h>
|
|
|
|
/* Breakpoints are enter through trap table entry 126. So in sparc assembly
|
|
* if you want to drop into the debugger you do:
|
|
*
|
|
* t DEBUG_BP_TRAP
|
|
*/
|
|
|
|
#define DEBUG_BP_TRAP 126
|
|
|
|
#ifndef __ASSEMBLY__
|
|
/* The debug vector is passed in %o1 at boot time. It is a pointer to
|
|
* a structure in the debuggers address space. Here is its format.
|
|
*/
|
|
|
|
typedef unsigned int (*debugger_funct)(void);
|
|
|
|
struct kernel_debug {
|
|
/* First the entry point into the debugger. You jump here
|
|
* to give control over to the debugger.
|
|
*/
|
|
unsigned long kdebug_entry;
|
|
unsigned long kdebug_trapme; /* Figure out later... */
|
|
/* The following is the number of pages that the debugger has
|
|
* taken from to total pool.
|
|
*/
|
|
unsigned long *kdebug_stolen_pages;
|
|
/* Ok, after you remap yourself and/or change the trap table
|
|
* from what you were left with at boot time you have to call
|
|
* this synchronization function so the debugger can check out
|
|
* what you have done.
|
|
*/
|
|
debugger_funct teach_debugger;
|
|
}; /* I think that is it... */
|
|
|
|
extern struct kernel_debug *linux_dbvec;
|
|
|
|
/* Use this macro in C-code to enter the debugger. */
|
|
static inline void sp_enter_debugger(void)
|
|
{
|
|
__asm__ __volatile__("jmpl %0, %%o7\n\t"
|
|
"nop\n\t" : :
|
|
"r" (linux_dbvec) : "o7", "memory");
|
|
}
|
|
|
|
#define SP_ENTER_DEBUGGER do { \
|
|
if((linux_dbvec!=0) && ((*(short *)linux_dbvec)!=-1)) \
|
|
sp_enter_debugger(); \
|
|
} while(0)
|
|
|
|
#endif /* !(__ASSEMBLY__) */
|
|
|
|
/* Some nice offset defines for assembler code. */
|
|
#define KDEBUG_ENTRY_OFF 0x0
|
|
#define KDEBUG_DUNNO_OFF 0x4
|
|
#define KDEBUG_DUNNO2_OFF 0x8
|
|
#define KDEBUG_TEACH_OFF 0xc
|
|
|
|
enum die_val {
|
|
DIE_UNUSED,
|
|
};
|
|
|
|
#endif /* !(_SPARC_KDEBUG_H) */
|