]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoFix some statements in disc(4) and about it:
Yaroslav Tykhiy [Mon, 26 Mar 2007 09:10:28 +0000 (09:10 +0000)]
Fix some statements in disc(4) and about it:
- ifnet is no more embedded in softc;
- the interface name is `disc', not `ds'.

17 years agoGive a hint that softc can contain many things besides ifp.
Yaroslav Tykhiy [Mon, 26 Mar 2007 09:05:10 +0000 (09:05 +0000)]
Give a hint that softc can contain many things besides ifp.

17 years agoComplete removal of uipc_socket2.c by moving the last few functions to
Robert Watson [Mon, 26 Mar 2007 08:59:03 +0000 (08:59 +0000)]
Complete removal of uipc_socket2.c by moving the last few functions to
other C files:

- Move sbcreatecontrol() and sbtoxsockbuf() to uipc_sockbuf.c.  While
  sbcreatecontrol() is really an mbuf allocation routine, it does its work
  with awareness of the layout of socket buffer memory.

- Move pru_*() protocol switch stubs to uipc_socket.c where the non-stub
  versions of several of these functions live.  Likewise, move socket state
  transition calls (soisconnecting(), etc) to uipc_socket.c.  Moveo
  sodupsockaddr() and sotoxsocket().

17 years agoWe no longer embed ifnet in softc, and the pointer to ifnet
Yaroslav Tykhiy [Mon, 26 Mar 2007 08:58:22 +0000 (08:58 +0000)]
We no longer embed ifnet in softc, and the pointer to ifnet
doesn't need to be first in softc now.  (It was the whole
ifnet structure itself that needed to be first in the good
old days.)  Fix the respective comment accordingly.

Add xrefs to ifnet(9) in some other comments while I'm here.

Pointed out by: thompsa

17 years agoAdding tests for Camellia which will be added to the tree soon.
George V. Neville-Neil [Mon, 26 Mar 2007 07:40:51 +0000 (07:40 +0000)]
Adding tests for Camellia which will be added to the tree soon.
Added tests for aes-ctr which were not present before.

17 years agoIntroduce a new toy interface, edsc(4). It's a discard interface
Yaroslav Tykhiy [Mon, 26 Mar 2007 04:50:06 +0000 (04:50 +0000)]
Introduce a new toy interface, edsc(4).  It's a discard interface
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be
attached to it for testing and benchmarking purposes.  Its source
can be an introduction to the anatomy of a network interface driver
due to its simplicity as well as to a bunch of comments in it.

(The rest of needed changes were in my previous commit, which got
interrupted in the middle.  Alas, CVS commits are not atomic.)

17 years agoIntroduce a new toy interface, edsc(4). It's a discard interface
Yaroslav Tykhiy [Mon, 26 Mar 2007 04:39:18 +0000 (04:39 +0000)]
Introduce a new toy interface, edsc(4).  It's a discard interface
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be
attached to it for testing and benchmarking purposes.  Its source
can be an introduction to the anatomy of a network interface driver
due to its simplicity as well as to a bunch of comments in it.

17 years agoUse "-ne" instead of "!=" for integer comparison.
Brooks Davis [Sun, 25 Mar 2007 23:58:46 +0000 (23:58 +0000)]
Use "-ne" instead of "!=" for integer comparison.

17 years agoIn tcp_sack_doack() remove too tight KASSERT() added in last revision. This
Andre Oppermann [Sun, 25 Mar 2007 23:27:26 +0000 (23:27 +0000)]
In tcp_sack_doack() remove too tight KASSERT() added in last revision.  This
function may be called without any TCP SACK option blocks present.  Protect
iteration over SACK option blocks by checking for SACK options present flag
first.

Bug reported by: wkoszek, keramida, Nicolas Blais

17 years agoReplace a comment about RSVP/mrouting with a different but similar comment
Robert Watson [Sun, 25 Mar 2007 21:49:50 +0000 (21:49 +0000)]
Replace a comment about RSVP/mrouting with a different but similar comment
explaining that some more locking is needed.  The routing pieces are done,
but there is an interlocking issue between optionally compiled code and
mandatory code.

Spotted by: kris

17 years agoReplace GIANT_REQUIRED's present for socket locking with NET_LOCK_GIANT().
Robert Watson [Sun, 25 Mar 2007 21:44:24 +0000 (21:44 +0000)]
Replace GIANT_REQUIRED's present for socket locking with NET_LOCK_GIANT().
If/when someone does the necessary MPSAFEty locking for the NFSv4 client,
the socket code is generally MPSAFE now.

Spotted by: kris

17 years agoRemove ancient preprocessor code. Fix module compilation.
Roman Kurakin [Sun, 25 Mar 2007 20:21:31 +0000 (20:21 +0000)]
Remove ancient preprocessor code. Fix module compilation.

Requested by: n_hibma

17 years agoHaving gone to the trouble of setting up a variable, we should use it.
Mike Makonnen [Sun, 25 Mar 2007 19:45:20 +0000 (19:45 +0000)]
Having gone to the trouble of setting up a variable, we should use it.

17 years agoTwo small changes to vm_map_pmap_enter():
Alan Cox [Sun, 25 Mar 2007 19:33:40 +0000 (19:33 +0000)]
Two small changes to vm_map_pmap_enter():

1) Eliminate an unnecessary check for fictitious pages.  Specifically,
only device-backed objects contain fictitious pages and the object is
not device-backed.

2) Change the types of "psize" and "tmpidx" to vm_pindex_t in order to
prevent possible wrap around with extremely large maps and objects,
respectively.  Observed by: tegge (last summer)

17 years agoo Really commit typo fixes to HEAD.
Maxim Konovalov [Sun, 25 Mar 2007 18:37:59 +0000 (18:37 +0000)]
o Really commit typo fixes to HEAD.

PR: docs/110809
Submitted by: naddy

17 years agoCorrect a comment typo
Kris Kennaway [Sun, 25 Mar 2007 10:07:23 +0000 (10:07 +0000)]
Correct a comment typo

17 years agoUpdate a comment: we usually call exec_vmspace_new with Giant not held,
Kris Kennaway [Sun, 25 Mar 2007 10:05:44 +0000 (10:05 +0000)]
Update a comment: we usually call exec_vmspace_new with Giant not held,
but sometimes it is.

17 years agoo cd9660 code repo-copied, update a comment.
Maxim Konovalov [Sat, 24 Mar 2007 22:40:16 +0000 (22:40 +0000)]
o cd9660 code repo-copied, update a comment.

17 years agoo Remove isofs from the cscope dirs list. Its content was
Maxim Konovalov [Sat, 24 Mar 2007 22:21:01 +0000 (22:21 +0000)]
o Remove isofs from the cscope dirs list.  Its content was
repo-copied to fs/.

17 years agoo Use a define for a buffer size.
Maxim Konovalov [Sat, 24 Mar 2007 22:15:02 +0000 (22:15 +0000)]
o Use a define for a buffer size.

Prodded by: db

o Add missed vars for TCPDEBUG in tcp_do_segment().

Prodded by: tinderbox

17 years agoFix some subtle bugs for posix_memalign() having to do with integer
Jason Evans [Sat, 24 Mar 2007 20:44:06 +0000 (20:44 +0000)]
Fix some subtle bugs for posix_memalign() having to do with integer
rounding and overflow.  Carefully document what the various overflow
tests actually detect.

The bugs mostly canceled out, such that the worst possible failure
cases resulted in non-fatal over-allocations.

17 years agoBack out rev. 1.129 because it breaks the practice of auto-loading
Yaroslav Tykhiy [Sat, 24 Mar 2007 20:26:54 +0000 (20:26 +0000)]
Back out rev. 1.129 because it breaks the practice of auto-loading
hardware drivers.  Unlike pseudo-device drivers, which just attach
to the cloning framework and wait for "ifconfig create", h/w drivers
create interfaces for installed cards as soon as loaded.  The issue
of devd(8) involuntarily reloading modules should be dealt with in a
different way.

17 years agoGeneral style cleanup.
Robert Watson [Sat, 24 Mar 2007 20:19:44 +0000 (20:19 +0000)]
General style cleanup.

Correct spelling errors.

Remove references to M_COPY_PKTHDR -- it was deprecated in 6.x and is not
used (or defined) in our tree.

17 years agoIn order to satisfy ACPI's need for an identity mapping, modify the
Alan Cox [Sat, 24 Mar 2007 19:53:22 +0000 (19:53 +0000)]
In order to satisfy ACPI's need for an identity mapping, modify the
temporary mapping created by locore so that the lowest two to four
megabytes can become a permanent identity mapping.  This implementation
avoids any use of a large page mapping.

17 years agoDrop the ipw softc lock before calling back into net80211, fixing a
Lukas Ertl [Sat, 24 Mar 2007 18:53:33 +0000 (18:53 +0000)]
Drop the ipw softc lock before calling back into net80211, fixing a
LOR/deadlock.

Tested by:   Denis Shaposhnikov <dsh_AT_vlink.ru>, le@
LOR id:      205
MFC in:      3 days

17 years agoUpdate the regression test so that there are actually two independent
George V. Neville-Neil [Sat, 24 Mar 2007 13:47:16 +0000 (13:47 +0000)]
Update the regression test so that there are actually two independent
networks involved, as opposed to two hosts on one network.

MFC after: 1 week

17 years agoo A quirk for Sagem USB-Serial controller.
Maxim Konovalov [Sat, 24 Mar 2007 09:27:58 +0000 (09:27 +0000)]
o A quirk for Sagem USB-Serial controller.

PR: usb/109613
Submitted by: Mayr Gerald
MFC after: 1 month

17 years agoo Add several CDMA-2000 terminals.
Maxim Konovalov [Sat, 24 Mar 2007 09:25:56 +0000 (09:25 +0000)]
o Add several CDMA-2000 terminals.

PR: usb/109838
Submitted by: R.Mahmatkhanov
MFC after: 1 month

17 years agoNotice when mkdir() fails.
Tim Kientzle [Sat, 24 Mar 2007 05:02:16 +0000 (05:02 +0000)]
Notice when mkdir() fails.
Don't change permissions on an existing dir unless _EXTRACT_PERM
is requested.

In particular, bsdtar -x should not edit mode of existing dirs
now; bsdtar -xp will.

17 years agobus_size_t is a bad cross-architectural type with respect to printf, use uint32_t...
Kip Macy [Sat, 24 Mar 2007 04:28:33 +0000 (04:28 +0000)]
bus_size_t is a bad cross-architectural type with respect to printf, use uint32_t instead

17 years agoIssue a warning if there's a non-zero exit value.
Tim Kientzle [Sat, 24 Mar 2007 03:25:49 +0000 (03:25 +0000)]
Issue a warning if there's a non-zero exit value.

17 years agoFix compile error when libbz2 is unavailable.
Tim Kientzle [Sat, 24 Mar 2007 03:23:26 +0000 (03:23 +0000)]
Fix compile error when libbz2 is unavailable.

17 years agoo While the script is correct and works well in sh(1) make it
Maxim Konovalov [Sat, 24 Mar 2007 01:39:24 +0000 (01:39 +0000)]
o While the script is correct and works well in sh(1) make it
works in tcsh(1) which does not support <<- redirection.

PR: docs/110097
Submitted by: Sameh Ghane

17 years agoDefault to booting off the SD card. It is more useful, and a full
Warner Losh [Fri, 23 Mar 2007 23:47:59 +0000 (23:47 +0000)]
Default to booting off the SD card.  It is more useful, and a full
FreeBSD/arm installworld install is only 170MB.  The smallest SD card
I could find at the store today was 512MB (and it was only $10 after
rebate), with a 2GB card for as low as $25.00...

Now that the IIC stuff has been sorted out, include that as well.
Include hints for the icee 16kb 16-bit i2c device.  It should include
info about the temperature sensor as well, but that driver isn't quite
ready.

Add bpf for dhclient happiness.

MFC After: 1 week

17 years agoNew device: icee. Generic i2c eeprom driver.
Warner Losh [Fri, 23 Mar 2007 23:10:35 +0000 (23:10 +0000)]
New device: icee.  Generic i2c eeprom driver.

17 years agoMFp4: Make the iicbus fully hinted. We no longer automatically add
Warner Losh [Fri, 23 Mar 2007 23:08:28 +0000 (23:08 +0000)]
MFp4: Make the iicbus fully hinted.  We no longer automatically add
some devices (and not others).  To get instances onto the iicbus, one
now needs hints or an identify routine.  We also do not probe the bus
for devices because many iic devices cannot be safely probed (and when
they can, the probe order turns out to be somewhat difficult to get
right).

# I'm not 100% sure that the iicsmb removal is right.  Please contact me if
# this causes difficulty.

17 years agoMFp4: Make iicbus_trasnfer_gen suitable for bridge drivers. Use it in the
Warner Losh [Fri, 23 Mar 2007 23:03:54 +0000 (23:03 +0000)]
MFp4: Make iicbus_trasnfer_gen suitable for bridge drivers.  Use it in the
bitbang bridge.

17 years agoMFp4: Create an ivar for each iic device on the iicbus. This ivar
Warner Losh [Fri, 23 Mar 2007 23:02:33 +0000 (23:02 +0000)]
MFp4: Create an ivar for each iic device on the iicbus.  This ivar
holds the device's address.

17 years agoFix posix_memalign() for large objects. Now that runs are extents rather
Jason Evans [Fri, 23 Mar 2007 22:58:15 +0000 (22:58 +0000)]
Fix posix_memalign() for large objects.  Now that runs are extents rather
than binary buddies, the alignment guarantees are weaker, which requires
a more complex aligned allocation algorithm, similar to that used for
alignment greater than the chunk size.

Reported by: matteo

17 years agoMFp4: A bunch of patches from myself and Tisco to improve the
Warner Losh [Fri, 23 Mar 2007 22:57:24 +0000 (22:57 +0000)]
MFp4: A bunch of patches from myself and Tisco to improve the
robustness of IIC transactions when parts aren't present.  This also
removes a bunch of debug.  This also moves this driver to 7-1
addressing rather than 6-0 addressing, which is more inline with all
the other iic drivers in the tree.  I've tested this for about a
million years on the systems at work.

17 years agoSwitch to ANSI function declarations.
Craig Rodrigues [Fri, 23 Mar 2007 22:48:44 +0000 (22:48 +0000)]
Switch to ANSI function declarations.

17 years agoUpdate to FICL 3.03 (the last release before FICL4 rewrite).
Jung-uk Kim [Fri, 23 Mar 2007 22:26:01 +0000 (22:26 +0000)]
Update to FICL 3.03 (the last release before FICL4 rewrite).

The relevant changes for FreeBSD (excerpt from the release note):

  * Newly implemented CORE EXT words: CASE, OF, ENDOF, and ENDCASE. Also
    added FALLTHROUGH, which works like ENDOF but jumps to the instruction
    just after the next OF.
  * Bugfix: John-Hopkins locals syntax now accepts | and -- in the comment
    (between the first -- and the }.)
  * Bugfix: Changed vmGetWord0() to make Purify happier. The resulting
    code is no slower, no larger, and slightly more robust.

17 years agoremove WARNS=2: we're not ready for it yet.
Matteo Riondato [Fri, 23 Mar 2007 22:09:02 +0000 (22:09 +0000)]
remove WARNS=2: we're not ready for it yet.

17 years ago- Increase coalesce_nsecs
Kip Macy [Fri, 23 Mar 2007 22:03:55 +0000 (22:03 +0000)]
- Increase coalesce_nsecs
- commit fixes for the following coverity warnings: 1765, 1760, 1758, 1756

17 years agocommit missed change
Kip Macy [Fri, 23 Mar 2007 22:02:11 +0000 (22:02 +0000)]
commit missed change

17 years agoIf KERNEL_EXTRA is defined, make kernel-all target depend on it.
Warner Losh [Fri, 23 Mar 2007 21:55:59 +0000 (21:55 +0000)]
If KERNEL_EXTRA is defined, make kernel-all target depend on it.
If KERNEL_EXTRA_INSTALL is defined, install it into ${DESTDIR}${KODIR}.

17 years agoExit status should be 1 on error.
Pawel Jakub Dawidek [Fri, 23 Mar 2007 21:05:36 +0000 (21:05 +0000)]
Exit status should be 1 on error.

PR: bin/110705
Reported by: Tom Judge
MFC after: 2 weeks

17 years agoCheck PCI-e link width to avoid foot shooting with 4x links
Kip Macy [Fri, 23 Mar 2007 20:18:07 +0000 (20:18 +0000)]
Check PCI-e link width to avoid foot shooting with 4x links

MFC after: 3 days

17 years agoSplit tcp_input() into its two functional parts:
Andre Oppermann [Fri, 23 Mar 2007 20:16:50 +0000 (20:16 +0000)]
Split tcp_input() into its two functional parts:

 o tcp_input() now handles TCP segment sanity checks and preparations
   including the INPCB lookup and syncache.
 o tcp_do_segment() handles all data and ACK processing and is IPv4/v6
   agnostic.

Change all KASSERT() messages to ("%s: ", __func__).

The changes in this commit are primarily of mechanical nature and no
functional changes besides the function split are made.

Discussed with: rwatson

17 years agoMake sysinstall's code WARNS=2 clean .
Matteo Riondato [Fri, 23 Mar 2007 19:57:27 +0000 (19:57 +0000)]
Make sysinstall's code WARNS=2 clean .

MFC after: 1 week

17 years agoTidy up some code to conform better to surroundings and style(9), 0 = NULL
Andre Oppermann [Fri, 23 Mar 2007 19:11:22 +0000 (19:11 +0000)]
Tidy up some code to conform better to surroundings and style(9), 0 = NULL
and space/tab.

17 years agoBring SACK option handling in tcp_dooptions() in line with all other
Andre Oppermann [Fri, 23 Mar 2007 18:33:21 +0000 (18:33 +0000)]
Bring SACK option handling in tcp_dooptions() in line with all other
options and ajust users accordingly.

17 years ago- Fix exca_(io|mem)_map() to return proper errno values.
John Baldwin [Fri, 23 Mar 2007 17:15:07 +0000 (17:15 +0000)]
- Fix exca_(io|mem)_map() to return proper errno values.
- Change exca_activate_resource() to call BUS_ACTIVATE_RESOURCE() before
  calling exca_(io|mem)_map() since the latter use rman_get_bus(tag|handle)
  and the recent changes to nexus(4) mean that you need to activate a
  resource before reading the bus tag and handle.  This was true before,
  but now the nexus(4) drivers on x86 and ia64 are more forceful about it.

Reviewed by: imp

17 years agoPurge two redundant case labels.
Bruce M Simpson [Fri, 23 Mar 2007 09:43:36 +0000 (09:43 +0000)]
Purge two redundant case labels.

17 years agoDon't destroy a mutex just before we use it, instead,
Xin LI [Fri, 23 Mar 2007 08:52:36 +0000 (08:52 +0000)]
Don't destroy a mutex just before we use it, instead,
destroy it after we have used it.

17 years agovm_page_busy() no longer requires the page queues lock to be held. Reduce
Alan Cox [Fri, 23 Mar 2007 06:11:25 +0000 (06:11 +0000)]
vm_page_busy() no longer requires the page queues lock to be held.  Reduce
the scope of the page queues lock in vm_fault() accordingly.

17 years agoUse extents rather than binary buddies to track free pages within
Jason Evans [Fri, 23 Mar 2007 05:05:48 +0000 (05:05 +0000)]
Use extents rather than binary buddies to track free pages within
chunks.  This allows runs to be any multiple of the page size.  The
primary advantage is that large objects are no longer constrained to be
2^n pages, which can dramatically decrease internal fragmentation for
large objects.  This also allows the sizes for runs that back small
objects to be more finely tuned.

Free runs are searched for linearly using the chunk page map (with the
help of some heuristic optimizations).  This changes the allocation
policy from "first best fit" to "first fit".  A prototype red-black tree
implementation for tracking free runs that implemented "first best fit"
did not cause a measurable speed or memory usage difference for
realistic chunk sizes (though of course it is possible to construct
benchmarks that favor one allocation policy over another).

Refine the handling of fullness constraints for small runs to be more
tunable.

Restructure the per chunk page map to contain only two fields per entry,
rather than four.  Also, increase each entry from 4 to 8 bytes, since it
allows for 32-bit integers, without increasing the number of chunk
header pages.

Relax the maximum chunk size constraint.  This is of no practical
interest; it is merely fallout from the chunk page map restructuring.

Revamp statistics gathering and reporting to be faster, clearer and more
informative.  Statistics gathering is fast enough now to have little
to no impact on application speed, but it still requires approximately
two extra pages of memory per arena (per process).  This memory overhead
may be acceptable for most systems, but we still need to leave
statistics gathering disabled by default in RELENG branches.

Rename NO_MALLOC_EXTRAS to MALLOC_PRODUCTION in order to make its intent
clearer (i.e. it should be defined in RELENG branches).

17 years agoStop setting ki_ocomm (thread name) to the proc name by default, as nothing
Ed Maste [Fri, 23 Mar 2007 04:01:08 +0000 (04:01 +0000)]
Stop setting ki_ocomm (thread name) to the proc name by default, as nothing
in the base system relies on this any longer.

17 years agoReflect ACPI-CA 20070320 import.
Xin LI [Fri, 23 Mar 2007 01:47:04 +0000 (01:47 +0000)]
Reflect ACPI-CA 20070320 import.

17 years agoAdd '-s' option and update the manual page. With this option, it prints
Jung-uk Kim [Fri, 23 Mar 2007 00:00:22 +0000 (00:00 +0000)]
Add '-s' option and update the manual page.  With this option, it prints
little more style(9) friendly output.  For example:

%file2c -n 8 -s -x 'const char data[] = {' '};' < /etc/motd
const char data[] = {
0x46, 0x72, 0x65, 0x65, 0x42, 0x53, 0x44, 0x20,
0x37, 0x2e, 0x30, 0x2d, 0x43, 0x55, 0x52, 0x52,
0x45, 0x4e, 0x54, 0x20, 0x28, 0x42, 0x45, 0x41,
0x53, 0x54, 0x49, 0x45, 0x29, 0x20, 0x23, 0x30,
0x3a, 0x20, 0x57, 0x65, 0x64, 0x20, 0x4d, 0x61,
0x72, 0x20, 0x32, 0x31, 0x20, 0x31, 0x39, 0x3a,
0x30, 0x34, 0x3a, 0x33, 0x36, 0x20, 0x45, 0x44,
0x54, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a
};

17 years agoPass the RID from the bus frontends to the core probe function.
Marcel Moolenaar [Thu, 22 Mar 2007 23:45:25 +0000 (23:45 +0000)]
Pass the RID from the bus frontends to the core probe function.
Currently all RIDs are 0, but for PCI devices this typically
isn't the case. This change is made with future PCI support in
mind.

17 years agoMFP4: a) Some constification from NetBSD (gcc 4.1.2)
Matt Jacob [Thu, 22 Mar 2007 23:38:32 +0000 (23:38 +0000)]
MFP4: a) Some constification from NetBSD (gcc 4.1.2)
b) Split default param fetching/setting into scsi and fibre functions
and retry the fibre fetch more than once.

MFC after: 1 week

17 years agoadd include now required for crypto flags
Sam Leffler [Thu, 22 Mar 2007 22:25:25 +0000 (22:25 +0000)]
add include now required for crypto flags

17 years agoMerge from vendor branch to fix tinderbox breakage.
Jung-uk Kim [Thu, 22 Mar 2007 21:23:29 +0000 (21:23 +0000)]
Merge from vendor branch to fix tinderbox breakage.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167817,
Jung-uk Kim [Thu, 22 Mar 2007 21:14:43 +0000 (21:14 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167817,
which included commits to RCS files with non-trunk default branches.

17 years agoFix tinderbox build breakage.
Jung-uk Kim [Thu, 22 Mar 2007 21:14:43 +0000 (21:14 +0000)]
Fix tinderbox build breakage.

Note that it is committed on the vendor branch because it will be
submitted to the vendor.

17 years agoFix a typo, and update a comment.
Bruce M Simpson [Thu, 22 Mar 2007 19:08:39 +0000 (19:08 +0000)]
Fix a typo, and update a comment.

Submitted by: yar

17 years agoCatch up with ACPI-CA 20070320 import.
Jung-uk Kim [Thu, 22 Mar 2007 18:16:43 +0000 (18:16 +0000)]
Catch up with ACPI-CA 20070320 import.

17 years agoUpdate to reflect import of ACPI-CA 20070320.
Jung-uk Kim [Thu, 22 Mar 2007 18:08:11 +0000 (18:08 +0000)]
Update to reflect import of ACPI-CA 20070320.

17 years agoResolve conflicts from import of Intel ACPI-CA 20070320.
Jung-uk Kim [Thu, 22 Mar 2007 18:02:34 +0000 (18:02 +0000)]
Resolve conflicts from import of Intel ACPI-CA 20070320.

17 years agoResolve conflicts of unchanged files that are off the vendor branch.
Jung-uk Kim [Thu, 22 Mar 2007 17:58:27 +0000 (17:58 +0000)]
Resolve conflicts of unchanged files that are off the vendor branch.

17 years agoUse proc name (ki_comm) instead of thread name (ki_ocomm) as these may now
Ed Maste [Thu, 22 Mar 2007 17:47:58 +0000 (17:47 +0000)]
Use proc name (ki_comm) instead of thread name (ki_ocomm) as these may now
be different.

17 years agoRemove files that removed on the vendor branch.
Jung-uk Kim [Thu, 22 Mar 2007 17:47:41 +0000 (17:47 +0000)]
Remove files that removed on the vendor branch.

17 years agoRemove files that are no longer needed or removed by vendor.
Jung-uk Kim [Thu, 22 Mar 2007 17:43:38 +0000 (17:43 +0000)]
Remove files that are no longer needed or removed by vendor.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167807,
Jung-uk Kim [Thu, 22 Mar 2007 17:43:38 +0000 (17:43 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167807,
which included commits to RCS files with non-trunk default branches.

17 years agoAdd fixes for FreeBSD build that were submitted upstream.
Jung-uk Kim [Thu, 22 Mar 2007 17:36:29 +0000 (17:36 +0000)]
Add fixes for FreeBSD build that were submitted upstream.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167805,
Jung-uk Kim [Thu, 22 Mar 2007 17:36:29 +0000 (17:36 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167805,
which included commits to RCS files with non-trunk default branches.

17 years agoVendor import of Intel ACPI-CA 20070320
Jung-uk Kim [Thu, 22 Mar 2007 17:24:05 +0000 (17:24 +0000)]
Vendor import of Intel ACPI-CA 20070320

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167802,
Jung-uk Kim [Thu, 22 Mar 2007 17:24:05 +0000 (17:24 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167802,
which included commits to RCS files with non-trunk default branches.

17 years ago- Simplify the #ifdef's for adaptive mutexes and rwlocks by conditionally
John Baldwin [Thu, 22 Mar 2007 16:09:23 +0000 (16:09 +0000)]
- Simplify the #ifdef's for adaptive mutexes and rwlocks by conditionally
  defining a macro earlier in the file.
- Add NO_ADAPTIVE_RWLOCKS option to disable adaptive spinning for rwlocks.

17 years agoAdd missing \n.
Pawel Jakub Dawidek [Thu, 22 Mar 2007 15:42:13 +0000 (15:42 +0000)]
Add missing \n.

17 years agoMove the dom_dispose and pru_detach calls in sofree() earlier. Only after
Gleb Smirnoff [Thu, 22 Mar 2007 13:21:24 +0000 (13:21 +0000)]
Move the dom_dispose and pru_detach calls in sofree() earlier. Only after
calling pru_detach we can be absolutely sure, that we don't have any
references to the socket in the stack.

This closes race between lockless sbdestroy() and data arriving on socket.

Reviewed by: rwatson

17 years agoWhen working on an RTM_CHANGE do the route editing in the following
Gleb Smirnoff [Thu, 22 Mar 2007 10:51:03 +0000 (10:51 +0000)]
When working on an RTM_CHANGE do the route editing in the following
sequence. First, if rt_ifa is going to be changed, then call
ifa_rtrequest(RTM_DELETE). Second, if gateway is going to be changed,
then call rt_setgate(). Third, change rt_ifa.

With this change we are able to change a link level route to a
gateway one, that wasn't possible before:

# ifconfig em0 192.168.22.1/24
        # arp -s 192.168.22.99 00:11:22:33:44:55
        # route change 192.168.22.99 192.168.22.199
        # ping 192.168.22.99
db>

Reported by: avatar

17 years agoRemove global list of all llinfo_arp entries and use a callout per
Gleb Smirnoff [Thu, 22 Mar 2007 10:37:53 +0000 (10:37 +0000)]
Remove global list of all llinfo_arp entries and use a callout per
instance expiry of the ARP entries. Since we no longer abuse the IPv4
radix head lock, we can now enter arp_rtrequest() with a lock held on
an arbitrary rt_entry.

Reviewed by: bms

17 years agoChange the order of lock reacquisition in vm_object_split() in order to
Alan Cox [Thu, 22 Mar 2007 07:02:43 +0000 (07:02 +0000)]
Change the order of lock reacquisition in vm_object_split() in order to
simplify the code slightly.  Add a comment concerning lock ordering.

17 years agoRename the cv_*wait*() functions to _cv_*wait*() and change their second
John Baldwin [Wed, 21 Mar 2007 22:22:13 +0000 (22:22 +0000)]
Rename the cv_*wait*() functions to _cv_*wait*() and change their second
argument from a mutex to a lock_object.  Add cv_*wait*() wrapper macros
that accept either a mutex, rwlock, or sx lock as the second argument and
convert it to a lock_object and then call _cv_*wait*().  Basically, the
visible difference is that you can now use rwlocks and sx locks with
condition variables using the same API as with mutexes.

17 years agoMake use of 'lock_object' being the same field name in the witness_check*()
John Baldwin [Wed, 21 Mar 2007 22:18:10 +0000 (22:18 +0000)]
Make use of 'lock_object' being the same field name in the witness_check*()
macros.
- witness_check() replaces witness_check_mtx() and
  witness_check_exclusive_sx() and checks for an exclusive acquire of
  either a mutex, rwlock, or sx lock.
- witness_check_shared() replaces witness_check_shared_sx() and checks for
  a shared acquire of either a rwlock or sx lock.

17 years agoRename the 'mtx_object', 'rw_object', and 'sx_object' members of mutexes,
John Baldwin [Wed, 21 Mar 2007 21:20:51 +0000 (21:20 +0000)]
Rename the 'mtx_object', 'rw_object', and 'sx_object' members of mutexes,
rwlocks, and sx locks to 'lock_object'.

17 years agoDon't use cv_wait_unlock() to implement cv_wait(). Instead, implement
John Baldwin [Wed, 21 Mar 2007 20:46:26 +0000 (20:46 +0000)]
Don't use cv_wait_unlock() to implement cv_wait().  Instead, implement
cv_wait() fully and add missing KTRACE context switch traces.

17 years agoANSIfy function declarations and remove register keywords for variables.
Andre Oppermann [Wed, 21 Mar 2007 19:37:55 +0000 (19:37 +0000)]
ANSIfy function declarations and remove register keywords for variables.
Consistently apply style to all function declarations.

17 years agoMatch up SYSCTL declarations in style.
Andre Oppermann [Wed, 21 Mar 2007 19:34:12 +0000 (19:34 +0000)]
Match up SYSCTL declarations in style.

17 years agoIf vn_open() fails during kern_open(), don't fdrop() the new file object
John Baldwin [Wed, 21 Mar 2007 19:32:08 +0000 (19:32 +0000)]
If vn_open() fails during kern_open(), don't fdrop() the new file object
until after the call to fdclose().  This closes an obscure race that
could result in the later call to fdclose() actually closing a different
file descriptor if another thread close()'s the file descriptor being
opened before fdrop() is called, so the fdrop() in kern_open() frees the
file object, then the second thread (or a third) creates a new file
descriptor which reuses both the same index and the same file pointer
thus tricking fdclose() in the first thread into thinking that the
original file was still open.

MFC after: 1 week

17 years agoHandle the case when a thread is blocked on a lockmgr lock with LK_DRAIN
John Baldwin [Wed, 21 Mar 2007 19:28:20 +0000 (19:28 +0000)]
Handle the case when a thread is blocked on a lockmgr lock with LK_DRAIN
in DDB's 'show sleepchain'.

MFC after: 3 days

17 years agoSubtract optlen in the maximum length check for TSO and finally avoid
Andre Oppermann [Wed, 21 Mar 2007 19:04:07 +0000 (19:04 +0000)]
Subtract optlen in the maximum length check for TSO and finally avoid
slightly oversized TSO mbuf chains.

Submitted by: kmacy

17 years agoTidy up IPFIREWALL_FORWARD sections and comments.
Andre Oppermann [Wed, 21 Mar 2007 18:56:03 +0000 (18:56 +0000)]
Tidy up IPFIREWALL_FORWARD sections and comments.

17 years agoUpdate and clarify comments in first section of tcp_input().
Andre Oppermann [Wed, 21 Mar 2007 18:52:58 +0000 (18:52 +0000)]
Update and clarify comments in first section of tcp_input().

17 years agoTidy up the ACCEPTCONN section of tcp_input(), ajust comments and remove
Andre Oppermann [Wed, 21 Mar 2007 18:49:43 +0000 (18:49 +0000)]
Tidy up the ACCEPTCONN section of tcp_input(), ajust comments and remove
old dead T/TCP code.

17 years agoFix an off-by-one error in iwi_init_fw_dma(). It didn't reuse the existing
John Baldwin [Wed, 21 Mar 2007 18:40:31 +0000 (18:40 +0000)]
Fix an off-by-one error in iwi_init_fw_dma().  It didn't reuse the existing
DMA memory for a firmware load if it was the exact size needed, thus in the
common case the driver was constantly free'ing and reallocating the DMA
buffer and it would eventually begin to fail.  With this fix, iwi0 reuses
the same buffer the entire time and no longer fails to load the firmware
after the machine has been up for a while.

MFC after: 1 week

17 years agoTidy up tcp_log_in_vain and blackhole.
Andre Oppermann [Wed, 21 Mar 2007 18:36:49 +0000 (18:36 +0000)]
Tidy up tcp_log_in_vain and blackhole.

17 years agoMake TCP_DROP_SYNFIN a standard part of TCP. Disabled by default it
Andre Oppermann [Wed, 21 Mar 2007 18:25:28 +0000 (18:25 +0000)]
Make TCP_DROP_SYNFIN a standard part of TCP.  Disabled by default it
doesn't impede normal operation negatively and is only a few lines of
code.  It's close relatives blackhole and log_in_vain aren't options
either.