]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoAdd a catch-all for PCPU_MD_FIELDS. While we expect this to be
marcel [Thu, 6 Mar 2008 16:59:36 +0000 (16:59 +0000)]
Add a catch-all for PCPU_MD_FIELDS. While we expect this to be
used in the kernel only (by virtue of checking for _KERNEL),
ports like lsof (part of gtop) cheat. It sets _KERNEL, but does
not set either AIM or E500. As such, PCPU_MD_FIELDS didn't get
defined and the build broke.
The catch-all is to define PCPU_MD_FIELDS with a dummy integer
when at the end of line we ended up without a definition for it.

16 years agoThe check for errors from the mount command did not work as intended
mtm [Thu, 6 Mar 2008 14:39:33 +0000 (14:39 +0000)]
The check for errors from the mount command did not work as intended
because another command (echo) is executed between the mount command
and the check.

Reported by: Sergey Baturov <sergey@toor.org.ru>
MFC after: 2 weeks

16 years agoThe rarpd(8) daemon must be instructed to start on all interfaces or a
mtm [Thu, 6 Mar 2008 14:01:10 +0000 (14:01 +0000)]
The rarpd(8) daemon must be instructed to start on all interfaces or a
specific one. Instruct it to listen on all interfaces so that enabling
it in rc.conf(5) works "out of the box."

PR: conf/121406
Submited by: trasz
MFC after: 1 week

16 years agoWhen redrawing an input line, count backspaces to get to the beginning of
rwatson [Thu, 6 Mar 2008 10:10:43 +0000 (10:10 +0000)]
When redrawing an input line, count backspaces to get to the beginning of
the input field from the current cursor location, rather than the end of
the input line, as the cursor may not be at the end of the line.
Otherwise, we may overshoot, overwriting a bit of the previous line and
failing to fully overwrite the current line.

MFC after: 3 days
PR: 119079
Submitted by: Michael Plass <mfp49_freebsd@plass-family.net>

16 years agoAdded missing BSD license text to the cmx.4 manpage.
rink [Thu, 6 Mar 2008 08:47:16 +0000 (08:47 +0000)]
Added missing BSD license text to the cmx.4 manpage.

Noticed by: brueffer

16 years agoCommit cmx(4), a driver for Omnikey CardMan 4040 PCMCIA smartcard readers.
rink [Thu, 6 Mar 2008 08:09:45 +0000 (08:09 +0000)]
Commit cmx(4), a driver for Omnikey CardMan 4040 PCMCIA smartcard readers.

PR: kern/114582
Submitted by: Daniel Roethlisberger <daniel@roe.ch>
Reviewed by: imp, myself
Tested by: johans, myself
MFC after: 2 weeks

16 years agoThe breakage from increased warns has been fixed, back out my back out
imp [Thu, 6 Mar 2008 04:09:06 +0000 (04:09 +0000)]
The breakage from increased warns has been fixed, back out my back out

16 years agoFix a bug when calculating remnant size.
davidxu [Thu, 6 Mar 2008 03:24:03 +0000 (03:24 +0000)]
Fix a bug when calculating remnant size.

16 years agoCast time_t to long to mute tinderbox build failure.
jkim [Thu, 6 Mar 2008 02:14:45 +0000 (02:14 +0000)]
Cast time_t to long to mute tinderbox build failure.

16 years agoThis breaks the arm build, back it out until that's fixed
imp [Thu, 6 Mar 2008 02:13:52 +0000 (02:13 +0000)]
This breaks the arm build, back it out until that's fixed

16 years agoDon't report death event to debugger if it is a forced exit.
davidxu [Thu, 6 Mar 2008 02:07:18 +0000 (02:07 +0000)]
Don't report death event to debugger if it is a forced exit.

16 years agoRestore code setting new thread's scheduler parameters, I was thinking
davidxu [Thu, 6 Mar 2008 01:59:08 +0000 (01:59 +0000)]
Restore code setting new thread's scheduler parameters, I was thinking
that there might be starvations, but because we have already locked the
thread, the cpuset settings will always be done before the new thread
does real-world work.

16 years agoNuke local jumbo allocator and switch to use of UMA backed page
yongari [Thu, 6 Mar 2008 01:47:53 +0000 (01:47 +0000)]
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame. Also remove unneeded jlist lock which
is no longer required to protect jumbo buffers.
With these changes jumbo frame performance of nfe(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure anymore.

16 years agoAdd an option to register DUN (Dial-Up Networking) service on the same
emax [Thu, 6 Mar 2008 00:37:29 +0000 (00:37 +0000)]
Add an option to register DUN (Dial-Up Networking) service on the same
RFCOMM channel if needed. There is really no good reason to not to support
this. AT-command exchange can be faked with chat script in ppp.conf.

MFC after: 1 week

16 years agoMark moused(8) WARNS=6 clean.
jkim [Thu, 6 Mar 2008 00:25:16 +0000 (00:25 +0000)]
Mark moused(8) WARNS=6 clean.

16 years agoFix compiler warnings and style(9) bugs.
jkim [Thu, 6 Mar 2008 00:24:11 +0000 (00:24 +0000)]
Fix compiler warnings and style(9) bugs.

16 years agoPrefer clock_gettime(2) over gettimeofday(2) and use CLOCK_MONOTONIC_FAST.
jkim [Thu, 6 Mar 2008 00:22:17 +0000 (00:22 +0000)]
Prefer clock_gettime(2) over gettimeofday(2) and use CLOCK_MONOTONIC_FAST.
It is only used to track elapsed time and it does not have to be precise.

16 years agoAdd an alias for glabel(8).
delphij [Wed, 5 Mar 2008 23:32:12 +0000 (23:32 +0000)]
Add an alias for glabel(8).

16 years agoMake it possible to build glabel into rescue geom(8) utility.
delphij [Wed, 5 Mar 2008 23:31:49 +0000 (23:31 +0000)]
Make it possible to build glabel into rescue geom(8) utility.

Ok'ed by: marcel
No objection: -current@

16 years agoUse calloc().
delphij [Wed, 5 Mar 2008 23:17:19 +0000 (23:17 +0000)]
Use calloc().

16 years ago- Add PHY ID for BCM5709C 1000Base-T controllers.
davidch [Wed, 5 Mar 2008 22:58:02 +0000 (22:58 +0000)]
- Add PHY ID for BCM5709C 1000Base-T controllers.

MFC after: 1 week

16 years agoIncrease default queue items allocation limit from 512 to 4096 items
mav [Wed, 5 Mar 2008 22:12:34 +0000 (22:12 +0000)]
Increase default queue items allocation limit from 512 to 4096 items
to avoid terrible unpredicted effects for netgraph operation of their
exhaustion while allocating control messages.
Add separate configurable 512 items limit for data items allocation
for DoS/overload protection.

Discussed with: julian

16 years agoFor users of FreeBSD <= 6.2 we recommend during the x.org 7.x upgrade
kris [Wed, 5 Mar 2008 20:58:15 +0000 (20:58 +0000)]
For users of FreeBSD <= 6.2 we recommend during the x.org 7.x upgrade
that they add X11BASE=${LOCALBASE} to /etc/make.conf since X11BASE was
hard-wired to the now-wrong location in old releases.

However, both X11BASE and LOCALBASE have moved out of scope of src/
into ports/ now, which causes problems for upgraded users who have old
make.conf files still containing the above setting.  X11BASE becomes
null and we instruct ssh and sshd to look for xauth in /bin/xauth
where it is unlikely to be found.

Instead, provide a copy of the default LOCALBASE?=/usr/local setting
here.

We also have to deal with the case where the user only overrides
LOCALBASE and doesn't set an explicit X11BASE (in ports it will be set
implicitly but not here), which will also move the location of xauth.

MFC after:  3 days
Reported by:  rwatson

16 years agoThe non-POSIX environment variable MAKE was superseded
yar [Wed, 5 Mar 2008 20:24:38 +0000 (20:24 +0000)]
The non-POSIX environment variable MAKE was superseded
by MAKEFLAGS ages ago, so don't mention it in comments.

Tested with: cmp(1)

16 years agoDon't forget to set MAKEFLAGS in the childs' environment
yar [Wed, 5 Mar 2008 20:11:04 +0000 (20:11 +0000)]
Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset.  This means setting MAKEFLAGS to just an empty string
in the latter case.

If not doing so, make(1) behaved inconsistently WRT MAKEFLAGS.
In particular, it would let a `-f foo' option down to sub-makes
if .MAKEFLAGS was unset.  E.g.,

env MAKEFLAGS="-f mymakefile" make

would pass `-f mymakefile' down to sub-makes via their environment
(unless mymakefile added something to .MAKEFLAGS).
But any additional options appearing would change this behaviour to
not passing `-f mymakefile' to sub-makes, as in:

env MAKEFLAGS="-f mymakefile" make -D DUMMY

or

env MAKEFLAGS="-f mymakefile -D DUMMY" make

(unless mymakefile cleared .MAKEFLAGS).

Also make(1) would leave MAKEFLAGS at its initial value if the
makefile set .MAKEFLAGS to an empty value.  I.e., it was impossible
to override MAKEFLAGS with an empty value.  (Note well that makefiles
are not to touch MAKEFLAGS directly, they alter .MAKEFLAGS instead.
So make(1) can filter out things such as -f when copying MAKEFLAGS
to .MAKEFLAGS at startup.  Direct modifications to MAKEFLAGS just go
nowhere.)

While the original intentions of the BSD make authors are somewhat
unclear here, the bug proves that NOT passing -f options down is
the settled behaviour because the opposite behaviour is totally
unreliable in the presence of any other options.  In addition, not
passing down -f's found in the environment is consistent with doing
so WRT the command line.

Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).

Submitted by: ru (main.c)
Tested with: make world

16 years agoo We don't have to keep track of the PIC, nor do we have to make sure
marcel [Wed, 5 Mar 2008 18:39:01 +0000 (18:39 +0000)]
o  We don't have to keep track of the PIC, nor do we have to make sure
   it's probed first. The PowerPC platform code deals with everything.
   As such, probe devices in order of their location in the memory map.
o  Refactor the ocpbus_alloc_resource for readability and make sure we
   set the RID in the resource as per the new convention.

16 years agoUse the new command file feature of ddb(8) to support setting ddb(4)
brooks [Wed, 5 Mar 2008 18:32:58 +0000 (18:32 +0000)]
Use the new command file feature of ddb(8) to support setting ddb(4)
scripts at boot.  This is currently disabled by default. /etc/ddb.conf
contains some potentially reasonable default scripts.

PR: conf/119995
Submitted by: Scot Hetzel <swhetzel at gmail dot com> (Earlier version)
X-MFC after: textdumps

16 years agomdoc changes to make this manpage consistent with our other section 4 manpages.
brueffer [Wed, 5 Mar 2008 18:04:21 +0000 (18:04 +0000)]
mdoc changes to make this manpage consistent with our other section 4 manpages.

16 years agoAdd the ability to read a file of commands to ddb(8) modeled after the
brooks [Wed, 5 Mar 2008 17:51:06 +0000 (17:51 +0000)]
Add the ability to read a file of commands to ddb(8) modeled after the
feature in ipfw(8).

16 years agoo Various fixes related to PCI Express:
marcel [Wed, 5 Mar 2008 16:46:38 +0000 (16:46 +0000)]
o  Various fixes related to PCI Express:
   - Even for the PCI Express host controller we need to use bus 0
     for configuration space accesses to devices directly on the
     host controller's bus.
   - Pass the maximum number of slots to pci_ocp_init() because the
     caller knows how many slots the bus has. Previously a PCI or
     PCI-X bus underneath a PCI Express host controller would not
     be enumerated properly.
o  Pull the interrupt routing logic out of pci_ocp_init() and into
   its own function. The logic is not quite right and is expected
   to be a bit more complex.
o  Fix/add support for PCI domains. The PCI domain is the unit
   number as per other PCI host controller drivers. As such, we
   can use logical bus numbers again and don't have to guarantee
   globally unique bus numbers. Remove pci_ocp_busnr. Return the
   highest bus number ito the caller of pci_ocp_init() now that
   we don't have a global variable anymore.
o  BAR programming fixes:
   - Non-type0 headers have at most 1 BAR, not 0.
   - First write ~0 to the BAR in question and then read back its
     size.

Obtained from: Juniper Networks (mostly)

16 years agoInitialize mnt_stat.f_iosize before autostarting UFS1 extattrs.
kib [Wed, 5 Mar 2008 16:34:03 +0000 (16:34 +0000)]
Initialize mnt_stat.f_iosize before autostarting UFS1 extattrs.
It is normally initialized by ffs_statfs() after ffs_mount finished.

The extattr autostart code calls the ufs_lookup(), that uses value above
to iterate over the directory blocks, see bmask initialization in the
ufs_lookup() and ufsdirhash. Having the filesystem with root directory
spanning more then one block would result in reading a random kernel
memory.

PR: kern/120781
Test case provided by: rwatson
MFC after: 1 week

16 years agoOops, I accidently concatenated uslcom.[c4] multiple times before the
rink [Wed, 5 Mar 2008 14:18:29 +0000 (14:18 +0000)]
Oops, I accidently concatenated uslcom.[c4] multiple times before the
commit :-/ Quickly fix before things get broken...

Pointyhat to: me

16 years agoImport uslcom(4) from OpenBSD - this is a driver for Silicon Laboratories
rink [Wed, 5 Mar 2008 14:13:30 +0000 (14:13 +0000)]
Import uslcom(4) from OpenBSD - this is a driver for Silicon Laboratories
CP2101/CP2102 based USB serial adapters.

Reviewed by: imp, emaste
Obtained from: OpenBSD
MFC after: 2 weeks

16 years agoAdd info about few missing GEOM classes that use geom(8).
pjd [Wed, 5 Mar 2008 11:51:13 +0000 (11:51 +0000)]
Add info about few missing GEOM classes that use geom(8).

16 years agoChange float_t and double_t to long double on i386. All floating point
bde [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.
bde [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
bde [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
rodrigc [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
rodrigc [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
rodrigc [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 [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
kevlo [Wed, 5 Mar 2008 07:55:45 +0000 (07:55 +0000)]
Add rl(4) support

16 years agoRemove hacks which filter out MNT_ROOTFS.
rodrigc [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
davidxu [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,
davidxu [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.
davidxu [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
davidxu [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
rodrigc [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.
yongari [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 [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 [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.
simokawa [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.
yongari [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
obrien [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.
obrien [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
obrien [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
rpaulo [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.
obrien [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
alc [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.
mav [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
jhb [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
imp [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
rwatson [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
rwatson [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.
yar [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.
yar [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.
mav [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().
kib [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.
yar [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()
ru [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
imp [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
imp [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,
davidxu [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.
davidxu [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 [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.
davidxu [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 [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 [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.
piso [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.
raj [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.
raj [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.
mav [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).
raj [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.
raj [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.
raj [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.
raj [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.
raj [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.
jadawin [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
jadawin [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.
piso [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.
dds [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
davidxu [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.
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().
ru [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
davidxu [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.
kevlo [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]
jkoshy [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
yongari [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.
yongari [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.
kmacy [Mon, 3 Mar 2008 03:34:52 +0000 (03:34 +0000)]
Add KMOD target.

Discovered by: Takahashi Yoshihiro