Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2006 17:21:22 GMT
From:      Alexander Leidinger <netchild@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108669 for review
Message-ID:  <200610291721.k9THLMuJ069742@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108669

Change 108669 by netchild@netchild_magellan on 2006/10/29 17:21:09

	IFC except for the linux aio removal, we put it into shape here in p4.
	Only the module build is enabled ATM, so that we can check stuff
	quickly. The linux emulation statically compiled into the kernel will
	not work ATM.
	The not so distant goal is to move the linux aio stuff into a
	separate module (idea and hints by rwatson) so that it doesn't has to
	call the kernel linker itself to look up some symbols.

Affected files ...

.. //depot/projects/linuxolator/src/sys/amd64/amd64/prof_machdep.c#3 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#7 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#9 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#9 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#8 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#9 integrate
.. //depot/projects/linuxolator/src/sys/boot/common/load_elf.c#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/boot2/boot2.c#3 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/libi386/elf32_freebsd.c#3 integrate
.. //depot/projects/linuxolator/src/sys/boot/pc98/boot2/boot.c#2 integrate
.. //depot/projects/linuxolator/src/sys/compat/linprocfs/linprocfs.c#5 integrate
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#19 integrate
.. //depot/projects/linuxolator/src/sys/conf/files.amd64#7 integrate
.. //depot/projects/linuxolator/src/sys/conf/files.i386#6 integrate
.. //depot/projects/linuxolator/src/sys/conf/files.pc98#4 integrate
.. //depot/projects/linuxolator/src/sys/i386/isa/prof_machdep.c#3 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux.h#6 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#8 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#8 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#8 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#7 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_bio.c#4 integrate
.. //depot/projects/linuxolator/src/sys/modules/linux/Makefile#4 integrate
.. //depot/projects/linuxolator/src/sys/netinet/ip_dummynet.c#3 integrate

Differences ...

==== //depot/projects/linuxolator/src/sys/amd64/amd64/prof_machdep.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/prof_machdep.c,v 1.27 2006/10/28 06:38:51 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/prof_machdep.c,v 1.28 2006/10/29 09:48:44 bde Exp $");
 
 #ifdef GUPROF
 #if 0
@@ -37,6 +37,7 @@
 #include <sys/systm.h>
 #include <sys/gmon.h>
 #include <sys/kernel.h>
+#include <sys/smp.h>
 #include <sys/sysctl.h>
 
 #include <machine/clock.h>
@@ -54,7 +55,7 @@
 int	cputime_bias = 1;	/* initialize for locality of reference */
 
 static int	cputime_clock = CPUTIME_CLOCK_UNINITIALIZED;
-#ifdef I586_PMC_GUPROF
+#if defined(PERFMON) && defined(I586_PMC_GUPROF)
 static u_int	cputime_clock_pmc_conf = I586_PMC_GUPROF;
 static int	cputime_clock_pmc_init;
 static struct gmonparam saved_gmp;
@@ -204,7 +205,6 @@
 	u_char high, low;
 	static u_int prev_count;
 
-#ifndef SMP
 	if (cputime_clock == CPUTIME_CLOCK_TSC) {
 		/*
 		 * Scale the TSC a little to make cputime()'s frequency
@@ -218,7 +218,7 @@
 		prev_count = count;
 		return (delta);
 	}
-#if defined(PERFMON) && defined(I586_PMC_GUPROF)
+#if defined(PERFMON) && defined(I586_PMC_GUPROF) && !defined(SMP)
 	if (cputime_clock == CPUTIME_CLOCK_I586_PMC) {
 		/*
 		 * XXX permon_read() should be inlined so that the
@@ -232,8 +232,7 @@
 		prev_count = count;
 		return (delta);
 	}
-#endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* !SMP */
+#endif /* PERFMON && I586_PMC_GUPROF && !SMP */
 
 	/*
 	 * Read the current value of the 8254 timer counter 0.
@@ -315,13 +314,10 @@
 {
 	if (cputime_clock == CPUTIME_CLOCK_UNINITIALIZED) {
 		cputime_clock = CPUTIME_CLOCK_I8254;
-#ifndef SMP
-		if (tsc_freq != 0)
+		if (tsc_freq != 0 && !tsc_is_broken && mp_ncpus < 2)
 			cputime_clock = CPUTIME_CLOCK_TSC;
-#endif
 	}
 	gp->profrate = timer_freq << CPUTIME_CLOCK_I8254_SHIFT;
-#ifndef SMP
 	if (cputime_clock == CPUTIME_CLOCK_TSC)
 		gp->profrate = tsc_freq >> 1;
 #if defined(PERFMON) && defined(I586_PMC_GUPROF)
@@ -350,7 +346,6 @@
 		}
 	}
 #endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* !SMP */
 	cputime_bias = 0;
 	cputime();
 }

==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#7 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#9 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#9 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#8 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#9 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/boot/common/load_elf.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.34 2006/05/12 04:09:52 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.35 2006/10/29 14:50:57 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/exec.h>
@@ -263,7 +263,7 @@
 #if __ELF_WORD_SIZE == 64
 	off = - (off & 0xffffffffff000000ull);/* x86_64 relocates after locore */
 #else
-	off = - (off & 0xff000000u);	/* i386 relocates after locore */
+	off = - (off & 0xc0000000u);	/* i386 relocates after locore */
 #endif
 #else
 	off = 0;		/* other archs use direct mapped kernels */

==== //depot/projects/linuxolator/src/sys/boot/i386/boot2/boot2.c#3 (text+ko) ====

@@ -14,7 +14,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.81 2006/10/26 19:41:02 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.82 2006/10/29 14:50:57 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/disklabel.h>
@@ -334,7 +334,7 @@
 	return;
     }
     if (fmt == 0) {
-	addr = hdr.ex.a_entry & 0xffffff;
+	addr = hdr.ex.a_entry & 0x3fffffff;
 	p = PTOV(addr);
 	fs_off = PAGE_SIZE;
 	if (xfsread(ino, p, hdr.ex.a_text))
@@ -368,7 +368,7 @@
 		j++;
 	}
 	for (i = 0; i < 2; i++) {
-	    p = PTOV(ep[i].p_paddr & 0xffffff);
+	    p = PTOV(ep[i].p_paddr & 0x3fffffff);
 	    fs_off = ep[i].p_offset;
 	    if (xfsread(ino, p, ep[i].p_filesz))
 		return;
@@ -389,7 +389,7 @@
 		p += es[i].sh_size;
 	    }
 	}
-	addr = hdr.eh.e_entry & 0xffffff;
+	addr = hdr.eh.e_entry & 0x3fffffff;
     }
     bootinfo.bi_esymtab = VTOP(p);
     bootinfo.bi_kernelname = VTOP(kname);

==== //depot/projects/linuxolator/src/sys/boot/i386/libi386/elf32_freebsd.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.15 2006/10/26 20:04:22 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.16 2006/10/29 14:50:58 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/exec.h>
@@ -65,7 +65,7 @@
     err = bi_load32(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
     if (err != 0)
 	return(err);
-    entry = ehdr->e_entry & 0xffffff;
+    entry = ehdr->e_entry & 0x3fffffff;
 
 #ifdef DEBUG
     printf("Start @ 0x%lx ...\n", entry);

==== //depot/projects/linuxolator/src/sys/boot/pc98/boot2/boot.c#2 (text+ko) ====

@@ -49,7 +49,7 @@
 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/pc98/boot2/boot.c,v 1.14 2005/05/27 19:26:11 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/pc98/boot2/boot.c,v 1.15 2006/10/29 14:50:58 ru Exp $");
 
 #include "boot.h"
 #include <a.out.h>
@@ -199,9 +199,9 @@
 	/*
 	 * We assume that the entry address is the same as the lowest text
 	 * address and that the kernel startup code handles relocation by
-	 * this address rounded down to a multiple of 16M.
+	 * this address rounded down to a multiple of 1G.
 	 */
-	startaddr = head.a_entry & 0x00FFFFFF;
+	startaddr = head.a_entry & 0x3FFFFFFF;
 	addr =  startaddr;
 	printf("Booting %d:%s(%d,%c)%s @ 0x%x\n"
 			, dosdev & 0x0f

==== //depot/projects/linuxolator/src/sys/compat/linprocfs/linprocfs.c#5 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.99 2006/10/11 20:32:46 keramida Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.100 2006/10/29 09:50:55 netchild Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -930,6 +930,7 @@
 static int
 linprocfs_dopid_max(PFS_FILL_ARGS)
 {
+
 	sbuf_printf(sb, "%i\n", PID_MAX);
 
 	return (0);

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#19 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.190 2006/10/28 10:59:59 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.191 2006/10/28 16:47:38 netchild Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -1572,35 +1572,35 @@
 #endif
    	
    	switch (args->option) {
-	   	case LINUX_PR_SET_PDEATHSIG:
-		   	if (!LINUX_SIG_VALID(args->arg2))
-			   	return (EINVAL);
-			em = em_find(p, EMUL_UNLOCKED);
-			KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
-			em->pdeath_signal = args->arg2;
-			EMUL_UNLOCK(&emul_lock);
-		   	break;
-		case LINUX_PR_GET_PDEATHSIG:
-			em = em_find(p, EMUL_UNLOCKED);
-			KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
-			error = copyout(&em->pdeath_signal, (void *)(register_t) args->arg2, sizeof(em->pdeath_signal));
-			EMUL_UNLOCK(&emul_lock);
-			break;
-		case LINUX_PR_SET_NAME:
-			comm[LINUX_MAX_COMM_LEN-1] = 0;
-			error = copyin(comm, (void *)(register_t) args->arg2, LINUX_MAX_COMM_LEN-1);
-			if (error)
-			   	return (error);
-			PROC_LOCK(p);
-			strcpy(p->p_comm, comm);
-			PROC_UNLOCK(p);
-			break;
-		case LINUX_PR_GET_NAME:
-			error = copyout(&p->p_comm, (void *)(register_t) args->arg2, MAXCOMLEN+1);
-			break;
-		default:
-			error = EINVAL;
-			break;
+   	case LINUX_PR_SET_PDEATHSIG:
+	   	if (!LINUX_SIG_VALID(args->arg2))
+		   	return (EINVAL);
+		em = em_find(p, EMUL_UNLOCKED);
+		KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
+		em->pdeath_signal = args->arg2;
+		EMUL_UNLOCK(&emul_lock);
+	   	break;
+	case LINUX_PR_GET_PDEATHSIG:
+		em = em_find(p, EMUL_UNLOCKED);
+		KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
+		error = copyout(&em->pdeath_signal, (void *)(register_t) args->arg2, sizeof(em->pdeath_signal));
+		EMUL_UNLOCK(&emul_lock);
+		break;
+	case LINUX_PR_SET_NAME:
+		comm[LINUX_MAX_COMM_LEN-1] = 0;
+		error = copyin(comm, (void *)(register_t) args->arg2, LINUX_MAX_COMM_LEN-1);
+		if (error)
+		   	return (error);
+		PROC_LOCK(p);
+		strcpy(p->p_comm, comm);
+		PROC_UNLOCK(p);
+		break;
+	case LINUX_PR_GET_NAME:
+		error = copyout(&p->p_comm, (void *)(register_t) args->arg2, MAXCOMLEN+1);
+		break;
+	default:
+		error = EINVAL;
+		break;
 	}
 
 	return (error);

==== //depot/projects/linuxolator/src/sys/conf/files.amd64#7 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.97 2006/10/23 13:23:12 ru Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.98 2006/10/29 14:02:39 netchild Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -232,7 +232,6 @@
 amd64/linux32/linux32_machdep.c	optional	compat_linux32
 amd64/linux32/linux32_sysent.c	optional	compat_linux32
 amd64/linux32/linux32_sysvec.c	optional	compat_linux32
-compat/linux/linux_aio.c	optional	compat_linux32
 compat/linux/linux_emul.c	optional	compat_linux32
 compat/linux/linux_file.c	optional	compat_linux32
 compat/linux/linux_futex.c	optional	compat_linux32

==== //depot/projects/linuxolator/src/sys/conf/files.i386#6 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.569 2006/10/23 13:23:12 ru Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.570 2006/10/29 14:02:39 netchild Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -85,7 +85,6 @@
 #
 compat/linprocfs/linprocfs.c	optional linprocfs
 compat/linsysfs/linsysfs.c	optional linsysfs
-compat/linux/linux_aio.c	optional compat_linux
 compat/linux/linux_emul.c	optional compat_linux
 compat/linux/linux_file.c	optional compat_linux
 compat/linux/linux_futex.c	optional compat_linux

==== //depot/projects/linuxolator/src/sys/conf/files.pc98#4 (text+ko) ====

@@ -3,7 +3,7 @@
 #
 # modified for PC-9801/PC-9821
 #
-# $FreeBSD: src/sys/conf/files.pc98,v 1.348 2006/10/23 13:23:12 ru Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.349 2006/10/29 14:02:39 netchild Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -55,7 +55,6 @@
 #
 compat/linprocfs/linprocfs.c	optional linprocfs
 compat/linsysfs/linsysfs.c	optional linsysfs
-compat/linux/linux_aio.c	optional compat_linux
 compat/linux/linux_emul.c	optional compat_linux
 compat/linux/linux_file.c	optional compat_linux
 compat/linux/linux_futex.c	optional compat_linux

==== //depot/projects/linuxolator/src/sys/i386/isa/prof_machdep.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/isa/prof_machdep.c,v 1.28 2006/10/28 06:38:51 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/isa/prof_machdep.c,v 1.29 2006/10/29 09:48:44 bde Exp $");
 
 #ifdef GUPROF
 #include "opt_i586_guprof.h"
@@ -35,6 +35,7 @@
 #include <sys/systm.h>
 #include <sys/gmon.h>
 #include <sys/kernel.h>
+#include <sys/smp.h>
 #include <sys/sysctl.h>
 
 #include <machine/clock.h>
@@ -50,7 +51,7 @@
 int	cputime_bias = 1;	/* initialize for locality of reference */
 
 static int	cputime_clock = CPUTIME_CLOCK_UNINITIALIZED;
-#ifdef I586_PMC_GUPROF
+#if defined(PERFMON) && defined(I586_PMC_GUPROF)
 static u_int	cputime_clock_pmc_conf = I586_PMC_GUPROF;
 static int	cputime_clock_pmc_init;
 static struct gmonparam saved_gmp;
@@ -174,7 +175,7 @@
 	u_char high, low;
 	static u_int prev_count;
 
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
+#if defined(I586_CPU) || defined(I686_CPU)
 	if (cputime_clock == CPUTIME_CLOCK_TSC) {
 		/*
 		 * Scale the TSC a little to make cputime()'s frequency
@@ -188,7 +189,7 @@
 		prev_count = count;
 		return (delta);
 	}
-#if defined(PERFMON) && defined(I586_PMC_GUPROF)
+#if defined(PERFMON) && defined(I586_PMC_GUPROF) && !defined(SMP)
 	if (cputime_clock == CPUTIME_CLOCK_I586_PMC) {
 		/*
 		 * XXX permon_read() should be inlined so that the
@@ -202,8 +203,8 @@
 		prev_count = count;
 		return (delta);
 	}
-#endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* (I586_CPU || I686_CPU) && !SMP */
+#endif /* PERFMON && I586_PMC_GUPROF && !SMP */
+#endif /* I586_CPU || I686_CPU */
 
 	/*
 	 * Read the current value of the 8254 timer counter 0.
@@ -285,13 +286,13 @@
 {
 	if (cputime_clock == CPUTIME_CLOCK_UNINITIALIZED) {
 		cputime_clock = CPUTIME_CLOCK_I8254;
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
-		if (tsc_freq != 0)
+#if defined(I586_CPU) || defined(I686_CPU)
+		if (tsc_freq != 0 && !tsc_is_broken && mp_ncpus < 2)
 			cputime_clock = CPUTIME_CLOCK_TSC;
 #endif
 	}
 	gp->profrate = timer_freq << CPUTIME_CLOCK_I8254_SHIFT;
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
+#if defined(I586_CPU) || defined(I686_CPU)
 	if (cputime_clock == CPUTIME_CLOCK_TSC)
 		gp->profrate = tsc_freq >> 1;
 #if defined(PERFMON) && defined(I586_PMC_GUPROF)
@@ -320,7 +321,7 @@
 		}
 	}
 #endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* (I586_CPU || I686_CPU) && !SMP */
+#endif /* I586_CPU || I686_CPU */
 	cputime_bias = 0;
 	cputime();
 }

==== //depot/projects/linuxolator/src/sys/i386/linux/linux.h#6 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#8 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#8 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#8 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.86 2006/10/28 11:24:38 netchild Exp $
- * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.82 2006/10/28 10:59:59 netchild Exp 
+ * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.87 2006/10/29 14:12:44 netchild Exp $
+ * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.83 2006/10/29 14:02:39 netchild Exp 
  */
 
 #include <bsm/audit_kevents.h>
@@ -264,11 +264,11 @@
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 242 = linux_sched_getaffinity */
 	{ AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0 },	/* 243 = linux_set_thread_area */
 	{ AS(linux_get_thread_area_args), (sy_call_t *)linux_get_thread_area, AUE_NULL, NULL, 0, 0 },	/* 244 = linux_get_thread_area */
-	{ AS(linux_io_setup_args), (sy_call_t *)linux_io_setup, AUE_NULL, NULL, 0, 0 },	/* 245 = linux_io_setup */
-	{ AS(linux_io_destroy_args), (sy_call_t *)linux_io_destroy, AUE_NULL, NULL, 0, 0 },	/* 246 = linux_io_destroy */
-	{ AS(linux_io_getevents_args), (sy_call_t *)linux_io_getevents, AUE_NULL, NULL, 0, 0 },	/* 247 = linux_io_getevents */
-	{ AS(linux_io_submit_args), (sy_call_t *)linux_io_submit, AUE_NULL, NULL, 0, 0 },	/* 248 = linux_io_submit */
-	{ AS(linux_io_cancel_args), (sy_call_t *)linux_io_cancel, AUE_NULL, NULL, 0, 0 },	/* 249 = linux_io_cancel */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 245 = linux_io_setup */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 246 = linux_io_destroy */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 247 = linux_io_getevents */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 248 = linux_io_submit */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 249 = linux_io_cancel */
 	{ 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0 },	/* 250 = linux_fadvise64 */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 251 =  */
 	{ AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0 },	/* 252 = linux_exit_group */

==== //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#7 (text+ko) ====


==== //depot/projects/linuxolator/src/sys/kern/vfs_bio.c#4 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.511 2006/10/22 04:28:13 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.513 2006/10/29 00:04:39 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -99,6 +99,7 @@
 			       int pageno, vm_page_t m);
 static void vfs_clean_pages(struct buf *bp);
 static void vfs_setdirty(struct buf *bp);
+static void vfs_setdirty_locked_object(struct buf *bp);
 static void vfs_vmio_release(struct buf *bp);
 static int vfs_bio_clcheck(struct vnode *vp, int size,
 		daddr_t lblkno, daddr_t blkno);
@@ -2284,8 +2285,6 @@
 static void
 vfs_setdirty(struct buf *bp) 
 {
-	int i;
-	vm_object_t object;
 
 	/*
 	 * Degenerate case - empty buffer
@@ -2302,8 +2301,19 @@
 	if ((bp->b_flags & B_VMIO) == 0)
 		return;
 
-	object = bp->b_pages[0]->object;
-	VM_OBJECT_LOCK(object);
+	VM_OBJECT_LOCK(bp->b_bufobj->bo_object);
+	vfs_setdirty_locked_object(bp);
+	VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object);
+}
+
+static void
+vfs_setdirty_locked_object(struct buf *bp)
+{
+	vm_object_t object;
+	int i;
+
+	object = bp->b_bufobj->bo_object;
+	VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
 	if (object->flags & (OBJ_MIGHTBEDIRTY|OBJ_CLEANING)) {
 		vm_offset_t boffset;
 		vm_offset_t eoffset;
@@ -2354,7 +2364,6 @@
 				bp->b_dirtyend = eoffset;
 		}
 	}
-	VM_OBJECT_UNLOCK(object);
 }
 
 /*
@@ -3167,6 +3176,7 @@
 		vm_object_t obj;
 		int iosize;
 		struct vnode *vp = bp->b_vp;
+		boolean_t are_queues_locked;
 
 		obj = bp->b_bufobj->bo_object;
 
@@ -3203,7 +3213,11 @@
 		    !(bp->b_ioflags & BIO_ERROR)) {
 			bp->b_flags |= B_CACHE;
 		}
-		vm_page_lock_queues();
+		if (bp->b_iocmd == BIO_READ) {
+			vm_page_lock_queues();
+			are_queues_locked = TRUE;
+		} else
+			are_queues_locked = FALSE;
 		for (i = 0; i < bp->b_npages; i++) {
 			int bogusflag = 0;
 			int resid;
@@ -3272,7 +3286,8 @@
 			foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK;
 			iosize -= resid;
 		}
-		vm_page_unlock_queues();
+		if (are_queues_locked)
+			vm_page_unlock_queues();
 		vm_object_pip_wakeupn(obj, 0);
 		VM_OBJECT_UNLOCK(obj);
 	}
@@ -3392,8 +3407,9 @@
 	foff = bp->b_offset;
 	KASSERT(bp->b_offset != NOOFFSET,
 	    ("vfs_busy_pages: no buffer offset"));
-	vfs_setdirty(bp);
 	VM_OBJECT_LOCK(obj);
+	if (bp->b_bufsize != 0)
+		vfs_setdirty_locked_object(bp);
 retry:
 	for (i = 0; i < bp->b_npages; i++) {
 		m = bp->b_pages[i];

==== //depot/projects/linuxolator/src/sys/modules/linux/Makefile#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/linux/Makefile,v 1.69 2006/10/15 14:22:14 netchild Exp $
+# $FreeBSD: src/sys/modules/linux/Makefile,v 1.70 2006/10/29 14:02:39 netchild Exp $
 
 .if ${MACHINE_ARCH} == "amd64"
 SFX= 32

==== //depot/projects/linuxolator/src/sys/netinet/ip_dummynet.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.104 2006/10/27 13:05:37 oleg Exp $
+ * $FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.105 2006/10/29 12:09:24 oleg Exp $
  */
 
 #define	DUMMYNET_DEBUG
@@ -68,6 +68,7 @@
 #include <sys/sysctl.h>
 #include <sys/taskqueue.h>
 #include <net/if.h>
+#include <net/netisr.h>
 #include <net/route.h>
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -197,13 +198,8 @@
 static void dummynet_task(void *, int);
 
 static struct mtx dummynet_mtx;
-/*
- * NB: Recursion is needed to deal with re-entry via ICMP.  That is,
- *     a packet may be dispatched via ip_input from dummynet_io and
- *     re-enter through ip_output.  Yech.
- */
 #define	DUMMYNET_LOCK_INIT() \
-	mtx_init(&dummynet_mtx, "dummynet", NULL, MTX_DEF | MTX_RECURSE)
+	mtx_init(&dummynet_mtx, "dummynet", NULL, MTX_DEF)
 #define	DUMMYNET_LOCK_DESTROY()	mtx_destroy(&dummynet_mtx)
 #define	DUMMYNET_LOCK()		mtx_lock(&dummynet_mtx)
 #define	DUMMYNET_UNLOCK()	mtx_unlock(&dummynet_mtx)
@@ -852,11 +848,11 @@
 			ip = mtod(m, struct ip *);
 			ip->ip_len = htons(ip->ip_len);
 			ip->ip_off = htons(ip->ip_off);
-			ip_input(m);
+			netisr_dispatch(NETISR_IP, m);
 			break;
 #ifdef INET6
 		case DN_TO_IP6_IN:
-			ip6_input(m);
+			netisr_dispatch(NETISR_IPV6, m);
 			break;
 
 		case DN_TO_IP6_OUT:
@@ -1407,36 +1403,37 @@
 static void
 purge_flow_set(struct dn_flow_set *fs, int all)
 {
-    struct dn_flow_queue *q, *qn ;
-    int i ;
+	struct dn_flow_queue *q, *qn;
+	int i;
+
+	DUMMYNET_LOCK_ASSERT();
 
-    DUMMYNET_LOCK_ASSERT();
+	for (i = 0; i <= fs->rq_size; i++) {
+		for (q = fs->rq[i]; q != NULL; q = qn) {
+			struct mbuf *m, *mnext;
 
-    for (i = 0 ; i <= fs->rq_size ; i++ ) {
-	for (q = fs->rq[i] ; q ; q = qn ) {
-	    struct mbuf *m, *mnext;
+			mnext = q->head;
+			while ((m = mnext) != NULL) {
+				mnext = m->m_nextpkt;
+				DN_FREE_PKT(m);
+			}
+			qn = q->next;
+			free(q, M_DUMMYNET);
+		}
+		fs->rq[i] = NULL;
+	}
 
-	    mnext = q->head;
-	    while ((m = mnext) != NULL) {
-		mnext = m->m_nextpkt;
-		DN_FREE_PKT(m);
-	    }
-	    qn = q->next ;
-	    free(q, M_DUMMYNET);
+	fs->rq_elements = 0;
+	if (all) {
+		/* RED - free lookup table. */
+		if (fs->w_q_lookup != NULL)
+			free(fs->w_q_lookup, M_DUMMYNET);
+		if (fs->rq != NULL)
+			free(fs->rq, M_DUMMYNET);
+		/* If this fs is not part of a pipe, free it. */
+		if (fs->pipe == NULL || fs != &(fs->pipe->fs))
+			free(fs, M_DUMMYNET);
 	}
-	fs->rq[i] = NULL ;
-    }
-    fs->rq_elements = 0 ;
-    if (all) {
-	/* RED - free lookup table */
-	if (fs->w_q_lookup)
-	    free(fs->w_q_lookup, M_DUMMYNET);
-	if (fs->rq)
-	    free(fs->rq, M_DUMMYNET);
-	/* if this fs is not part of a pipe, free it */
-	if (fs->pipe && fs != &(fs->pipe->fs) )
-	    free(fs, M_DUMMYNET);
-    }
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610291721.k9THLMuJ069742>