]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoMake chflags(1) more chmod(1)-like (and more feature complete):
rwatson [Sun, 9 Mar 2008 12:10:24 +0000 (12:10 +0000)]
Make chflags(1) more chmod(1)-like (and more feature complete):

- Add -v to print file names as they are processed; -vv prints the flags
  change as well.
- Add -f to ignore failures with the same semantics as chflags(1), neither
  printing an error nor affecting the return code.
- Don't try to set the flags if they won't change.

I made minor cosmetic tweaks to the code in the patch.

MFC after: 1 week
PR: 112827
Submitted by: Ighighi <ighighi at gmail.com>

16 years agoHZ now defaults to 1000 on many architectures, so update NOTES to reflect
rwatson [Sun, 9 Mar 2008 11:29:59 +0000 (11:29 +0000)]
HZ now defaults to 1000 on many architectures, so update NOTES to reflect
that.

MFC after: 3 days
PR: 113670
Submitted by: Ighighi <ighighi at gmail.com>

16 years agoMFV: tzdata2008a
edwin [Sun, 9 Mar 2008 11:23:08 +0000 (11:23 +0000)]
MFV: tzdata2008a

Notable changes:

- Chilis DST has been extended for 3 weeks.
- No leapsecond in 2008

Approved by: grog@ (mentor)

16 years agoSome PIIX4 chipsets need to be told to generate Stop Breaks by setting
rpaulo [Sun, 9 Mar 2008 11:19:03 +0000 (11:19 +0000)]
Some PIIX4 chipsets need to be told to generate Stop Breaks by setting
the appropriate bit in the DEVACTB register.
This change allows the C2 state on those systems to work as expected.

Reviewed by: njl
Submitted by: Andriy Gapon <avg at icyb.net.ua>
MFC after: 1 week

16 years agoAddition to the previous commit. Release inproc in case of memory error.
mav [Sun, 9 Mar 2008 11:17:00 +0000 (11:17 +0000)]
Addition to the previous commit. Release inproc in case of memory error.

16 years agoWhen gzipping to a target file, only set the source file flags on the
rwatson [Sun, 9 Mar 2008 11:16:42 +0000 (11:16 +0000)]
When gzipping to a target file, only set the source file flags on the
target file after the timestamp has been set; otherwise setting the
timestamp will fail if the flags don't permit it (i.e., uchg).

MFC after: 1 week
PR: 120208
Submitted by: Ighighi <ighighi at gmail.com>

16 years agoEliminate an unnecessary test from vm_fault's delete-behind heuristic.
alc [Sun, 9 Mar 2008 06:08:58 +0000 (06:08 +0000)]
Eliminate an unnecessary test from vm_fault's delete-behind heuristic.
Specifically, since the delete-behind heuristic is never applied to a
device-backed object, there is no point in checking whether each of the
object's pages is fictitious.  (Only device-backed objects have
fictitious pages.)

16 years agoDocument all the BUS_PROBE_* values.
imp [Sun, 9 Mar 2008 05:31:31 +0000 (05:31 +0000)]
Document all the BUS_PROBE_* values.

Note to the mdoc gods: This may need some teaks.

16 years agoAny driver that relies on its parent to set the devclass has no way to
imp [Sun, 9 Mar 2008 05:10:22 +0000 (05:10 +0000)]
Any driver that relies on its parent to set the devclass has no way to
know if has siblings that need an actual probe.  Introduce a specail
return value called BUS_PROBE_NOOWILDCARD.  If the driver returns
this, the probe is only successful for devices that have had a
specific devclass set for them.

Reviewed by: current@, jhb@, grehan@

16 years agoDon't use in32() and out32() when writing to the CCSRBAR. The
marcel [Sun, 9 Mar 2008 02:29:19 +0000 (02:29 +0000)]
Don't use in32() and out32() when writing to the CCSRBAR. The
in*() and out*() primitives should not be used, other than by
ISA drivers. In this case they were used for memory-mapped I/O
and were not even used in the spirit of the primitives.

16 years agoTo avoid control data losses do not acknowledge recieving of control packet
mav [Sat, 8 Mar 2008 23:55:29 +0000 (23:55 +0000)]
To avoid control data losses do not acknowledge recieving of control packet
if netgraph reported error while delivering to destination.
Reset 'next send' counter to the last requested by peer on ack timeout
to resend all subsequest packets after lost one again without additional hints.

16 years agoBump __FreeBSD_version for F_DUP2FD command to fcntl(2)
antoine [Sat, 8 Mar 2008 22:17:14 +0000 (22:17 +0000)]
Bump __FreeBSD_version for F_DUP2FD command to fcntl(2)

Requested by: Craig Rodrigues
Approved by: rwatson (mentor)

16 years agoIntroduce a new F_DUP2FD command to fcntl(2), for compatibility with
antoine [Sat, 8 Mar 2008 22:02:21 +0000 (22:02 +0000)]
Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).

PR: 120233
Submitted by: Jukka Ukkonen
Approved by: rwaston (mentor)
MFC after: 1 month

16 years agoAdd some obsolete usr/lib32 libraries.
antoine [Sat, 8 Mar 2008 21:59:43 +0000 (21:59 +0000)]
Add some obsolete usr/lib32 libraries.

PR: 117189
Submitted by: Scot Hetzel
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoAdd some checks for amd64 target around usr/lib32 libraries, missed in
antoine [Sat, 8 Mar 2008 21:57:35 +0000 (21:57 +0000)]
Add some checks for amd64 target around usr/lib32 libraries, missed in
previous commit.

Approved by: rwatson (mentor)
X-MFC: with revision 1.13

16 years agoMerge changes from NetBSD on humanize_number.c, 1.8 -> 1.13
antoine [Sat, 8 Mar 2008 21:55:59 +0000 (21:55 +0000)]
Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13
Significant changes:
- rev. 1.11: Use PRId64 instead of a cast to long long and %lld to print
an int64_t.
- rev. 1.12: Fix a bug that humanize_number() produces "1000" where it
should be "1.0G" or "1.0M".  The bug reported by Greg Troxel.

PR: 118461
PR: 102694
Approved by: rwatson (mentor)
Obtained from: NetBSD
MFC after: 1 month

16 years ago"root" the include path so there is less duplication.
obrien [Sat, 8 Mar 2008 19:14:43 +0000 (19:14 +0000)]
"root" the include path so there is less duplication.

16 years agoFix a mistake made during the import of the driver. Previous versions of
scottl [Sat, 8 Mar 2008 18:06:48 +0000 (18:06 +0000)]
Fix a mistake made during the import of the driver.  Previous versions of
HPT drivers would sometimes test the value of a preprocessor definition but
not always make sure that the definition existed in the first place, leading
to warnings on newer compilers.  I blindly assumed the same with this driver,
and it turned out to be wrong and to enable some code that doesn't work.

16 years agoUse sbuf routines to construct core dump filenames rather than custom
rwatson [Sat, 8 Mar 2008 16:31:29 +0000 (16:31 +0000)]
Use sbuf routines to construct core dump filenames rather than custom
string buffer handling, making the code both easier to read and more
robust against string-handling bugs.

MFC after: 1 week

16 years agoUnlock the process lock when expand_name() fails, or we may leak the
rwatson [Sat, 8 Mar 2008 15:48:06 +0000 (15:48 +0000)]
Unlock the process lock when expand_name() fails, or we may leak the
process lock leading to a hang.  This bug was introduced in
kern_sig.c:1.351, when the call to expand_name() was moved earlier
bit this particular error case was not updated.

16 years agoImprove handling of the tinybsd application wrt ports. Ports that
remko [Sat, 8 Mar 2008 15:41:06 +0000 (15:41 +0000)]
Improve handling of the tinybsd application wrt ports.  Ports that
have dependencies or need to install a new user/group, are not
problematic anymore.

PR: 121367
Submitted by: Richard Arends < richard at unixguru dot nl >
MFC after: 3 days

16 years agoFix typos.
brueffer [Sat, 8 Mar 2008 12:13:00 +0000 (12:13 +0000)]
Fix typos.

PR: 121486
Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com>
MFC after: 3 days

16 years agoEnable the D-cache and I-cache when not already enabled.
marcel [Sat, 8 Mar 2008 05:36:25 +0000 (05:36 +0000)]
Enable the D-cache and I-cache when not already enabled.
It so happens that U-Boot disables the D-cache when booting
an ELF image, so this change makes sure we run with the
D-cache enabled from now on. It shows too...

While here, remove the duplicate definition of the hw.model
sysctl.

16 years ago- Add my birthday entry
lippe [Sat, 8 Mar 2008 03:54:30 +0000 (03:54 +0000)]
- Add my birthday entry

Approved by: gabor (mentor)

16 years agoInstall manpage links for RB_PREV and RB_FOREACH_REVERSE.
jasone [Fri, 7 Mar 2008 22:29:53 +0000 (22:29 +0000)]
Install manpage links for RB_PREV and RB_FOREACH_REVERSE.

16 years agoFor AIM, have cpu_idle() set MSR_POW when the powerpc_pow_enabled
marcel [Fri, 7 Mar 2008 22:27:06 +0000 (22:27 +0000)]
For AIM, have cpu_idle() set MSR_POW when the powerpc_pow_enabled
variable is set. On my Mac Mini this puts the CPU in NAP mode when
the kernel is idle and, any technical or environmental reasons
aside, avoids that I have to listen to the fan all day :-)

16 years agoAdd support for the BUS_CONFIG_INTR() method to the platform and to
marcel [Fri, 7 Mar 2008 22:08:43 +0000 (22:08 +0000)]
Add support for the BUS_CONFIG_INTR() method to the platform and to
openpic(4). Make use of it in ocpbus(4). On the MPC85xxCDS, IRQ0:4
are active-low.

16 years agoSend only one incoming notification at a time to reduce queue
mav [Fri, 7 Mar 2008 21:12:56 +0000 (21:12 +0000)]
Send only one incoming notification at a time to reduce queue
trashing and improve performance.
Remove waitflag argument from ng_ksocket_incoming2(), it means nothing
as function call was queued by netgraph.
Remove node validity check, as node validity guarantied by netgraph.
Update comments.

16 years agoUpdate ddb.4 to reflect addition of /S (symbol name) printing mode for
rwatson [Fri, 7 Mar 2008 18:14:29 +0000 (18:14 +0000)]
Update ddb.4 to reflect addition of /S (symbol name) printing mode for
examine.

MFC after: 3 days
PR: 57976

16 years agoAdd a /S mode to DDB "ex" command, which interprets and prints the
rwatson [Fri, 7 Mar 2008 18:09:07 +0000 (18:09 +0000)]
Add a /S mode to DDB "ex" command, which interprets and prints the
value at the requested address as a symbol.  For example, "ex /S
aio_swake" prints the name of the function currently registered in
via aio_swake hook.

The change as committed differs slightly from the patch in the PR,
as I force the size of the retrieved value (and the automatic
address increment) to be sizeof(void *).  This seems to provide
the most useful auto-increment behavior, and defaults using the
default size (4), which is not sizeof(void *) on 64-bit platforms.

MFC after: 3 days
PR: 57976
Submitted by: Dan Strick <strick at covad.net>

16 years agoMinor spelling/grammer fixes.
rwatson [Fri, 7 Mar 2008 17:02:34 +0000 (17:02 +0000)]
Minor spelling/grammer fixes.

MFC after: 3 days

16 years agoApply le*toh() or htole*() to the variables of which we use the address
marcel [Fri, 7 Mar 2008 16:55:24 +0000 (16:55 +0000)]
Apply le*toh() or htole*() to the variables of which we use the address
as the buffer pointer in the call to axe_cmd(). This is needed to make
the code work on big-endian machines.

Ok'd: imp@

16 years agoRemove stale #include <machine/atomic.h>, which as needed by lazy
jasone [Fri, 7 Mar 2008 16:54:03 +0000 (16:54 +0000)]
Remove stale #include <machine/atomic.h>, which as needed by lazy
deallocation.

16 years agoMove IFF_NEEDSGIANT warning from if_ethersubr.c to if.c so it is displayed
rwatson [Fri, 7 Mar 2008 16:00:44 +0000 (16:00 +0000)]
Move IFF_NEEDSGIANT warning from if_ethersubr.c to if.c so it is displayed
for all network interfaces, not just ethernet-like ones.

Upgrade it to a louder WARNING and be explicit that the flag is obsolete.
Support for IFF_NEEDSGIANT will be removed in a few months (see arch@ for
details) and will not appear in 8.0.

Upgrade if_watchdog to a WARNING.

16 years agoAdd __FBSDID() tag.
rwatson [Fri, 7 Mar 2008 15:27:08 +0000 (15:27 +0000)]
Add __FBSDID() tag.

MFC after: 3 days
Pointed out by: antoine

16 years agoAdd __FBSDID() tags.
rwatson [Fri, 7 Mar 2008 15:25:56 +0000 (15:25 +0000)]
Add __FBSDID() tags.

MFC after: 3 days

16 years agoWhen killing a user process from DDB, check that the requested signal is
rwatson [Fri, 7 Mar 2008 14:26:30 +0000 (14:26 +0000)]
When killing a user process from DDB, check that the requested signal is
> 0 rather than >= 0, or we will panic when trying to deliver the signal.

MFC after: 3 days
PR: 100802
Submitted by: Valerio Daelli <valerio.daelli at gmail.com>

16 years agoCalculate the number of pages the GATT spans when reading from each page
jhb [Fri, 7 Mar 2008 13:36:38 +0000 (13:36 +0000)]
Calculate the number of pages the GATT spans when reading from each page
to flush the TLB instead of hardcoding a size of 33 pages.  Apertures of
32MB and 64MB only use a 16 page GATT and an aperture of 128MB only uses
a 32 page GATT, so without this the code could walk off the end of the
pointer and cause a page fault if the next page was unmapped.  Also, for
aperture sizes > 128MB, not all of the pages would be read.  The Linux
driver has the same bug.

MFC after: 1 week
Tested by: Frédéric PRACA  frederic.praca of freebsd-fr.org

16 years agoReserve two bytes at the end of the DDB input line in db_readline() to
rwatson [Fri, 7 Mar 2008 13:13:17 +0000 (13:13 +0000)]
Reserve two bytes at the end of the DDB input line in db_readline() to
hold the newline and nul terminator.  Otherwise, there are cases where
garbage may end up in the command history due to a lack of a nul
terminator, or input may end up without room for a newline.

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

16 years agoThis commit was generated by cvs2svn to compensate for changes in r176892,
syrinx [Fri, 7 Mar 2008 09:33:29 +0000 (09:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r176892,
which included commits to RCS files with non-trunk default branches.

16 years agoVendor patch: Prevent bsnmpd from dumping core when a module's init hook
syrinx [Fri, 7 Mar 2008 09:33:29 +0000 (09:33 +0000)]
Vendor patch: Prevent bsnmpd from dumping core when a module's init hook
returns an error.

Approved by: bz (mentor), harti

16 years agoAdd proper support for the SATA/AHCI part of IXP[67]00
sos [Fri, 7 Mar 2008 09:29:19 +0000 (09:29 +0000)]
Add proper support for the SATA/AHCI part of IXP[67]00

16 years agoTo overcome hardware checksum offload bug msk(4) used to compute
yongari [Fri, 7 Mar 2008 04:55:58 +0000 (04:55 +0000)]
To overcome hardware checksum offload bug msk(4) used to compute
TCP/UDP checksum in driver for short frames. For frames that requires
hardware VLAN tag insertion, the checksum offload trick does not
work due to changes of checksum offset in mbuf after the VLAN tag.

Disable hardware checksum offload for VLAN interface to fix the bug.

Reported by: Christopher Cowart < ccowart AT rescomp DOT berkeley DOT edu >
Tested by: Christopher Cowart < ccowart AT rescomp DOT berkeley DOT edu >
MFC after: 5 days

16 years agoUse intmax_t instead of long when casting time_t.
jkim [Fri, 7 Mar 2008 00:01:24 +0000 (00:01 +0000)]
Use intmax_t instead of long when casting time_t.

Suggested by: mlaier
Tested with: make universe

16 years agoMerge revisions 1.10 and 1.11 from DragonFly:
delphij [Fri, 7 Mar 2008 00:01:19 +0000 (00:01 +0000)]
Merge revisions 1.10 and 1.11 from DragonFly:

 - Use real getopt() handling instead of the hand-rolled and
   IOCCC-worthy "Micro getopt()" macros, plus clean up to the
   option handling code:
    * Sort the options in the switch statement;
    * Plug piddling memory leaks when processing repeated options
      by freeing strings before allocating them for a second time;
    * Die with a fatal error if the requested report file cannot
      be opened for appending;
    * Don't call init() before usage() (to prevent the usage
      message being mangled by changes to the terminal settings;)
 - Clean up the usage message, both in usage() and in the main
   program comment, both stylistically (sort and combine options)
   and for accuracy (following the manual page, make note of the -s
   and -S flags, and use the term 'send' instead of 'say' to reduce
   confusion (SAY is the name of a command for output to the user,
   not the connection.))

Obtained from: DragonFly

16 years agoChange auditon(2) so that if somebody supplies an invalid command, it
csjp [Thu, 6 Mar 2008 22:57:03 +0000 (22:57 +0000)]
Change auditon(2) so that if somebody supplies an invalid command, it
returns EINVAL. Right now we return 0 or success for invalid commands,
which could be quite problematic in certain conditions.

MFC after: 1 week
Discussed with: rwatson

16 years agoMFi386:
cognet [Thu, 6 Mar 2008 22:27:35 +0000 (22:27 +0000)]
MFi386:
revision 1.6
date: 2004/08/21 18:50:34;  author: alc;  state: Exp;  lines: +3 -1
Properly free the temporary sf_buf in uiomove_fromphys() if a copyin or
copyout fails.

Obtained from: DragonFlyBSD

Spotted out by: Mark Tinguely
MFC After: 3 days

16 years agoRemove unused pv_list_count from the vm_page, and pm_count from the struct
cognet [Thu, 6 Mar 2008 21:59:47 +0000 (21:59 +0000)]
Remove unused pv_list_count from the vm_page, and pm_count from the struct
pmap.

Submitted by: Mark Tinguely

16 years agoMFP4:
piso [Thu, 6 Mar 2008 21:50:41 +0000 (21:50 +0000)]
MFP4:
restrict the utilization of direct pointers to the content of
ip packet. These modifications are functionally nop()s thus
can be merged with no side effects.

16 years agoStyle tweak to the 5722 chipid to match the rest of this file.
jhb [Thu, 6 Mar 2008 21:48:34 +0000 (21:48 +0000)]
Style tweak to the 5722 chipid to match the rest of this file.

16 years agoIn the PROBE_KEYBOARD case, always enable multiple consoles and set the
jhb [Thu, 6 Mar 2008 21:43:56 +0000 (21:43 +0000)]
In the PROBE_KEYBOARD case, always enable multiple consoles and set the
serial console as the primary console if the keyboard probe fails.

MFC after: 1 week

16 years agoFlesh out support for the BCM5722 by recognizing the phy on the 5722 and
jhb [Thu, 6 Mar 2008 21:42:48 +0000 (21:42 +0000)]
Flesh out support for the BCM5722 by recognizing the phy on the 5722 and
the specific ASIC revision.

MFC after: 1 week
Obtained from: OpenBSD (mii/phy bits)

16 years ago - Add a missing unlock to cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID)
jeff [Thu, 6 Mar 2008 20:11:24 +0000 (20:11 +0000)]
 - Add a missing unlock to cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID)

Found by: gallatin

16 years agoImprove EtherIP interaction with the bridge
thompsa [Thu, 6 Mar 2008 19:02:37 +0000 (19:02 +0000)]
Improve EtherIP interaction with the bridge
 - Set M_BCAST|M_MCAST for incoming frames
 - Send the frame to a local interface if the bridge returns the mbuf

Submitted by: Eugene Grosbein
Tested by: Boris Kochergin

16 years agoMove the PCPU_MD_FIELDS last in struct pcpu. While this header is
marcel [Thu, 6 Mar 2008 17:24:28 +0000 (17:24 +0000)]
Move the PCPU_MD_FIELDS last in struct pcpu. While this header is
private to the kernel, some ports define _KERNEL and include this
header. While arguably this is wrong, it's also reality. By having
the MD fields last, architectures that have CPU-specific variations
of PCPU_MD_FIELDS will at least have the MI fields at a constant
offset.  Of course, having all MI fields first helps kernel debugging
as well, so this is not a change without some benefits to us.

This change does not result in an ABI breakage, because this header
is not part of the ABI. Recompilation of lsof is required though :-)

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.