diff options
| author | Paul Mackerras <paulus@samba.org> | 2005-10-11 08:08:12 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2005-10-11 08:08:12 -0400 |
| commit | fd582ec88eb8d2d907876603e4ecebe6eab330d9 (patch) | |
| tree | bafacc1916098001051b8235722daa6b9b52e63a | |
| parent | 35d81a4bfe28a6ea81c9f67c9ce40543124ded0b (diff) | |
ppc: Various minor compile fixes
This fixes up a variety of minor problems in compiling with ARCH=ppc
arising from using the merged versions of various header files.
A lot of the changes are just adding #include <asm/machdep.h> to
files that use ppc_md or smp_ops_t.
This also arranges for us to use semaphore.c, vecemu.c, vector.S and
fpu.S from arch/powerpc/kernel when compiling with ARCH=ppc.
Signed-off-by: Paul Mackerras <paulus@samba.org>
35 files changed, 78 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 47a8eb6e7e39..e1db51e6f23a 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
| @@ -10,7 +10,7 @@ CFLAGS_prom_init.o += -fPIC | |||
| 10 | CFLAGS_btext.o += -fPIC | 10 | CFLAGS_btext.o += -fPIC |
| 11 | endif | 11 | endif |
| 12 | 12 | ||
| 13 | obj-y := semaphore.o traps.o | 13 | obj-y := semaphore.o |
| 14 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o | 14 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o |
| 15 | obj-$(CONFIG_POWER4) += idle_power4.o | 15 | obj-$(CONFIG_POWER4) += idle_power4.o |
| 16 | 16 | ||
| @@ -28,7 +28,7 @@ extra-$(CONFIG_PPC_FPU) += fpu.o | |||
| 28 | extra-y += vmlinux.lds | 28 | extra-y += vmlinux.lds |
| 29 | 29 | ||
| 30 | obj-y += process.o init_task.o \ | 30 | obj-y += process.o init_task.o \ |
| 31 | prom.o systbl.o | 31 | prom.o systbl.o traps.o |
| 32 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o | 32 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o |
| 33 | obj-$(CONFIG_PPC64) += setup_64.o misc_64.o | 33 | obj-$(CONFIG_PPC64) += setup_64.o misc_64.o |
| 34 | obj-$(CONFIG_PPC_OF) += prom_init.o of_device.o | 34 | obj-$(CONFIG_PPC_OF) += prom_init.o of_device.o |
| @@ -39,4 +39,12 @@ ifeq ($(CONFIG_PPC_ISERIES),y) | |||
| 39 | $(obj)/head_64.o: $(obj)/lparmap.s | 39 | $(obj)/head_64.o: $(obj)/lparmap.s |
| 40 | AFLAGS_head_64.o += -I$(obj) | 40 | AFLAGS_head_64.o += -I$(obj) |
| 41 | endif | 41 | endif |
| 42 | |||
| 43 | else | ||
| 44 | # stuff used from here for ARCH=ppc or ARCH=ppc64 | ||
| 45 | obj-$(CONFIG_PPC64) += traps.o | ||
| 46 | |||
| 47 | fpux-$(CONFIG_PPC32) += fpu.o | ||
| 48 | extra-$(CONFIG_PPC_FPU) += $(fpux-y) | ||
| 49 | |||
| 42 | endif | 50 | endif |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index ddf0c81e1958..b0d6a7cd85e9 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
| @@ -252,6 +252,7 @@ int main(void) | |||
| 252 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); | 252 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); |
| 253 | DEFINE(pbe_next, offsetof(struct pbe, next)); | 253 | DEFINE(pbe_next, offsetof(struct pbe, next)); |
| 254 | 254 | ||
| 255 | DEFINE(TASK_SIZE, TASK_SIZE); | ||
| 255 | DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); | 256 | DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); |
| 256 | #else /* CONFIG_PPC64 */ | 257 | #else /* CONFIG_PPC64 */ |
| 257 | /* systemcfg offsets for use by vdso */ | 258 | /* systemcfg offsets for use by vdso */ |
diff --git a/arch/powerpc/platforms/4xx/Makefile b/arch/powerpc/platforms/4xx/Makefile new file mode 100644 index 000000000000..79ff6b1e887c --- /dev/null +++ b/arch/powerpc/platforms/4xx/Makefile | |||
| @@ -0,0 +1 @@ | |||
| # empty makefile so make clean works \ No newline at end of file | |||
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile new file mode 100644 index 000000000000..6407197ffd89 --- /dev/null +++ b/arch/powerpc/platforms/85xx/Makefile | |||
| @@ -0,0 +1 @@ | |||
| # empty makefile so make clean works | |||
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index 90c750227ed9..aedc9ae13b2a 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile | |||
| @@ -57,9 +57,10 @@ head-$(CONFIG_FSL_BOOKE) := arch/ppc/kernel/head_fsl_booke.o | |||
| 57 | 57 | ||
| 58 | head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o | 58 | head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o |
| 59 | head-$(CONFIG_POWER4) += arch/ppc/kernel/idle_power4.o | 59 | head-$(CONFIG_POWER4) += arch/ppc/kernel/idle_power4.o |
| 60 | head-$(CONFIG_PPC_FPU) += arch/ppc/kernel/fpu.o | 60 | head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o |
| 61 | 61 | ||
| 62 | core-y += arch/ppc/kernel/ arch/ppc/platforms/ \ | 62 | core-y += arch/ppc/kernel/ arch/powerpc/kernel/ \ |
| 63 | arch/ppc/platforms/ \ | ||
| 63 | arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/ | 64 | arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/ |
| 64 | core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ | 65 | core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ |
| 65 | core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ | 66 | core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ |
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index 74b30978619f..59b6b62d1120 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile | |||
| @@ -10,12 +10,11 @@ extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | |||
| 10 | extra-$(CONFIG_8xx) := head_8xx.o | 10 | extra-$(CONFIG_8xx) := head_8xx.o |
| 11 | extra-$(CONFIG_6xx) += idle_6xx.o | 11 | extra-$(CONFIG_6xx) += idle_6xx.o |
| 12 | extra-$(CONFIG_POWER4) += idle_power4.o | 12 | extra-$(CONFIG_POWER4) += idle_power4.o |
| 13 | extra-$(CONFIG_PPC_FPU) += fpu.o | ||
| 14 | extra-y += vmlinux.lds | 13 | extra-y += vmlinux.lds |
| 15 | 14 | ||
| 16 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ | 15 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ |
| 17 | process.o signal.o ptrace.o align.o \ | 16 | process.o signal.o ptrace.o align.o \ |
| 18 | semaphore.o syscalls.o setup.o \ | 17 | syscalls.o setup.o \ |
| 19 | cputable.o ppc_htab.o perfmon.o | 18 | cputable.o ppc_htab.o perfmon.o |
| 20 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o | 19 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o |
| 21 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o | 20 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o |
| @@ -26,7 +25,6 @@ obj-$(CONFIG_PCI) += pci.o | |||
| 26 | obj-$(CONFIG_KGDB) += ppc-stub.o | 25 | obj-$(CONFIG_KGDB) += ppc-stub.o |
| 27 | obj-$(CONFIG_SMP) += smp.o smp-tbsync.o | 26 | obj-$(CONFIG_SMP) += smp.o smp-tbsync.o |
| 28 | obj-$(CONFIG_TAU) += temp.o | 27 | obj-$(CONFIG_TAU) += temp.o |
| 29 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o | ||
| 30 | ifndef CONFIG_E200 | 28 | ifndef CONFIG_E200 |
| 31 | obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o | 29 | obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o |
| 32 | endif | 30 | endif |
| @@ -37,9 +35,6 @@ obj-$(CONFIG_8xx) += softemu8xx.o | |||
| 37 | endif | 35 | endif |
| 38 | 36 | ||
| 39 | # These are here while we do the architecture merge | 37 | # These are here while we do the architecture merge |
| 40 | vecemu-y += ../../powerpc/kernel/vecemu.o | ||
| 41 | vector-y += ../../powerpc/kernel/vector.o | ||
| 42 | fpu-y += ../../powerpc/kernel/fpu.o | ||
| 43 | 38 | ||
| 44 | else | 39 | else |
| 45 | obj-y := irq.o idle.o time.o \ | 40 | obj-y := irq.o idle.o time.o \ |
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index d9ad1d776d0e..7972db1f6570 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c | |||
| @@ -141,6 +141,7 @@ main(void) | |||
| 141 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); | 141 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); |
| 142 | DEFINE(pbe_next, offsetof(struct pbe, next)); | 142 | DEFINE(pbe_next, offsetof(struct pbe, next)); |
| 143 | 143 | ||
| 144 | DEFINE(TASK_SIZE, TASK_SIZE); | ||
| 144 | DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); | 145 | DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); |
| 145 | return 0; | 146 | return 0; |
| 146 | } | 147 | } |
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 2c3a1d34e3c7..5b43987a943b 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
| @@ -467,7 +467,7 @@ FPUnavailable: | |||
| 467 | EXCEPTION_PROLOG | 467 | EXCEPTION_PROLOG |
| 468 | bne load_up_fpu /* if from user, just load it up */ | 468 | bne load_up_fpu /* if from user, just load it up */ |
| 469 | addi r3,r1,STACK_FRAME_OVERHEAD | 469 | addi r3,r1,STACK_FRAME_OVERHEAD |
