android_kernel_motorola_sm6225/include/asm-sparc/kdebug_32.h

74 lines
1.9 KiB
C
Raw Normal View History

sparc: join the remaining header files With this commit all sparc64 header files are moved to asm-sparc. The remaining files (71 files) were too different to be trivially merged so divide them up in a _32.h and a _64.h file which are both included from the file with no bit size. The following script were used: cd include FILES=`wc -l asm-sparc64/*h | grep -v '^ 1' | cut -b 20-` for FILE in ${FILES}; do echo $FILE: BASE=`echo $FILE | cut -d '.' -f 1` FN32=${BASE}_32.h FN64=${BASE}_64.h GUARD=___ASM_SPARC_`echo $BASE | tr '-' '_' | tr [:lower:] [:upper:]`_H git mv asm-sparc/$FILE asm-sparc/$FN32 git mv asm-sparc64/$FILE asm-sparc/$FN64 echo git mv done printf "#ifndef %s\n" $GUARD > asm-sparc/$FILE printf "#define %s\n" $GUARD >> asm-sparc/$FILE printf "#if defined(__sparc__) && defined(__arch64__)\n" >> asm-sparc/$FILE printf "#include <asm-sparc/%s>\n" $FN64 >> asm-sparc/$FILE printf "#else\n" >> asm-sparc/$FILE printf "#include <asm-sparc/%s>\n" $FN32 >> asm-sparc/$FILE printf "#endif\n" >> asm-sparc/$FILE printf "#endif\n" >> asm-sparc/$FILE git add asm-sparc/$FILE echo new file done printf "#include <asm-sparc/%s>\n" $FILE > asm-sparc64/$FILE git add asm-sparc64/$FILE echo sparc64 file done done The guard contains three '_' to avoid conflict with existing guards. In additing the two Kbuild files are emptied to avoid breaking headers_* targets. We will reintroduce the exported header files when the necessary kbuild changes are merged. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-18 06:55:51 +02:00
/*
* 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)
enum die_val {
DIE_UNUSED,
};
#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
#endif /* !(_SPARC_KDEBUG_H) */