]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoEnable shared locks for path name lookups on supported filesystems (NFS
John Baldwin [Wed, 1 Oct 2008 19:25:37 +0000 (19:25 +0000)]
Enable shared locks for path name lookups on supported filesystems (NFS
client, UFS, and ZFS) by default.

15 years agoRemove the LOOKUP_SHARED kernel option. Instead, make vfs.lookup_shared
John Baldwin [Wed, 1 Oct 2008 19:24:16 +0000 (19:24 +0000)]
Remove the LOOKUP_SHARED kernel option.  Instead, make vfs.lookup_shared
a loader tunable (it was already a sysctl).

15 years agoWait until after dropping the receive socket buffer lock to allocate space
John Baldwin [Wed, 1 Oct 2008 19:14:05 +0000 (19:14 +0000)]
Wait until after dropping the receive socket buffer lock to allocate space
to store the socket address stored in the first mbuf in a packet chain.
This reduces contention on the lock and CPU system time in certain UDP
workloads.

Tested by: ps
Reviewed by: rwatson
MFC after: 1 week

15 years agoRemove compat support for vaps_<ifn> and vap_create_<ifn> variables as
Brooks Davis [Wed, 1 Oct 2008 18:46:46 +0000 (18:46 +0000)]
Remove compat support for vaps_<ifn> and vap_create_<ifn> variables as
promised in r178527.  These variables were never in a release version.

Reminded by: sam

15 years agoRemove function prototypes of nonexistent TTY functions.
Ed Schouten [Wed, 1 Oct 2008 17:41:41 +0000 (17:41 +0000)]
Remove function prototypes of nonexistent TTY functions.

It turns out I overlooked some function prototypes that were actually
TTY related, but were stored in <sys/conf.h> to implement the D_TTY
flag. Remove these prototypes now that they don't exist anymore.

15 years agoUpdate to Myri10GE firmware version 1.4.33 from 1.4.29. Relevant changes include:
Andrew Gallatin [Wed, 1 Oct 2008 16:23:35 +0000 (16:23 +0000)]
Update to Myri10GE firmware version 1.4.33 from 1.4.29.  Relevant changes include:

- Support for Myricom 10G-PCIE-8B NICs

- multi-slice firmware: fix a bug when the presence of 32-bit or
 64-bit DMA addresses for interrupt queues and data is not uniform across
 slices.

- Improves automatic selection between ethp_z8e/eth_z8e

Sponsored by: Myricom Inc.

15 years ago- Make gvinum header on-disk structure consistent on all platforms by storing
Ulf Lilleengen [Wed, 1 Oct 2008 14:50:36 +0000 (14:50 +0000)]
- Make gvinum header on-disk structure consistent on all platforms by storing
  the gvinum header in fields of fixed size and in a big endian byte order
  rather than the size and byte order of the actual platform.

Note that the change is backwards compatible with the old gvinum configuration
format, but will save the configuration in the new format when the 'saveconfig'
command is executed.

Submitted by: Rick C. Petty <rick-freebsd -at- kiwi-computer.com>

15 years agoVarious cleanups for soreceive_dgram():
Robert Watson [Wed, 1 Oct 2008 13:26:52 +0000 (13:26 +0000)]
Various cleanups for soreceive_dgram():

- Update or remove comments that were left over from the original
  soreceive_generic() implementation.  Quite a few were misleading in the
  context of the new code.
- Since soreceive_dgram() has a simpler structure, replace several gotos
  with a while loop making the invariants more clear.
- In the blocking while loop, don't try to handle cases incompatible with
  the loop invariant (since m is always NULL, don't check for and handle
  non-NULL).
- Don't drop and re-acquire the socket buffer lock unnecessarily after
  sbwait() returns, which may help reduce lock contention (etc).
- Assume PR_ATOMIC since we assert it at the top of the function.

MFC after: 3 days

15 years agoRemove critical_enter() and critical_exit(): pmap_growkernel is called
Warner Losh [Wed, 1 Oct 2008 05:47:17 +0000 (05:47 +0000)]
Remove critical_enter() and critical_exit(): pmap_growkernel is called
with kernel_map->system_mtx held so these aren't needed.  Add an
assertion to make sure this is the case.

Also, fix a minor style(9) nit.

Reviewed by: alc@

15 years agoAdd device ids for MCP77/79 and set appropriate support flags.
Pyun YongHyeon [Wed, 1 Oct 2008 00:17:54 +0000 (00:17 +0000)]
Add device ids for MCP77/79 and set appropriate support flags.

Obtained from:  OpenBSD
PR: kern/127529

15 years agoupdate callers of vm_fault_hold_user_pages
Kip Macy [Tue, 30 Sep 2008 23:45:22 +0000 (23:45 +0000)]
update callers of vm_fault_hold_user_pages

MFC after: 1 week

15 years agoRefactor vm_fault_hold_user_pages:
Kip Macy [Tue, 30 Sep 2008 23:44:44 +0000 (23:44 +0000)]
Refactor vm_fault_hold_user_pages:
- simplify page hold logic
- allow pages for processes other than that of curthread to
  have pages held
- normalize the interface to more closely resemble the functions in
  sys/vm

MFC after: 1 week

15 years agoMake sure that optical PHYs work ...
Kip Macy [Tue, 30 Sep 2008 21:21:52 +0000 (21:21 +0000)]
Make sure that optical PHYs work ...

Submitted by: Chelsio Inc.
MFC after: 1 day

15 years agocosmetic changes and style fixes
Marius Strobl [Tue, 30 Sep 2008 20:53:15 +0000 (20:53 +0000)]
cosmetic changes and style fixes

15 years agoUse bus_get_dma_tag() so fatm(4) works on platforms requiring it.
Marius Strobl [Tue, 30 Sep 2008 18:52:43 +0000 (18:52 +0000)]
Use bus_get_dma_tag() so fatm(4) works on platforms requiring it.

Reported and tested by: Sean Thomas Caron
MFC after: 3 days

15 years agoUpdate the function name in several assertions in soreceive_dgram().
John Baldwin [Tue, 30 Sep 2008 18:44:26 +0000 (18:44 +0000)]
Update the function name in several assertions in soreceive_dgram().

Approved by: rwatson
MFC after: 3 days

15 years agoImprove the `pkill -t' handling, which I changed in my previous commit.
Ed Schouten [Tue, 30 Sep 2008 17:30:39 +0000 (17:30 +0000)]
Improve the `pkill -t' handling, which I changed in my previous commit.

In my previous commit I disabled pkill(1)'s automatic prepending of the
"tty" string when `pkill -t' was being used. Re-enable it and stat()
both possible device names when called.

Requested by: jhb, rwatson (MFC)
MFC after: 1 month

15 years agoMake example commands working.
Gleb Smirnoff [Tue, 30 Sep 2008 14:24:03 +0000 (14:24 +0000)]
Make example commands working.

Reviewed by: benjsc

15 years ago Do not mangle if_oerrors of the underlying interface. This counter
Gleb Smirnoff [Tue, 30 Sep 2008 14:18:38 +0000 (14:18 +0000)]
  Do not mangle if_oerrors of the underlying interface. This counter
belongs solely to the driver.
  We don't lose any statistics with this change, because in a error
case the drop counter on the interface output queue is always incremented.

Reviewed by: thompsa

15 years ago- A call to close(2) might overwrite errno and thus give a wrong error message
Ulf Lilleengen [Tue, 30 Sep 2008 11:46:14 +0000 (11:46 +0000)]
- A call to close(2) might overwrite errno and thus give a wrong error message
  on g_providername failure.

Suggested by: pjd
Approved by: pjd (mentor)

15 years agoAdd unistd.h to the getosreldate(3) manpage.
Konstantin Belousov [Tue, 30 Sep 2008 11:25:55 +0000 (11:25 +0000)]
Add unistd.h to the getosreldate(3) manpage.
Update referenced example to include unistd.h per manpage.
Update example to be more style(9)-ish, silence warnings and add
FreeBSD id to the source file.

15 years agoRemove empty directories recreated by the SVN conversion.
Edwin Groothuis [Tue, 30 Sep 2008 11:01:53 +0000 (11:01 +0000)]
Remove empty directories recreated by the SVN conversion.

15 years agoSave extended address register prior to switching to 1000BASE-X
Pyun YongHyeon [Tue, 30 Sep 2008 08:18:38 +0000 (08:18 +0000)]
Save extended address register prior to switching to 1000BASE-X
only mode and restore original value of extended address register
instead of overwriting it with page 1. There are still instance
information passing issue(e.g configured media type: fiber or
copper) from driver to PHY layer but this change make the selected
PHY work with 88E1112 PHY.

Reported by: Krzysztof Jedruczyk < beaker <at> hot dot pl >
Tested by: Krzysztof Jedruczyk < beaker <at> hot dot pl >

15 years agoAdd Vitesse VSC8211 PHY which is found on Planex GU-1000T.
Pyun YongHyeon [Tue, 30 Sep 2008 07:30:05 +0000 (07:30 +0000)]
Add Vitesse VSC8211 PHY which is found on Planex GU-1000T.

HW donated by: nork

15 years agoExplicitly mark IFM_HDX for half-duplex media.
Pyun YongHyeon [Tue, 30 Sep 2008 07:24:20 +0000 (07:24 +0000)]
Explicitly mark IFM_HDX for half-duplex media.

15 years agoReport current link state while auto-negotiation is in progress.
Pyun YongHyeon [Tue, 30 Sep 2008 07:22:02 +0000 (07:22 +0000)]
Report current link state while auto-negotiation is in progress.

15 years agoUse mii_anegticks instead of hardcoded MII_ANEGTICKS.
Pyun YongHyeon [Tue, 30 Sep 2008 07:20:26 +0000 (07:20 +0000)]
Use mii_anegticks instead of hardcoded MII_ANEGTICKS.

15 years agoAnnounce link loss right after it happens.
Pyun YongHyeon [Tue, 30 Sep 2008 07:19:01 +0000 (07:19 +0000)]
Announce link loss right after it happens.

15 years ago- Improve error message given on g_providername call failure.
Ulf Lilleengen [Tue, 30 Sep 2008 07:18:49 +0000 (07:18 +0000)]
- Improve error message given on g_providername call failure.
- While there, make error messages consistent with the rest.

Approved by: kib (mentor)

15 years agoIf mbuf is not writable get a writable copy before invoking
Pyun YongHyeon [Tue, 30 Sep 2008 04:52:30 +0000 (04:52 +0000)]
If mbuf is not writable get a writable copy before invoking
m_pullup(9).

Tested by: Garrett Cooper < yanefbsd <at> gmail dot com >

15 years agoAlways pullup mbuf prior to accessing TCP header.
Pyun YongHyeon [Tue, 30 Sep 2008 04:47:49 +0000 (04:47 +0000)]
Always pullup mbuf prior to accessing TCP header.
This should fix occasional Tx checksum corruption issue.

Reported by: Garrett Cooper < yanefbsd <at> gmail dot com >
Tested by: Garrett Cooper < yanefbsd <at> gmail dot com >

15 years agoVerify high-res birthtime support on FreeBSD.
Tim Kientzle [Tue, 30 Sep 2008 04:13:21 +0000 (04:13 +0000)]
Verify high-res birthtime support on FreeBSD.

MFC after: 30 days

15 years agoMfP4: restore birth time data to disk + more thorough tests for
Tim Kientzle [Tue, 30 Sep 2008 04:02:36 +0000 (04:02 +0000)]
MfP4: restore birth time data to disk + more thorough tests for
time restore to disk.

MFC after: 30 days

15 years agoMfP4: Store/read birthtime data in pax format.
Tim Kientzle [Tue, 30 Sep 2008 03:57:07 +0000 (03:57 +0000)]
MfP4: Store/read birthtime data in pax format.

Submitted by: Pedro Giffuni
MFC after: 30 days

15 years agoMfP4: Support for storing birthtime in archive_entry objects.
Tim Kientzle [Tue, 30 Sep 2008 03:53:03 +0000 (03:53 +0000)]
MfP4: Support for storing birthtime in archive_entry objects.

Submitted by: Pedro Giffuni
MFC after: 30 days

15 years agoImprove support for multiple block read/write. This code is currently
Warner Losh [Tue, 30 Sep 2008 02:34:45 +0000 (02:34 +0000)]
Improve support for multiple block read/write.  This code is currently
disabled by default because there's problems with it on AT91RM9200,
currently the only host controller in the tree.  I've not had time to
track those problems to ground.  I'm committing because this is
important for other host controllers that are in the pipeline.

Submitted by: mav@

15 years agoProperly implement read only. Also, the caps implementation is wrong
Warner Losh [Tue, 30 Sep 2008 02:32:41 +0000 (02:32 +0000)]
Properly implement read only.  Also, the caps implementation is wrong
here, so I'm backing it out.

15 years agovm_fault_hold_user_pages will not return if an address in the range passed in is...
Kip Macy [Mon, 29 Sep 2008 22:13:29 +0000 (22:13 +0000)]
vm_fault_hold_user_pages will not return if an address in the range passed in is mapped RO
but an RW mapping exists for the underlying page. This change fixes the bug by using the
page / NULL returned from pmap_extract_and_hold to determine whether or not vm_fault needs
to be called.

The bug was pointed out by alc.

MFC after: 3 days

15 years agoMove the code for doing out-of-memory grass from vm_pageout_scan()
Konstantin Belousov [Mon, 29 Sep 2008 19:45:12 +0000 (19:45 +0000)]
Move the code for doing out-of-memory grass from vm_pageout_scan()
into the separate function vm_pageout_oom(). Supply a parameter for
vm_pageout_oom() describing a reason for the call.

Call vm_pageout_oom() from the swp_pager_meta_build() when swap zone
is exhausted.

Reviewed by: alc
Tested by: pho, jhb
MFC after: 2 weeks

15 years agoMake the media size return the block rather than the bytes on the device.
Warner Losh [Mon, 29 Sep 2008 18:55:45 +0000 (18:55 +0000)]
Make the media size return the block rather than the bytes on the device.

15 years agoExplicitly set data to NULL rather than relying mmc_wait_for_cmd() to
Warner Losh [Mon, 29 Sep 2008 18:33:08 +0000 (18:33 +0000)]
Explicitly set data to NULL rather than relying mmc_wait_for_cmd() to
do it for us.  There may be commands we have to wait for that need to
set data.

Submitted by: mav@

15 years agoMinor style fixes from mav@ (with similar problems fixed where I noticed
Warner Losh [Mon, 29 Sep 2008 18:17:23 +0000 (18:17 +0000)]
Minor style fixes from mav@ (with similar problems fixed where I noticed
them):
#define<tab>
zero memory when we allocate it
Put device name in error message.

Submitted by: mav@

15 years agoConform to style(9) for return (foo); The files were a mix before.
Warner Losh [Mon, 29 Sep 2008 18:05:26 +0000 (18:05 +0000)]
Conform to style(9) for return (foo);  The files were a mix before.

Submitted by: mav@

15 years agoDistinguish between cmd/parameters used for clone operations and
Sam Leffler [Mon, 29 Sep 2008 16:27:32 +0000 (16:27 +0000)]
Distinguish between cmd/parameters used for clone operations and
all others.  Use this to disambiguate cmd line arguments that can
be either clone params or regular parameters so, in particular,
"bssid" again works as a regular parameter.

While here leverage the above to improve the logic for flushing
clone operations on the first !clone cmd line parameter.

Reviewed by: jhay

15 years agoSince in some cases (when found obsolete) 'make' can be builded earlier
Andrey A. Chernov [Mon, 29 Sep 2008 16:13:28 +0000 (16:13 +0000)]
Since in some cases (when found obsolete) 'make' can be builded earlier
at 'upgrade_checks' target, put arc4random_uniform() into
__FreeBSD_version ifdef.

15 years agoSupport for CPU sets is going to appear in 7.1 before 8.0.
John Baldwin [Mon, 29 Sep 2008 15:44:48 +0000 (15:44 +0000)]
Support for CPU sets is going to appear in 7.1 before 8.0.

MFC after: 3 days

15 years agoExpand comments relating various detach/free/drop inpcb routines.
Robert Watson [Mon, 29 Sep 2008 13:50:17 +0000 (13:50 +0000)]
Expand comments relating various detach/free/drop inpcb routines.

MFC after: 3 days

15 years agoFix typo in comment.
Robert Watson [Mon, 29 Sep 2008 13:48:48 +0000 (13:48 +0000)]
Fix typo in comment.

MFC after: 3 days

15 years agoOur groff doesn't understand $Mdocdate$, so replace them with bare dates.
Dag-Erling Smørgrav [Mon, 29 Sep 2008 10:53:05 +0000 (10:53 +0000)]
Our groff doesn't understand $Mdocdate$, so replace them with bare dates.

MFC after: 3 days

15 years agoo Add missed dot.
Maxim Konovalov [Mon, 29 Sep 2008 05:31:27 +0000 (05:31 +0000)]
o Add missed dot.

15 years agoReturn G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM
Marcel Moolenaar [Mon, 29 Sep 2008 02:48:22 +0000 (02:48 +0000)]
Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM
if the probe succeeds. This guarantees that the BSD scheme
wins over the MBR scheme when MBR gets to probe first. Build-
or link-time conditions can cause schemes to end up in the
linker set in a different order. Normally BSD is before MBR
in the linker set and as such get to probe first. But typically
when the kernel gets rebuild or relinked, this can change.

15 years agoInsert the null scheme at the head. This does not change any
Marcel Moolenaar [Mon, 29 Sep 2008 02:39:02 +0000 (02:39 +0000)]
Insert the null scheme at the head. This does not change any
functionality, but creates an invariant: the first element
on the list is always the null scheme.

15 years agoConvert all C++ comments to C style. There's lots of folks that don't
Warner Losh [Mon, 29 Sep 2008 01:32:21 +0000 (01:32 +0000)]
Convert all C++ comments to C style.  There's lots of folks that don't
like them and they don't add enough to be worth standing out.

15 years agoThe parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were
Warner Losh [Mon, 29 Sep 2008 01:28:30 +0000 (01:28 +0000)]
The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were
the device in question, rather than the bus doing the requesting.  Fix
it so that it is the bus.

Submitted by: mav@

15 years agoImplement MMCBR_IVAR_CAPS for AT91 MCI device.
Warner Losh [Sun, 28 Sep 2008 23:37:56 +0000 (23:37 +0000)]
Implement MMCBR_IVAR_CAPS for AT91 MCI device.

Submitted by: mav@ (well, not this one, but the base impl was)

15 years agoAdd "caps" word to host bridge.
Warner Losh [Sun, 28 Sep 2008 23:37:06 +0000 (23:37 +0000)]
Add "caps" word to host bridge.

15 years agoImplement power down, and power down the bus on detach.
Warner Losh [Sun, 28 Sep 2008 23:24:52 +0000 (23:24 +0000)]
Implement power down, and power down the bus on detach.

Submitted by: mav@

15 years agoWhen a device is read only, fail all non-read BIO requests.
Warner Losh [Sun, 28 Sep 2008 22:42:29 +0000 (22:42 +0000)]
When a device is read only, fail all non-read BIO requests.

Submitted by: mav@

15 years agoPropigate read-only status of cards. Right now it is read only at
Warner Losh [Sun, 28 Sep 2008 22:40:11 +0000 (22:40 +0000)]
Propigate read-only status of cards.  Right now it is read only at
device attach time.  We may need to read this more often in the
future, but for now simplicity of implementation wins.

Submitted by: mav@

15 years agoThe OCR register defines both acceptable voltage bits, as well as bits
Warner Losh [Sun, 28 Sep 2008 22:27:29 +0000 (22:27 +0000)]
The OCR register defines both acceptable voltage bits, as well as bits
for other things.  Mask out the voltage only bits when returning the
Vdd mask for voltage computation.

Submitted by: mav@

15 years agoOther busses on the system use the official capitalization for the
Warner Losh [Sun, 28 Sep 2008 22:23:06 +0000 (22:23 +0000)]
Other busses on the system use the official capitalization for the
technology.  Make mmc conform to that.

Submitted by: mav@

15 years agoFix line continuation whitespace.
Warner Losh [Sun, 28 Sep 2008 22:21:53 +0000 (22:21 +0000)]
Fix line continuation whitespace.

Submitted by: mav@

15 years agoSmall typo in the makedev(3) manpage.
Ed Schouten [Sun, 28 Sep 2008 20:26:16 +0000 (20:26 +0000)]
Small typo in the makedev(3) manpage.

devtoname(3) is a nonexistent function. We do have devtoname(9), but
that's entirely different. The correct function is devname(3).

15 years agoSeveral documentation fixups related to device minor/major numbers:
Ed Schouten [Sun, 28 Sep 2008 20:15:45 +0000 (20:15 +0000)]
Several documentation fixups related to device minor/major numbers:

- Document the minor(3), major(3) and makedev(3) macro's. They also
  apply to umajor() and uminor() in the kernel, but hopefully we'll sort
  that out one day.

- Briefly dev2unit() inside the make_dev(9) manual page, since this is
  now the preferred macro to obtain character device unit numbers inside
  the kernel.

- Remove the device_ids(9) manual page. It contains highly inaccurate
  information, such as a description of the nonexistent major().

15 years agoCatch up with svn r96606 (cvs rev 1.127 2002/05/14 20:35:29) of
Warner Losh [Sun, 28 Sep 2008 19:44:38 +0000 (19:44 +0000)]
Catch up with svn r96606 (cvs rev 1.127 2002/05/14 20:35:29) of
sys/param.h and move the MI numbers out of here.  Also move the MI
defines.  Also remove a couple defines not in use (not sure if it is
age, or OpenBSD origins for thse).  Note the current values that are
overrides that appear to be odd in some way.

More cleanup could be done here: NBPG appears to be spelled PAGE_SIZE
these days.  There's new ways to spell PGOFSET and PGSHIFT too, I
think.  These constants duplicate the MI constants and are sprinkled
into the mips code only.  Further investigation is needed.

15 years agoRevert previous commit. The prototype has been moved to unistd.h
Marcel Moolenaar [Sun, 28 Sep 2008 19:17:54 +0000 (19:17 +0000)]
Revert previous commit. The prototype has been moved to unistd.h

15 years agoRemove ipi_all() and ipi_self() as the former hasn't been used at
Marius Strobl [Sun, 28 Sep 2008 18:34:14 +0000 (18:34 +0000)]
Remove ipi_all() and ipi_self() as the former hasn't been used at
all to date and the latter also is only used in ia64 and powerpc
code which no longer serves a real purpose after bring-up and just
can be removed as well. Note that architectures like sun4u also
provide no means of implementing IPI'ing a CPU itself natively
in the first place.

Suggested by: jhb
Reviewed by: arch, grehan, jhb

15 years agoDon't automatically prepend the "tty" prefix to `pkill -t' arguments.
Ed Schouten [Sun, 28 Sep 2008 16:44:15 +0000 (16:44 +0000)]
Don't automatically prepend the "tty" prefix to `pkill -t' arguments.

Because we now enforce UNIX98-style PTY's, we now use a lot of TTY's
that don't have the traditional /dev/ttyXX naming scheme. pkill(1)'s -t
flag automatically prepended the word "tty" to each TTY that was passed
on the command line. This meant that `pkill -t pts/0' was actually
converted to /dev/ttypts/0. Disable this broken behaviour for now.

Reported by: erwin

15 years agoUnbreak support for G4s without an L3 cache. L3 cache support was introduced
Nathan Whitehorn [Sun, 28 Sep 2008 15:12:43 +0000 (15:12 +0000)]
Unbreak support for G4s without an L3 cache. L3 cache support was introduced
with, and limited to, the Motorola/Freescale 745x family.

Reported by: Marco Trillo

15 years agoAdd new PMC classes and CPU types.
Joseph Koshy [Sun, 28 Sep 2008 14:11:34 +0000 (14:11 +0000)]
Add new PMC classes and CPU types.

15 years agoUpdate a comment.
Joseph Koshy [Sun, 28 Sep 2008 14:05:12 +0000 (14:05 +0000)]
Update a comment.

15 years agoWhite space nit.
Warner Losh [Sun, 28 Sep 2008 05:36:25 +0000 (05:36 +0000)]
White space nit.

15 years agoFix comments to relate to FreeBSD's current interrupt blocking
Warner Losh [Sun, 28 Sep 2008 03:50:34 +0000 (03:50 +0000)]
Fix comments to relate to FreeBSD's current interrupt blocking
functionality, as opposed to the legacy spl means.

15 years agoFix comment about needing to call something from splnet, which doesn't
Warner Losh [Sun, 28 Sep 2008 03:48:15 +0000 (03:48 +0000)]
Fix comment about needing to call something from splnet, which doesn't
exist in freebsd.

15 years agoRemove stale comment. splhigh -> critical_enter transition happend
Warner Losh [Sun, 28 Sep 2008 03:47:24 +0000 (03:47 +0000)]
Remove stale comment.  splhigh -> critical_enter transition happend
some time ago, and no longer needs special attention.

15 years agoAdd stronger warning that spl is historical. I almost deleted this
Warner Losh [Sun, 28 Sep 2008 03:45:16 +0000 (03:45 +0000)]
Add stronger warning that spl is historical.  I almost deleted this
man page entirely, but it is still mildly useful in understanding the
few splxxx usages we still have in the tree.

15 years agoChange while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the
Warner Losh [Sun, 28 Sep 2008 03:33:01 +0000 (03:33 +0000)]
Change while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the
former more explicitly tells the compiler that you want an empty loop.
There are some lint programs that use this hint to avoid generating
warnings.

No functional change...

15 years agoAdd a driver for `Schizo' Fireplane/Safari to PCI 2.1 and `Tomatillo'
Marius Strobl [Sun, 28 Sep 2008 00:07:05 +0000 (00:07 +0000)]
Add a driver for `Schizo' Fireplane/Safari to PCI 2.1 and `Tomatillo'
JBus to PCI 2.2 bridges. In theory, this driver should also handle
`XMITS' Fireplane/Safari to PCI-X bridges but due to lack of access
to such hardware, support for these hasn't be fleshed out, yet.

15 years ago- Build jexec (1) and slstat.
Antoine Brodin [Sat, 27 Sep 2008 22:24:50 +0000 (22:24 +0000)]
- Build jexec (1) and slstat.
- style.Makefile
Noticed by: Marius (1)

15 years agoguard against adhoc_pick_channel returning a NULL channel; this can
Sam Leffler [Sat, 27 Sep 2008 21:18:40 +0000 (21:18 +0000)]
guard against adhoc_pick_channel returning a NULL channel; this can
happen after a scan cache flush (e.g. in response to ifconfig wlan bssid -)

15 years agoExport the partition name in the conftxt and confxml output.
Marcel Moolenaar [Sat, 27 Sep 2008 19:58:11 +0000 (19:58 +0000)]
Export the partition name in the conftxt and confxml output.
The conftxt output is used by libdisk, and the confxml
output is used by gpart itself (gpart show -l).

Submitted by: nyan@

15 years agoHold the root mount while we're tasting. It is possible
Marcel Moolenaar [Sat, 27 Sep 2008 19:29:52 +0000 (19:29 +0000)]
Hold the root mount while we're tasting. It is possible
that a nested partition (typically the BSD disklabel)
is not done tasting while the root file system is being
mounted. While this is rare, it's still possible.

15 years agoWhen an inpcb doesn't have a socket but the inpcb is passed to ipfw
Robert Watson [Sat, 27 Sep 2008 19:28:28 +0000 (19:28 +0000)]
When an inpcb doesn't have a socket but the inpcb is passed to ipfw
in the transmit path, such as TCPS_TIMEWAIT, fail the credential
extraction immediately rather than acquiring locks and looking up
the inpcb on the global lists in order to reach the conclusion that
the credential extraction has failed.

This is more efficient, but more importantly, it avoids lock
recursion on the inpcbinfo, which is no longer allowed with rwlocks.
This appears to have been responsible for at least two reported
panics.

MFC after: 3 days
Reported by: ganbold

15 years agoDisable use of the user credentials until there is code to set the levels
John Birrell [Sat, 27 Sep 2008 17:52:48 +0000 (17:52 +0000)]
Disable use of the user credentials until there is code to set the levels
that DTrace uses.

This fixes a bug that would have affected kernels built with MAC and all
kernels built after the mpsafetty integration.

The bug will be apparent in RELENG7 on MAC kernels.

Reported by: kan

15 years agoAlso use dev2unit() in the pseudo-driver example script.
Ed Schouten [Sat, 27 Sep 2008 16:52:57 +0000 (16:52 +0000)]
Also use dev2unit() in the pseudo-driver example script.

Because I'm planning on MFC'ing my last change to this file, make sure
we use dev2unit() here as well.

15 years agoFix the build.
Roman Kurakin [Sat, 27 Sep 2008 15:58:54 +0000 (15:58 +0000)]
Fix the build.

Noted by: ganbold@

15 years agoDifferentiate between interrupt frames, trap interrupt frames and timer
Konstantin Belousov [Sat, 27 Sep 2008 15:58:37 +0000 (15:58 +0000)]
Differentiate between interrupt frames, trap interrupt frames and timer
frame in the kgdb, to allow it to properly backtrace over the interrupt
stacks.

Noted and reviewed by: tegge
Tested by: pho
MFC after: 1 week

15 years agoFrames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler
Konstantin Belousov [Sat, 27 Sep 2008 15:54:04 +0000 (15:54 +0000)]
Frames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler
and Xlazypmap differ from the frame for Xtimerint. The Xtimerint puts
pointer to the frame between return address and frame body, while rest
of the functions listed above do not. Correct offset calculation to
allow the ddb backtrace to step over such frames.

Noted and reviewed by: tegge
Tested by: pho
MFC after: 1 week

15 years agoIf the panic thread is preempted after setting panicstr but before
Konstantin Belousov [Sat, 27 Sep 2008 15:45:54 +0000 (15:45 +0000)]
If the panic thread is preempted after setting panicstr but before
setting TDF_INPANIC then it will never be rescheduled again. Wrap
setting the panic condition with the critical section.

Noted and reviewed by: tegge
MFC after: 1 week

15 years agoExpand the DBDMA API to allow setting device-dependent control bits. While
Nathan Whitehorn [Sat, 27 Sep 2008 15:41:16 +0000 (15:41 +0000)]
Expand the DBDMA API to allow setting device-dependent control bits. While
here, clean up and document this a little.

Submitted by: Marco Trillo
MFC after: 1 week

15 years agoAllow 255 sectors/track for the BSD disklabel. The previous limit
Marcel Moolenaar [Sat, 27 Sep 2008 15:28:15 +0000 (15:28 +0000)]
Allow 255 sectors/track for the BSD disklabel. The previous limit
of 63 sectors/track is too PC BIOS specific. On pc98, where the
BSD disklabel is used as well, 255 sectors/track is not uncommon.

Submitted by: nyan@

15 years agoAdd DMA support for Apple built-in ATA controllers.
Nathan Whitehorn [Sat, 27 Sep 2008 15:13:44 +0000 (15:13 +0000)]
Add DMA support for Apple built-in ATA controllers.

Tested by: grehan, marcotrillo@gmail.com
MFC after: 1 month

15 years ago* add all keyword for table list & flush actions.
Roman Kurakin [Sat, 27 Sep 2008 15:09:00 +0000 (15:09 +0000)]
* add all keyword for table list & flush actions.
* add tables_max sysctl.
* add default_rule sysctl.

PR: 127058 (partially)

15 years agoAdd keyword all in addtion to the table number for the 'list' and the
Roman Kurakin [Sat, 27 Sep 2008 14:30:34 +0000 (14:30 +0000)]
Add keyword all in addtion to the table number for the 'list' and the
'flush' actions on tables.  Part of PR: 127058.

PR: 127058 (based on)
MFC after: 1 month

15 years agoMove uminor() and umajor() to the same place as userspace minor() and major().
Ed Schouten [Sat, 27 Sep 2008 13:19:09 +0000 (13:19 +0000)]
Move uminor() and umajor() to the same place as userspace minor() and major().

The uminor() and umajor() functions have the same use in kernel space as
the minor() and major() functions in userspace. If we ever get rid of
the minor() function in kernel space, we could decide to just expose
minor() and major() to kernel space, making uminor() and umajor()
redundant.

There are two reasons why we want to have uminor() and umajor() in
<sys/types.h>:

- Having them close together prevents them from diverting. Even though
  it's unlikely the definitions will change, it's a good habit to have
  them at the same place.

- They don't really belong in kern_conf.c. kern_conf.c has been
  liberated from dealing with device major and minor number handling.

The device_ids(9) manpage now lists the wrong #include's, because it
should only list <sys/types.h> now. I'm leaving it as it is now, because
I wonder if we should document them anyway. We're probably better off
documenting minor(3) and major(3).

15 years agoRather than shadowing global variable 'lookup' in check_uidgid(), rename
Robert Watson [Sat, 27 Sep 2008 10:14:02 +0000 (10:14 +0000)]
Rather than shadowing global variable 'lookup' in check_uidgid(), rename
it to ugid_lookupp.  This should make debugging issues with ipfw uid
rules easier.

MFC after: 3 days

15 years agoReplace all calls to minor() with dev2unit().
Ed Schouten [Sat, 27 Sep 2008 08:51:18 +0000 (08:51 +0000)]
Replace all calls to minor() with dev2unit().

After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by: kib

15 years agoStatic-ify procedures in init(8).
Xin LI [Sat, 27 Sep 2008 00:09:10 +0000 (00:09 +0000)]
Static-ify procedures in init(8).

15 years agoMove getosreldate(3) prototype from the machine generated <osreldate.h>
Peter Wemm [Fri, 26 Sep 2008 19:23:22 +0000 (19:23 +0000)]
Move getosreldate(3) prototype from the machine generated <osreldate.h>
to <unistd.h> in the BSD section.

Suggested by: kib

15 years agoMove CTASSERT from header file to source file, per implementation note now
Ed Maste [Fri, 26 Sep 2008 18:44:40 +0000 (18:44 +0000)]
Move CTASSERT from header file to source file, per implementation note now
in the CTASSERT man page.