From: Paul M. <le...@us...> - 2002-04-21 20:02:50
|
Update of /cvsroot/linux-mips/linux/arch/mips/tools In directory usw-pr-cvs1:/tmp/cvs-serv3535/arch/mips/tools Modified Files: offset.c Log Message: More OSS syncing.. Index: offset.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/tools/offset.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- offset.c 2 Jan 2002 19:58:02 -0000 1.3 +++ offset.c 21 Apr 2002 20:01:13 -0000 1.4 @@ -10,6 +10,7 @@ */ #include <linux/types.h> #include <linux/sched.h> +#include <linux/mm.h> #include <asm/ptrace.h> #include <asm/processor.h> @@ -19,6 +20,8 @@ #define offset(string, ptr, member) \ __asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member))) +#define constant(string, member) \ + __asm__("\n@@@" string "%x0" : : "i" (member)) #define size(string, size) \ __asm__("\n@@@" string "%0" : : "i" (sizeof(size))) #define linefeed text("") @@ -130,6 +133,10 @@ offset("#define MM_USERS ", struct mm_struct, mm_users); offset("#define MM_PGD ", struct mm_struct, pgd); offset("#define MM_CONTEXT ", struct mm_struct, context); + linefeed; + constant("#define _PAGE_SIZE ", PAGE_SIZE); + constant("#define _PGD_ORDER ", PGD_ORDER); + constant("#define _PGDIR_SHIFT ", PGDIR_SHIFT); linefeed; } |