Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356358
b: refs/heads/master
c: 96f013f
h: refs/heads/master
v: v3
  • Loading branch information
Jimi Xenidis authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent d0e5a27 commit a491f83
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 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: c7c360eedb8c1eea302a224a8c83d19a4e4cf608
refs/heads/master: 96f013fe1b0904ee9059aa5105f7aa4959cd3914
19 changes: 18 additions & 1 deletion trunk/arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,40 @@ __secondary_hold:
#endif
/* Grab our physical cpu number */
mr r24,r3
/* stash r4 for book3e */
mr r25,r4

/* Tell the master cpu we're here */
/* Relocation is off & we are located at an address less */
/* than 0x100, so only need to grab low order offset. */
std r24,__secondary_hold_acknowledge-_stext(0)
sync

li r26,0
#ifdef CONFIG_PPC_BOOK3E
tovirt(r26,r26)
#endif
/* All secondary cpus wait here until told to start. */
100: ld r4,__secondary_hold_spinloop-_stext(0)
100: ld r4,__secondary_hold_spinloop-_stext(r26)
cmpdi 0,r4,0
beq 100b

#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
#ifdef CONFIG_PPC_BOOK3E
tovirt(r4,r4)
#endif
ld r4,0(r4) /* deref function descriptor */
mtctr r4
mr r3,r24
/*
* it may be the case that other platforms have r4 right to
* begin with, this gives us some safety in case it is not
*/
#ifdef CONFIG_PPC_BOOK3E
mr r4,r25
#else
li r4,0
#endif
/* Make sure that patched code is visible */
isync
bctr
Expand Down

0 comments on commit a491f83

Please sign in to comment.