aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-17 23:43:34 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-17 23:43:34 -0500
commit437a58db57c61385baaa1cb8b7fa590b6a2f1607 (patch)
tree3b25862dccdfd891b0d8582ff7b98b1db9f197f7
parentf62859bb6871c5e4a8e591c60befc8caaf54db8c (diff)
powerpc: Move remaining .c files from arch/ppc64 to arch/powerpc
This also deletes the now-unused Makefiles under arch/ppc64. Both of the files moved over could use some merging, but for now I have moved them as-is and arranged for them to be used only in 64-bit kernels. For 32-bit kernels we still use arch/ppc/kernel/idle.c and drivers/char/generic_nvram.c as before. Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/Makefile4
-rw-r--r--arch/powerpc/kernel/Makefile5
-rw-r--r--arch/powerpc/kernel/idle_64.c (renamed from arch/ppc64/kernel/idle.c)0
-rw-r--r--arch/powerpc/kernel/nvram_64.c (renamed from arch/ppc64/kernel/nvram.c)0
-rw-r--r--arch/ppc64/Makefile142
-rw-r--r--arch/ppc64/kernel/Makefile7
6 files changed, 6 insertions, 152 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 99dbea8c5c50..987036b60c88 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -125,11 +125,11 @@ head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
125head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o 125head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
126 126
127core-y += arch/powerpc/kernel/ \ 127core-y += arch/powerpc/kernel/ \
128 arch/$(OLDARCH)/kernel/ \
129 arch/powerpc/mm/ \ 128 arch/powerpc/mm/ \
130 arch/powerpc/lib/ \ 129 arch/powerpc/lib/ \
131 arch/powerpc/sysdev/ \ 130 arch/powerpc/sysdev/ \
132 arch/powerpc/platforms/ 131 arch/powerpc/platforms/
132core-$(CONFIG_PPC32) += arch/ppc/kernel/
133core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ 133core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
134core-$(CONFIG_XMON) += arch/powerpc/xmon/ 134core-$(CONFIG_XMON) += arch/powerpc/xmon/
135core-$(CONFIG_APUS) += arch/ppc/amiga/ 135core-$(CONFIG_APUS) += arch/ppc/amiga/
@@ -165,7 +165,7 @@ define archhelp
165 @echo ' (your) ~/bin/installkernel or' 165 @echo ' (your) ~/bin/installkernel or'
166 @echo ' (distribution) /sbin/installkernel or' 166 @echo ' (distribution) /sbin/installkernel or'
167 @echo ' install to $$(INSTALL_PATH) and run lilo' 167 @echo ' install to $$(INSTALL_PATH) and run lilo'
168 @echo ' *_defconfig - Select default config from arch/$(ARCH)/ppc/configs' 168 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
169endef 169endef
170 170
171archclean: 171archclean:
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0e679afb2e20..9ed551b6c172 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -17,7 +17,7 @@ obj-y += vdso32/
17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
18 signal_64.o ptrace32.o systbl.o \ 18 signal_64.o ptrace32.o systbl.o \
19 paca.o ioctl32.o cpu_setup_power4.o \ 19 paca.o ioctl32.o cpu_setup_power4.o \
20 firmware.o sysfs.o udbg.o 20 firmware.o sysfs.o udbg.o idle_64.o
21obj-$(CONFIG_PPC64) += vdso64/ 21obj-$(CONFIG_PPC64) += vdso64/
22obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 22obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
23obj-$(CONFIG_POWER4) += idle_power4.o 23obj-$(CONFIG_POWER4) += idle_power4.o
@@ -35,6 +35,7 @@ obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
35obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o 35obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
36udbgscc-$(CONFIG_PPC64) := udbg_scc.o 36udbgscc-$(CONFIG_PPC64) := udbg_scc.o
37obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y) 37obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y)
38obj64-$(CONFIG_PPC_MULTIPLATFORM) += nvram_64.o
38 39
39ifeq ($(CONFIG_PPC_MERGE),y) 40ifeq ($(CONFIG_PPC_MERGE),y)
40 41
@@ -78,5 +79,7 @@ smpobj-$(CONFIG_SMP) += smp.o
78 79
79endif 80endif
80 81
82obj-$(CONFIG_PPC64) += $(obj64-y)
83
81extra-$(CONFIG_PPC_FPU) += fpu.o 84extra-$(CONFIG_PPC_FPU) += fpu.o
82extra-$(CONFIG_PPC64) += entry_64.o 85extra-$(CONFIG_PPC64) += entry_64.o
diff --git a/arch/ppc64/kernel/idle.c b/arch/powerpc/kernel/idle_64.c
index b879d3057ef8..b879d3057ef8 100644
--- a/arch/ppc64/kernel/idle.c
+++ b/arch/powerpc/kernel/idle_64.c
diff --git a/arch/ppc64/kernel/nvram.c b/arch/powerpc/kernel/nvram_64.c
index c0fcd29918ce..c0fcd29918ce 100644
--- a/arch/ppc64/kernel/nvram.c
+++ b/arch/powerpc/kernel/nvram_64.c
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile
deleted file mode 100644
index a55a82d145d4..000000000000
--- a/arch/ppc64/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.
9#
10# Copyright (C) 1994 by Linus Torvalds
11# Changes for PPC by Gary Thomas
12# Rewritten by Cort Dougan and Paul Mackerras
13# Adjusted for PPC64 by Tom Gall
14#
15
16KERNELLOAD := 0xc000000000000000
17
18# Set default 32 bits cross compilers for vdso and boot wrapper
19CROSS32_COMPILE ?=
20
21CROSS32CC := $(CROSS32_COMPILE)gcc
22CROSS32AS := $(CROSS32_COMPILE)as
23CROSS32LD := $(CROSS32_COMPILE)ld
24CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy
25
26# If we have a biarch compiler, use it for 32 bits cross compile if
27# CROSS32_COMPILE wasn't explicitely defined, and add proper explicit
28# target type to target compilers
29
30HAS_BIARCH := $(call cc-option-yn, -m64)
31ifeq ($(HAS_BIARCH),y)
32ifeq ($(CROSS32_COMPILE),)
33CROSS32CC := $(CC) -m32
34CROSS32AS := $(AS) -a32
35CROSS32LD := $(LD) -m elf32ppc
36CROSS32OBJCOPY := $(OBJCOPY)
37endif
38override AS += -a64
39override LD += -m elf64ppc
40override CC += -m64
41endif
42
43export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
44
45new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
46
47ifeq ($(new_nm),y)
48NM := $(NM) --synthetic
49
50endif
51
52CHECKFLAGS += -m64 -D__powerpc__ -D__powerpc64__
53
54LDFLAGS := -m elf64ppc
55LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
56CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \
57 -mcall-aixdesc
58# Temporary hack until we have migrated to asm-powerpc
59CPPFLAGS += -Iarch/$(ARCH)/include
60
61GCC_VERSION := $(call cc-version)
62GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;)
63
64ifeq ($(CONFIG_POWER4_ONLY),y)
65ifeq ($(CONFIG_ALTIVEC),y)
66ifeq ($(GCC_BROKEN_VEC),y)
67 CFLAGS += $(call cc-option,-mcpu=970)
68else
69 CFLAGS += $(call cc-option,-mcpu=power4)
70endif
71else
72 CFLAGS += $(call cc-option,-mcpu=power4)
73endif
74else
75 CFLAGS += $(call cc-option,-mtune=power4)
76endif
77
78# No AltiVec instruction when building kernel
79CFLAGS += $(call cc-option, -mno-altivec)
80
81# Enable unit-at-a-time mode when possible. It shrinks the
82# kernel considerably.
83CFLAGS += $(call cc-option,-funit-at-a-time)
84
85head-y := arch/ppc64/kernel/head.o
86head-y += arch/powerpc/kernel/fpu.o
87head-y += arch/powerpc/kernel/entry_64.o
88
89core-y += arch/ppc64/kernel/ arch/powerpc/kernel/
90core-y += arch/powerpc/mm/
91core-y += arch/powerpc/sysdev/
92core-y += arch/powerpc/platforms/
93core-y += arch/powerpc/lib/
94core-$(CONFIG_XMON) += arch/powerpc/xmon/
95drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
96
97boot := arch/ppc64/boot
98
99boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd
100boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode
101boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd
102boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm
103boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd
104$(boottargets-y): vmlinux
105 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
106
107bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage
108bootimage-$(CONFIG_PPC_PMAC) := vmlinux
109bootimage-$(CONFIG_PPC_MAPLE) := $(boot)/zImage
110bootimage-$(CONFIG_PPC_BPA) := $(boot)/zImage
111bootimage-$(CONFIG_PPC_ISERIES) := vmlinux
112BOOTIMAGE := $(bootimage-y)
113install: vmlinux
114 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
115
116defaultimage-$(CONFIG_PPC_PSERIES) := zImage
117defaultimage-$(CONFIG_PPC_PMAC) := zImage.vmode
118defaultimage-$(CONFIG_PPC_MAPLE) := zImage
119defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
120KBUILD_IMAGE := $(defaultimage-y)
121all: $(KBUILD_IMAGE)
122
123archclean:
124 $(Q)$(MAKE) $(clean)=$(boot)
125 # Temporary hack until we have migrated to asm-powerpc
126 $(Q)rm -rf arch/$(ARCH)/include
127
128
129# Temporary hack until we have migrated to asm-powerpc
130include/asm: arch/$(ARCH)/include/asm
131arch/$(ARCH)/include/asm:
132 $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
133 $(Q)ln -fsn $(srctree)/include/asm-powerpc arch/$(ARCH)/include/asm
134
135define archhelp
136 echo ' zImage.vmode - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)'
137 echo ' zImage.initrd.vmode - Compressed kernel image with initrd attached,'
138 echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
139 echo ' (arch/$(ARCH)/boot/zImage.initrd.vmode)'
140 echo ' zImage - zImage for pSeries machines'
141 echo ' zImage.initrd - zImage with initrd for pSeries machines'
142endef
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
deleted file mode 100644
index 5f0abdb66e0b..000000000000
--- a/arch/ppc64/kernel/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
1#
2# Makefile for the linux ppc64 kernel.
3#
4
5obj-y += idle.o
6
7obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o