diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-07-08 02:00:09 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-10 22:55:05 -0400 |
commit | e623fbf1c4c140764e084e9159a352750c035d44 (patch) | |
tree | 941d9f44888f3fd7549104ee05d31408d2e5f700 /arch/powerpc/platforms | |
parent | 6663a4fa6711050036562ddfd2086edf735fae21 (diff) |
powerpc/cell: Fix compilation with CONFIG_COREDUMP=n
Commit 046d662f4818 "coredump: make core dump functionality optional"
made the coredump optional, but didn't update the spufs code that
depends on it. That leads to build errors such as:
arch/powerpc/platforms/built-in.o: In function `.spufs_arch_write_note':
coredump.c:(.text+0x22cd4): undefined reference to `.dump_emit'
coredump.c:(.text+0x22cf4): undefined reference to `.dump_emit'
coredump.c:(.text+0x22d0c): undefined reference to `.dump_align'
coredump.c:(.text+0x22d48): undefined reference to `.dump_emit'
coredump.c:(.text+0x22e7c): undefined reference to `.dump_skip'
Fix it by adding some ifdefs in the cell code.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_syscalls.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/syscalls.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index 38e0a1a5cec3..5e6e0bad6db6 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c | |||
@@ -111,6 +111,7 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, __u32 __user *ustatus) | |||
111 | return ret; | 111 | return ret; |
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_COREDUMP | ||
114 | int elf_coredump_extra_notes_size(void) | 115 | int elf_coredump_extra_notes_size(void) |
115 | { | 116 | { |
116 | struct spufs_calls *calls; | 117 | struct spufs_calls *calls; |
@@ -142,6 +143,7 @@ int elf_coredump_extra_notes_write(struct coredump_params *cprm) | |||
142 | 143 | ||
143 | return ret; | 144 | return ret; |
144 | } | 145 | } |
146 | #endif | ||
145 | 147 | ||
146 | void notify_spus_active(void) | 148 | void notify_spus_active(void) |
147 | { | 149 | { |
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index b9d5d678aa44..52a7d2596d30 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile | |||
@@ -1,8 +1,9 @@ | |||
1 | 1 | ||
2 | obj-$(CONFIG_SPU_FS) += spufs.o | 2 | obj-$(CONFIG_SPU_FS) += spufs.o |
3 | spufs-y += inode.o file.o context.o syscalls.o coredump.o | 3 | spufs-y += inode.o file.o context.o syscalls.o |
4 | spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o | 4 | spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o |
5 | spufs-y += switch.o fault.o lscsa_alloc.o | 5 | spufs-y += switch.o fault.o lscsa_alloc.o |
6 | spufs-$(CONFIG_COREDUMP) += coredump.o | ||
6 | 7 | ||
7 | # magic for the trace events | 8 | # magic for the trace events |
8 | CFLAGS_sched.o := -I$(src) | 9 | CFLAGS_sched.o := -I$(src) |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index b045fdda4845..a87200a535fa 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -79,8 +79,10 @@ static long do_spu_create(const char __user *pathname, unsigned int flags, | |||
79 | struct spufs_calls spufs_calls = { | 79 | struct spufs_calls spufs_calls = { |
80 | .create_thread = do_spu_create, | 80 | .create_thread = do_spu_create, |
81 | .spu_run = do_spu_run, | 81 | .spu_run = do_spu_run, |
82 | .coredump_extra_notes_size = spufs_coredump_extra_notes_size, | ||
83 | .coredump_extra_notes_write = spufs_coredump_extra_notes_write, | ||
84 | .notify_spus_active = do_notify_spus_active, | 82 | .notify_spus_active = do_notify_spus_active, |
85 | .owner = THIS_MODULE, | 83 | .owner = THIS_MODULE, |
84 | #ifdef CONFIG_COREDUMP | ||
85 | .coredump_extra_notes_size = spufs_coredump_extra_notes_size, | ||
86 | .coredump_extra_notes_write = spufs_coredump_extra_notes_write, | ||
87 | #endif | ||
86 | }; | 88 | }; |