Skip to contentSkip to conversation

checkpoint/powerpc: fix build break with CONFIG_CHECKPOINT=n

PATCH In review Nathan Lynch 2 participants 2 messages Mar 17, 2010 – Mar 30, 2010 1 message not in the archive PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpoint/powerpc: fix build break with CONFIG_CHECKPOINT=n

do_sys_checkpoint and do_sys_restart don't exist when checkpoint is turned off, so move references to these to code which is built only when CONFIG_CHECKPOINT=y.

---
 arch/powerpc/kernel/checkpoint.c |   18 ++++++++++++++++++
 arch/powerpc/kernel/process.c    |   18 ------------------
 2 files changed, 18 insertions(+), 18 deletions(-)
arch/powerpc/kernel/checkpoint.c +18 -0
index 2634011..c73acda 100644
@@ -531,3 +531,21 @@ int restore_mm_context(struct ckpt_ctx *ctx, struct mm_struct *mm)
 {
 	return 0;
 }
+
+int sys_checkpoint(unsigned long pid, unsigned long fd, unsigned long flags,
+		   unsigned long logfd, unsigned long p5, unsigned long p6,
+		   struct pt_regs *regs)
+{
+	CHECK_FULL_REGS(regs);
+
+	return do_sys_checkpoint(pid, fd, flags, logfd);
+}
+
+int sys_restart(unsigned long pid, unsigned long fd, unsigned long flags,
+		unsigned long logfd, unsigned long p5, unsigned long p6,
+		struct pt_regs *regs)
+{
+	CHECK_FULL_REGS(regs);
+
+	return do_sys_restart(pid, fd, flags, logfd);
+}
arch/powerpc/kernel/process.c +0 -18
index 6457530..0aafbf1 100644
@@ -979,24 +979,6 @@ out:
 	return error;
 }
 
-int sys_checkpoint(unsigned long pid, unsigned long fd, unsigned long flags,
-		   unsigned long logfd, unsigned long p5, unsigned long p6,
-		   struct pt_regs *regs)
-{
-	CHECK_FULL_REGS(regs);
-
-	return do_sys_checkpoint(pid, fd, flags, logfd);
-}
-
-int sys_restart(unsigned long pid, unsigned long fd, unsigned long flags,
-		unsigned long logfd, unsigned long p5, unsigned long p6,
-		struct pt_regs *regs)
-{
-	CHECK_FULL_REGS(regs);
-
-	return do_sys_restart(pid, fd, flags, logfd);
-}
-
 #ifdef CONFIG_IRQSTACKS
 static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
 				  unsigned long nbytes)
Signature · 1 line
1.6.0.6
#2 lore raw
In reply to a message not in the archive

Applied for ckpt-v21

Quoted 65 lines · Nathan Lynch

do_sys_checkpoint and do_sys_restart don't exist when checkpoint is turned off, so move references to these to code which is built only when CONFIG_CHECKPOINT=y.

---
 arch/powerpc/kernel/checkpoint.c |   18 ++++++++++++++++++
 arch/powerpc/kernel/process.c    |   18 ------------------
 2 files changed, 18 insertions(+), 18 deletions(-)
arch/powerpc/kernel/checkpoint.c +18 -0
index 2634011..c73acda 100644
@@ -531,3 +531,21 @@ int restore_mm_context(struct ckpt_ctx *ctx, struct mm_struct *mm)
 {
 	return 0;
 }
+
+int sys_checkpoint(unsigned long pid, unsigned long fd, unsigned long flags,
+		   unsigned long logfd, unsigned long p5, unsigned long p6,
+		   struct pt_regs *regs)
+{
+	CHECK_FULL_REGS(regs);
+
+	return do_sys_checkpoint(pid, fd, flags, logfd);
+}
+
+int sys_restart(unsigned long pid, unsigned long fd, unsigned long flags,
+		unsigned long logfd, unsigned long p5, unsigned long p6,
+		struct pt_regs *regs)
+{
+	CHECK_FULL_REGS(regs);
+
+	return do_sys_restart(pid, fd, flags, logfd);
+}
arch/powerpc/kernel/process.c +0 -18
index 6457530..0aafbf1 100644
@@ -979,24 +979,6 @@ out:
 	return error;
 }
 
-int sys_checkpoint(unsigned long pid, unsigned long fd, unsigned long flags,
-		   unsigned long logfd, unsigned long p5, unsigned long p6,
-		   struct pt_regs *regs)
-{
-	CHECK_FULL_REGS(regs);
-
-	return do_sys_checkpoint(pid, fd, flags, logfd);
-}
-
-int sys_restart(unsigned long pid, unsigned long fd, unsigned long flags,
-		unsigned long logfd, unsigned long p5, unsigned long p6,
-		struct pt_regs *regs)
-{
-	CHECK_FULL_REGS(regs);
-
-	return do_sys_restart(pid, fd, flags, logfd);
-}
-
 #ifdef CONFIG_IRQSTACKS
 static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
 				  unsigned long nbytes)