Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Sep 2011 17:30:50 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r225342 - in projects/ino64/sys: amd64/conf conf i386/conf ia64/conf kern pc98/conf powerpc/conf sparc64/conf
Message-ID:  <201109021730.p82HUo2w009099@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mdf
Date: Fri Sep  2 17:30:50 2011
New Revision: 225342
URL: http://svn.freebsd.org/changeset/base/225342

Log:
  Add a new COMPAT9 flag for FreeBSD 9.x compatibility system calls.
  Add COMPAT_FREEBSD9 option to kernel configs
  
  GSoC r223086, r223087.

Modified:
  projects/ino64/sys/amd64/conf/GENERIC
  projects/ino64/sys/conf/NOTES
  projects/ino64/sys/conf/options
  projects/ino64/sys/i386/conf/GENERIC
  projects/ino64/sys/i386/conf/XEN
  projects/ino64/sys/ia64/conf/GENERIC
  projects/ino64/sys/kern/makesyscalls.sh
  projects/ino64/sys/kern/syscalls.master
  projects/ino64/sys/pc98/conf/GENERIC
  projects/ino64/sys/powerpc/conf/GENERIC
  projects/ino64/sys/powerpc/conf/GENERIC64
  projects/ino64/sys/sparc64/conf/GENERIC

Modified: projects/ino64/sys/amd64/conf/GENERIC
==============================================================================
--- projects/ino64/sys/amd64/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/amd64/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -49,6 +49,7 @@ options 	COMPAT_FREEBSD4		# Compatible w
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	KTRACE			# ktrace(1) support
 options 	STACK			# stack(9) support

Modified: projects/ino64/sys/conf/NOTES
==============================================================================
--- projects/ino64/sys/conf/NOTES	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/conf/NOTES	Fri Sep  2 17:30:50 2011	(r225342)
@@ -330,6 +330,9 @@ options 	COMPAT_FREEBSD6
 # Enable FreeBSD7 compatibility syscalls
 options 	COMPAT_FREEBSD7
 
+# Enable FreeBSD9 compatibility syscalls
+options 	COMPAT_FREEBSD9
+
 #
 # These three options provide support for System V Interface
 # Definition-style interprocess communication, in the form of shared

Modified: projects/ino64/sys/conf/options
==============================================================================
--- projects/ino64/sys/conf/options	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/conf/options	Fri Sep  2 17:30:50 2011	(r225342)
@@ -74,6 +74,7 @@ COMPAT_FREEBSD4	opt_compat.h
 COMPAT_FREEBSD5	opt_compat.h
 COMPAT_FREEBSD6	opt_compat.h
 COMPAT_FREEBSD7	opt_compat.h
+COMPAT_FREEBSD9	opt_compat.h
 COMPILING_LINT	opt_global.h
 COMPRESS_USER_CORES opt_core.h
 CY_PCI_FASTINTR

Modified: projects/ino64/sys/i386/conf/GENERIC
==============================================================================
--- projects/ino64/sys/i386/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/i386/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -50,6 +50,7 @@ options 	COMPAT_FREEBSD4		# Compatible w
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	KTRACE			# ktrace(1) support
 options 	STACK			# stack(9) support

Modified: projects/ino64/sys/i386/conf/XEN
==============================================================================
--- projects/ino64/sys/i386/conf/XEN	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/i386/conf/XEN	Fri Sep  2 17:30:50 2011	(r225342)
@@ -35,6 +35,7 @@ options 	COMPAT_FREEBSD4		# Compatible w
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
 options 	KTRACE			# ktrace(1) support
 options 	STACK			# stack(9) support
 options 	SYSVSHM			# SYSV-style shared memory

Modified: projects/ino64/sys/ia64/conf/GENERIC
==============================================================================
--- projects/ino64/sys/ia64/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/ia64/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -28,6 +28,7 @@ makeoptions	DEBUG=-g	# Build kernel with
 options 	AUDIT		# Security event auditing
 options 	CD9660		# ISO 9660 Filesystem
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9	# Compatible with FreeBSD9
 options 	DDB		# Support DDB
 options 	DEADLKRES	# Enable the deadlock resolver
 options 	FFS		# Berkeley Fast Filesystem

Modified: projects/ino64/sys/kern/makesyscalls.sh
==============================================================================
--- projects/ino64/sys/kern/makesyscalls.sh	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/kern/makesyscalls.sh	Fri Sep  2 17:30:50 2011	(r225342)
@@ -9,6 +9,7 @@ compat=COMPAT_43
 compat4=COMPAT_FREEBSD4
 compat6=COMPAT_FREEBSD6
 compat7=COMPAT_FREEBSD7
+compat9=COMPAT_FREEBSD9
 
 # output files:
 sysnames="syscalls.c"
@@ -33,6 +34,8 @@ syscompat6="sysent.compat6.$$"
 syscompat6dcl="sysent.compat6dcl.$$"
 syscompat7="sysent.compat7.$$"
 syscompat7dcl="sysent.compat7dcl.$$"
+syscompat9="sysent.compat9.$$"
+syscompat9dcl="sysent.compat9dcl.$$"
 sysent="sysent.switch.$$"
 sysinc="sysinc.switch.$$"
 sysarg="sysarg.switch.$$"
@@ -46,9 +49,9 @@ else
 	capenabled=""
 fi
 
-trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat7 $syscompat7dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0
+trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat7 $syscompat7dcl $syscompat9 $syscompat9dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0
 
-touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat7 $syscompat7dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp
+touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat9 $syscompat9dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp
 
 case $# in
     0)	echo "usage: $0 input-file <config-file>" 1>&2
@@ -87,6 +90,8 @@ s/\$//g
 		syscompat6dcl = \"$syscompat6dcl\"
 		syscompat7 = \"$syscompat7\"
 		syscompat7dcl = \"$syscompat7dcl\"
+		syscompat9 = \"$syscompat9\"
+		syscompat9dcl = \"$syscompat9dcl\"
 		sysent = \"$sysent\"
 		syssw = \"$syssw\"
 		sysinc = \"$sysinc\"
@@ -100,6 +105,7 @@ s/\$//g
 		compat4 = \"$compat4\"
 		compat6 = \"$compat6\"
 		compat7 = \"$compat7\"
+		compat9 = \"$compat9\"
 		syscallprefix = \"$syscallprefix\"
 		switchname = \"$switchname\"
 		namesname = \"$namesname\"
@@ -121,6 +127,7 @@ s/\$//g
 		printf "\n#ifdef %s\n\n", compat4 > syscompat4
 		printf "\n#ifdef %s\n\n", compat6 > syscompat6
 		printf "\n#ifdef %s\n\n", compat7 > syscompat7
+		printf "\n#ifdef %s\n\n", compat9 > syscompat9
 
 		printf "/*\n * System call names.\n *\n" > sysnames
 		printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
@@ -199,6 +206,7 @@ s/\$//g
 		print > syscompat4
 		print > syscompat6
 		print > syscompat7
+		print > syscompat9
 		print > sysnames
 		print > systrace
 		print > systracetmp
@@ -213,6 +221,7 @@ s/\$//g
 		print > syscompat4
 		print > syscompat6
 		print > syscompat7
+		print > syscompat9
 		print > sysnames
 		print > systrace
 		print > systracetmp
@@ -227,6 +236,7 @@ s/\$//g
 		print > syscompat4
 		print > syscompat6
 		print > syscompat7
+		print > syscompat9
 		print > sysnames
 		print > systrace
 		print > systracetmp
@@ -330,6 +340,8 @@ s/\$//g
 				argalias = "freebsd6_" argalias
 			if (flag("COMPAT7"))
 				argalias = "freebsd7_" argalias
+			if (flag("COMPAT9"))
+				argalias = "freebsd9_" argalias
 		}
 		f++
 
@@ -452,7 +464,7 @@ s/\$//g
 		next
 	}
 	type("COMPAT") || type("COMPAT4") || type("COMPAT6") || \
-	    type("COMPAT7") {
+	    type("COMPAT7") || type("COMPAT9") {
 		if (flag("COMPAT")) {
 			ncompat++
 			out = syscompat
@@ -481,6 +493,13 @@ s/\$//g
 			wrap = "compat7"
 			prefix = "freebsd7_"
 			descr = "freebsd7"
+		} else if (flag("COMPAT9")) {
+			ncompat9++
+			out = syscompat9
+			outdcl = syscompat9dcl
+			wrap = "compat9"
+			prefix = "freebsd9_"
+			descr = "freebsd9"
 		}
 		parseline()
 		if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \
@@ -555,7 +574,7 @@ s/\$//g
 	END {
 		printf "\n#define AS(name) (sizeof(struct name) / sizeof(register_t))\n" > sysinc
 
-		if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0 || ncompat7 != 0)
+		if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0 || ncompat7 != 0 || ncompat9 != 0)
 			printf "#include \"opt_compat.h\"\n\n" > syssw
 
 		if (ncompat != 0) {
@@ -590,10 +609,19 @@ s/\$//g
 			printf "#endif\n" > sysinc
 		}
 
+		if (ncompat9 != 0) {
+			printf "\n#ifdef %s\n", compat9 > sysinc
+			printf "#define compat9(n, name) n, (sy_call_t *)__CONCAT(freebsd7_,name)\n" > sysinc
+			printf "#else\n" > sysinc
+			printf "#define compat9(n, name) 0, (sy_call_t *)nosys\n" > sysinc
+			printf "#endif\n" > sysinc
+		}
+
 		printf("\n#endif /* %s */\n\n", compat) > syscompatdcl
 		printf("\n#endif /* %s */\n\n", compat4) > syscompat4dcl
 		printf("\n#endif /* %s */\n\n", compat6) > syscompat6dcl
 		printf("\n#endif /* %s */\n\n", compat7) > syscompat7dcl
+		printf("\n#endif /* %s */\n\n", compat9) > syscompat9dcl
 
 		printf("\n#undef PAD_\n") > sysprotoend
 		printf("#undef PADL_\n") > sysprotoend
@@ -615,6 +643,7 @@ cat $sysarg $sysdcl \
 	$syscompat4 $syscompat4dcl \
 	$syscompat6 $syscompat6dcl \
 	$syscompat7 $syscompat7dcl \
+	$syscompat9 $syscompat9dcl \
 	$sysaue $sysprotoend > $sysproto
 cat $systracetmp >> $systrace
 

Modified: projects/ino64/sys/kern/syscalls.master
==============================================================================
--- projects/ino64/sys/kern/syscalls.master	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/kern/syscalls.master	Fri Sep  2 17:30:50 2011	(r225342)
@@ -12,7 +12,7 @@
 ;		case where the event exists, but we don't want auditing, the
 ;		event should be #defined to AUE_NULL in audit_kevents.h.
 ;	type	one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
-;		COMPAT7, NODEF, NOARGS, NOPROTO, NOSTD
+;		COMPAT7, COMPAT9, NODEF, NOARGS, NOPROTO, NOSTD
 ;		The COMPAT* options may be combined with one or more NO*
 ;		options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
 ;	name	psuedo-prototype of syscall routine
@@ -28,6 +28,7 @@
 ;	COMPAT4	included on COMPAT4 #ifdef (FreeBSD 4 compat)
 ;	COMPAT6	included on COMPAT6 #ifdef (FreeBSD 6 compat)
 ;	COMPAT7	included on COMPAT7 #ifdef (FreeBSD 7 compat)
+;	COMPAT9	included on COMPAT9 #ifdef (FreeBSD 9 compat)
 ;	OBSOL	obsolete, not included in system, only specifies name
 ;	UNIMPL	not implemented, placeholder only
 ;	NOSTD	implemented but as a lkm that can be statically

Modified: projects/ino64/sys/pc98/conf/GENERIC
==============================================================================
--- projects/ino64/sys/pc98/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/pc98/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -50,6 +50,7 @@ options 	COMPAT_FREEBSD4		# Compatible w
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	EPSON_BOUNCEDMA		# use bounce buffer for 15-16M
 #options 	EPSON_MEMWIN		# EPSON memory window support

Modified: projects/ino64/sys/powerpc/conf/GENERIC
==============================================================================
--- projects/ino64/sys/powerpc/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/powerpc/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -55,6 +55,7 @@ options 	COMPAT_FREEBSD4		#Keep this for
 options 	COMPAT_FREEBSD5		#Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		#Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		#Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		#Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		#Delay (in ms) before probing SCSI 
 options 	KTRACE			#ktrace(1) syscall trace support
 options 	STACK			#stack(9) support

Modified: projects/ino64/sys/powerpc/conf/GENERIC64
==============================================================================
--- projects/ino64/sys/powerpc/conf/GENERIC64	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/powerpc/conf/GENERIC64	Fri Sep  2 17:30:50 2011	(r225342)
@@ -55,6 +55,7 @@ options 	COMPAT_FREEBSD32	#Compatible wi
 options 	COMPAT_FREEBSD5		#Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		#Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		#Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		#Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		#Delay (in ms) before probing SCSI 
 options 	KTRACE			#ktrace(1) syscall trace support
 options 	STACK			#stack(9) support

Modified: projects/ino64/sys/sparc64/conf/GENERIC
==============================================================================
--- projects/ino64/sys/sparc64/conf/GENERIC	Fri Sep  2 17:11:59 2011	(r225341)
+++ projects/ino64/sys/sparc64/conf/GENERIC	Fri Sep  2 17:30:50 2011	(r225342)
@@ -50,6 +50,7 @@ options 	GEOM_LABEL		# Provides labeliza
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	KTRACE			# ktrace(1) support
 options 	STACK			# stack(9) support



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