Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114520
b: refs/heads/master
c: e31aa45
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mackerras committed Sep 15, 2008
1 parent 4d883e3 commit 6591341
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 127 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: 1f6a93e4c35e75d547b51f56ba8139ab1a91628c
refs/heads/master: e31aa453bbc4886a7bd33e5c2afa526d6f55bd7a
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/ppc_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ GLUE(.,name):
* Loads the value of the constant expression 'expr' into register 'rn'
* using immediate instructions only. Use this when it's important not
* to reference other data (i.e. on ppc64 when the TOC pointer is not
* valid).
* valid) and when 'expr' is a constant or absolute address.
*
* LOAD_REG_ADDR(rn, name)
* Loads the address of label 'name' into register 'rn'. Use this when
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/kernel/cpu_setup_ppc970.S
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ load_hids:
isync

/* Save away cpu state */
LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
LOAD_REG_ADDR(r5,cpu_state_storage)

/* Save HID0,1,4 and 5 */
mfspr r3,SPRN_HID0
Expand All @@ -134,7 +134,7 @@ _GLOBAL(__restore_cpu_ppc970)
rldicl. r0,r0,4,63
beqlr

LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
LOAD_REG_ADDR(r5,cpu_state_storage)
/* Before accessing memory, we make sure rm_ci is clear */
li r0,0
mfspr r3,SPRN_HID4
Expand Down
16 changes: 7 additions & 9 deletions trunk/arch/powerpc/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,6 @@ _GLOBAL(enter_rtas)
std r7,_DAR(r1)
mfdsisr r8
std r8,_DSISR(r1)
mfsrr0 r9
std r9,_SRR0(r1)
mfsrr1 r10
std r10,_SRR1(r1)

/* Temporary workaround to clear CR until RTAS can be modified to
* ignore all bits.
Expand Down Expand Up @@ -754,21 +750,27 @@ _STATIC(rtas_return_loc)
mfspr r4,SPRN_SPRG3 /* Get PACA */
clrldi r4,r4,2 /* convert to realmode address */

bcl 20,31,$+4
0: mflr r3
ld r3,(1f-0b)(r3) /* get &.rtas_restore_regs */

mfmsr r6
li r0,MSR_RI
andc r6,r6,r0
sync
mtmsrd r6

ld r1,PACAR1(r4) /* Restore our SP */
LOAD_REG_IMMEDIATE(r3,.rtas_restore_regs)
ld r4,PACASAVEDMSR(r4) /* Restore our MSR */

mtspr SPRN_SRR0,r3
mtspr SPRN_SRR1,r4
rfid
b . /* prevent speculative execution */

.align 3
1: .llong .rtas_restore_regs

_STATIC(rtas_restore_regs)
/* relocation is on at this point */
REST_GPR(2, r1) /* Restore the TOC */
Expand All @@ -788,10 +790,6 @@ _STATIC(rtas_restore_regs)
mtdar r7
ld r8,_DSISR(r1)
mtdsisr r8
ld r9,_SRR0(r1)
mtsrr0 r9
ld r10,_SRR1(r1)
mtsrr1 r10

addi r1,r1,RTAS_FRAME_SIZE /* Unstack our frame */
ld r0,16(r1) /* get return address */
Expand Down
Loading

0 comments on commit 6591341

Please sign in to comment.