public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work
@ 2003-02-02 22:54 Peter Chubb
  2003-02-03 19:34 ` David Mosberger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Chubb @ 2003-02-02 22:54 UTC (permalink / raw)
  To: linux-ia64

If you try to compile with CONFIG_IA32 on and CONFIG_SYSCTL off, then
you get an undefined reference to do_sysctl() on final link.

I believe that if sysctl is turned off, it should be off for IA32
processes as well as for IA64 processes.  Here's a patch:

=== arch/ia64/ia32/ia32_entry.S 1.18 vs edited ==--- 1.18/arch/ia64/ia32/ia32_entry.S	Mon Jan 13 11:07:06 2003
+++ edited/arch/ia64/ia32/ia32_entry.S	Mon Feb  3 09:49:48 2003
@@ -347,7 +347,11 @@
 	data8 sys32_writev
 	data8 sys_getsid
 	data8 sys_fdatasync
+#ifdef CONFIG_SYSCTL
 	data8 sys32_sysctl
+#else
+	data8 sys32_ni_syscall
+#endif
 	data8 sys_mlock		  /* 150 */
 	data8 sys_munlock
 	data8 sys_mlockall
=== arch/ia64/ia32/sys_ia32.c 1.43 vs edited ==--- 1.43/arch/ia64/ia32/sys_ia32.c	Tue Jan 28 10:44:14 2003
+++ edited/arch/ia64/ia32/sys_ia32.c	Mon Feb  3 09:48:39 2003
@@ -3148,6 +3148,7 @@
 
 extern asmlinkage long sys_sysctl(struct __sysctl_args *args);
 
+#ifdef CONFIG_SYSCTL
 asmlinkage long
 sys32_sysctl (struct sysctl32 *args)
 {
@@ -3189,6 +3190,7 @@
 
 	return ret;
 }
+#endif
 
 asmlinkage long
 sys32_newuname (struct new_utsname *name)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work
  2003-02-02 22:54 [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work Peter Chubb
@ 2003-02-03 19:34 ` David Mosberger
  2003-03-06 21:55 ` Bjorn Helgaas
  2003-03-07  6:28 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-02-03 19:34 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 3 Feb 2003 09:54:11 +1100, Peter Chubb <peter@chubb.wattle.id.au> said:

  Peter> If you try to compile with CONFIG_IA32 on and CONFIG_SYSCTL off, then
  Peter> you get an undefined reference to do_sysctl() on final link.

  Peter> I believe that if sysctl is turned off, it should be off for IA32
  Peter> processes as well as for IA64 processes.

Agreed.

  Peter> Here's a patch:

The ia32 subsystem should mirror what's done in kernel/sysctl.c: when
CONFIG_SYSCTL isn't defined, there should be a dummy sys32_sysctl().
That way, the number of #ifdefs is localized to one file.

	--david


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work
  2003-02-02 22:54 [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work Peter Chubb
  2003-02-03 19:34 ` David Mosberger
@ 2003-03-06 21:55 ` Bjorn Helgaas
  2003-03-07  6:28 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2003-03-06 21:55 UTC (permalink / raw)
  To: linux-ia64

> The ia32 subsystem should mirror what's done in kernel/sysctl.c: when
> CONFIG_SYSCTL isn't defined, there should be a dummy sys32_sysctl().
> That way, the number of #ifdefs is localized to one file.

I applied the following patch to 2.4:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1009.1.5 -> 1.1009.1.6
#	arch/ia64/ia32/sys_ia32.c	1.16    -> 1.16.1.1
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/06	bjorn_helgaas@hp.com	1.1009.1.6
# ia64: Make CONFIG_SYSCTL control sys32_sysctl as well.  Based on a
# patch from Peter Chubb.
# --------------------------------------------
#
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	Thu Mar  6 14:40:13 2003
+++ b/arch/ia64/ia32/sys_ia32.c	Thu Mar  6 14:40:13 2003
@@ -3407,6 +3407,7 @@
 asmlinkage long
 sys32_sysctl (struct sysctl32 *args)
 {
+#ifdef CONFIG_SYSCTL
 	struct sysctl32 a32;
 	mm_segment_t old_fs = get_fs ();
 	void *oldvalp, *newvalp;
@@ -3444,6 +3445,9 @@
 		return -EFAULT;
 
 	return ret;
+#else
+	return -ENOSYS;
+#endif
 }
 
 asmlinkage long



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work
  2003-02-02 22:54 [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work Peter Chubb
  2003-02-03 19:34 ` David Mosberger
  2003-03-06 21:55 ` Bjorn Helgaas
@ 2003-03-07  6:28 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-03-07  6:28 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 6 Mar 2003 14:55:51 -0700, Bjorn Helgaas <bjorn_helgaas@hp.com> said:

  >> The ia32 subsystem should mirror what's done in kernel/sysctl.c:
  >> when CONFIG_SYSCTL isn't defined, there should be a dummy
  >> sys32_sysctl().  That way, the number of #ifdefs is localized to
  >> one file.

  Bjorn> I applied the following patch to 2.4:

I did the same for 2.5.

Thanks,

	--david


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-07  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-02 22:54 [Linux-ia64] [PATCH] IA32 support without sysctl doesn't work Peter Chubb
2003-02-03 19:34 ` David Mosberger
2003-03-06 21:55 ` Bjorn Helgaas
2003-03-07  6:28 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox