]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoChange float_t and double_t to long double on i386. All floating point
Bruce Evans [Wed, 5 Mar 2008 11:21:14 +0000 (11:21 +0000)]
Change float_t and double_t to long double on i386.  All floating point
expressions on i386 are evaluated in the range of the long double type,
so this is wrong in a different but hopefully less worse way than
before.  Since expressions are evaluated in long double registers,
there is no runtime cost to using long double instead of double to
declare intermediate values (except in cases where this avoids compiler
bugs), and by careful use of float_t or double_t it is possible to
avoid some of the compiler bugs in this area, provided these types are
declared as long double.

I was going to change float.h to be less broken and more usable in
combination with the change here (in particular, it is more necessary
to know the effective number of bits in a double_t when double_t !=
double, since DBL_MANT_DIG no longer logically gives this, and
LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default
rounding precision.  However, this was too hard for now.  In particular,
LDBL_MANT_DIG is used a lot in libm, so it cannot be changed.  One
thing that is completely broken now is LDBL_MAX.  This may have sort
of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at
runtime gave +Inf, but you could at least compare with it), but starting
with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at
compile time in the default rounding precision.

16 years agoOops, back out previous commit since it was to the wrong file.
Bruce Evans [Wed, 5 Mar 2008 11:17:20 +0000 (11:17 +0000)]
Oops, back out previous commit since it was to the wrong file.

16 years agoChange float_t and double_t to long double on i386. All floating point
Bruce Evans [Wed, 5 Mar 2008 11:11:53 +0000 (11:11 +0000)]
Change float_t and double_t to long double on i386.  All floating point
expressions on i386 are evaluated in the range of the long double type,
so this is wrong in a different but hopefully less worse way than
before.  Since expressions are evaluated in long double registers,
there is no runtime cost to using long double instead of double to
declare intermediate values (except in cases where this avoids compiler
bugs), and by careful use of float_t or double_t it is possible to
avoid some of the compiler bugs in this area, provided these types are
declared as long double.

I was going to change float.h to be less broken and more usable in
combination with the change here (in particular, it is more necessary
to know the effective number of bits in a double_t when double_t !=
double, since DBL_MANT_DIG no longer logically gives this, and
LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default
rounding precision.  However, this was too hard for now.  In particular,
LDBL_MANT_DIG is used a lot in libm, so it cannot be changed.  One
thing that is completely broken now is LDBL_MAX.  This may have sort
of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at
runtime gave +Inf, but you could at least compare with it), but starting
with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at
compile time in the default rounding precision.

16 years agoExpand the nfs_opts array to include all possible string
Craig Rodrigues [Wed, 5 Mar 2008 10:09:29 +0000 (10:09 +0000)]
Expand the nfs_opts array to include all possible string
mount options that mount_nfs could pass down, if it passed
down string mount options.  Right now, mount_nfs jut passes
down a single mount option named "nfs_args" with a fully
initialized 'struct nfs_args'.

In future commits, we will add code to the kernel for parsing stringified
NFS mount options, so that we can convert mount_nfs to pass string options
from userspace to kernel, instead of an initialized struct nfs_args.

16 years agoIn nfs_mount(), default initialize struct nfs_args
Craig Rodrigues [Wed, 5 Mar 2008 09:41:22 +0000 (09:41 +0000)]
In nfs_mount(), default initialize struct nfs_args
the same way that it is default initialized in revision 1.77 of mount_nfs.c.

Right now, this is a no-op, because currently we initialize
struct nfs_args in mount_nfs in userspace, and pass it
down into the kernel via nmount(), so we overwrite whatever we initialize
here with the value passed in from userspace.

However, this lays the groundwork for moving away from passing
struct nfs_args from userspace to kernel via nmount(), so that we
can instead pass string mount options via nmount() which can be parsed in
the kernel.  This will make it easier to add new NFS mount options.

16 years agoFor a mounted file system which is read-only, when
Craig Rodrigues [Wed, 5 Mar 2008 08:25:49 +0000 (08:25 +0000)]
For a mounted file system which is read-only, when
doing the MNT_RELOAD, pass in "ro" and "update"
string mount options to nmount() instead of MNT_RDONLY and MNT_UPDATE flags.

Due to the complexity of the mount parsing code especially
with respect to the root file system, passing in MNT_RDONLY and MNT_UPDATE
flags would do weird things and would cause fsck to convert the root
file system from a read-only mount to read-write.

To test:
 - boot into single user mode
 - show mounted file systems with: mount
 - root file system should be mounted read-only
 - fsck /
 - show mounted file systems with: mount
 - root file system should still be mounted read-only

PR: 120319
MFC after: 1 month
Reported by: yar

16 years ago - Don't overwrite the recently allocated 'nset' in cpuset_setthread() by
Jeff Roberson [Wed, 5 Mar 2008 08:08:32 +0000 (08:08 +0000)]
 - Don't overwrite the recently allocated 'nset' in cpuset_setthread() by
   passing it to cpuset_which().  Pass in 'set' instead.  This argument
   is not used but for convenience cpuset_which() nulls all incoming
   parameters.

Submitted by: davidxu

16 years agoAdd rl(4) support
Kevin Lo [Wed, 5 Mar 2008 07:55:45 +0000 (07:55 +0000)]
Add rl(4) support

16 years agoRemove hacks which filter out MNT_ROOTFS.
Craig Rodrigues [Wed, 5 Mar 2008 07:55:07 +0000 (07:55 +0000)]
Remove hacks which filter out MNT_ROOTFS.
They are no longer needed now that we filter out MNT_ROOTFS
inside the nmount() call in revision 1.267 of vfs_mount.c.

Reviewed by: rink

16 years agoIncrease and decrease in_sigcancel_handler accordingly to avoid possible
David Xu [Wed, 5 Mar 2008 07:04:55 +0000 (07:04 +0000)]
Increase and decrease in_sigcancel_handler accordingly to avoid possible
error caused by nested SIGCANCEL stack, it is a bit complex.

16 years agoUse cpuset defined in pthread_attr for newly created thread, for now,
David Xu [Wed, 5 Mar 2008 07:01:20 +0000 (07:01 +0000)]
Use cpuset defined in pthread_attr for newly created thread, for now,
we set scheduling parameters and cpu binding fully in userland, and
because default scheduling policy is SCHED_RR (time-sharing), we set
default sched_inherit to PTHREAD_SCHED_INHERIT, this saves a system
call.

16 years agoAdd more cpu affinity function's symbols.
David Xu [Wed, 5 Mar 2008 06:56:35 +0000 (06:56 +0000)]
Add more cpu affinity function's symbols.

16 years agoCheck actual size of cpuset kernel is using and define underscore version
David Xu [Wed, 5 Mar 2008 06:55:48 +0000 (06:55 +0000)]
Check actual size of cpuset kernel is using and define underscore version
of API.

16 years agoRemove hacks to filter out MNT_ROOTFS, since we now
Craig Rodrigues [Wed, 5 Mar 2008 06:24:42 +0000 (06:24 +0000)]
Remove hacks to filter out MNT_ROOTFS, since we now
do that internally inside nmount() in revision 1.267 of vfs_mount.c.

16 years agoPlug memory leak in jumbo buffer allocation failure path.
Pyun YongHyeon [Wed, 5 Mar 2008 05:36:09 +0000 (05:36 +0000)]
Plug memory leak in jumbo buffer allocation failure path.
Patch in the PR was modified to check active jumbo buffers in use
and other possible jumbo buffer leak.

Jumbo buffer usage in lge(4) still wouldn't be reliable due to lack
of driver lock in local jumbo buffer allocator. Either introduce
a new lock to protect jumbo buffer or switch to UMA backed page
allocator for jumbo frame is required.

PR: kern/78072

16 years ago - Remove the -i argument when running a command to simplify things a
Jeff Roberson [Wed, 5 Mar 2008 02:10:43 +0000 (02:10 +0000)]
 - Remove the -i argument when running a command to simplify things a
   little bit and to prevent users from specifying a private mask that may
   later restrict other group changes.
 - Add a man page which brueffer generously contributed to.

Sponsored by:   Nokia

16 years ago - Verify that when a user supplies a mask that is bigger than the kernel
Jeff Roberson [Wed, 5 Mar 2008 01:49:20 +0000 (01:49 +0000)]
 - Verify that when a user supplies a mask that is bigger than the kernel
   mask none of the upper bits are set.
 - Be more careful about enforcing the boundaries of masks and child sets.
 - Introduce a few more CPU_* macros for implementing these tests.
 - Change the cpusetsize argument to be bytes rather than bits to match
   other apis.

Sponsored by: Nokia

16 years ago- add '-f' option to force root node.
Hidetoshi Shimokawa [Wed, 5 Mar 2008 01:30:48 +0000 (01:30 +0000)]
- add '-f' option to force root node.
- fix byte order in read_write_quad()
- show hostnames in the list
- fix typo in manpage

MFC after: 1 week

16 years agoAdd detection of isolation state.
Pyun YongHyeon [Wed, 5 Mar 2008 01:15:10 +0000 (01:15 +0000)]
Add detection of isolation state.

PR: kern/76710

16 years agoIt seems some don't care for the anchient joke. Add WITHOUT_OLD_JOKE
David E. O'Brien [Tue, 4 Mar 2008 22:51:37 +0000 (22:51 +0000)]
It seems some don't care for the anchient joke.  Add WITHOUT_OLD_JOKE
to your CFLAGS if you fall into this camp.

16 years agoNo need to tell make to DTRT with "make love", just do it.
David E. O'Brien [Tue, 4 Mar 2008 22:32:58 +0000 (22:32 +0000)]
No need to tell make to DTRT with "make love", just do it.
Also remove the 2002/08/31 bootstrapping aid for upgrades from
year old (mid-2001) systems.

16 years agoTemporarily back out revision 1.98 to give Portmgr some time to
David E. O'Brien [Tue, 4 Mar 2008 20:26:03 +0000 (20:26 +0000)]
Temporarily back out revision 1.98 to give Portmgr some time to
address PR ports/121363 (current day re-opening of PR ports/73797)
to make ports CFLAGS more independent of src/'s CFLAGS WRT aliasing.

Discussed with: brooks

16 years agoChange the default port range for outgoing connections by introducing
Rui Paulo [Tue, 4 Mar 2008 19:16:21 +0000 (19:16 +0000)]
Change the default port range for outgoing connections by introducing
IPPORT_EPHEMERALFIRST and IPPORT_EPHEMERALLAST with values
10000 and 65535 respectively.
The rationale behind is that it makes the attacker's life more
difficult if he/she wants to guess the ephemeral port range and
also lowers the probability of a port colision (described in
draft-ietf-tsvwg-port-randomization-01.txt).

While there, remove code duplication in in_pcbbind_setup().

Submitted by: Fernando Gont <fernando at gont.com.ar>
Approved by: njl (mentor)
Reviewed by: silby, bms
Discussed on: freebsd-net

16 years agoBack out revision 1.97, which backed out part of revision 1.96.
David E. O'Brien [Tue, 4 Mar 2008 19:00:11 +0000 (19:00 +0000)]
Back out revision 1.97, which backed out part of revision 1.96.
Change the default CFLAGS to match the simple defaults that the
tinderboxes use.  By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.

16 years agoAdd support for automatic promotion of 4KB page mappings to 2MB page
Alan Cox [Tue, 4 Mar 2008 18:50:15 +0000 (18:50 +0000)]
Add support for automatic promotion of 4KB page mappings to 2MB page
mappings.  Automatic promotion can be enabled by setting the tunable
"vm.pmap.pg_ps_enabled" to a non-zero value.  By default, automatic
promotion is disabled.  (Expect this to change.)

Reviewed by: ups
Tested by: kris, Peter Holm

16 years agoImplement 128 items node name hash for faster name search.
Alexander Motin [Tue, 4 Mar 2008 18:22:18 +0000 (18:22 +0000)]
Implement 128 items node name hash for faster name search.
Increase node ID hash size from 32 to 128 items.

16 years agoForce an explicit dependency on opt_global.h for all module object files
John Baldwin [Tue, 4 Mar 2008 16:54:31 +0000 (16:54 +0000)]
Force an explicit dependency on opt_global.h for all module object files
when building modules as part of a kernel build just as we do for kernel
object files.

MFC after: 1 week
Reported by: kmacy, kris
Reviewed by: ru

16 years ago<limits.h> is necessary for using INT_MIN, so included it here
Warner Losh [Tue, 4 Mar 2008 15:56:17 +0000 (15:56 +0000)]
<limits.h> is necessary for using INT_MIN, so included it here
explicitly rather than relying on name space pollution to pull it in
for us.

NB: The usage of INT_MIN is somewhat bogus and suspect to my eye, but this
commit doesn't address that issue.

16 years agoContinue on-going campaign to replace lockmgr locks with sx locks where
Robert Watson [Tue, 4 Mar 2008 12:50:11 +0000 (12:50 +0000)]
Continue on-going campaign to replace lockmgr locks with sx locks where
the specific semantics of ockmgr aren't required: update UFS1 extended
attributes to protect its data structures using an sx lock.

While here, update comments on lock granularity.

MFC after: 2 weeks

16 years agoMove setting of MNTK_MPSAFE flag before UFS1 extended attribute
Robert Watson [Tue, 4 Mar 2008 12:10:03 +0000 (12:10 +0000)]
Move setting of MNTK_MPSAFE flag before UFS1 extended attribute
auto-start so that the flag is set before we start performing I/O
in the auto-start routine.

MFC after: 2 weeks
Suggested by: kib

16 years agoMove a stray paragraph on .Ev MAKEFLAGS to where it belongs.
Yaroslav Tykhiy [Tue, 4 Mar 2008 11:28:54 +0000 (11:28 +0000)]
Move a stray paragraph on .Ev MAKEFLAGS to where it belongs.

16 years agoRevise the description of how .Ev MAKEFILE and .Va .MAKEFILE relate.
Yaroslav Tykhiy [Tue, 4 Mar 2008 11:25:23 +0000 (11:25 +0000)]
Revise the description of how .Ev MAKEFILE and .Va .MAKEFILE relate.
The most important point is that -f option(s) are never copied from
.Ev MAKEFILE to .Va .MAKEFILE by make(1), which is consistent with
handling the command line.  (-f silently sit in .Ev MAKEFILE and go
to make's children unless overwritten via .Va .MAKEFILE)

Bump .Dd.

16 years agoFix incorrect field name.
Alexander Motin [Tue, 4 Mar 2008 11:10:54 +0000 (11:10 +0000)]
Fix incorrect field name.

16 years agoFix the Giant leak in the nfsrv_remove().
Konstantin Belousov [Tue, 4 Mar 2008 11:05:03 +0000 (11:05 +0000)]
Fix the Giant leak in the nfsrv_remove().

Reported by: pluknet <pluknet gmail com>
MFC after: 1 week

16 years agoSplit descriptions of .Ev MAKEFILE and .Va .MAKEFLAGS for clarity.
Yaroslav Tykhiy [Tue, 4 Mar 2008 10:33:42 +0000 (10:33 +0000)]
Split descriptions of .Ev MAKEFILE and .Va .MAKEFLAGS for clarity.

16 years agoMake it possible to continue working after calling doadump()
Ruslan Ermilov [Tue, 4 Mar 2008 07:39:31 +0000 (07:39 +0000)]
Make it possible to continue working after calling doadump()
manually from debugger.  (This got broken in rev. 1.122.)

16 years agoNote 7.0 was the first version that FreeBSD/pc98 had a MACHINE of pc98
Warner Losh [Tue, 4 Mar 2008 06:08:59 +0000 (06:08 +0000)]
Note 7.0 was the first version that FreeBSD/pc98 had a MACHINE of pc98
instead of i386.

16 years agoLinux requires -D__dead2= and -D__unused= to get rid of the
Warner Losh [Tue, 4 Mar 2008 05:35:27 +0000 (05:35 +0000)]
Linux requires -D__dead2= and -D__unused= to get rid of the
sys/cdef.h-isms in the make source.  The variant of linux I tried it
on doesn't have arc4random, so -Darc4random=random too.

16 years agoIf a new thread is created, it inherits current thread's signal masks,
David Xu [Tue, 4 Mar 2008 04:28:59 +0000 (04:28 +0000)]
If a new thread is created, it inherits current thread's signal masks,
however if current thread is executing cancellation handler, signal
SIGCANCEL may have already been blocked, this is unexpected, unblock the
signal in new thread if this happens.

MFC after: 1 week

16 years agoInclude cpuset.h, unbreak compiling.
David Xu [Tue, 4 Mar 2008 03:45:11 +0000 (03:45 +0000)]
Include cpuset.h, unbreak compiling.

16 years agoAlso comment-out options MPC85XX. We don't define CCSRBAR_* without E500.
Marcel Moolenaar [Tue, 4 Mar 2008 03:05:53 +0000 (03:05 +0000)]
Also comment-out options MPC85XX. We don't define CCSRBAR_* without E500.

16 years agoimplement pthread_attr_getaffinity_np and pthread_attr_setaffinity_np.
David Xu [Tue, 4 Mar 2008 03:03:24 +0000 (03:03 +0000)]
implement pthread_attr_getaffinity_np and pthread_attr_setaffinity_np.

16 years agoComment-out cpu E500. We can't yet build it with AIM at the same time.
Marcel Moolenaar [Tue, 4 Mar 2008 02:20:27 +0000 (02:20 +0000)]
Comment-out cpu E500. We can't yet build it with AIM at the same time.

16 years agoAdd the pic_ipi method. While here, eliminate the unused openpic_ocpbus_softc
Marcel Moolenaar [Tue, 4 Mar 2008 01:40:26 +0000 (01:40 +0000)]
Add the pic_ipi method. While here, eliminate the unused openpic_ocpbus_softc
struct.

16 years agoWhen unloading kld, don't forget to flush the nat pointers.
Paolo Pisati [Mon, 3 Mar 2008 22:32:01 +0000 (22:32 +0000)]
When unloading kld, don't forget to flush the nat pointers.

16 years agoImport the omitted gdb_machdep.c for PowerPC kernel.
Rafal Jaworowski [Mon, 3 Mar 2008 22:00:46 +0000 (22:00 +0000)]
Import the omitted gdb_machdep.c for PowerPC kernel.

Approved by: cognet (mentor)
MFp4: e500

16 years agoConnect MPC85XX to the PowerPC build.
Rafal Jaworowski [Mon, 3 Mar 2008 20:40:20 +0000 (20:40 +0000)]
Connect MPC85XX to the PowerPC build.

The kernel config file is KERNCONF=MPC85XX, so the usual procedure applies:

1. make buildworld TARGET_ARCH=powerpc
2. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX

This default config uses kernel-level FPU emulation. For the soft-float world
approach:

1. make buildworld TARGET_ARCH=powerpc TARGET_CPUTYPE=e500
2. disable FPU_EMU option in sys/powerpc/conf/MPC85XX
3. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX

Approved by: cognet (mentor)
MFp4: e500

16 years agoUse more compact LIST instead of TAILQ for session hash.
Alexander Motin [Mon, 3 Mar 2008 19:36:03 +0000 (19:36 +0000)]
Use more compact LIST instead of TAILQ for session hash.
Add all listening hooks into LIST to simplify searches.
Use ng_findhook() instead of own equal implementation.

16 years agoSupport for Freescale integrated Three-Speed Ethernet Controller (TSEC).
Rafal Jaworowski [Mon, 3 Mar 2008 19:03:44 +0000 (19:03 +0000)]
Support for Freescale integrated Three-Speed Ethernet Controller (TSEC).

TSEC is the MAC engine offering 10, 100 or 1000 Mbps speed and is found on
different Freescale parts (MPC83xx, MPC85xx). Depending on the silicon version
there are up to four TSEC units integrated on the chip.

This driver also works with the enhanced version of the controller (eTSEC),
which is backwards compatible, but doesn't take advantage of its additional
features (various off-loading mechanisms) at the moment.

Approved by: cognet (mentor)
Obtained from: Semihalf
MFp4: e500

16 years agoRecognize the quad-port Cicada (Vitesse) CS8204 10/100/1000TX PHY.
Rafal Jaworowski [Mon, 3 Mar 2008 18:44:33 +0000 (18:44 +0000)]
Recognize the quad-port Cicada (Vitesse) CS8204 10/100/1000TX PHY.

This PHY is found on many embedded development boards: among others MPC8555CDS
evaluation systems use it.

Approved by: cognet (mentor)
MFp4: e500

16 years agoSupport for Freescale QUad Integrated Communications Controller.
Rafal Jaworowski [Mon, 3 Mar 2008 18:20:17 +0000 (18:20 +0000)]
Support for Freescale QUad Integrated Communications Controller.

The QUICC engine is found on various Freescale parts including MPC85xx, and
provides multiple generic time-division serial channel resources, which are in
turn muxed/demuxed by the Serial Communications Controller (SCC).

Along with core QUICC/SCC functionality a uart(4)-compliant device driver is
provided which allows for serial ports over QUICC/SCC.

Approved by: cognet (mentor)
Obtained from: Juniper
MFp4: e500

16 years agoInitial support for Freescale PowerQUICC III MPC85xx system-on-chip family.
Rafal Jaworowski [Mon, 3 Mar 2008 17:17:00 +0000 (17:17 +0000)]
Initial support for Freescale PowerQUICC III MPC85xx system-on-chip family.

The PQ3 is a high performance integrated communications processing system
based on the e500 core, which is an embedded RISC processor that implements
the 32-bit Book E definition of the PowerPC architecture. For details refer
to: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8555E

This port was tested and successfully run on the following members of the PQ3
family: MPC8533, MPC8541, MPC8548, MPC8555.

The following major integrated peripherals are supported:

  * On-chip peripherals bus
  * OpenPIC interrupt controller
  * UART
  * Ethernet (TSEC)
  * Host/PCI bridge
  * QUICC engine (SCC functionality)

This commit brings the main functionality and will be followed by individual
drivers that are logically separate from this base.

Approved by: cognet (mentor)
Obtained from: Juniper, Semihalf
MFp4: e500

16 years agoRework and extend PowerPC headers definitons towards Book-E/e500 CPUs support.
Rafal Jaworowski [Mon, 3 Mar 2008 13:20:52 +0000 (13:20 +0000)]
Rework and extend PowerPC headers definitons towards Book-E/e500 CPUs support.

Approved by: cognet (mentor)
Obtained from: Juniper, Semihalf
MFp4: e500

16 years ago- Add my birthday.
Philippe Audeoud [Mon, 3 Mar 2008 13:14:39 +0000 (13:14 +0000)]
- Add my birthday.

Approved by : thierry (co-mentor)

16 years ago- Add myself to ports committers and to tabthorpe and thierry's mentee list
Philippe Audeoud [Mon, 3 Mar 2008 13:12:27 +0000 (13:12 +0000)]
- Add myself to ports committers and to tabthorpe and thierry's mentee list

Approved by: thierry (co-mentor)

16 years agoRaise a bit ipfw kld priority.
Paolo Pisati [Mon, 3 Mar 2008 10:12:46 +0000 (10:12 +0000)]
Raise a bit ipfw kld priority.

Discussed on: net-, ipfw-.

16 years agoFix typo.
Diomidis Spinellis [Mon, 3 Mar 2008 10:06:52 +0000 (10:06 +0000)]
Fix typo.

16 years agoImplement functions pthread_getaffinity_np and pthread_setaffinity_np to
David Xu [Mon, 3 Mar 2008 09:16:29 +0000 (09:16 +0000)]
Implement functions pthread_getaffinity_np and pthread_setaffinity_np to
get and set thread's cpu affinity mask.

16 years agoThe Sony i.LINK (CXD1947) is _not_ supported.
Christian Brueffer [Mon, 3 Mar 2008 08:55:50 +0000 (08:55 +0000)]
The Sony i.LINK (CXD1947) is _not_ supported.

PR: 116680
Submitted by: Jens Köhler <mail@chatty.de>
MFC after: 3 days

16 years agoFix SYNOPSIS and usage().
Ruslan Ermilov [Mon, 3 Mar 2008 08:32:58 +0000 (08:32 +0000)]
Fix SYNOPSIS and usage().

16 years agoAdd cpu affinity APIs to get and set thread's cpu affinity mask, the
David Xu [Mon, 3 Mar 2008 08:28:13 +0000 (08:28 +0000)]
Add cpu affinity APIs to get and set thread's cpu affinity mask, the
functions are intented to be are compatible with glibc.

16 years agoConvert to be a 2-clause bsd-only license.
Kevin Lo [Mon, 3 Mar 2008 06:39:36 +0000 (06:39 +0000)]
Convert to be a 2-clause bsd-only license.

Pointed out by: rwatson

16 years ago- Fix an off-by-one bug in _libelf_insert_section(). [1]
Joseph Koshy [Mon, 3 Mar 2008 04:29:25 +0000 (04:29 +0000)]
- Fix an off-by-one bug in _libelf_insert_section(). [1]
- Update (c) years.

Submitted by: kaiw [1]

16 years agoDon't map memory/IO resource in device probe and just use PCI
Pyun YongHyeon [Mon, 3 Mar 2008 04:15:08 +0000 (04:15 +0000)]
Don't map memory/IO resource in device probe and just use PCI
vendor/revision/sub device id of the hardware to probe it.
This is the same way as NetBSD does and it enhances readabilty
a lot.

16 years agoDon't allow jumbo frame on 8139C+ controller.
Pyun YongHyeon [Mon, 3 Mar 2008 03:41:06 +0000 (03:41 +0000)]
Don't allow jumbo frame on 8139C+ controller.
While I'm here add a check for minimal MTU length.

16 years agoAdd KMOD target.
Kip Macy [Mon, 3 Mar 2008 03:34:52 +0000 (03:34 +0000)]
Add KMOD target.

Discovered by: Takahashi Yoshihiro

16 years agoImplement WOL.
Pyun YongHyeon [Mon, 3 Mar 2008 03:33:58 +0000 (03:33 +0000)]
Implement WOL.

Tested by: Fabian Keil ( freebsd-listen AT fabienkeli DOT de )

16 years agoMake session ID generator to use session ID hash.
Alexander Motin [Sun, 2 Mar 2008 23:26:35 +0000 (23:26 +0000)]
Make session ID generator to use session ID hash.
Make session ID generator thread-safe.

16 years agoDon't auto-start or allow extattrctl for UFS2 file systems, as UFS2 has
Robert Watson [Sun, 2 Mar 2008 22:52:14 +0000 (22:52 +0000)]
Don't auto-start or allow extattrctl for UFS2 file systems, as UFS2 has
native extended attributes.  This didn't interfere with the operation of
UFS2 extended attributes, but the code shouldn't be running for UFS2.

MFC after: 2 weeks

16 years agoTypo in comment spotted by Hasso Tepper.
Tony Finch [Sun, 2 Mar 2008 22:27:49 +0000 (22:27 +0000)]
Typo in comment spotted by Hasso Tepper.

Obtained from: DragonFlyBSD

16 years agoUnbreak after cpuset: initialize td_cpuset in sched_fork_thread().
Marcel Moolenaar [Sun, 2 Mar 2008 21:34:57 +0000 (21:34 +0000)]
Unbreak after cpuset: initialize td_cpuset in sched_fork_thread().

16 years agoRather than copying out the full audit trigger record, which includes
Robert Watson [Sun, 2 Mar 2008 21:34:17 +0000 (21:34 +0000)]
Rather than copying out the full audit trigger record, which includes
a queue entry field, just copy out the unsigned int that is the trigger
message.  In practice, auditd always requested sizeof(unsigned int), so
the extra bytes were ignored, but copying them out was not the intent.

MFC after: 1 month

16 years agoDon't run tests that assume <= 64-bit precision on machines with quad
David Schultz [Sun, 2 Mar 2008 20:49:24 +0000 (20:49 +0000)]
Don't run tests that assume <= 64-bit precision on machines with quad
precision.

16 years ago1 << 47 needs to be written 1ULL << 47.
David Schultz [Sun, 2 Mar 2008 20:16:55 +0000 (20:16 +0000)]
1 << 47 needs to be written 1ULL << 47.

16 years agoNew sentence -> new line.
Christian Brueffer [Sun, 2 Mar 2008 20:07:48 +0000 (20:07 +0000)]
New sentence -> new line.

16 years agoReplace lockmgr lock protecting nwfs vnode hash table with an sx lock.
Robert Watson [Sun, 2 Mar 2008 19:02:30 +0000 (19:02 +0000)]
Replace lockmgr lock protecting nwfs vnode hash table with an sx lock.

MFC after: 1 month

16 years agoReplace lockmgr lock protecting smbfs node hash table with sx lock.
Robert Watson [Sun, 2 Mar 2008 18:56:13 +0000 (18:56 +0000)]
Replace lockmgr lock protecting smbfs node hash table with sx lock.

MFC after: 1 month

16 years agoFix bugs when allocating and passing information of current lifetime and
Bjoern A. Zeeb [Sun, 2 Mar 2008 17:12:28 +0000 (17:12 +0000)]
Fix bugs when allocating and passing information of current lifetime and
soft lifetime [1] introduced in rev. 1.21 of key.c.

Along with that, fix a related problem in key_debug
printing the correct data.
While there replace a printf by panic in a sanity check.

PR: 120751
Submitted by: Kazuaki ODA (kazuaki aliceblue.jp) [1]
MFC after: 5 days

16 years agoUnify and generalize PowerPC headers, adjust AIM code accordingly.
Rafal Jaworowski [Sun, 2 Mar 2008 17:05:57 +0000 (17:05 +0000)]
Unify and generalize PowerPC headers, adjust AIM code accordingly.

Rework of this area is a pre-requirement for importing e500 support (and
other PowerPC core variations in the future). Mainly the following
headers are refactored so that we can cover for low-level differences between
various machines within PowerPC architecture:

  <machine/pcpu.h>
  <machine/pcb.h>
  <machine/kdb.h>
  <machine/hid.h>
  <machine/frame.h>

Areas which use the above are adjusted and cleaned up.

Credits for this rework go to marcel@

Approved by: cognet (mentor)
MFp4: e500

16 years agoReturn ENOSYS instead of 0 for the unknown futex operations.
Konstantin Belousov [Sun, 2 Mar 2008 14:00:50 +0000 (14:00 +0000)]
Return ENOSYS instead of 0 for the unknown futex operations.

Submitted by: rdivacky
Reported and tested by: Gary Stanley <gary velocity-servers net>

16 years agoSet AR=gnu-ar and RANLIB=gnu-ranlib on systems where we are forced
Ruslan Ermilov [Sun, 2 Mar 2008 11:10:46 +0000 (11:10 +0000)]
Set AR=gnu-ar and RANLIB=gnu-ranlib on systems where we are forced
to use GNU tools.  Remove the _WITH_GNUAR knob.

Prodded by: obrien

16 years agoSome "cleanup" of tcp_mss():
Bjoern A. Zeeb [Sun, 2 Mar 2008 08:40:47 +0000 (08:40 +0000)]
Some "cleanup" of tcp_mss():
- Move the assigment of the socket down before we first need it.
  No need to do it at the beginning and then drop out the function
  by one of the returns before using it 100 lines further down.
- Use t_maxopd which was assigned the "tcp_mssdflt" for the corrrect
  AF already instead of another #ifdef ? : #endif block doing the same.
- Remove an unneeded (duplicate) assignment of mss to t_maxseg just before
  we possibly change mss and re-do the assignment without using t_maxseg
  in between.

Reviewed by: silby
No objections: net@ (silence)
MFC after: 5 days

16 years agoAdd support for the new cpu topology api:
Jeff Roberson [Sun, 2 Mar 2008 08:20:59 +0000 (08:20 +0000)]
Add support for the new cpu topology api:
 - When searching for affinity search backwards in the tree from the last
   cpu we ran on while the thread still has affinity for the group.   This
   can take advantage of knowledge of shared L2 or L3 caches among a
   group of cores.
 - When searching for the least loaded cpu find the least loaded cpu via
   the least loaded path through the tree.  This load balances system bus
   links, individual cache levels, and hyper-threaded/SMT cores.
 - Make the periodic balancer recursively balance the highest and lowest
   loaded cpu across each link.

Add support for cpusets:
 - Convert the cpuset to a simple native cpumask_t while the kernel still
   only supports cpumask.
 - Pass the derived cpumask down through the cpu_search functions to
   restrict the result cpus.
 - Make the various steal functions resilient to failure since all threads
   can not run on all cpus any longer.

General improvements:
 - Precisely track the lowest priority thread on every runq with
   tdq_setlowpri().  Before it was more advisory but this ended up having
   pathological behaviors.
 - Remove many #ifdef SMP conditions to simplify the code.
 - Get rid of the old cumbersome tdq_group.  This is more naturally
   expressed via the cpu_group tree.

Sponsored by: Nokia
Testing by: kris

16 years ago - Remove the old smp cpu topology specification with a new, more flexible
Jeff Roberson [Sun, 2 Mar 2008 07:58:42 +0000 (07:58 +0000)]
 - Remove the old smp cpu topology specification with a new, more flexible
   tree structure that encodes the level of cache sharing and other
   properties.
 - Provide several convenience functions for creating one and two level
   cpu trees as well as a default flat topology.  The system now always
   has some topology.
 - On i386 and amd64 create a seperate level in the hierarchy for HTT
   and multi-core cpus.  This will allow the scheduler to intelligently
   load balance non-uniform cores.  Presently we don't detect what level
   of the cache hierarchy is shared at each level in the topology.
 - Add a mechanism for testing common topologies that have more information
   than the MD code is able to provide via the kern.smp.topology tunable.
   This should be considered a debugging tool only and not a stable api.

Sponsored by: Nokia

16 years ago - Add cpuset to the build.
Jeff Roberson [Sun, 2 Mar 2008 07:52:26 +0000 (07:52 +0000)]
 - Add cpuset to the build.

Sponsored by: Nokia

16 years agoAdd a simple utility for manipulating cpusets. Man page will be available
Jeff Roberson [Sun, 2 Mar 2008 07:51:29 +0000 (07:51 +0000)]
Add a simple utility for manipulating cpusets.  Man page will be available
soon.
 - Lists of cpus may be specified with -l with ranges specified as low-high and
   commas between individual cpus and ranges.  ie -l 0-2,4,6-8.
 - cpuset can modified -p pids, -t tids, or -s cpusetids.
 - cpuset can -g get the current mask for any of the above.

Sponsored by: Nokia

16 years ago - Regen for cpuset
Jeff Roberson [Sun, 2 Mar 2008 07:41:10 +0000 (07:41 +0000)]
 - Regen for cpuset

Sponsored by: Nokia

16 years agoAdd cpuset, an api for thread to cpu binding and cpu resource grouping
Jeff Roberson [Sun, 2 Mar 2008 07:39:22 +0000 (07:39 +0000)]
Add cpuset, an api for thread to cpu binding and cpu resource grouping
and assignment.
 - Add a reference to a struct cpuset in each thread that is inherited from
   the thread that created it.
 - Release the reference when the thread is destroyed.
 - Add prototypes for syscalls and macros for manipulating cpusets in
   sys/cpuset.h
 - Add syscalls to create, get, and set new numbered cpusets:
   cpuset(), cpuset_{get,set}id()
 - Add syscalls for getting and setting affinity masks for cpusets or
   individual threads: cpuid_{get,set}affinity()
 - Add types for the 'level' and 'which' parameters for the cpuset.  This
   will permit expansion of the api to cover cpu masks for other objects
   identifiable with an id_t integer.  For example, IRQs and Jails may be
   coming soon.
 - The root set 0 contains all valid cpus.  All thread initially belong to
   cpuset 1.  This permits migrating all threads off of certain cpus to
   reserve them for special applications.

Sponsored by: Nokia
Discussed with: arch, rwatson, brooks, davidxu, deischen
Reviewed by: antoine

16 years ago - Add a new sched_affinity() api to be used in the upcoming cpuset
Jeff Roberson [Sun, 2 Mar 2008 07:19:35 +0000 (07:19 +0000)]
 - Add a new sched_affinity() api to be used in the upcoming cpuset
   implementation.
 - Add empty implementations of sched_affinity() to 4BSD and ULE.

Sponsored by: Nokia

16 years ago- Do not malloc buffer for 0-size member when reading from archive.
Kai Wang [Sun, 2 Mar 2008 07:01:01 +0000 (07:01 +0000)]
- Do not malloc buffer for 0-size member when reading from archive.
- Fix a malloc buffer overrun: Use a while loop to check whether
  the string buffer is big enough after resizing, since doubling
  once might not be enough when a very long member name or symbol
  name is provided.
- Fix typo.

Reported by: Michael Plass <mfp49_freebsd@plass-family.net>
Tested by: Michael Plass <mfp49_freebsd@plass-family.net>
Reviewed by: jkoshy
Approved by: jkoshy

16 years agoTranslate the r_info field of ELF relocation records when converting
Joseph Koshy [Sun, 2 Mar 2008 06:33:10 +0000 (06:33 +0000)]
Translate the r_info field of ELF relocation records when converting
between 64 and 32 bit variants.

Submitted by: kaiw

16 years agoAdd the SMI VTOC8 disk label option.
Marcel Moolenaar [Sun, 2 Mar 2008 06:24:29 +0000 (06:24 +0000)]
Add the SMI VTOC8 disk label option.

16 years agoRemove makefiles for geom_apple and geom_gpt. These are non-existent
Marcel Moolenaar [Sun, 2 Mar 2008 05:59:25 +0000 (05:59 +0000)]
Remove makefiles for geom_apple and geom_gpt. These are non-existent
for while.

16 years agoAdd geom_part module.
Marcel Moolenaar [Sun, 2 Mar 2008 05:54:34 +0000 (05:54 +0000)]
Add geom_part module.

16 years agoHook up sqrtl() to the build.
David Schultz [Sun, 2 Mar 2008 01:48:17 +0000 (01:48 +0000)]
Hook up sqrtl() to the build.

16 years agoMD implementations of sqrtl().
David Schultz [Sun, 2 Mar 2008 01:48:08 +0000 (01:48 +0000)]
MD implementations of sqrtl().

16 years agoMI implementation of sqrtl(). This is very slow and should
David Schultz [Sun, 2 Mar 2008 01:47:58 +0000 (01:47 +0000)]
MI implementation of sqrtl(). This is very slow and should
be overridden when hardware sqrt is available.

16 years agoAdd support for VTOC8 labels (aka sun disk labels). When a label does
Marcel Moolenaar [Sun, 2 Mar 2008 00:52:49 +0000 (00:52 +0000)]
Add support for VTOC8 labels (aka sun disk labels). When a label does
not have VTOC information about the partitions, it will be created.
This is because the VTOC information is used for the partition type
and FreeBSD's sunlabel(8) does not create nor use VTOC information.
For this purpose, new tags have been added to support FreeBSD's
partition types.

16 years agoMake the vm_pmap field of struct vmspace the last field in the
Marcel Moolenaar [Sat, 1 Mar 2008 22:54:42 +0000 (22:54 +0000)]
Make the vm_pmap field of struct vmspace the last field in the
structure. This allows per-CPU variations of struct pmap on a
single architecture without affecting the machine-independent
fields. As such, the PMAP variations don't affect the ABI. They
become part of it.

16 years agoFix indentation (whitespace changes only).
Bjoern A. Zeeb [Sat, 1 Mar 2008 22:27:15 +0000 (22:27 +0000)]
Fix indentation (whitespace changes only).

MFC after: 6 days