Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181057
b: refs/heads/master
c: 70e068e
h: refs/heads/master
i:
  181055: bd97e6b
v: v3
  • Loading branch information
Paul Mundt committed Jan 12, 2010
1 parent 34cde24 commit cd2bd71
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 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: 6430a5987f8bb9a7c5187b343956aa8ef404d571
refs/heads/master: 70e068eef97d05c97c3512f82352f39fdadfa8cb
13 changes: 2 additions & 11 deletions trunk/arch/sh/include/asm/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,10 @@ extern int ubc_usercnt;
.sp = sizeof(init_stack) + (long) &init_stack, \
}

/*
* Do necessary setup to start up a newly executed thread.
*/
#define start_thread(_regs, new_pc, new_sp) \
set_fs(USER_DS); \
_regs->pr = 0; \
_regs->sr = SR_FD; /* User mode. */ \
_regs->pc = new_pc; \
_regs->regs[15] = new_sp

/* Forward declaration, a strange C thing */
struct task_struct;
struct mm_struct;

extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned long new_sp);

/* Free all resources held by a thread. */
extern void release_thread(struct task_struct *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define mb() __asm__ __volatile__ ("synco": : :"memory")
#define rmb() mb()
#define wmb() __asm__ __volatile__ ("synco": : :"memory")
#define ctrl_barrier() __icbi(PAGE_OFFSET)
#define ctrl_barrier() __icbi(0xa8000000)
#define read_barrier_depends() do { } while(0)
#else
#define mb() __asm__ __volatile__ ("": : :"memory")
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/sh/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
}
EXPORT_SYMBOL(kernel_thread);

void start_thread(struct pt_regs *regs, unsigned long new_pc,
unsigned long new_sp)
{
set_fs(USER_DS);

regs->pr = 0;
regs->sr = SR_FD;
regs->pc = new_pc;
regs->regs[15] = new_sp;
}
EXPORT_SYMBOL(start_thread);

/*
* Free current thread data structures etc..
*/
Expand Down

0 comments on commit cd2bd71

Please sign in to comment.