blob: ce482032deb0d657c30a97e905f75dbff813e839 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * This program is used to generate definitions needed by
3 * assembly language modules.
4 *
5 * We use the technique used in the OSF Mach kernel code:
6 * generate asm statements containing #defines,
7 * compile this file to assembler, and then extract the
8 * #defines from the assembly-language output.
9 *
10 * On sparc, thread_info data is static and TI_XXX offsets are computed by hand.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/sched.h>
14// #include <linux/mm.h>
Christoph Lameter32b07672008-04-29 01:04:01 -070015#include <linux/kbuild.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Sam Ravnborgb5db8542008-11-29 21:51:05 -080017#ifdef CONFIG_SPARC32
18int sparc32_foo(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070019{
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 DEFINE(AOFF_thread_fork_kpsr,
21 offsetof(struct thread_struct, fork_kpsr));
Sam Ravnborgb5db8542008-11-29 21:51:05 -080022 return 0;
23}
24#else
25int sparc64_foo(void)
26{
27 return 0;
28}
29#endif
30
31int foo(void)
32{
33 BLANK();
34 DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 BLANK();
36 DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
Olivier DANET9f6c7532013-07-10 13:56:10 -070037 BLANK();
38 DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
40 /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
41 return 0;
42}
Sam Ravnborgb5db8542008-11-29 21:51:05 -080043