]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/um/sys-i386/kernel-offsets.c
[PATCH] uml makefiles sanitized
[mirror_ubuntu-bionic-kernel.git] / arch / um / sys-i386 / kernel-offsets.c
CommitLineData
a31769ed
AV
1#include <linux/config.h>
2#include <linux/stddef.h>
3#include <linux/sched.h>
4#include <linux/time.h>
95608261 5#include <linux/elf.h>
a31769ed
AV
6#include <asm/page.h>
7
8#define DEFINE(sym, val) \
9 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
10
11#define STR(x) #x
12#define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : )
13
14#define BLANK() asm volatile("\n->" : : )
15
16#define OFFSET(sym, str, mem) \
17 DEFINE(sym, offsetof(struct str, mem));
18
19void foo(void)
20{
ecba97d4 21 OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs);
a31769ed 22#ifdef CONFIG_MODE_TT
ecba97d4 23 OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
a31769ed
AV
24#endif
25#include <common-offsets.h>
26}