freebsd-dev/sys/conf
Marko Zec 385195c062 Conditionally compile out V_ globals while instantiating the appropriate
container structures, depending on VIMAGE_GLOBALS compile time option.

Make VIMAGE_GLOBALS a new compile-time option, which by default will not
be defined, resulting in instatiations of global variables selected for
V_irtualization (enclosed in #ifdef VIMAGE_GLOBALS blocks) to be
effectively compiled out.  Instantiate new global container structures
to hold V_irtualized variables: vnet_net_0, vnet_inet_0, vnet_inet6_0,
vnet_ipsec_0, vnet_netgraph_0, and vnet_gif_0.

Update the VSYM() macro so that depending on VIMAGE_GLOBALS the V_
macros resolve either to the original globals, or to fields inside
container structures, i.e. effectively

#ifdef VIMAGE_GLOBALS
#define V_rt_tables rt_tables
#else
#define V_rt_tables vnet_net_0._rt_tables
#endif

Update SYSCTL_V_*() macros to operate either on globals or on fields
inside container structs.

Extend the internal kldsym() lookups with the ability to resolve
selected fields inside the virtualization container structs.  This
applies only to the fields which are explicitly registered for kldsym()
visibility via VNET_MOD_DECLARE() and vnet_mod_register(), currently
this is done only in sys/net/if.c.

Fix a few broken instances of MODULE_GLOBAL() macro use in SCTP code,
and modify the MODULE_GLOBAL() macro to resolve to V_ macros, which in
turn result in proper code being generated depending on VIMAGE_GLOBALS.

De-virtualize local static variables in sys/contrib/pf/net/pf_subr.c
which were prematurely V_irtualized by automated V_ prepending scripts
during earlier merging steps.  PF virtualization will be done
separately, most probably after next PF import.

Convert a few variable initializations at instantiation to
initialization in init functions, most notably in ipfw.  Also convert
TUNABLE_INT() initializers for V_ variables to TUNABLE_FETCH_INT() in
initializer functions.

Discussed at:	devsummit Strassburg
Reviewed by:	bz, julian
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
2008-12-10 23:12:39 +00:00
..
defines
files Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
files.amd64 Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.arm Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.i386 Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.ia64 Add freebsd32 compat shims for ioctl(2) 2008-09-22 16:09:16 +00:00
files.mips Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.pc98 Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.powerpc Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.sparc64 Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
files.sun4v Switch sun4v to back to using its own clock.c, which was ressurected 2008-09-03 17:31:13 +00:00
kern.mk Disable SSP for mips until support is added to the base architecture. 2008-07-23 06:16:34 +00:00
kern.post.mk Add CTF conversion to the objects compiled from generated code. 2008-07-05 06:12:14 +00:00
kern.pre.mk Switch to ath hal source code. Note this removes the ath_hal 2008-12-01 16:53:01 +00:00
kmod_syms.awk
kmod.mk add usb2_if.m to mfiles to unbreak build of modules. 2008-11-04 03:42:01 +00:00
ldscript.amd64
ldscript.arm Create a non-elf pure binary version of the kernel as well. 2005-11-24 02:25:49 +00:00
ldscript.i386
ldscript.ia64
ldscript.mips Merge from p4: add Juniper license statement. 2008-09-19 03:36:37 +00:00
ldscript.mips.cfe Fix the CFE ldscript after the cutover to tradmips. 2008-10-13 06:07:58 +00:00
ldscript.powerpc Avoid hardcoding the kernel link address in the linker script. 2008-02-27 00:03:23 +00:00
ldscript.sparc64
Makefile.amd64 Add a kernel option for amd64 to compile with the frame on the stack 2008-05-23 03:52:55 +00:00
Makefile.arm enable use of modules but disable them by adding MODULES_OVERRIDE="" 2008-11-30 17:53:19 +00:00
Makefile.i386 Revert config(8) version bump. It brings major pain for people working on 2007-05-16 17:23:54 +00:00
Makefile.ia64 Remove definition of the GCC3 variable. It was introduced in rev. 2007-06-02 21:30:39 +00:00
Makefile.mips Merge in the mips specific configuration files and such from the 2008-04-13 06:25:43 +00:00
Makefile.pc98 Revert config(8) version bump. It brings major pain for people working on 2007-05-16 17:23:54 +00:00
Makefile.powerpc Revert config(8) version bump. It brings major pain for people working on 2007-05-16 17:23:54 +00:00
Makefile.sparc64 Revert config(8) version bump. It brings major pain for people working on 2007-05-16 17:23:54 +00:00
Makefile.sun4v Revert config(8) version bump. It brings major pain for people working on 2007-05-16 17:23:54 +00:00
makeLINT.mk
makeLINT.sed
newvers.sh Backout svn r183528. 2008-10-03 10:08:36 +00:00
NOTES Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet 2008-11-12 09:52:06 +00:00
options Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
options.amd64 Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and 2008-05-26 10:40:09 +00:00
options.arm - Obtain main clock frequency dynamically based on CKGR_MCFR register 2008-11-30 22:33:03 +00:00
options.i386 Integrate configuration bits for compling xen. 2008-08-15 20:58:57 +00:00
options.ia64 Add option EXCEPTION_TRACING, which enables KTR-like functionality 2007-07-30 22:42:33 +00:00
options.mips Merge from p4: add Juniper license statement. 2008-09-19 03:36:37 +00:00
options.pc98 Remove obselete PECOFF image activator support. 2008-06-14 12:51:44 +00:00
options.powerpc Initial support for Freescale PowerQUICC III MPC85xx system-on-chip family. 2008-03-03 17:17:00 +00:00
options.sparc64 Add a driver for Schizo' Fireplane/Safari to PCI 2.1 and Tomatillo' 2008-09-28 00:07:05 +00:00
options.sun4v Remove remnants from the sparc64 origin of this file and which are 2007-01-19 12:22:50 +00:00
systags.sh Use a simpler way to reach the <machine> include dir, which should 2005-12-03 21:37:54 +00:00