From: Andrew Morton <akpm@digeo.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: ch@murgatroid.com, linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] 2.5.68 FUTEX support should be optional
Date: Tue, 13 May 2003 23:32:19 -0700 [thread overview]
Message-ID: <20030513233219.5f39bf33.akpm@digeo.com> (raw)
In-Reply-To: <20030514071446.A2647@infradead.org>
Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, May 13, 2003 at 09:32:07PM -0700, Christopher Hoover wrote:
> > Not everyone needs futex support, so it should be optional. This is
> > needed for small platforms.
>
> Looks good. I think you want to disable it unconditionally for !CONFIG_MMU.
>
It needs some changes for non-ia32.
diff -puN init/Kconfig~CONFIG_FUTEX init/Kconfig
--- 25-power4/init/Kconfig~CONFIG_FUTEX 2003-05-13 22:12:34.000000000 -0700
+++ 25-power4-akpm/init/Kconfig 2003-05-13 22:12:34.000000000 -0700
@@ -108,8 +108,14 @@ config LOG_BUF_SHIFT
13 => 8 KB
12 => 4 KB
-endmenu
+config FUTEX
+ bool "Futex support"
+ default y
+ ---help---
+ Say Y if you want support for Fast Userspace Mutexes (Futexes).
+
+endmenu
menu "Loadable module support"
diff -puN kernel/Makefile~CONFIG_FUTEX kernel/Makefile
--- 25-power4/kernel/Makefile~CONFIG_FUTEX 2003-05-13 22:12:34.000000000 -0700
+++ 25-power4-akpm/kernel/Makefile 2003-05-13 22:15:09.000000000 -0700
@@ -5,9 +5,10 @@
obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
exit.o itimer.o time.o softirq.o resource.o \
sysctl.o capability.o ptrace.o timer.o user.o \
- signal.o sys.o kmod.o workqueue.o futex.o pid.o \
+ signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o intermodule.o extable.o params.o posix-timers.o
+obj-$(CONFIG_FUTEX) += futex.o
obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
obj-$(CONFIG_SMP) += cpu.o
obj-$(CONFIG_LOCKMETER) += lockmeter.o
diff -puN kernel/sys.c~CONFIG_FUTEX kernel/sys.c
--- 25-power4/kernel/sys.c~CONFIG_FUTEX 2003-05-13 22:12:34.000000000 -0700
+++ 25-power4-akpm/kernel/sys.c 2003-05-13 22:12:34.000000000 -0700
@@ -228,6 +228,7 @@ cond_syscall(sys_shutdown)
cond_syscall(sys_sendmsg)
cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
+cond_syscall(sys_futex)
static int set_one_prio(struct task_struct *p, int niceval, int error)
{
diff -puN kernel/compat.c~CONFIG_FUTEX kernel/compat.c
--- 25-power4/kernel/compat.c~CONFIG_FUTEX 2003-05-13 22:17:56.000000000 -0700
+++ 25-power4-akpm/kernel/compat.c 2003-05-13 22:27:29.000000000 -0700
@@ -211,11 +211,10 @@ asmlinkage long compat_sys_sigprocmask(i
return ret;
}
-extern long do_futex(unsigned long, int, int, unsigned long);
-
asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
struct compat_timespec *utime)
{
+#ifdef CONFIG_FUTEX
struct timespec t;
unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
@@ -225,6 +224,9 @@ asmlinkage long compat_sys_futex(u32 *ua
timeout = timespec_to_jiffies(&t) + 1;
}
return do_futex((unsigned long)uaddr, op, val, timeout);
+#else
+ return -ENOSYS;
+#endif
}
asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim);
diff -puN include/linux/futex.h~CONFIG_FUTEX include/linux/futex.h
--- 25-power4/include/linux/futex.h~CONFIG_FUTEX 2003-05-13 22:18:20.000000000 -0700
+++ 25-power4-akpm/include/linux/futex.h 2003-05-13 22:22:21.000000000 -0700
@@ -8,4 +8,6 @@
extern asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, struct timespec __user *utime);
+long do_futex(unsigned long uaddr, int op, int val, unsigned long timeout);
+
#endif
_
next prev parent reply other threads:[~2003-05-14 6:18 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 4:32 Christopher Hoover
2003-05-14 6:14 ` Christoph Hellwig
2003-05-14 6:20 ` Miles Bader
2003-05-14 6:28 ` Christoph Hellwig
2003-05-14 6:32 ` Andrew Morton [this message]
2003-05-14 6:35 ` Christoph Hellwig
2003-05-14 7:52 ` Christopher Hoover
2003-05-14 19:19 ` Ulrich Drepper
2003-05-14 19:32 ` Dave Jones
2003-05-14 19:44 ` Ulrich Drepper
2003-05-14 19:50 ` Linus Torvalds
2003-05-14 20:01 ` Andrew Morton
2003-05-14 20:43 ` Davide Libenzi
2003-05-14 20:54 ` H. Peter Anvin
2003-05-14 21:05 ` Davide Libenzi
2003-05-15 0:58 ` Christopher Hoover
2003-05-15 1:20 ` Linus Torvalds
2003-05-15 2:18 ` Miles Bader
2003-05-15 16:47 ` Ingo Oeser
2003-05-15 17:45 ` Ulrich Drepper
2003-05-15 18:00 ` Bill Davidsen
2003-05-15 18:16 ` Ulrich Drepper
2003-05-15 18:04 ` Christopher Hoover
2003-05-14 22:26 Chuck Ebbert
2003-05-14 22:59 ` Carl-Daniel Hailfinger
2003-05-14 23:33 Perez-Gonzalez, Inaky
2003-05-15 0:41 ` Andrew Morton
2003-05-15 0:52 ` Christopher Hoover
2003-05-15 1:00 ` Linus Torvalds
2003-05-15 1:25 ` Andrew Morton
2003-05-15 1:28 ` Linus Torvalds
2003-05-15 1:39 ` Andrew Morton
2003-05-15 1:42 ` Davide Libenzi
2003-05-15 2:02 ` Christopher Hoover
2003-05-15 2:18 ` Davide Libenzi
2003-05-15 3:01 ` Arnaldo Carvalho de Melo
2003-05-15 3:45 ` Linus Torvalds
2003-05-15 18:14 ` Bill Davidsen
2003-05-16 21:55 ` Alan Cox
2003-05-17 0:01 ` Valdis.Kletnieks
2003-05-17 2:36 ` Andrew Morton
2003-05-17 9:40 ` Werner Almesberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030513233219.5f39bf33.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=ch@murgatroid.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome