[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1443009569-1508-2-git-send-email-pmladek@suse.com>
Date: Wed, 23 Sep 2015 13:59:28 +0200
From: Petr Mladek <pmladek@...e.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Thiago Macieira <thiago.macieira@...el.com>,
Jiri Kosina <jkosina@...e.com>, linux-kernel@...r.kernel.org,
Petr Mladek <pmladek@...e.com>
Subject: [PATCH 1/2] clone: Declare do_fork() only when available
The commit 3033f14ab78c32687 ("clone: support passing tls argument via C
rather than pt_regs magic") introduced _do_fork() that allowed to pass
@tls parameter.
The old do_fork() is defined only for architectures that are not ready
to use this way and do not define HAVE_COPY_THREAD_TLS. But the function
is always declared in linux/sched.h.
This patch hides the declaration when the function is not defined.
Signed-off-by: Petr Mladek <pmladek@...e.com>
---
include/linux/sched.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b7b9501b41af..f71f1f505923 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2618,7 +2618,9 @@ extern int do_execveat(int, struct filename *,
const char __user * const __user *,
int);
extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *, unsigned long);
+#ifndef CONFIG_HAVE_COPY_THREAD_TLS
extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *);
+#endif
struct task_struct *fork_idle(int);
extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
--
1.8.5.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists