Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11679
b: refs/heads/master
c: 6316222
h: refs/heads/master
i:
  11677: bc05118
  11675: 14e7dc1
  11671: 469e8a6
  11663: 7deaaa5
  11647: c8c2704
v: v3
  • Loading branch information
Paul Mackerras committed Oct 27, 2005
1 parent 475644d commit f90e42b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 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: 80579e1f4a6b5f5dec92faa6c3e0645961c99091
refs/heads/master: 6316222ea050d469c3155881d9dee2c7671d9fef
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/kernel/fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ _GLOBAL(load_up_fpu)
*/
#ifndef CONFIG_SMP
LOADBASE(r3, last_task_used_math)
tophys(r3,r3)
toreal(r3)
LDL r4,OFF(last_task_used_math)(r3)
CMPI 0,r4,0
beq 1f
tophys(r4,r4)
toreal(r4)
addi r4,r4,THREAD /* want last_task_used_math->thread */
SAVE_32FPRS(0, r4)
mffs fr0
stfd fr0,THREAD_FPSCR(r4)
LDL r5,PT_REGS(r4)
tophys(r5,r5)
toreal(r5)
LDL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
li r10,MSR_FP|MSR_FE0|MSR_FE1
andc r4,r4,r10 /* disable FP for previous task */
Expand All @@ -76,7 +76,7 @@ _GLOBAL(load_up_fpu)
REST_32FPRS(0, r5)
#ifndef CONFIG_SMP
subi r4,r5,THREAD
tovirt(r4,r4)
fromreal(r4)
STL r4,OFF(last_task_used_math)(r3)
#endif /* CONFIG_SMP */
/* restore registers and return */
Expand Down
29 changes: 15 additions & 14 deletions trunk/include/asm-powerpc/ppc_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ GLUE(.,name):
* loads the address of 'name' into 'rn'
*
* LOADBASE( rn, name )
* loads the address (less the low 16 bits) of 'name' into 'rn'
* loads the address (possibly without the low 16 bits) of 'name' into 'rn'
* suitable for base+disp addressing
*/
#ifdef __powerpc64__
Expand All @@ -166,10 +166,7 @@ GLUE(.,name):
ori rn,rn,name##@l

#define LOADBASE(rn,name) \
.section .toc,"aw"; \
1: .tc name[TC],name; \
.previous; \
ld rn,1b@toc(r2)
ld rn,name@got(r2)

#define OFF(name) 0

Expand Down Expand Up @@ -278,30 +275,34 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)


#if defined(CONFIG_BOOKE)
#define toreal(rd)
#define fromreal(rd)

#define tophys(rd,rs) \
addis rd,rs,0

#define tovirt(rd,rs) \
addis rd,rs,0

#elif defined(CONFIG_PPC64)
/* PPPBBB - DRENG If KERNELBASE is always 0xC0...,
* Then we can easily do this with one asm insn. -Peter
*/
#define toreal(rd) /* we can access c000... in real mode */
#define fromreal(rd)

#define tophys(rd,rs) \
lis rd,((KERNELBASE>>48)&0xFFFF); \
rldicr rd,rd,32,31; \
sub rd,rs,rd
clrldi rd,rs,2

#define tovirt(rd,rs) \
lis rd,((KERNELBASE>>48)&0xFFFF); \
rldicr rd,rd,32,31; \
add rd,rs,rd
rotldi rd,rs,16; \
ori rd,rd,((KERNELBASE>>48)&0xFFFF);\
rotldi rd,rd,48
#else
/*
* On APUS (Amiga PowerPC cpu upgrade board), we don't know the
* physical base address of RAM at compile time.
*/
#define toreal(rd) tophys(rd,rd)
#define fromreal(rd) tovirt(rd,rd)

#define tophys(rd,rs) \
0: addis rd,rs,-KERNELBASE@h; \
.section ".vtop_fixup","aw"; \
Expand Down

0 comments on commit f90e42b

Please sign in to comment.