]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoMerge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit
roberto [Fri, 22 Aug 2008 15:58:00 +0000 (15:58 +0000)]
Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head.  Next commit
will update usr.sbin/ntp to match this.

MFC after: 2 weeks

15 years agoAdd myself.
trasz [Fri, 22 Aug 2008 13:29:30 +0000 (13:29 +0000)]
Add myself.

Approved by: rwatson

15 years agoBack FreeBSD(98)'s copyright to 2003.
nyan [Fri, 22 Aug 2008 12:31:21 +0000 (12:31 +0000)]
Back FreeBSD(98)'s copyright to 2003.

15 years agoFix pts(4) error codes when slave device is closed.
ed [Fri, 22 Aug 2008 10:40:21 +0000 (10:40 +0000)]
Fix pts(4) error codes when slave device is closed.

Unlike pre-MPSAFE TTY, the pts(4) driver always returned ENXIO when a
read() or write() was performed on a pseudo-terminal master device when
the slave device was not opened. The old implementation had different
semantics:

- When the slave device had not been opened yet, read() and write() just
  blocked.
- When the slave device had been closed, a read() call would return 0
  bytes length.
- When the slave device had been closed, a write() call would return
  EIO.

Change the new implementation to return 0 and EIO as well. We don't
implement the first rule, but I suspect this is not needed, because
routines like openpty() also open the slave device node. posix_openpt()
users also do similar things.

Reported by: rink
Tested by: rink

15 years agoAdd -fno-omit-frame-pointer to CFLAGS used to compile crt1.c on amd64.
kib [Fri, 22 Aug 2008 09:23:39 +0000 (09:23 +0000)]
Add -fno-omit-frame-pointer to CFLAGS used to compile crt1.c on amd64.

For gcc' __builtin_frame_address() to work, all call frames need to save
frame pointer. In particular, this is important for the upper frame that
should terminate the chain.

No objections from: jhb
PR: amd64/126543
MFC after: 1 week

15 years agoAdd a new sysctl node 'dev.bfe.N.stats' that shows various MAC
yongari [Fri, 22 Aug 2008 06:46:55 +0000 (06:46 +0000)]
Add a new sysctl node 'dev.bfe.N.stats' that shows various MAC
counters for Rx/Tx statistics. Various counters in ifnet is also
updated with these hardware counters.

Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com
Ulrich Spoerlein uspoerlein at gmail dot com

15 years agoPrevent VSTART flooding when turning on software flow control.
ed [Fri, 22 Aug 2008 05:15:52 +0000 (05:15 +0000)]
Prevent VSTART flooding when turning on software flow control.

It turned out we transmitted VSTART after each successful read on a TTY
when software flow control was turned on. This was because of a very
evil bug where we tested the TF_HIWAT_IN flag the other way around.

Reported by: Christian Weisgerber <naddy mips inka de>

15 years agoBecause bfe(4) knows interrupt mask value there is no need to read
yongari [Fri, 22 Aug 2008 04:52:21 +0000 (04:52 +0000)]
Because bfe(4) knows interrupt mask value there is no need to read
interrupt mask register again. This saves one register access per
each interrupt.
Also don't try to process frames when driver is not running.

Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com
Ulrich Spoerlein uspoerlein at gmail dot com

15 years agoComment a couple of places where bsdcpio and gcpio 2.9 disagree.
kientzle [Fri, 22 Aug 2008 02:27:06 +0000 (02:27 +0000)]
Comment a couple of places where bsdcpio and gcpio 2.9 disagree.
The number of blocks read from ustar archives is just an implementation
difference.  The failure of bsdcpio to emit a block count to stderr
in -p mode is a real bug in bsdcpio.

15 years agoExtend the support for PCI-e memory mapped configuration space access:
jhb [Fri, 22 Aug 2008 02:14:23 +0000 (02:14 +0000)]
Extend the support for PCI-e memory mapped configuration space access:
- Rename pciereg_cfgopen() to pcie_cfgregopen() and expose it to the
  rest of the kernel.  It now also accepts parameters via function
  arguments rather than global variables.
- Add a notion of minimum and maximum bus numbers and reject requests for
  an out of range bus.
- Add more range checks on slot/func/reg/bytes parameters to the cfg reg
  read/write routines.  Don't panic on any invalid parameters, just fail
  the request (writes do nothing, reads return -1).  This matches the
  behavior of the other cfg mechanisms.
- Port the memory mapped configuration space access to amd64.  On amd64
  we simply use the direct map (via pmap_mapdev()) for the memory mapped
  window.
- During acpi_attach() just after loading the ACPI tables, check for a
  MCFG table.  If it exists, call pciereg_cfgopen() on each subtable
  (memory mapped window).  For now we only support windows for domain 0
  that start with bus 0.  This removes the need for more chipset-specific
  quirks in the MD code.
- Remove the chipset-specific quirks for the Intel 5000P/V/Z chipsets
  since these machines should all have MCFG tables via ACPI.
- Updated pci_cfgregopen() to DTRT if ACPI had invoked pcie_cfgregopen()
  earlier.

MFC after: 2 weeks

15 years agoThe newc-format verification is now a little smarter about
kientzle [Fri, 22 Aug 2008 02:09:10 +0000 (02:09 +0000)]
The newc-format verification is now a little smarter about
following the archive structure.  In particular, it no longer
crashes if you run it against GNU cpio 2.9 (although it does
still complain a lot more than it should).

15 years agoMinor cleanup of the -q test: Assert that stdout/stderr are empty for each
kientzle [Fri, 22 Aug 2008 01:35:08 +0000 (01:35 +0000)]
Minor cleanup of the -q test:  Assert that stdout/stderr are empty for each
extraction.

15 years agoDon't clean before running tests.
kientzle [Fri, 22 Aug 2008 01:31:13 +0000 (01:31 +0000)]
Don't clean before running tests.

15 years agoExplain how the test_option_q test works.
kientzle [Fri, 22 Aug 2008 01:26:55 +0000 (01:26 +0000)]
Explain how the test_option_q test works.

15 years agoTest for -q (aka --fast-read).
kientzle [Fri, 22 Aug 2008 01:22:55 +0000 (01:22 +0000)]
Test for -q (aka --fast-read).
Fix the error uncovered by this test.

15 years agoRemove bfe_link in softc and introduce two new flags to mark
yongari [Fri, 22 Aug 2008 01:06:25 +0000 (01:06 +0000)]
Remove bfe_link in softc and introduce two new flags to mark
link state and detach request.
While I'm here make sure established link is IFM_10_T or
IFM_100_TX as bfe(4) just supports 10/100Mbps media.

Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com
Ulrich Spoerlein uspoerlein at gmail dot com

15 years agoAdd the Decision Computer Inc, PCCOM 8-port serial card.
thompsa [Fri, 22 Aug 2008 00:13:17 +0000 (00:13 +0000)]
Add the Decision Computer Inc, PCCOM 8-port serial card.

PR: kern/69730
Submitted by: Darrin Smith

15 years agoAdd the VScom PCI-100L card.
thompsa [Fri, 22 Aug 2008 00:12:08 +0000 (00:12 +0000)]
Add the VScom PCI-100L card.

PR: kern/72352
Submitted by: Thomas Nystrom

15 years agoAdd the Avlab Technology PCI IO 4S-850 4 port serial card.
thompsa [Thu, 21 Aug 2008 23:22:32 +0000 (23:22 +0000)]
Add the Avlab Technology PCI IO 4S-850 4 port serial card.

PR: kern/110797
Submitted by: Trevor Roydhouse

15 years agoAdd comments on NOARGS, NODEF, and NOPROTO.
obrien [Thu, 21 Aug 2008 22:57:31 +0000 (22:57 +0000)]
Add comments on NOARGS, NODEF, and NOPROTO.

15 years agoThe results for test 2 here are short enough to just be included inline.
kientzle [Thu, 21 Aug 2008 22:28:00 +0000 (22:28 +0000)]
The results for test 2 here are short enough to just be included inline.
There's no need to go through the hassle of having a checked-in uuencoded
reference file for comparison.

15 years agoAdd support for the Alcor Card Reader (9361)
remko [Thu, 21 Aug 2008 20:37:38 +0000 (20:37 +0000)]
Add support for the Alcor Card Reader (9361)

PR: 124656
Submitted by: Vincent Francois <vincentfrancois dot pro at gmail dot com>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoAdd a "CACHING" section regarding the internal caching of kernel variables
jhb [Thu, 21 Aug 2008 19:22:13 +0000 (19:22 +0000)]
Add a "CACHING" section regarding the internal caching of kernel variables
and the ability to clear that cache.

15 years agoMerge the relevant information of man4.i386/ichwd.4 into man4/ichwd.4
rpaulo [Thu, 21 Aug 2008 17:53:13 +0000 (17:53 +0000)]
Merge the relevant information of man4.i386/ichwd.4 into man4/ichwd.4
and remove ichwd(4) man page from man4.i386.

Submitted by: gavin
Reviewed by: des, me
Approved by: des

15 years agoRemove comments and #ifdef notyet'd code relating to directly dispatching
rwatson [Thu, 21 Aug 2008 17:24:49 +0000 (17:24 +0000)]
Remove comments and #ifdef notyet'd code relating to directly dispatching
the IP multicast input code from the output path; we don't allow
reentrance of the input path from the IP output path, it must use the
netisr due to potential lock recursion.

MFC after: 3 days

15 years agoIncrease cryptotest tool initialization vector (IV) size.
raj [Thu, 21 Aug 2008 16:49:57 +0000 (16:49 +0000)]
Increase cryptotest tool initialization vector (IV) size.

This fixes potential out-of-bound accesses when testing ciphers with block size
greater than 8 bytes (e.g. AES).

Submitted by: Bartlomiej Sieka tur ! semihalf dot com
Discussed with: pjd, sam

15 years agoAdapt mxge shims to detect phys contig jumbo frames
gallatin [Thu, 21 Aug 2008 16:35:34 +0000 (16:35 +0000)]
Adapt mxge shims to detect phys contig jumbo frames
in RELENG_7

MFC after: 3 days

15 years agoProperly lock proctree_lock before locking the process while accounting.
ed [Thu, 21 Aug 2008 15:02:17 +0000 (15:02 +0000)]
Properly lock proctree_lock before locking the process while accounting.

During the import of the MPSAFE TTY layer (r181905), I changed
acct_process() to lock proctree_lock instead of SESS_LOCK, because
s_ttyp is now locked using proctree_lock. One of the things I forgot,
was to lock it before we PROC_LOCK.

Commit this patch, written by kib@. To ensure we hold proctree_lock as
short as possible, obtaining `ac_tty' has now been made the first step
of filling `acct'.

Reported by: Kevin <kevinxlinuz 163 com>
Solved by: kib

15 years agoUse the SCHEME_ knobs rather than knowing what they expand to.
obrien [Thu, 21 Aug 2008 14:12:34 +0000 (14:12 +0000)]
Use the SCHEME_ knobs rather than knowing what they expand to.

Reviewed by: des

15 years agoLockf was exiting with status 1 if the command did not exit normally.
dwmalone [Thu, 21 Aug 2008 07:36:17 +0000 (07:36 +0000)]
Lockf was exiting with status 1 if the command did not exit normally.
This is easy to confuse with the actual exit status of the program.
Instead exit with EX_SOFTWARE if the command doesn't exit normally.

MFC after: 1 month

15 years agoAdd some more tests to verify that "./foo" matches "foo" but "/foo" does not.
kientzle [Thu, 21 Aug 2008 07:04:57 +0000 (07:04 +0000)]
Add some more tests to verify that "./foo" matches "foo" but "/foo" does not.

15 years agoAlways display the unedited pathname in -t output.
kientzle [Thu, 21 Aug 2008 06:41:14 +0000 (06:41 +0000)]
Always display the unedited pathname in -t output.
I would like to provide a way to preview the effects of pathname edits,
but pattern selection has to happen against the unedited path, so it
seems that we have to show people the unedited path to help in
designing selection patterns.

15 years ago o Sort includes and add <endian.h> to support endianness.
yongari [Thu, 21 Aug 2008 04:21:53 +0000 (04:21 +0000)]
 o Sort includes and add <endian.h> to support endianness.
 o Removed unneeded header files.
 o bus_dma(9) fix:
   - created parent tag with 1GB dma address limit with no
     alignment restrictions.
   - set 4096 alignment limit for Tx/Rx descriptor rings.
   - separate Rx buffer tag from Tx buffer tag such that Tx tag
     allows up-to 16 segments while Rx buffer tag only allows
     single segment.
   - it seems the controller has no alignment restrictions on Tx/Rx
     buffers. Remove ETHER_ALIGN alignment restriction in Tx/Rx
     buffers.
   - created a spare Rx dma map which would be used to cope with
     failure of loading a dma map.
   - make sure to load full Tx/Rx descriptor size for Tx/Rx
     descriptor dma maps, previously bfe(4) used to load single
     descriptor size for each descriptor rings. I have no idea how
     it could be run without problems.
   - don't blindly cast bus_addr_t type to 32bits in bfe_dma_map().
   - created bfe_dma_free() to free allocated dma memory/tags.
   - make sure to invoke bus_dmamap_sync(9) before/after processing
     descriptor rings/buffers. Because the hardware has severe dma
     address space limitation, bounce-buffers would be always used
     on systems with more than 1GB memory during
     descriptors/buffers access.
   - added Tx descriptor ring initialization function,
     bfe_list_tx_init().
   - moved producer/consumer index initialization to
     bfe_list_tx_init() and bfe_list_rx_init() from
     bfe_chip_reset().
   - added bfe_discard_buf() which will update loaded descriptors
     without unloading/reloading the dma map to speed up error
     recovery.
   - implemented Tx side bus_dmamap_load_mbuf_sg(9). The number of
     segments allowed was chosen to be 16 which should be enough for
     non-TSO capable hardwares. Setting SOF bit of Tx descriptor is
     done in the last to avoid potential race.
   - don't give up sending frames in bfe_start() until the hardware
     lacks free descriptors.
   - added XXX comment to second kick command and possible workaround.
   - implemented Rx side bus_dmamap_load_mbuf_sg(9).
   - removed bfe_dma_map_desc() as it's not needed anymore after
     the conversion to bus_dmamap_load_mbuf_sg(9).
   - added endianness support. With this change bfe(4) should work
     on any architectures that can create bounce buffers within 1GB
     address range.
   - add missing bus_dmamap_sync() in bfe_tx_eof()/bfe_rx_eof().
 o Use PCI_BAR instead of hardcoded value to set BARs.
   Simplified register access with bus_write_4(9)/bus_read_4(9) and
   removed bfe_btag, bfe_bhandle, bfe_vhandle in softc as it's not
   used anymore.
 o Reorder device detach logic such that bfe_detach() is also used
   for handling driver attach failure case.
 o Remove unnecessary KASSERT in bfe_detach().
 o Remove bfe_rx_cnt, bfe_up, bfe_vpd_prodname, bfe_vpd_readonly in
   softc.  It's not used at all.
 o Remove BFE_RX_RING_SIZE/BFE_RX_RING_SIZE/BFE_LINK_DOWN.

Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com
Ulrich Spoerlein uspoerlein at gmail dot com

15 years agoFix boot time pmap_growkernel panic for case where vm is allocated >= 768M
kmacy [Thu, 21 Aug 2008 02:57:02 +0000 (02:57 +0000)]
Fix boot time pmap_growkernel panic for case where vm is allocated >= 768M

MFC after: 1 month

15 years agoFor reasons that I have not delved in to Xen 3.2 netback now does header splitting
kmacy [Thu, 21 Aug 2008 02:40:26 +0000 (02:40 +0000)]
For reasons that I have not delved in to Xen 3.2 netback now does header splitting
so packets > 128 bytes are now split in to multiple buffer. This fixes netfront
to handle multiple buffers per rx packet.

MFC after: 1 month

15 years agoMove man pages out of man4.i386. Most of them are applicable to amd64
rpaulo [Thu, 21 Aug 2008 00:40:55 +0000 (00:40 +0000)]
Move man pages out of man4.i386. Most of them are applicable to amd64
too, so, instead of descending to the i386 directory, we add some magic to
the parent Makefile.
These man pages refer to drivers that I'm aware that work on amd64. Most
likely there are more, but I'll deal with them later.

Approved by: brueffer, philip, takawata

15 years agoCope with the file rename by changing rc variables.
rpaulo [Thu, 21 Aug 2008 00:04:19 +0000 (00:04 +0000)]
Cope with the file rename by changing rc variables.

15 years agoFix a small typo in the pstat(8) manual page.
ed [Wed, 20 Aug 2008 22:09:33 +0000 (22:09 +0000)]
Fix a small typo in the pstat(8) manual page.

The second LOW column of the pstat(8) command refers to the low
watermark of the output queue.

15 years agofix typo in previous commit breaking bootup
kmacy [Wed, 20 Aug 2008 21:27:48 +0000 (21:27 +0000)]
fix typo in previous commit breaking bootup

pointed out by: Takahashi Yoshihiro nyan@

15 years agoThe config space registers holding the upper 32-bits of the prefetchable
jhb [Wed, 20 Aug 2008 18:29:59 +0000 (18:29 +0000)]
The config space registers holding the upper 32-bits of the prefetchable
memory area's base and limit are optional.  The low 4-bits of the "low"
prefetchable registers indicates whether or not a 32-bit or 64-bit
region is supported.  The PCI-PCI driver had been assuming that all bridges
supported a 64-bit region (and thus the two upper 32-bit registers).  Fix
the driver to only use those registers if the low 4-bits of the "low"
registers indicate that a 64-bit region is supported.  The PCI-PCI bridge
in the XBox happens to be a bridge that only supports a 32-bit region.

Reported by: rink
MFC after: 1 week

15 years ago- Add support for memory mapped PCI config space access on Intel 915GM
jhb [Wed, 20 Aug 2008 18:18:17 +0000 (18:18 +0000)]
- Add support for memory mapped PCI config space access on Intel 915GM
  and 5000P/V/Z chipsets.
- If the base address of the config space BAR is above 4GB for some reason
  and this isn't a PAE kernel, then warn about this (under bootverbose)
  and don't use the BAR.

PR: kern/126525
Submitted by: Arthur Hartwig @ Nokia
MFC after: 2 weeks

15 years agoUse switch statements instead of if-else for enabling PCI-express config
jhb [Wed, 20 Aug 2008 17:50:59 +0000 (17:50 +0000)]
Use switch statements instead of if-else for enabling PCI-express config
space support.

MFC after: 1 week

15 years agocpio should restore file flags and ACLs when they're available
kientzle [Wed, 20 Aug 2008 16:39:18 +0000 (16:39 +0000)]
cpio should restore file flags and ACLs when they're available

15 years agoRecent work on the gnu cpio seems to have introduced some bugs, it
kensmith [Wed, 20 Aug 2008 13:35:39 +0000 (13:35 +0000)]
Recent work on the gnu cpio seems to have introduced some bugs, it
complains about "Malformed numbers" while unpacking the dists and
what winds up on the disk isn't correct.  Use this as an opportunity
to switch over to bsdcpio since at this point we don't even build
and install the gnu cpio by default.  Note sysinstall needed to be
tweaked a bit (dropping tape block size setting) because it seems
bsdcpio doesn't do anything with block sizes, at least as far as
reading from archives goes.  That wasn't really a problem since
installations from tape have been broken for a while and the rest
of sysinstall's tape support code will be removed shortly.

15 years agoRemove sysinstall's ability to adjust the tape block size. Installs from
kensmith [Wed, 20 Aug 2008 13:21:04 +0000 (13:21 +0000)]
Remove sysinstall's ability to adjust the tape block size.  Installs from
tape have been broken for quite a while, and I'll be removing the rest
of sysinstall's knowledge of tapes shortly.  I'm doing this piece now
because I want to switch from gnu's cpio to bsdcpio being integrated
into the installation environment and bsdcpio doesn't seem to handle
block sizes at all.

15 years agoBring in support for the MC8755 Sierra UMTS card.
remko [Wed, 20 Aug 2008 13:14:58 +0000 (13:14 +0000)]
Bring in support for the MC8755 Sierra UMTS card.

Submitted by: Robert Blacquiere <robert at blacquiere dot nl>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoInstal k8temp(4) man page only on amd64 and i386.
rpaulo [Wed, 20 Aug 2008 13:04:27 +0000 (13:04 +0000)]
Instal k8temp(4) man page only on amd64 and i386.

MFC after: 1 week

15 years agoAdd Eee PC.
rpaulo [Wed, 20 Aug 2008 12:36:53 +0000 (12:36 +0000)]
Add Eee PC.

15 years agow(1) uses strftime %b with to print the abbreviated month name
ache [Wed, 20 Aug 2008 12:32:19 +0000 (12:32 +0000)]
w(1) uses strftime %b with to print the abbreviated month name
if a user logged in more than a week ago.
This may contain multibyte characters (e.g. when using UTF-8).
This string is then aligned on byte-length rathern than char-length,
resulting in misalignment and unfinished multibyte characters.

PR:             126657
Submitted by:   Johan van Selst <johans@stack.nl>

15 years agoRemove the now unused `lbolt' variable from the kernel.
ed [Wed, 20 Aug 2008 12:20:22 +0000 (12:20 +0000)]
Remove the now unused `lbolt' variable from the kernel.

We used to have a single wait channel inside the kernel which could be
used by threads that just wanted to sleep for some time (the next
second). The old TTY layer was the only piece of code that still used
lbolt, because I already removed the use of lbolt from the NFS clients
and the VFS syncer.

Approved by: philip

15 years agoRevert r181886. A man page already exists in man.i386.
rpaulo [Wed, 20 Aug 2008 11:48:04 +0000 (11:48 +0000)]
Revert r181886. A man page already exists in man.i386.
I didn't notice it because I was on amd64.

Pointy hat to: me
Pointed out by: several

15 years agoUse net.inet.ip.portrange.reservedhigh instead of IPPORT_RESERVED.
des [Wed, 20 Aug 2008 10:40:07 +0000 (10:40 +0000)]
Use net.inet.ip.portrange.reservedhigh instead of IPPORT_RESERVED.
Submitted upstream, no reaction.

Submitted by: delphij@
MFC after: 2 weeks

15 years agoset MCLSHIFT to correspond to page size
kmacy [Wed, 20 Aug 2008 10:07:10 +0000 (10:07 +0000)]
set MCLSHIFT to correspond to page size

MFC after: 1 month

15 years agochange netfront to match xen31_6
kmacy [Wed, 20 Aug 2008 09:47:49 +0000 (09:47 +0000)]
change netfront to match xen31_6
fix console locking

15 years agoRemove grantpt.c, which should have been deleted in the MPSAFE TTY commit.
ed [Wed, 20 Aug 2008 09:43:46 +0000 (09:43 +0000)]
Remove grantpt.c, which should have been deleted in the MPSAFE TTY commit.

The routines in grantpt.c have been moved to ptsname.c in the MPSAFE TTY
layer, because grantpt() is now effectively a no-op. I forgot to remove
the corresponding source file from libc.

15 years agomark blkfront_info as ready
kmacy [Wed, 20 Aug 2008 09:22:37 +0000 (09:22 +0000)]
mark blkfront_info as ready

MFC after: 1 month

15 years agoremove scheduler_running as xenbus no longer needs it
kmacy [Wed, 20 Aug 2008 09:21:24 +0000 (09:21 +0000)]
remove scheduler_running as xenbus no longer needs it

MFC after: 1 month

15 years ago- add more debug cruft to xenbus
kmacy [Wed, 20 Aug 2008 09:20:12 +0000 (09:20 +0000)]
- add more debug cruft to xenbus
- probe backend
- separate probing from initialization
- add xenbus_strstate
- replace pause with tsleep (which should probably be cv_wait)

15 years ago- clean up interrupt handling for xen a tiny bit
kmacy [Wed, 20 Aug 2008 09:16:46 +0000 (09:16 +0000)]
- clean up interrupt handling for xen a tiny bit
- parse the command line in to kenv
- defer shutdown watcher until later in boot

MFC after: 1 month

15 years agoinclude vmparam.h for KERNBASE and fix typo
kmacy [Wed, 20 Aug 2008 09:11:58 +0000 (09:11 +0000)]
include vmparam.h for KERNBASE and fix typo

15 years agoregister netfront before xenbus does its probing
kmacy [Wed, 20 Aug 2008 09:03:23 +0000 (09:03 +0000)]
register netfront before xenbus does its probing

MFC after:  1 month

15 years agoIntegrate the Xen console driver.
ed [Wed, 20 Aug 2008 09:03:03 +0000 (09:03 +0000)]
Integrate the Xen console driver.

I initially didn't want to integrate the Xen console driver, because it
did not receive any testing. Kip Macy suggested that I'd better check it
in right now, because this is the easiest way for him to test it while
he is working on the Xen import.

Requested by: kmacy

15 years agoCorrect misbehaviour of patching sys/sys/tty.h.
ed [Wed, 20 Aug 2008 08:44:52 +0000 (08:44 +0000)]
Correct misbehaviour of patching sys/sys/tty.h.

For some reason, sys/sys/tty.h was only half patched. This went by
unnoticed, because the copyright notice on the top already displayed my
name, so I thought the file went in properly.

Reported by: kmacy

15 years agoUpdate system call tables.
ed [Wed, 20 Aug 2008 08:39:10 +0000 (08:39 +0000)]
Update system call tables.

The previous commit also included changes to all the system call lists,
but it is a tradition to update these lists in a second commit, so rerun
make sysent to update the $FreeBSD$ tags inside these files to refer to
the latest version of syscalls.master.

Requested by: rwatson

15 years agoIntegrate the new MPSAFE TTY layer to the FreeBSD operating system.
ed [Wed, 20 Aug 2008 08:31:58 +0000 (08:31 +0000)]
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.

The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

  The old TTY layer has a driver model that is not abstract enough to
  make it friendly to use. A good example is the output path, where the
  device drivers directly access the output buffers. This means that an
  in-kernel PPP implementation must always convert network buffers into
  TTY buffers.

  If a PPP implementation would be built on top of the new TTY layer
  (still needs a hooks layer, though), it would allow the PPP
  implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

  With the old TTY layer, it isn't entirely safe to destroy TTY's from
  the system. This implementation has a two-step destructing design,
  where the driver first abandons the TTY. After all threads have left
  the TTY, the TTY layer calls a routine in the driver, which can be
  used to free resources (unit numbers, etc).

  The pts(4) driver also implements this feature, which means
  posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

  One of the major improvements is the per-TTY mutex, which is expected
  to improve scalability when compared to the old Giant locking.
  Another change is the unbuffered copying to userspace, which is both
  used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan

15 years agoBetter comment the pattern tests; adjust the filenames for the
kientzle [Wed, 20 Aug 2008 06:01:53 +0000 (06:01 +0000)]
Better comment the pattern tests; adjust the filenames for the
reference files to match the corresponding source.

MFC after: 3 days

15 years agoifnet_setbyindex() is only used locally, go back to being static.
thompsa [Wed, 20 Aug 2008 05:00:18 +0000 (05:00 +0000)]
ifnet_setbyindex() is only used locally, go back to being static.

15 years agodon't use cpu_idle_acpi under xen
kmacy [Wed, 20 Aug 2008 03:28:32 +0000 (03:28 +0000)]
don't use cpu_idle_acpi under xen

MFC after: 1 month

15 years agoCheck for watch events when doing inline message processing
kmacy [Wed, 20 Aug 2008 03:27:12 +0000 (03:27 +0000)]
Check for watch events when doing inline message processing

MFC after: 1 month

15 years agoFix build
kmacy [Wed, 20 Aug 2008 03:14:48 +0000 (03:14 +0000)]
Fix build

15 years agoRename the RCng 'kernel' script to 'kernel_symlink'.
obrien [Wed, 20 Aug 2008 03:02:06 +0000 (03:02 +0000)]
Rename the RCng 'kernel' script to 'kernel_symlink'.

15 years agoFix wierd integration error
julian [Wed, 20 Aug 2008 02:48:33 +0000 (02:48 +0000)]
Fix wierd integration error
No idea where this came from

15 years agoXen 3.2 now interleaves watch events with regular message notifications.
kmacy [Wed, 20 Aug 2008 02:42:08 +0000 (02:42 +0000)]
Xen 3.2 now interleaves watch events with regular message notifications.
More graciously handle processing messages and watch events inline prior
to threads being up and running.

MFC after: 1 month

15 years agoFix some of the formatting fixes.. It's amazing how some thing stand out
julian [Wed, 20 Aug 2008 01:24:55 +0000 (01:24 +0000)]
Fix some of the formatting fixes.. It's amazing how some thing stand out
in a commit message.

15 years agoA bunch of formatting fixes brough to light by, or created by the Vimage commit
julian [Wed, 20 Aug 2008 01:05:56 +0000 (01:05 +0000)]
A bunch of formatting fixes brough to light by, or created by the Vimage commit
a few days ago.

15 years agoAdd a man page for the acpi_asus(4) driver.
rpaulo [Tue, 19 Aug 2008 23:06:21 +0000 (23:06 +0000)]
Add a man page for the acpi_asus(4) driver.

MFC after: 1 week

15 years agoFix typo in comment.
rpaulo [Tue, 19 Aug 2008 22:28:24 +0000 (22:28 +0000)]
Fix typo in comment.

15 years agoProvide hooks into the GPIO lines and the ability to set/clear
imp [Tue, 19 Aug 2008 22:17:14 +0000 (22:17 +0000)]
Provide hooks into the GPIO lines and the ability to set/clear
interrupts from them.  This should be more generalized, but is
sufficient for now.

Submitted by: Hans Petter Selasky

15 years agoUse the proper clock domain for the usb host controller.
imp [Tue, 19 Aug 2008 22:16:10 +0000 (22:16 +0000)]
Use the proper clock domain for the usb host controller.

Submitted by: Hans Petter Selasky

15 years agoAdd IRQ line for usb device. I'm not 100% sure this is the right
imp [Tue, 19 Aug 2008 22:15:14 +0000 (22:15 +0000)]
Add IRQ line for usb device.  I'm not 100% sure this is the right
place to add this connection, since the interrupt is for a GPIO pin,
but since we have no alternative at the moment...

Submitted by: Hans Petter Selasky

15 years agoUse kvm_getcptime(3) to fetch the global CPU time stats from a crashdump
jhb [Tue, 19 Aug 2008 21:33:09 +0000 (21:33 +0000)]
Use kvm_getcptime(3) to fetch the global CPU time stats from a crashdump
since the 'cp_time' symbol doesn't exist in recent kernels.  This fixes
iostat and vmstat on crash dumps.

MFC after: 1 week

15 years agoAdd a new routine kvm_getcptime(3) for fetching the equivalent of
jhb [Tue, 19 Aug 2008 21:30:36 +0000 (21:30 +0000)]
Add a new routine kvm_getcptime(3) for fetching the equivalent of
'kern.cp_time'.  For a live kernel it uses the sysctl.  For a crashdump,
it first checks to see if the kernel has a 'cp_time' global symbol.  If
it does, it uses that.  If that doesn't work, when it uses the recently
added kvm_getmaxcpu(3) and kvm_getpcpu(3) routines to walk all the CPUs
and sum up their counters.

MFC after: 1 week

15 years agoAdd calls to callout_drain() to ensure the callouts are flushed before
jb [Tue, 19 Aug 2008 21:28:58 +0000 (21:28 +0000)]
Add calls to callout_drain() to ensure the callouts are flushed before
we free memory from underneath them.

This fixes an occasional panic I've been seeing in softclock() where a bad
pointer would be encountered when pushing DTrace hard.

15 years agoPass the right pointer to bzero() when clearing cp_time.
jhb [Tue, 19 Aug 2008 20:33:59 +0000 (20:33 +0000)]
Pass the right pointer to bzero() when clearing cp_time.

MFC after: 1 week

15 years agoAdd two new routines to libkvm for working with per-CPU data:
jhb [Tue, 19 Aug 2008 19:55:33 +0000 (19:55 +0000)]
Add two new routines to libkvm for working with per-CPU data:
kvm_getmaxcpu() and kvm_getpcpu().

MFC after: 1 week

15 years agoExport 'struct pcpu' to userland w/o requiring _KERNEL. A few ports
jhb [Tue, 19 Aug 2008 19:53:52 +0000 (19:53 +0000)]
Export 'struct pcpu' to userland w/o requiring _KERNEL.  A few ports
already define _KERNEL to get to this and I'm about to add hooks to
libkvm to access per-CPU data.

MFC after: 1 week

15 years agoDon't include <sys/tty.h> in our sound layer. It is not needed.
ed [Tue, 19 Aug 2008 19:45:08 +0000 (19:45 +0000)]
Don't include <sys/tty.h> in our sound layer. It is not needed.

The PCM's sound.h file only seems to include <sys/tty.h>, because
channel_if seems to require selinfo. Just replace it with
<sys/selinfo.h>.

There's no real problem with including <sys/tty.h> here, even with
MPSAFE TTY, but <sys/tty.h> is something that should be used by the TTY
layer, its driver and code that integrated it with the process tree.

15 years agoRename the RCng 'kernel' script to 'kernel_symlink'.
obrien [Tue, 19 Aug 2008 14:23:31 +0000 (14:23 +0000)]
Rename the RCng 'kernel' script to 'kernel_symlink'.

Requested by: many

15 years agoIf a CPUTYPE isn't specified, then don't use -march=k8 when compiling
jhb [Tue, 19 Aug 2008 14:23:26 +0000 (14:23 +0000)]
If a CPUTYPE isn't specified, then don't use -march=k8 when compiling
32-bit compat libs on amd64 since -march=k8 may generate instructions
that are not implemented on Intel EM64T processors.  Instead, use
a simpler set of default flags that should work on all amd64-capable
CPUs.

PR: amd64/113111
Submitted by: NIIMI Satoshi  sa2c of sa2c.net
MFC after: 1 week

15 years agoIn brelse, put the B_NEEDSGIANT buffer on the QUEUE_DIRTY_GIANT queue,
kib [Tue, 19 Aug 2008 11:31:49 +0000 (11:31 +0000)]
In brelse, put the B_NEEDSGIANT buffer on the QUEUE_DIRTY_GIANT queue,
instead of QUEUE_DIRTY.

Tested by: pho
Reviewed by: attilio
MFC after: 3 days

15 years agoprotect queue_log not queue
kmacy [Tue, 19 Aug 2008 02:39:34 +0000 (02:39 +0000)]
protect queue_log not queue

MFC after: 1 month

15 years agoFix compilation without INVARIANTS
kmacy [Tue, 19 Aug 2008 02:36:56 +0000 (02:36 +0000)]
Fix compilation without INVARIANTS

MFC after: 1 month

15 years agoavoid evtchn_init name collision in gdb
kmacy [Tue, 19 Aug 2008 02:31:01 +0000 (02:31 +0000)]
avoid evtchn_init name collision in gdb

MFC after: 1 month

15 years agoremove redundant PT_SET_MA declaration
kmacy [Tue, 19 Aug 2008 02:27:31 +0000 (02:27 +0000)]
remove redundant PT_SET_MA declaration

MFC after: 1 month

15 years agoAdd the D-Link DWA-110
kevlo [Tue, 19 Aug 2008 01:44:56 +0000 (01:44 +0000)]
Add the D-Link DWA-110

Tested by: Jonathan Lee <spamtrap at tczyhatczsche dot eu>

15 years agoAdd test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction.
jkim [Mon, 18 Aug 2008 23:05:19 +0000 (23:05 +0000)]
Add test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction.

15 years agoFix two test cases on 32-bit architectures.
jkim [Mon, 18 Aug 2008 21:40:03 +0000 (21:40 +0000)]
Fix two test cases on 32-bit architectures.

15 years agoPT_UPDATES_FLUSH() is used in common code so it needs to be defined
kmacy [Mon, 18 Aug 2008 21:35:09 +0000 (21:35 +0000)]
PT_UPDATES_FLUSH() is used in common code so it needs to be defined
even in the !defined(XEN) case

MFC after: 1 month

15 years agoMFamd64: Correctly check unsignedness of all registers used
jkim [Mon, 18 Aug 2008 21:17:47 +0000 (21:17 +0000)]
MFamd64: Correctly check unsignedness of all registers used
for load instructions with direct or indirect offsets.

15 years agoCorrectly check unsignedness of all BPF_LD|BPF_IND instructions.
jkim [Mon, 18 Aug 2008 19:14:26 +0000 (19:14 +0000)]
Correctly check unsignedness of all BPF_LD|BPF_IND instructions.
This is roughly from sys/net/bpf_filter.c r1.12 and r1.14.