diff options
| author | Richard Weinberger <richard@nod.at> | 2015-04-03 12:56:16 -0400 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2015-04-12 14:58:24 -0400 |
| commit | ede45dd302385007b7ee83148753654ab8453167 (patch) | |
| tree | 1c73acbbe71e3944f4ece333ed8d861d3792663a /arch/blackfin/kernel | |
| parent | 9699a517e0029c4dc34159787a26a746dfab858b (diff) | |
blackfin: Autogenerate offsets in struct thread_info
Maintaining offsets by hand is no fun.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/blackfin/kernel')
| -rw-r--r-- | arch/blackfin/kernel/asm-offsets.c | 6 | ||||
| -rw-r--r-- | arch/blackfin/kernel/traps.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c index 37fcae950216..486560aea050 100644 --- a/arch/blackfin/kernel/asm-offsets.c +++ b/arch/blackfin/kernel/asm-offsets.c | |||
| @@ -42,6 +42,12 @@ int main(void) | |||
| 42 | DEFINE(THREAD_PC, offsetof(struct thread_struct, pc)); | 42 | DEFINE(THREAD_PC, offsetof(struct thread_struct, pc)); |
| 43 | DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE); | 43 | DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE); |
| 44 | 44 | ||
| 45 | /* offsets in thread_info struct */ | ||
| 46 | OFFSET(TI_TASK, thread_info, task); | ||
| 47 | OFFSET(TI_FLAGS, thread_info, flags); | ||
| 48 | OFFSET(TI_CPU, thread_info, cpu); | ||
| 49 | OFFSET(TI_PREEMPT, thread_info, preempt_count); | ||
| 50 | |||
| 45 | /* offsets into the pt_regs */ | 51 | /* offsets into the pt_regs */ |
| 46 | DEFINE(PT_ORIG_R0, offsetof(struct pt_regs, orig_r0)); | 52 | DEFINE(PT_ORIG_R0, offsetof(struct pt_regs, orig_r0)); |
| 47 | DEFINE(PT_ORIG_P0, offsetof(struct pt_regs, orig_p0)); | 53 | DEFINE(PT_ORIG_P0, offsetof(struct pt_regs, orig_p0)); |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index de5c2c3ebd9b..1ed85ddadc0d 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <asm/fixed_code.h> | 18 | #include <asm/fixed_code.h> |
| 19 | #include <asm/pseudo_instructions.h> | 19 | #include <asm/pseudo_instructions.h> |
| 20 | #include <asm/pda.h> | 20 | #include <asm/pda.h> |
| 21 | #include <asm/asm-offsets.h> | ||
| 21 | 22 | ||
| 22 | #ifdef CONFIG_KGDB | 23 | #ifdef CONFIG_KGDB |
| 23 | # include <linux/kgdb.h> | 24 | # include <linux/kgdb.h> |
