]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoBring the behaviour of pmc_capabilities() and pmc_width() in line with
Joseph Koshy [Wed, 12 Mar 2008 15:51:32 +0000 (15:51 +0000)]
Bring the behaviour of pmc_capabilities() and pmc_width() in line with
documentation: set 'errno' and return -1 in case of an error.

Update (c) years.

16 years agoDescribe return values from pmc_ncpu() and pmc_npmc() better.
Joseph Koshy [Wed, 12 Mar 2008 15:48:59 +0000 (15:48 +0000)]
Describe return values from pmc_ncpu() and pmc_npmc() better.

16 years agoRespect RF_SHAREABLE flag in ARM nexus_setup_intr()
Rafal Jaworowski [Wed, 12 Mar 2008 15:46:25 +0000 (15:46 +0000)]
Respect RF_SHAREABLE flag in ARM nexus_setup_intr()

Reviewed by: imp
Approved by: cognet (mentor)

16 years agoRemove dead code which makes a call to mem_range_attr_set().
Andrew Gallatin [Wed, 12 Mar 2008 15:36:00 +0000 (15:36 +0000)]
Remove dead code which makes a call to mem_range_attr_set().
This fixes a bug where mxge did not declare a dependancy on
mem(4), and failed to load with options nomem.

Pointed out by: antoine

16 years agoImprove ARM bus_dmamap_load_buffer() error handling.
Rafal Jaworowski [Wed, 12 Mar 2008 15:31:37 +0000 (15:31 +0000)]
Improve ARM bus_dmamap_load_buffer() error handling.

Reviewed by: imp
Approved by: cognet (mentor)
Spotted by: Grzegorz Bernacki gjb AT semihalf DOT com

16 years agoIf the special target .MAKEFILEDEPS exists, then enable the
David E. O'Brien [Wed, 12 Mar 2008 14:51:47 +0000 (14:51 +0000)]
If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature.  Otherwise, follow traditional Pmake behavior.

16 years agoIf the special target .MAKEFILEDEPS exists, then enable the
David E. O'Brien [Wed, 12 Mar 2008 14:50:58 +0000 (14:50 +0000)]
If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature.  Otherwise, follow traditional Pmake behavior.
(hash table will be regenerated and committed follow this commit)

16 years agoUpdate to the "new" libalias API (and thus fix world breakage).
Paolo Pisati [Wed, 12 Mar 2008 14:34:34 +0000 (14:34 +0000)]
Update to the "new" libalias API (and thus fix world breakage).

16 years ago-Don't pass down the entire pkt to ProtoAliasIn, ProtoAliasOut, FragmentIn
Paolo Pisati [Wed, 12 Mar 2008 11:58:29 +0000 (11:58 +0000)]
-Don't pass down the entire pkt to ProtoAliasIn, ProtoAliasOut, FragmentIn
 and FragmentOut.
-Axe the old PacketAlias API: it has been deprecated since 5.x.

16 years ago - Remove ksethrcmdname.
Jeff Roberson [Wed, 12 Mar 2008 11:51:01 +0000 (11:51 +0000)]
 - Remove ksethrcmdname.

16 years ago - Remove kse syscall symbols and man pages.
Jeff Roberson [Wed, 12 Mar 2008 10:12:22 +0000 (10:12 +0000)]
 - Remove kse syscall symbols and man pages.

16 years agoRemove kernel support for M:N threading.
Jeff Roberson [Wed, 12 Mar 2008 10:12:01 +0000 (10:12 +0000)]
Remove kernel support for M:N threading.

While the KSE project was quite successful in bringing threading to
FreeBSD, the M:N approach taken by the kse library was never developed
to its full potential.  Backwards compatibility will be provided via
libmap.conf for dynamically linked binaries and static binaries will
be broken.

16 years ago - P_SA has been removed.
Jeff Roberson [Wed, 12 Mar 2008 10:01:34 +0000 (10:01 +0000)]
 - P_SA has been removed.

16 years ago - Don't inspect the P_SA flag. It's being removed.
Jeff Roberson [Wed, 12 Mar 2008 10:00:33 +0000 (10:00 +0000)]
 - Don't inspect the P_SA flag.  It's being removed.

16 years ago - Remove libkse and related support code in libpthread from the build.
Jeff Roberson [Wed, 12 Mar 2008 09:49:39 +0000 (09:49 +0000)]
 - Remove libkse and related support code in libpthread from the build.
   Don't remove the files yet.  Kernel support will be removed shortly.

16 years ago - Add an UPDATING entry about the removal of KSE.
Jeff Roberson [Wed, 12 Mar 2008 09:48:42 +0000 (09:48 +0000)]
 - Add an UPDATING entry about the removal of KSE.

16 years ago - Bump __FreeBSD_version for sleepq/cv_* api changes.
Jeff Roberson [Wed, 12 Mar 2008 06:33:36 +0000 (06:33 +0000)]
 - Bump __FreeBSD_version for sleepq/cv_* api changes.

16 years ago - Pass the priority argument from *sleep() into sleepq and down into
Jeff Roberson [Wed, 12 Mar 2008 06:31:06 +0000 (06:31 +0000)]
 - Pass the priority argument from *sleep() into sleepq and down into
   sched_sleep().  This removes extra thread_lock() acquisition and
   allows the scheduler to decide what to do with the static boost.
 - Change the priority arguments to cv_* to match sleepq/msleep/etc.
   where 0 means no priority change.  Catch -1 in cv_broadcastpri() and
   convert it to 0 for now.
 - Set a flag when sleeping in a way that is compatible with swapping
   since direct priority comparisons are meaningless now.
 - Add a sysctl to ule, kern.sched.static_boost, that defaults to on which
   controls the boost behavior.  Turning it off gives better performance
   in some workloads but needs more investigation.
 - While we're modifying sleepq, change signal and broadcast to both
   return with the lock held as the lock was held on enter.

Reviewed by: jhb, peter

16 years agoPortability: Eliminate the need for uudecode by incorporating
Tim Kientzle [Wed, 12 Mar 2008 05:12:23 +0000 (05:12 +0000)]
Portability: Eliminate the need for uudecode by incorporating
uudecode into the main test driver and invoking it just-in-time
within the various tests.

Also, incorporate a number of improvements to the main test support
code that have proven useful on other projects where I've used this
framework.

16 years ago - KSE may free a thread that was never actually forked. This will leave
Jeff Roberson [Wed, 12 Mar 2008 05:01:14 +0000 (05:01 +0000)]
 - KSE may free a thread that was never actually forked.  This will leave
   td_cpuset NULL.  Check for this condition before dereferencing the
   cpuset.

Reported by: david@catwhisker.org, miwi@freebsd.org
Sponsored by: Nokia

16 years agoRemove some unused fields from the private archive_read structure
Tim Kientzle [Wed, 12 Mar 2008 04:58:32 +0000 (04:58 +0000)]
Remove some unused fields from the private archive_read structure
(left over from when the unified read/write structure was copied
to form separate read and write structures) and eliminate the
pointless initialization of a couple of the unused fields.

16 years agoTighten up the semantics of acl_next() and xattr_next() when you
Tim Kientzle [Wed, 12 Mar 2008 04:47:37 +0000 (04:47 +0000)]
Tighten up the semantics of acl_next() and xattr_next() when you
hit the end of the ACL or xattr list.

Thanks to: Jeff Johnson for pointing out the obvious typo

16 years agoTypo, thanks to: Jeff Johnson.
Tim Kientzle [Wed, 12 Mar 2008 04:26:44 +0000 (04:26 +0000)]
Typo, thanks to: Jeff Johnson.
MFC after: 3 days

16 years agoAdd missing comma.
David Xu [Wed, 12 Mar 2008 02:37:31 +0000 (02:37 +0000)]
Add missing comma.

16 years agoAdd manual for function sem_timedwait().
David Xu [Wed, 12 Mar 2008 02:33:17 +0000 (02:33 +0000)]
Add manual for function sem_timedwait().

Reviewed by: ru, deischen

16 years ago- Update with a better example which shows that options specific to a
Tom McLaughlin [Wed, 12 Mar 2008 02:09:22 +0000 (02:09 +0000)]
- Update with a better example which shows that options specific to a
  file system may be passed using -o.

Approved by: remko, rodrigc

16 years agoFix apparent typo. The permitted confidence values include 95%, not 85%.
Peter Wemm [Wed, 12 Mar 2008 00:13:49 +0000 (00:13 +0000)]
Fix apparent typo.  The permitted confidence values include 95%, not 85%.

16 years agoImprove apply callback error reporting:
Alexander Motin [Tue, 11 Mar 2008 21:58:48 +0000 (21:58 +0000)]
Improve apply callback error reporting:
Before this patch callback returned result of the last finished call chain.
Now it returns last nonzero result from all call chain results in this request.

As soon as this improvement gives reliable error reporting, it is now possible
to remove dirty workaround in ng_socket, made to return ENOBUFS error statuses
of request-response operations. That workaround was responsible for returning
ENOBUFS errors to completely unrelated requests working at the same time
on socket.

16 years agoStyle(9) these files. No changes in the compiled code. (Verified by
John Baldwin [Tue, 11 Mar 2008 21:41:36 +0000 (21:41 +0000)]
Style(9) these files.  No changes in the compiled code. (Verified by
diff'ing objdump -d output).

16 years agoAdd constants for the various fields in MTRR registers.
John Baldwin [Tue, 11 Mar 2008 20:10:37 +0000 (20:10 +0000)]
Add constants for the various fields in MTRR registers.

MFC after: 1 week
Verified by: md5(1)

16 years agoIn intr_lookup(), when adding an IRQ to powerpc_intrs[], also
Marcel Moolenaar [Tue, 11 Mar 2008 19:58:52 +0000 (19:58 +0000)]
In intr_lookup(), when adding an IRQ to powerpc_intrs[], also
set a default name. If the IRQ is added as a consequence of
configurating the IRQ without there ever being a handler
assigned to it, we will not have a name. This breaks the
fragile intrcnt/intrnames logic.

16 years agoGNU ar did NOT implment option -q as a synonym of -r as the manual
Kai Wang [Tue, 11 Mar 2008 18:35:51 +0000 (18:35 +0000)]
GNU ar did NOT implment option -q as a synonym of -r as the manual
page stated, thus BSD ar(1) option -q, which was implemented based on
the GNU ar manual page, turns out to be incompatible with GNU ar -q.

This change will make BSD ar(1) -q a *REAL* GNU ar -q:

1. It will update symbol table. (same as unfixed version)
2. It will NOT compare new members spcified in the command line args
   with existing members, instead, append them directly.

Reported by:   Johannes 5 Joemann <joemann@beefree.free.de>
Reported by:   Timothy Bourke <timbob@bigpond.com>
Tested by:   Johannes 5 Joemann <joemann@beefree.free.de>
Reviewed by:   jkoshy
Approved by:   jkoshy (mentor)

16 years agoForced commit to correct previous commit message:
Xin LI [Tue, 11 Mar 2008 17:21:55 +0000 (17:21 +0000)]
Forced commit to correct previous commit message:

Do nextboot -D twice during boot.  The first time in rc.d/root which ensures that
we can remove the file as early as possible, but shut up nextboot at this moment
if the operation is failed, because /boot is not necessarily a part of /; the
newly added second run is placed in rc.d/mountlate after all filesystems were
mounted.

Discussed at: -rc@
Suggestions from: brooks, mtm
MFC after: 1 month

16 years agoDo nextboot -D twice during boot. The first time in rc.d/root which ensures that
Xin LI [Tue, 11 Mar 2008 17:21:14 +0000 (17:21 +0000)]
Do nextboot -D twice during boot.  The first time in rc.d/root which ensures that
we can remove the file as early as possible, but shut up nextboot at this moment
if the operation is failed, because /boot is not necessarily a part of /; the
newly added second run is placed in rc.d/mountlate after all filesystems were
mounted.

Discussed at: -rc@
Suggestions from: brooks, mtm
MFC after: 1 month

16 years agoroot
Xin LI [Tue, 11 Mar 2008 17:20:34 +0000 (17:20 +0000)]
root

16 years agoAdd support for the NAP, GN and PANU profiles to the sdpd(8).
Maksim Yevmenkin [Tue, 11 Mar 2008 16:51:07 +0000 (16:51 +0000)]
Add support for the NAP, GN and PANU profiles to the sdpd(8).
It should be mentioned that a somewhat similar patch was
submitted by Rako < rako29 at gmail dot com >

MFC after: 1 week

16 years agoDon't enable the workaround for the jitter bug on the 5722.
John Baldwin [Tue, 11 Mar 2008 15:05:54 +0000 (15:05 +0000)]
Don't enable the workaround for the jitter bug on the 5722.

Obtained from: Linux tg3 driver

16 years agoFix minor typo.
Joel Dahl [Tue, 11 Mar 2008 14:48:59 +0000 (14:48 +0000)]
Fix minor typo.

16 years agovr(4) should work on all archs now, remove it from here.
Christian Brueffer [Tue, 11 Mar 2008 08:28:44 +0000 (08:28 +0000)]
vr(4) should work on all archs now, remove it from here.

16 years agoUncomment vr(4), vr(4) should work on all architectures.
Pyun YongHyeon [Tue, 11 Mar 2008 05:09:03 +0000 (05:09 +0000)]
Uncomment vr(4), vr(4) should work on all architectures.

16 years agoDocument a new sysctl variable, dev.vr.%d.stats.
Pyun YongHyeon [Tue, 11 Mar 2008 05:05:55 +0000 (05:05 +0000)]
Document a new sysctl variable, dev.vr.%d.stats.
Touch Dd.

16 years agoTeach vr(4) to use bus_dma(9) and major overhauling to handle link
Pyun YongHyeon [Tue, 11 Mar 2008 04:51:22 +0000 (04:51 +0000)]
Teach vr(4) to use bus_dma(9) and major overhauling to handle link
state change and reliable error recovery.
 o Moved vr_softc structure and relevant macros to header file.
 o Use PCIR_BAR macro to get BARs.
 o Implemented suspend/resume methods.
 o Implemented automatic Tx threshold configuration which will be
   activated when it suffers from Tx underrun. Also Tx underrun
   will try to restart only Tx path and resort to previous
   full-reset(both Rx/Tx) operation if restarting Tx path have failed.
 o Removed old bit-banging MII interface. Rhine provides simple and
   efficient MII interface. While I'm here show PHY address and PHY
   register number when its read/write operation was failed.
 o Define VR_MII_TIMEOUT constant and use it in MII access routines.
 o Always honor link up/down state reported by mii layers. The link
   state information is used in vr_start() to determine whether we
   got a valid link.
 o Removed vr_setcfg() which is now handled in vr_link_task(), link
   state taskqueue handler. When mii layer reports link state changes
   the taskqueue handler reprograms MAC to reflect negotiated duplex
   settings. Flow-control changes are not handled yet and it should
   be revisited when mii layer knows the notion of flow-control.
 o Added a new sysctl interface to get statistics of an instance of
   the driver.(sysctl dev.vr.0.stats=1)
 o Chip name was renamed to reflect the official name of the chips
   described in VIA Rhine I/II/III datasheet.
REV_ID_3065_A -> REV_ID_VT6102_A
REV_ID_3065_B -> REV_ID_VT6102_B
REV_ID_3065_C -> REV_ID_VT6102_C
REV_ID_3106_J -> REV_ID_VT6105_A0
REV_ID_3106_S -> REV_ID_VT6105M_A0
   The following chip revisions were added.
#define REV_ID_VT6105_B0 0x83
#define REV_ID_VT6105_LOM 0x8A
#define REV_ID_VT6107_A0 0x8C
#define REV_ID_VT6107_A1 0x8D
#define REV_ID_VT6105M_B1 0x94
 o Always show chip revision number in device attach. This shall help
   identifying revision specific issues.
 o Check whether EEPROM reloading is complete by inspecting the state
   of VR_EECSR_LOAD bit. This bit is self-cleared after the EEPROM
   reloading. Previously vr(4) blindly spins for 200us which may/may
   not enough to complete the EEPROM reload.
 o Removed if_mtu setup. It's done in ether_ifattach().
 o Use our own callout to drive watchdog timer.
 o In vr_attach disable further interrupts after reset. For VT6102 or
   newer hardwares, diable MII state change interrupt as well because
   mii state handling is done by mii layer.
 o Add more sane register initialization for VT6102 or newer chips.
    - Have NIC report error instead of retrying forever.
    - Let hardware detect MII coding error.
    - Enable MODE10T mode.
    - Enable memory-read-multiple for VT6107.
 o PHY address for VT6105 or newer chips is located at fixed address 1.
   For older chips the PHY address is stored in VR_PHYADDR register.
   Armed with these information, there is no need to re-read
   VR_PHYADDR register in miibus handler to get PHY address. This
   saves one register access cycle for each MII access.
 o Don't reprogram VR_PHYADDR register whenever access to a register
   located at a PHY address is made. Rhine fmaily allows reprogramming
   PHY address location via VR_PHYADDR register depending on
   VR_MIISTAT_PHYOPT bit of VR_MIISTAT register. This used to lead
   numerous phantom PHYs attached to miibus during phy probe phase and
   driver used to limit allowable PHY address in mii register accessors
   for certain chip revisions. This removes one more register access
   cycle for each MII access.
 o Correctly set VLAN header length.
 o bus_dma(9) conversion.
    - Limit DMA access to be in range of 32bit address space. Hardware
      doesn't support DAC.
    - Apply descriptor ring alignment requirements(16 bytes alignment)
    - Apply Rx buffer address alignment requirements(4 bytes alignment)
    - Apply Tx buffer address alignment requirements(4 bytes alignment)
      for Rhine I chip. Rhine II or III has no Tx buffer address
      alignment restrictions, though.
    - Reduce number of allowable number of DMA segments to 8.
    - Removed the atomic(9) used in descriptor ownership managements
      as it's job of bus_dmamap_sync(9).
    With these change vr(4) should work on all platforms.
 o Rhine uses two separated 8bits command registers to control Tx/Rx
   MAC. So don't access it as a single 16bit register.
 o For non-strict alignment architectures vr(4) no longer require
   time-consuming copy operation for received frames to align IP
   header. This greatly improves Rx performance on i386/amd64
   platforms. However the alignment is still necessary for
   strict-alignment platforms(e.g. sparc64). The alignment is handled
   in new fuction vr_fixup_rx().
 o vr_rxeof() now rejects multiple-segmented(fragmented) frames as
   vr(4) is not ready to handle this situation. Datasheet said nothing
   about the reason when/why it happens.
 o In vr_newbuf() don't set VR_RXSTAT_FIRSTFRAG/VR_RXSTAT_LASTFRAG
   bits as it's set by hardware.
 o Don't pass checksum offload information to upper layer for
   fragmented frames. The hardware assisted checksum is valid only
   when the frame is non-fragmented IP frames. Also mark the checksum
   is valid for corrupted frames such that upper layers doesn't need
   to recompute the checksum with software routine.
 o Removed vr_rxeoc(). RxDMA doesn't seem to need to be idle before
   sending VR_CMD_RX_GO command. Previously it used to stop RxDMA
   first which in turn resulted in long delays in Rx error recovery.
 o Rewrote Tx completion handler.
    - Always check VR_TXSTAT_OWN bit in status word prior to
      inspecting other status bits in the status word.
    - Collision counter updates were corrected as VT3071 or newer
      ones use different bits to notify collisions.
    - Unlike other chip revisions, VT86C100A uses different bit to
      indicate Tx underrun. For VT3071 or newer ones, check both
      VR_TXSTAT_TBUFF and VR_TXSTAT_UDF bits to see whether Tx
      underrun was happend. In case of Tx underrun requeue the failed
      frame and restart stalled Tx SM. Also double Tx DMA threshold
      size on each failure to mitigate future Tx underruns.
    - Disarm watchdog timer only if we have no queued packets,
      otherwise don't touch watchdog timer.
 o Rewrote interrupt handler.
    - status word in Tx/Rx descriptors indicates more detailed error
      state required to recover from the specific error. There is no
      need to rely on interrupt status word to recover from Tx/Rx
      error except PCI bus error. Other event notifications like
      statistics counter overflows or link state events will be
      handled in main interrupt handler.
    - Don't touch VR_IMR register if we are in suspend mode. Touching
      the register may hang the hardware if we are in suspended state.
      Previously it seems that touching VR_IMR register in interrupt
      handler was to work-around panic occurred in system shutdown
      stage on SMP systems. I think that work-around would hide
      root-cause of the panic and I couldn't reproduce the panic
      with multiple attempts on my box.
 o While padding space to meet minimum frame size, zero the pad data
   in order to avoid possibly leaking sensitive data.
 o Rewrote vr_start_locked().
    - Don't try to queue packets if number of available Tx descriptors
      are short than that of required one.
 o Don't reinitialize hardware whenever media configuration is
   changed. Media/link state changes are reported from mii layer if
   this happens and vr_link_task() will perform necessary changes.
 o Don't reinitialize hardware if only PROMISC bit was changed. Just
   toggle the PROMISC bit in hardware is sufficient to reflect the
   request.
 o Rearrganed the IFCAP_POLLING/IFCAP_HWCSUM handling in vr_ioctl().
 o Generate Tx completion interrupts for every VR_TX_INTR_THRESH-th
   frames. This reduces Tx completion interrupts under heavy network
   loads.
 o Since vr(4) doesn't request Tx interrupts for every queued frames,
   reclaim any pending descriptors not handled in Tx completion
   handler before actually firing up watchdog timeouts.
 o Added vr_tx_stop()/vr_rx_stop() to wait for the end of active
   TxDMA/RxDMA cycles(draining). These routines are used in vr_stop()
   to ensure sane state of MAC before releasing allocated Tx/Rx
   buffers. vr_link_task() also takes advantage of these functions to
   get to idle state prior to restarting Tx/Rx.
 o Added vr_tx_start()/vr_rx_start() to restart Rx/Tx. By separating
   Rx operation from Tx operation vr(4) no longer need to full-reset
   the hardware in case of Tx/Rx error recovery.
 o Implemented WOL.
 o Added VT6105M specific register definitions. VT6105M has the
   following hardware capabilities.
    - Tx/Rx IP/TCP/UDP checksum offload.
    - VLAN hardware tag insertion/extraction. Due to lack of information
       for getting extracted VLAN tag in Rx path, VLAN hardware support
       was not implemented yet.
    - CAM(Content Addressable Memory) based 32 entry perfect multicast/
      VLAN filtering.
    - 8 priority queues.
 o Implemented CAM based 32 entry perfect multicast filtering for
   VT6105M. If number of multicast entry is greater than 32, vr(4)
   uses traditional hash based filtering.
 o Reflect real Tx/Rx descriptor structure. Previously vr(4) used to
   embed other driver (private) data into these structure. This type
   of embedding make it hard to work on LP64 systems.
 o Removed unused vr_mii_frame structure and MII bit-baning
   definitions.
 o Added new PCI configuration registers that controls mii operation
   and mode selection.
 o Reduced number of Tx/Rx descriptors to 128 from 256. From my
   testing, increasing number of descriptors above than 64 didn't help
   increasing performance at all. Experimentations show 128 Rx
   descriptors seems to help a lot reducing Rx FIFO overruns under
   high system loads. It seems the poor Tx performance of Rhine
   hardwares comes from the limitation of hardware. You wouldn't
   satuarte the link with vr(4) no matter how fast CPU/large number of
   descriptors are used.
 o Added vr_statistics structure to hold various counter values.

No regression was reported but one variant of Rhine III(VT6105M)
found on RouterBOARD 44 does not work yet(Reported by Milan Obuch).
I hope this would be resolved in near future.

I'd like to say big thanks to Mike Tancsa who kindly donated a Rhine
hardware to me. Without his enthusiastic testing and feedbacks
overhauling vr(4) never have been possible. Also thanks to Masayuki
Murayama who provided some good comments on the hardware's internals.
This driver is result of combined effort of many users who provided
many feedbacks so I'd like to say special thanks to them.

Hardware donated by: Mike Tancsa (mike AT sentex dot net)
Reviewed by: remko (initial version)
Tested by: Mike Tancsa(x86), JoaoBR ( joao AT matik DOT com DOT br )
Marcin Wisnicki ( mwisnicki+freebsd AT gmail DOT com )
Stefan Ehmann ( shoesoft AT gmx DOT net )
Florian Smeets ( flo AT kasimir DOT com )
Phil Oleson ( oz AT nixil DOT net )
Larry Baird ( lab AT gta DOT com )
Milan Obuch ( freebsd-current AT dino DOT sk )
remko (initial version)

16 years agovr(4) was repocopied to src/sys/dev/vr.
Pyun YongHyeon [Tue, 11 Mar 2008 03:53:53 +0000 (03:53 +0000)]
vr(4) was repocopied to src/sys/dev/vr.

16 years agoUpdate file list and Makefile after repocopying vr(4) from
Pyun YongHyeon [Tue, 11 Mar 2008 03:50:57 +0000 (03:50 +0000)]
Update file list and Makefile after repocopying vr(4) from
src/sys/pci to src/sys/dev.

16 years agoForced commit to note that vr(4) was repocopied from sys/pci
Pyun YongHyeon [Tue, 11 Mar 2008 03:44:46 +0000 (03:44 +0000)]
Forced commit to note that vr(4) was repocopied from sys/pci
and modified for its new location.

16 years agoIf a thread is cancelled, it may have already consumed a umtx_wake,
David Xu [Tue, 11 Mar 2008 03:26:47 +0000 (03:26 +0000)]
If a thread is cancelled, it may have already consumed a umtx_wake,
check waiter and semphore counter to see if we may wake up next thread.

16 years agoMove comments block 1 line up to remark on the setting
Pyun YongHyeon [Tue, 11 Mar 2008 02:39:52 +0000 (02:39 +0000)]
Move comments block 1 line up to remark on the setting
if_capabilities. This would make comments clear.

Suggested by: yar

16 years agoAdd structures to hold SDP parameters for the NAP, GN and PANU profiles.
Maksim Yevmenkin [Tue, 11 Mar 2008 00:08:40 +0000 (00:08 +0000)]
Add structures to hold SDP parameters for the NAP, GN and PANU profiles.
It should be mentioned that a somewhat similar patch was submitted by
Rako < rako29 at gmail dot com >

MFC after: 1 week

16 years agoUpdate wpi(4) with stability fixes
Andrew Thompson [Mon, 10 Mar 2008 23:16:48 +0000 (23:16 +0000)]
Update wpi(4) with stability fixes
 - remove second taskqueue
 - busdma 16k alignment workaround
 - use busdma instead of external mbuf storage on Rx
 - locking fixes
 - net80211 state change fixes
 - improve scanning reliability
 - improve radio hw switch interaction
 - consolidate callouts

Parts obtained from: benjsc, sam
Tested by: many

16 years ago - Fix the invalid priority panics people are seeing by forcing
Jeff Roberson [Mon, 10 Mar 2008 22:48:27 +0000 (22:48 +0000)]
 - Fix the invalid priority panics people are seeing by forcing
   tdq_runq_add to select the runq rather than hoping we set it properly
   when we adjusted the priority.  This involves the same number of
   branches as before so should perform identically without the extra
   fragility.

Tested by: bz
Reviewed by: bz

16 years agoProbe CPUs after the PCI hierarchy on i386, amd64, and ia64. This allows
John Baldwin [Mon, 10 Mar 2008 22:18:07 +0000 (22:18 +0000)]
Probe CPUs after the PCI hierarchy on i386, amd64, and ia64.  This allows
the cpufreq drivers to reliably use properties of PCI devices for quirks,
etc.
- For the legacy drivers, add CPU devices via an identify routine in the
  CPU driver itself rather than in the legacy driver's attach routine.
- Add CPU devices after Host-PCI bridges in the acpi bus driver.
- Change the ichss(4) driver to use pci_find_bsf() to locate the ICH and
  check its device ID rather than having a bogus PCI attachment that only
  checked for the ID in probe and always failed.  As a side effect, you
  can now kldload ichss after boot.
- Fix the ichss(4) driver to use the correct device_t for the ICH (and not
  for ichss0) when doing PCI config space operations to enable SpeedStep.

MFC after: 2 weeks
Reviewed by: njl, Andriy Gapon  avg of icyb.net.ua

16 years ago- Don't execute cpuid to fetch the features. We already have the features
John Baldwin [Mon, 10 Mar 2008 22:00:35 +0000 (22:00 +0000)]
- Don't execute cpuid to fetch the features.  We already have the features
  present in cpu_feature2.  Also, use CPUID2_EST rather than a magic
  number.
- Don't free the ACPI settings list in detach if we are going to fail the
  request.  Otherwise an attempt to kldunload est would free the array
  but the driver would keep trying to use it.

MFC after: 1 week

16 years agoChange the BTX kernel to drop all the way out to real mode to invoke BIOS
John Baldwin [Mon, 10 Mar 2008 21:43:31 +0000 (21:43 +0000)]
Change the BTX kernel to drop all the way out to real mode to invoke BIOS
routines (V86 requests from the client and hardware interrupt handlers):
- Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f
  to handle hardware interrupts by invoking the appropriate vector (0x8-0xf
  or 0x70-0x78).  This allows the 8259As to use vectors 0x20-0x2f in real
  mode as well as protected mode will ensuring that the master 8259A
  doesn't share IDT space with CPU exceptions in protected mode.
- Since we don't need to reserve space for page tables and a page directory
  anymore since dropping paging support, move the TSS and protected mode
  IDT up by 16k.  Grow the ring 1 link stack by 16k as a result.
- Repurpose the ring 1 link stack to be used as a real mode stack when
  invoking real mode routines either via a V86 request or a hardware
  interrupts.  This simplifies a few things as we avoid disturbing the
  original user stack.
- Add some more block comments to explain how the code interacts with the
  V86 structure as this wasn't immediately obvious from the prior comments
  (e.g. that we explicitly copy the seg regs for real mode out of the V86
  struct onto the stack to be popped off when going into real mode, etc.).
  Also, document some of the stack frames we create going to real mode and
  back.
- Remove all of the virtual 86 related code including having to simulate
  various instructions and BIOS calls on a trap from virtual 86 mode.
- Explicitly panic if a user client attempts to perform a V86 CALL
  request that isn't a far call.
- Bump version to 1.2.

Assuming this works ok this should fix some of the long standing issues
with USB booting as well as etherboot.

MFC after: 2 weeks
Submitted by: kib (some parts from his original real mode patch)

16 years ago- Also change the /sbin/mount_unionfs line I managed to miss just two
Tom McLaughlin [Mon, 10 Mar 2008 20:44:27 +0000 (20:44 +0000)]
- Also change the /sbin/mount_unionfs line I managed to miss just two
  lines down to '-o below'.

Approved by: remko
Noticed by: rodrigc
Pointyhat by: me

16 years agoAdd an '-a' option which is identical to specifying '-RpP' for
John Baldwin [Mon, 10 Mar 2008 19:58:41 +0000 (19:58 +0000)]
Add an '-a' option which is identical to specifying '-RpP' for
compatibility with other implementations.

MFC after: 1 month

16 years ago- unionfs -b option is deprecated in favor of '-o below' as per
Tom McLaughlin [Mon, 10 Mar 2008 19:03:55 +0000 (19:03 +0000)]
- unionfs -b option is deprecated in favor of '-o below' as per
  mount_unionfs(8).

Approved by: remko

16 years agoRemove include of opt_quota.h; as of revision 1.205 there is no longer
Ed Maste [Mon, 10 Mar 2008 18:44:07 +0000 (18:44 +0000)]
Remove include of opt_quota.h; as of revision 1.205 there is no longer
any #ifdef QUOTA conditional code.

16 years agoRemove XXX to remind me to check the free space calculation, which to my
Robert Watson [Mon, 10 Mar 2008 18:15:02 +0000 (18:15 +0000)]
Remove XXX to remind me to check the free space calculation, which to my
eyes appears right following a check.

MFC after: 3 days

16 years agoRemove unused vc_tnode field from struct smb_vc.
Robert Watson [Mon, 10 Mar 2008 14:55:34 +0000 (14:55 +0000)]
Remove unused vc_tnode field from struct smb_vc.

MFC after: 3 days

16 years agoUse .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.
Joseph Koshy [Mon, 10 Mar 2008 14:45:29 +0000 (14:45 +0000)]
Use .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.
Correct a typo [a misplaced comma].

Reviewed by: ru

16 years agoUse .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.
Joseph Koshy [Mon, 10 Mar 2008 14:44:41 +0000 (14:44 +0000)]
Use .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.

Reviewed by: ru

16 years agoHook fifolog tools up to the build.
Poul-Henning Kamp [Mon, 10 Mar 2008 12:53:41 +0000 (12:53 +0000)]
Hook fifolog tools up to the build.

To the extent make universe works, it hasn't found any fault with this.

16 years agoMFi386: revision 1.482.
Yoshihiro Takahashi [Mon, 10 Mar 2008 12:25:04 +0000 (12:25 +0000)]
MFi386: revision 1.482.

  Import uslcom(4) from OpenBSD - this is a driver for Silicon Laboratories
  CP2101/CP2102 based USB serial adapters.

16 years agoAdd reference to kldunloadf system call, which was previously not
Robert Watson [Mon, 10 Mar 2008 09:54:13 +0000 (09:54 +0000)]
Add reference to kldunloadf system call, which was previously not
mentioned in the kldunload(2) man page.

MFC after: 3 days
Spotted by: rink

16 years ago - Don't rely on a side effect of sched_prio() to set the initial ts_runq
Jeff Roberson [Mon, 10 Mar 2008 09:50:29 +0000 (09:50 +0000)]
 - Don't rely on a side effect of sched_prio() to set the initial ts_runq
   for thread0.  Set it directly in sched_setup().  This fixes traps on boot
   seen on some machines.

Reported by: phk

16 years ago - Handle kdb switch panics outside of mi_switch() to remove some instructions
Jeff Roberson [Mon, 10 Mar 2008 03:16:51 +0000 (03:16 +0000)]
 - Handle kdb switch panics outside of mi_switch() to remove some instructions
   from the common path and make the code more clear.  Whether this has any
   impact on performance may depend on optimization levels.

Sponsored by: Nokia

16 years agoReduce ULE context switch time by over 25%.
Jeff Roberson [Mon, 10 Mar 2008 03:15:19 +0000 (03:15 +0000)]
Reduce ULE context switch time by over 25%.

 - Only calculate timeshare priorities once per tick or when a thread is woken
   from sleeping.
 - Keep the ts_runq pointer valid after all priority changes.
 - Call tdq_runq_add() directly from sched_switch() without passing in via
   tdq_add().  We don't need to adjust loads or runqs anymore.
 - Sort tdq and ts_sched according to utilization to improve cache behavior.

Sponsored by: Nokia

16 years agoTiny bit of KNF to make bus_setup_intr() look like the rest of this
Warner Losh [Mon, 10 Mar 2008 01:48:25 +0000 (01:48 +0000)]
Tiny bit of KNF to make bus_setup_intr() look like the rest of this
function.

16 years ago - Add the missing '2' case to the switch table for kern.smp.topology and
Jeff Roberson [Mon, 10 Mar 2008 01:38:53 +0000 (01:38 +0000)]
 - Add the missing '2' case to the switch table for kern.smp.topology and
   assign it to create the flat 'none' topology where all cpus are scheduled
   as if they are equal and unrelated.

16 years ago - Rather than repeating the same preemption code everywhere call the scheduler
Jeff Roberson [Mon, 10 Mar 2008 01:32:48 +0000 (01:32 +0000)]
 - Rather than repeating the same preemption code everywhere call the scheduler
   specific sched_preempt() routine.

16 years ago - Add an implementation of sched_preempt() that avoids excessive IPIs.
Jeff Roberson [Mon, 10 Mar 2008 01:32:01 +0000 (01:32 +0000)]
 - Add an implementation of sched_preempt() that avoids excessive IPIs.
 - Normalize the preemption/ipi setting code by introducing sched_shouldpreempt()
   so the logical is identical and not repeated between tdq_notify() and
   sched_setpreempt().
 - In tdq_notify() don't set NEEDRESCHED as we may not actually own the thread lock
   this could have caused us to lose td_flags settings.
 - Garbage collect some tunables that are no longer relevant.

16 years ago - Add a sched_preempt() routine to be called by md code after IPI_PREEMPT is
Jeff Roberson [Mon, 10 Mar 2008 01:30:35 +0000 (01:30 +0000)]
 - Add a sched_preempt() routine to be called by md code after IPI_PREEMPT is
   delivered.
 - Add a simple implementation to 4bsd.

16 years agoImprove convergence of bpf_filter.c toward style(9).
Robert Watson [Sun, 9 Mar 2008 21:13:43 +0000 (21:13 +0000)]
Improve convergence of bpf_filter.c toward style(9).

MFC after: 3 weeks
Submitted by: csjp

16 years agoAdd the fifolog tools to FreeBSD.
Poul-Henning Kamp [Sun, 9 Mar 2008 19:14:36 +0000 (19:14 +0000)]
Add the fifolog tools to FreeBSD.

Quoth the man-page:

     Fifologs provide a compact round-robin circular storage for recording
     text and binary information to permanent storage in a bounded and pre-
     dictable fashion, time and space wise.

Not yet connected to the build, but feel free to test & review.

16 years ago- Fix some style bugs and remove another banal comment missed in
Marius Strobl [Sun, 9 Mar 2008 17:55:19 +0000 (17:55 +0000)]
- Fix some style bugs and remove another banal comment missed in
  rev. 1.46.
- Move the KASSERT on gem_add_rxbuf() to the right spot and add an
  equivalent one to gem_disable_tx().

16 years ago- Fix some style bugs.
Marius Strobl [Sun, 9 Mar 2008 17:09:15 +0000 (17:09 +0000)]
- Fix some style bugs.
- Replace hard-coded functions names missed in rev. 1.44 with __func__.

MFC after: 1 week

16 years ago- Do as the comment in pmap_bootstrap() suggests and flush all non-locked
Marius Strobl [Sun, 9 Mar 2008 15:53:34 +0000 (15:53 +0000)]
- Do as the comment in pmap_bootstrap() suggests and flush all non-locked
  TLB entries possibly left over by the firmware and also do so while
  bootstrapping APs.
- Use __FBSDID.

MFC after: 1 month

16 years agoTeach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
Robert Watson [Sun, 9 Mar 2008 13:49:09 +0000 (13:49 +0000)]
Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
its existing understanding that .tgz uncompresses to .tar.

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

16 years ago- Add myself.
Felippe de Meirelles Motta [Sun, 9 Mar 2008 13:33:44 +0000 (13:33 +0000)]
- Add myself.

Approved by: gabor (mentor)

16 years agoPadding after EOL option must be zeros according to RFC793 but
Bjoern A. Zeeb [Sun, 9 Mar 2008 13:26:50 +0000 (13:26 +0000)]
Padding after EOL option must be zeros according to RFC793 but
the NOPs used are 0x01.
While we could simply pad with EOLs (which are 0x00), rather use an
explicit 0x00 constant there to not confuse poeple with 'EOL padding'.
Put in a comment saying just that.

Problem discussed on: src-committers with andre, silby, dwhite as
follow up to the rev. 1.161 commit of tcp_var.h.
MFC after: 11 days

16 years agoEnhance realpath(1) in a number of ways:
Robert Watson [Sun, 9 Mar 2008 12:46:39 +0000 (12:46 +0000)]
Enhance realpath(1) in a number of ways:

- Allow realpath to accept multiple paths on the command line.
- Add -q to suppress warnings if some paths can't be processed, and use
  getopt(3) to process flags.
- Print the path being requested rather than a possibly partially
  processed path when a failure occurs so that you can tell which of
  several passed paths did fail.

MFC after: 1 week
PR: 112920
Submitted by: Ighighi <ighighi@gmail.com>

16 years agoMake chflags(1) more chmod(1)-like (and more feature complete):
Robert Watson [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
Robert Watson [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 Groothuis [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
Rui Paulo [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.
Alexander Motin [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
Robert Watson [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.
Alan Cox [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.
Warner Losh [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
Warner Losh [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 Moolenaar [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
Alexander Motin [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 Brodin [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 Brodin [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 Brodin [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 Brodin [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 Brodin [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.
David E. O'Brien [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
Scott Long [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
Robert Watson [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