2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* This program is used to generate definitions needed by
|
|
|
|
* assembly language modules.
|
|
|
|
*
|
|
|
|
* We use the technique used in the OSF Mach kernel code:
|
|
|
|
* generate asm statements containing #defines,
|
|
|
|
* compile this file to assembler, and then extract the
|
|
|
|
* #defines from the assembly-language output.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/stddef.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/mm.h>
|
2008-04-29 16:04:12 +08:00
|
|
|
#include <linux/kbuild.h>
|
2009-03-06 17:47:02 +08:00
|
|
|
#include <linux/suspend.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-04-29 16:04:12 +08:00
|
|
|
#include <asm/thread_info.h>
|
2009-03-06 17:47:02 +08:00
|
|
|
#include <asm/suspend.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
/* offsets into the thread_info struct */
|
|
|
|
DEFINE(TI_TASK, offsetof(struct thread_info, task));
|
|
|
|
DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain));
|
|
|
|
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
|
|
|
|
DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
|
|
|
|
DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
|
|
|
|
DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block));
|
2009-07-11 09:00:23 +08:00
|
|
|
DEFINE(TI_SIZE, sizeof(struct thread_info));
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2009-03-06 17:47:02 +08:00
|
|
|
#ifdef CONFIG_HIBERNATION
|
|
|
|
DEFINE(PBE_ADDRESS, offsetof(struct pbe, address));
|
|
|
|
DEFINE(PBE_ORIG_ADDRESS, offsetof(struct pbe, orig_address));
|
|
|
|
DEFINE(PBE_NEXT, offsetof(struct pbe, next));
|
|
|
|
DEFINE(SWSUSP_ARCH_REGS_SIZE, sizeof(struct swsusp_arch_regs));
|
|
|
|
#endif
|
2005-04-17 06:20:36 +08:00
|
|
|
return 0;
|
|
|
|
}
|