Skip to content

Commit 70d64ce

Browse files
committed
powerpc: Rename files to have consistent _32/_64 suffixes
This doesn't change any code, just renames things so we consistently have foo_32.c and foo_64.c where we have separate 32- and 64-bit versions. Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent a432403 commit 70d64ce

24 files changed

+129
-269
lines changed

arch/powerpc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ CFLAGS += $(cpu-as-y)
112112
# Default to the common case.
113113
KBUILD_DEFCONFIG := common_defconfig
114114

115-
head-y := arch/powerpc/kernel/head.o
115+
head-y := arch/powerpc/kernel/head_32.o
116116
head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
117117
head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
118118
head-$(CONFIG_4xx) := arch/powerpc/kernel/head_4xx.o

arch/powerpc/kernel/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CFLAGS_prom_init.o += -fPIC
1010
CFLAGS_btext.o += -fPIC
1111
endif
1212

13-
extra-$(CONFIG_PPC_STD_MMU) := head.o
13+
extra-$(CONFIG_PPC_STD_MMU) := head_32.o
1414
extra-$(CONFIG_PPC64) := head_64.o
1515
extra-$(CONFIG_40x) := head_4xx.o
1616
extra-$(CONFIG_44x) := head_44x.o
@@ -21,7 +21,7 @@ extra-$(CONFIG_PPC_FPU) += fpu.o
2121
extra-y += vmlinux.lds
2222

2323
obj-y := traps.o prom.o semaphore.o
24-
obj-$(CONFIG_PPC32) += setup.o process.o
24+
obj-$(CONFIG_PPC32) += setup_32.o process.o
2525
obj-$(CONFIG_PPC64) += idle_power4.o
2626
ifeq ($(CONFIG_PPC32),y)
2727
obj-$(CONFIG_PPC_OF) += prom_init.o of_device.o
File renamed without changes.
File renamed without changes.

arch/powerpc/lib/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
obj-y := strcase.o string.o
6-
obj-$(CONFIG_PPC32) += div64.o copy32.o checksum.o
7-
obj-$(CONFIG_PPC64) += copypage.o copyuser.o memcpy.o usercopy.o \
8-
sstep.o checksum64.o
6+
obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
7+
obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o memcpy_64.o \
8+
usercopy_64.o sstep.o checksum_64.o mem_64.o
99
obj-$(CONFIG_PPC_ISERIES) += e2a.o
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

arch/powerpc/lib/mem_64.S

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* String handling functions for PowerPC.
3+
*
4+
* Copyright (C) 1996 Paul Mackerras.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU General Public License
8+
* as published by the Free Software Foundation; either version
9+
* 2 of the License, or (at your option) any later version.
10+
*/
11+
#include <asm/processor.h>
12+
#include <asm/errno.h>
13+
#include <asm/ppc_asm.h>
14+
15+
_GLOBAL(memset)
16+
neg r0,r3
17+
rlwimi r4,r4,8,16,23
18+
andi. r0,r0,7 /* # bytes to be 8-byte aligned */
19+
rlwimi r4,r4,16,0,15
20+
cmplw cr1,r5,r0 /* do we get that far? */
21+
rldimi r4,r4,32,0
22+
mtcrf 1,r0
23+
mr r6,r3
24+
blt cr1,8f
25+
beq+ 3f /* if already 8-byte aligned */
26+
subf r5,r0,r5
27+
bf 31,1f
28+
stb r4,0(r6)
29+
addi r6,r6,1
30+
1: bf 30,2f
31+
sth r4,0(r6)
32+
addi r6,r6,2
33+
2: bf 29,3f
34+
stw r4,0(r6)
35+
addi r6,r6,4
36+
3: srdi. r0,r5,6
37+
clrldi r5,r5,58
38+
mtctr r0
39+
beq 5f
40+
4: std r4,0(r6)
41+
std r4,8(r6)
42+
std r4,16(r6)
43+
std r4,24(r6)
44+
std r4,32(r6)
45+
std r4,40(r6)
46+
std r4,48(r6)
47+
std r4,56(r6)
48+
addi r6,r6,64
49+
bdnz 4b
50+
5: srwi. r0,r5,3
51+
clrlwi r5,r5,29
52+
mtcrf 1,r0
53+
beq 8f
54+
bf 29,6f
55+
std r4,0(r6)
56+
std r4,8(r6)
57+
std r4,16(r6)
58+
std r4,24(r6)
59+
addi r6,r6,32
60+
6: bf 30,7f
61+
std r4,0(r6)
62+
std r4,8(r6)
63+
addi r6,r6,16
64+
7: bf 31,8f
65+
std r4,0(r6)
66+
addi r6,r6,8
67+
8: cmpwi r5,0
68+
mtcrf 1,r5
69+
beqlr+
70+
bf 29,9f
71+
stw r4,0(r6)
72+
addi r6,r6,4
73+
9: bf 30,10f
74+
sth r4,0(r6)
75+
addi r6,r6,2
76+
10: bflr 31
77+
stb r4,0(r6)
78+
blr
79+
80+
_GLOBAL(memmove)
81+
cmplw 0,r3,r4
82+
bgt .backwards_memcpy
83+
b .memcpy
84+
85+
_GLOBAL(backwards_memcpy)
86+
rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
87+
add r6,r3,r5
88+
add r4,r4,r5
89+
beq 2f
90+
andi. r0,r6,3
91+
mtctr r7
92+
bne 5f
93+
1: lwz r7,-4(r4)
94+
lwzu r8,-8(r4)
95+
stw r7,-4(r6)
96+
stwu r8,-8(r6)
97+
bdnz 1b
98+
andi. r5,r5,7
99+
2: cmplwi 0,r5,4
100+
blt 3f
101+
lwzu r0,-4(r4)
102+
subi r5,r5,4
103+
stwu r0,-4(r6)
104+
3: cmpwi 0,r5,0
105+
beqlr
106+
mtctr r5
107+
4: lbzu r0,-1(r4)
108+
stbu r0,-1(r6)
109+
bdnz 4b
110+
blr
111+
5: mtctr r0
112+
6: lbzu r7,-1(r4)
113+
stbu r7,-1(r6)
114+
bdnz 6b
115+
subf r5,r0,r5
116+
rlwinm. r7,r5,32-3,3,31
117+
beq 2b
118+
mtctr r7
119+
b 1b
File renamed without changes.
File renamed without changes.

arch/powerpc/mm/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#
44

55
obj-y := fault.o mem.o lmb.o
6-
obj-$(CONFIG_PPC32) += init.o pgtable.o mmu_context.o \
7-
tlb.o
8-
obj-$(CONFIG_PPC64) += init64.o pgtable64.o mmu_context64.o
9-
obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu.o hash_32.o
6+
obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o \
7+
tlb_32.o
8+
obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o
9+
obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o
1010
obj-$(CONFIG_40x) += 4xx_mmu.o
1111
obj-$(CONFIG_44x) += 44x_mmu.o
1212
obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)