diff options
author | Richard Weinberger <richard@nod.at> | 2015-04-12 18:10:36 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-04-12 21:03:29 +0200 |
commit | cb418fdb33feba951187f6e01e9f78d3cd2dacbb (patch) | |
tree | 5b41a82a0b48d5893850890e993340528d6bca83 /arch/xtensa/kernel | |
parent | 3050a35fba296196cb00e87f4a96aa7d9ed17a7b (diff) | |
download | linux-cb418fdb33feba951187f6e01e9f78d3cd2dacbb.tar.gz linux-cb418fdb33feba951187f6e01e9f78d3cd2dacbb.tar.bz2 linux-cb418fdb33feba951187f6e01e9f78d3cd2dacbb.zip |
xtensa: Autogenerate offsets in struct thread_info
Maintaining offsets by hand is no fun.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/asm-offsets.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index 1915c7c889ba..b123ace3b67c 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c @@ -77,6 +77,14 @@ int main(void) DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack)); DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); + /* offsets in thread_info struct */ + OFFSET(TI_TASK, thread_info, task); + OFFSET(TI_FLAGS, thread_info, flags); + OFFSET(TI_STSTUS, thread_info, status); + OFFSET(TI_CPU, thread_info, cpu); + OFFSET(TI_PRE_COUNT, thread_info, preempt_count); + OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); + /* struct thread_info (offset from start_struct) */ DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra)); DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp)); |