Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333650
b: refs/heads/master
c: 0973c68
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer authored and Al Viro committed Oct 1, 2012
1 parent ad2255b commit 985c478
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be6abfa769fa07ce89ac73273360b335ae978805
refs/heads/master: 0973c687e05a802a757664722678d2b5016f1c1c
23 changes: 12 additions & 11 deletions trunk/arch/m68k/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ struct thread_struct {
.fs = __KERNEL_DS, \
}

/*
* ColdFire stack format sbould be 0x4 for an aligned usp (will always be
* true on thread creation). We need to set this explicitly.
*/
#ifdef CONFIG_COLDFIRE
#define setframeformat(_regs) do { (_regs)->format = 0x4; } while(0)
#else
#define setframeformat(_regs) do { } while (0)
#endif

#ifdef CONFIG_MMU
/*
* Do necessary setup to start up a newly executed thread.
Expand All @@ -109,28 +119,19 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
{
regs->pc = pc;
regs->sr &= ~0x2000;
setframeformat(regs);
wrusp(usp);
}

extern int handle_kernel_fault(struct pt_regs *regs);

#else

/*
* Coldfire stacks need to be re-aligned on trap exit, conventional
* 68k can handle this case cleanly.
*/
#ifdef CONFIG_COLDFIRE
#define reformat(_regs) do { (_regs)->format = 0x4; } while(0)
#else
#define reformat(_regs) do { } while (0)
#endif

#define start_thread(_regs, _pc, _usp) \
do { \
(_regs)->pc = (_pc); \
((struct switch_stack *)(_regs))[-1].a6 = 0; \
reformat(_regs); \
setframeformat(_regs); \
if (current->mm) \
(_regs)->d5 = current->mm->start_data; \
(_regs)->sr &= ~0x2000; \
Expand Down

0 comments on commit 985c478

Please sign in to comment.