diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 | 
| commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
| tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /arch/powerpc/lib | |
| parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
| parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) | |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
  [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
  [POWERPC] remove kernel module option for booke wdt
  [POWERPC] Avoid putting cpu node twice
  [POWERPC] Spinlock initializer cleanup
  [POWERPC] ppc4xx_sgdma needs dma-mapping.h
  [POWERPC] arch/powerpc/sysdev/timer.c build fix
  [POWERPC] get_property cleanups
  [POWERPC] Remove the unused HTDMSOUND driver
  [POWERPC] cell: cbe_cpufreq cleanup and crash fix
  [POWERPC] Declare enable_kernel_spe in a header
  [POWERPC] Add dt_xlate_addr() to bootwrapper
  [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
  [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
  [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
  [POWERPC] Add uartlite boot console driver for the zImage wrapper
  [POWERPC] Stop using ppc_sys for Xilinx Virtex boards
  [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
  [POWERPC] Merge common virtex header files
  [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
  [POWERPC] Clean up cpufreq Kconfig dependencies
  ...
Diffstat (limited to 'arch/powerpc/lib')
| -rw-r--r-- | arch/powerpc/lib/copyuser_64.S | 6 | ||||
| -rw-r--r-- | arch/powerpc/lib/locks.c | 4 | ||||
| -rw-r--r-- | arch/powerpc/lib/mem_64.S | 6 | ||||
| -rw-r--r-- | arch/powerpc/lib/memcpy_64.S | 6 | ||||
| -rw-r--r-- | arch/powerpc/lib/sstep.c | 45 | 
5 files changed, 57 insertions, 10 deletions
| diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index a6b54cb97c49..25ec5378afa4 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
| @@ -24,7 +24,7 @@ _GLOBAL(__copy_tofrom_user) | |||
| 24 | dcbt 0,r4 | 24 | dcbt 0,r4 | 
| 25 | beq .Lcopy_page_4K | 25 | beq .Lcopy_page_4K | 
| 26 | andi. r6,r6,7 | 26 | andi. r6,r6,7 | 
| 27 | mtcrf 0x01,r5 | 27 | PPC_MTOCRF 0x01,r5 | 
| 28 | blt cr1,.Lshort_copy | 28 | blt cr1,.Lshort_copy | 
| 29 | bne .Ldst_unaligned | 29 | bne .Ldst_unaligned | 
| 30 | .Ldst_aligned: | 30 | .Ldst_aligned: | 
| @@ -135,7 +135,7 @@ _GLOBAL(__copy_tofrom_user) | |||
| 135 | b .Ldo_tail | 135 | b .Ldo_tail | 
| 136 | 136 | ||
| 137 | .Ldst_unaligned: | 137 | .Ldst_unaligned: | 
| 138 | mtcrf 0x01,r6 /* put #bytes to 8B bdry into cr7 */ | 138 | PPC_MTOCRF 0x01,r6 /* put #bytes to 8B bdry into cr7 */ | 
| 139 | subf r5,r6,r5 | 139 | subf r5,r6,r5 | 
| 140 | li r7,0 | 140 | li r7,0 | 
| 141 | cmpldi r1,r5,16 | 141 | cmpldi r1,r5,16 | 
| @@ -150,7 +150,7 @@ _GLOBAL(__copy_tofrom_user) | |||
| 150 | 2: bf cr7*4+1,3f | 150 | 2: bf cr7*4+1,3f | 
| 151 | 37: lwzx r0,r7,r4 | 151 | 37: lwzx r0,r7,r4 | 
| 152 | 83: stwx r0,r7,r3 | 152 | 83: stwx r0,r7,r3 | 
| 153 | 3: mtcrf 0x01,r5 | 153 | 3: PPC_MTOCRF 0x01,r5 | 
| 154 | add r4,r6,r4 | 154 | add r4,r6,r4 | 
| 155 | add r3,r6,r3 | 155 | add r3,r6,r3 | 
| 156 | b .Ldst_aligned | 156 | b .Ldst_aligned | 
| diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 80b482ca30df..79d0fa3a470d 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
| @@ -43,9 +43,11 @@ void __spin_yield(raw_spinlock_t *lock) | |||
| 43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 
| 44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 
| 45 | ((u64)holder_cpu << 32) | yield_count); | 45 | ((u64)holder_cpu << 32) | yield_count); | 
| 46 | #ifdef CONFIG_PPC_SPLPAR | ||
| 46 | else | 47 | else | 
| 47 | plpar_hcall_norets(H_CONFER, | 48 | plpar_hcall_norets(H_CONFER, | 
| 48 | get_hard_smp_processor_id(holder_cpu), yield_count); | 49 | get_hard_smp_processor_id(holder_cpu), yield_count); | 
| 50 | #endif | ||
| 49 | } | 51 | } | 
| 50 | 52 | ||
| 51 | /* | 53 | /* | 
| @@ -72,9 +74,11 @@ void __rw_yield(raw_rwlock_t *rw) | |||
| 72 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 74 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 
| 73 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 75 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 
| 74 | ((u64)holder_cpu << 32) | yield_count); | 76 | ((u64)holder_cpu << 32) | yield_count); | 
| 77 | #ifdef CONFIG_PPC_SPLPAR | ||
| 75 | else | 78 | else | 
| 76 | plpar_hcall_norets(H_CONFER, | 79 | plpar_hcall_norets(H_CONFER, | 
| 77 | get_hard_smp_processor_id(holder_cpu), yield_count); | 80 | get_hard_smp_processor_id(holder_cpu), yield_count); | 
| 81 | #endif | ||
| 78 | } | 82 | } | 
| 79 | #endif | 83 | #endif | 
| 80 | 84 | ||
| diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S index 68df20283ff5..11ce045e21fd 100644 --- a/arch/powerpc/lib/mem_64.S +++ b/arch/powerpc/lib/mem_64.S | |||
| @@ -19,7 +19,7 @@ _GLOBAL(memset) | |||
| 19 | rlwimi r4,r4,16,0,15 | 19 | rlwimi r4,r4,16,0,15 | 
| 20 | cmplw cr1,r5,r0 /* do we get that far? */ | 20 | cmplw cr1,r5,r0 /* do we get that far? */ | 
| 21 | rldimi r4,r4,32,0 | 21 | rldimi r4,r4,32,0 | 
| 22 | mtcrf 1,r0 | 22 | PPC_MTOCRF 1,r0 | 
| 23 | mr r6,r3 | 23 | mr r6,r3 | 
| 24 | blt cr1,8f | 24 | blt cr1,8f | 
| 25 | beq+ 3f /* if already 8-byte aligned */ | 25 | beq+ 3f /* if already 8-byte aligned */ | 
| @@ -49,7 +49,7 @@ _GLOBAL(memset) | |||
| 49 | bdnz 4b | 49 | bdnz 4b | 
| 50 | 5: srwi. r0,r5,3 | 50 | 5: srwi. r0,r5,3 | 
| 51 | clrlwi r5,r5,29 | 51 | clrlwi r5,r5,29 | 
| 52 | mtcrf 1,r0 | 52 | PPC_MTOCRF 1,r0 | 
| 53 | beq 8f | 53 | beq 8f | 
| 54 | bf 29,6f | 54 | bf 29,6f | 
| 55 | std r4,0(r6) | 55 | std r4,0(r6) | 
| @@ -65,7 +65,7 @@ _GLOBAL(memset) | |||
| 65 | std r4,0(r6) | 65 | std r4,0(r6) | 
| 66 | addi r6,r6,8 | 66 | addi r6,r6,8 | 
| 67 | 8: cmpwi r5,0 | 67 | 8: cmpwi r5,0 | 
| 68 | mtcrf 1,r5 | 68 | PPC_MTOCRF 1,r5 | 
| 69 | beqlr+ | 69 | beqlr+ | 
| 70 | bf 29,9f | 70 | bf 29,9f | 
| 71 | stw r4,0(r6) | 71 | stw r4,0(r6) | 
| diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 7173ba98f427..3f131129d1c1 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | .align 7 | 12 | .align 7 | 
| 13 | _GLOBAL(memcpy) | 13 | _GLOBAL(memcpy) | 
| 14 | std r3,48(r1) /* save destination pointer for return value */ | 14 | std r3,48(r1) /* save destination pointer for return value */ | 
| 15 | mtcrf 0x01,r5 | 15 | PPC_MTOCRF 0x01,r5 | 
| 16 | cmpldi cr1,r5,16 | 16 | cmpldi cr1,r5,16 | 
| 17 | neg r6,r3 # LS 3 bits = # bytes to 8-byte dest bdry | 17 | neg r6,r3 # LS 3 bits = # bytes to 8-byte dest bdry | 
| 18 | andi. r6,r6,7 | 18 | andi. r6,r6,7 | 
| @@ -128,7 +128,7 @@ _GLOBAL(memcpy) | |||
| 128 | b .Ldo_tail | 128 | b .Ldo_tail | 
| 129 | 129 | ||
| 130 | .Ldst_unaligned: | 130 | .Ldst_unaligned: | 
| 131 | mtcrf 0x01,r6 # put #bytes to 8B bdry into cr7 | 131 | PPC_MTOCRF 0x01,r6 # put #bytes to 8B bdry into cr7 | 
| 132 | subf r5,r6,r5 | 132 | subf r5,r6,r5 | 
| 133 | li r7,0 | 133 | li r7,0 | 
| 134 | cmpldi r1,r5,16 | 134 | cmpldi r1,r5,16 | 
| @@ -143,7 +143,7 @@ _GLOBAL(memcpy) | |||
| 143 | 2: bf cr7*4+1,3f | 143 | 2: bf cr7*4+1,3f | 
| 144 | lwzx r0,r7,r4 | 144 | lwzx r0,r7,r4 | 
| 145 | stwx r0,r7,r3 | 145 | stwx r0,r7,r3 | 
| 146 | 3: mtcrf 0x01,r5 | 146 | 3: PPC_MTOCRF 0x01,r5 | 
| 147 | add r4,r6,r4 | 147 | add r4,r6,r4 | 
| 148 | add r3,r6,r3 | 148 | add r3,r6,r3 | 
| 149 | b .Ldst_aligned | 149 | b .Ldst_aligned | 
| diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 7e8ded051b5b..4aae0c387645 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
| @@ -54,7 +54,7 @@ static int __kprobes branch_taken(unsigned int instr, struct pt_regs *regs) | |||
| 54 | */ | 54 | */ | 
| 55 | int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | 55 | int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | 
| 56 | { | 56 | { | 
| 57 | unsigned int opcode, rd; | 57 | unsigned int opcode, rs, rb, rd, spr; | 
| 58 | unsigned long int imm; | 58 | unsigned long int imm; | 
| 59 | 59 | ||
| 60 | opcode = instr >> 26; | 60 | opcode = instr >> 26; | 
| @@ -152,6 +152,49 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
| 152 | regs->nip &= 0xffffffffUL; | 152 | regs->nip &= 0xffffffffUL; | 
| 153 | return 1; | 153 | return 1; | 
| 154 | #endif | 154 | #endif | 
| 155 | case 0x26: /* mfcr */ | ||
| 156 | regs->gpr[rd] = regs->ccr; | ||
| 157 | regs->gpr[rd] &= 0xffffffffUL; | ||
| 158 | goto mtspr_out; | ||
| 159 | case 0x2a6: /* mfspr */ | ||
| 160 | spr = (instr >> 11) & 0x3ff; | ||
| 161 | switch (spr) { | ||
| 162 | case 0x20: /* mfxer */ | ||
| 163 | regs->gpr[rd] = regs->xer; | ||
| 164 | regs->gpr[rd] &= 0xffffffffUL; | ||
| 165 | goto mtspr_out; | ||
| 166 | case 0x100: /* mflr */ | ||
| 167 | regs->gpr[rd] = regs->link; | ||
| 168 | goto mtspr_out; | ||
| 169 | case 0x120: /* mfctr */ | ||
| 170 | regs->gpr[rd] = regs->ctr; | ||
| 171 | goto mtspr_out; | ||
| 172 | } | ||
| 173 | break; | ||
| 174 | case 0x378: /* orx */ | ||
| 175 | rs = (instr >> 21) & 0x1f; | ||
| 176 | rb = (instr >> 11) & 0x1f; | ||
| 177 | if (rs == rb) { /* mr */ | ||
| 178 | rd = (instr >> 16) & 0x1f; | ||
| 179 | regs->gpr[rd] = regs->gpr[rs]; | ||
| 180 | goto mtspr_out; | ||
| 181 | } | ||
| 182 | break; | ||
| 183 | case 0x3a6: /* mtspr */ | ||
| 184 | spr = (instr >> 11) & 0x3ff; | ||
| 185 | switch (spr) { | ||
| 186 | case 0x20: /* mtxer */ | ||
| 187 | regs->xer = (regs->gpr[rd] & 0xffffffffUL); | ||
| 188 | goto mtspr_out; | ||
| 189 | case 0x100: /* mtlr */ | ||
| 190 | regs->link = regs->gpr[rd]; | ||
| 191 | goto mtspr_out; | ||
| 192 | case 0x120: /* mtctr */ | ||
| 193 | regs->ctr = regs->gpr[rd]; | ||
| 194 | mtspr_out: | ||
| 195 | regs->nip += 4; | ||
| 196 | return 1; | ||
| 197 | } | ||
| 155 | } | 198 | } | 
| 156 | } | 199 | } | 
| 157 | return 0; | 200 | return 0; | 
