diff options
Diffstat (limited to 'include/asm-m68knommu/processor.h')
-rw-r--r-- | include/asm-m68knommu/processor.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h index ba393b1a023b..0ee158e09abb 100644 --- a/include/asm-m68knommu/processor.h +++ b/include/asm-m68knommu/processor.h | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
18 | #include <asm/types.h> | 17 | #include <asm/types.h> |
19 | #include <asm/segment.h> | 18 | #include <asm/segment.h> |
@@ -79,19 +78,31 @@ struct thread_struct { | |||
79 | } | 78 | } |
80 | 79 | ||
81 | /* | 80 | /* |
81 | * Coldfire stacks need to be re-aligned on trap exit, conventional | ||
82 | * 68k can handle this case cleanly. | ||
83 | */ | ||
84 | #if defined(CONFIG_COLDFIRE) | ||
85 | #define reformat(_regs) do { (_regs)->format = 0x4; } while(0) | ||
86 | #else | ||
87 | #define reformat(_regs) do { } while (0) | ||
88 | #endif | ||
89 | |||
90 | /* | ||
82 | * Do necessary setup to start up a newly executed thread. | 91 | * Do necessary setup to start up a newly executed thread. |
83 | * | 92 | * |
84 | * pass the data segment into user programs if it exists, | 93 | * pass the data segment into user programs if it exists, |
85 | * it can't hurt anything as far as I can tell | 94 | * it can't hurt anything as far as I can tell |
86 | */ | 95 | */ |
87 | #define start_thread(_regs, _pc, _usp) \ | 96 | #define start_thread(_regs, _pc, _usp) \ |
88 | do { \ | 97 | do { \ |
89 | set_fs(USER_DS); /* reads from user space */ \ | 98 | set_fs(USER_DS); /* reads from user space */ \ |
90 | (_regs)->pc = (_pc); \ | 99 | (_regs)->pc = (_pc); \ |
91 | if (current->mm) \ | 100 | ((struct switch_stack *)(_regs))[-1].a6 = 0; \ |
92 | (_regs)->d5 = current->mm->start_data; \ | 101 | reformat(_regs); \ |
93 | (_regs)->sr &= ~0x2000; \ | 102 | if (current->mm) \ |
94 | wrusp(_usp); \ | 103 | (_regs)->d5 = current->mm->start_data; \ |
104 | (_regs)->sr &= ~0x2000; \ | ||
105 | wrusp(_usp); \ | ||
95 | } while(0) | 106 | } while(0) |
96 | 107 | ||
97 | /* Forward declaration, a strange C thing */ | 108 | /* Forward declaration, a strange C thing */ |