]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoMK_LIBTHR was misspelled.
ru [Mon, 1 Oct 2007 18:08:11 +0000 (18:08 +0000)]
MK_LIBTHR was misspelled.

Approved by: re (kensmith)

16 years agoInstall the forgotten /usr/include/geom/multipath/ header.
ru [Mon, 1 Oct 2007 18:07:29 +0000 (18:07 +0000)]
Install the forgotten /usr/include/geom/multipath/ header.

Approved by: re (kensmith)

16 years ago- Bug fix managing congestion parameter on immediate
rrs [Mon, 1 Oct 2007 03:22:29 +0000 (03:22 +0000)]
- Bug fix managing congestion parameter on immediate
  retransmittion by handover event (fast mobility code)
- Fixed problem of mobility code which is caused by remaining
  parameters in the deleted primary destination.
- Add a missing lock. When a peer sends an INIT, and while we
  are processing it to send an INIT-ACK the socket is closed,
  we did not hold a lock to keep the socket from going away.
  Add protection for this case.
- Fix so that arwnd is alway uses the minimal rwnd if the user
  has set the socket buffer smaller. Found this when the test
  org decided to see what happens when you set in a rwnd of 10
  bytes (which is not allowed per RFC .. 4k is minimum).
- Fixes so a cookie-echo ootb will NOT cause an abort to
  be sent. This was happening in a MPI collision case.
- Examined all panics and unless there was no recovery, moved
  any that were not already to INVARANTS.

Approved by: re@freebsd.org (gnn)

16 years agoMake the PCI code aware of PCI domains (aka PCI segments) so we can
marius [Sun, 30 Sep 2007 11:05:18 +0000 (11:05 +0000)]
Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by: jhb
Reviewed by: grehan, jhb, marcel
Approved by: re (kensmith), jhb (PCI maintainer hat)

16 years agoUpdating ObsoleteFiles.inc after cached->nscd renaming.
bushman [Sat, 29 Sep 2007 22:37:40 +0000 (22:37 +0000)]
Updating ObsoleteFiles.inc after cached->nscd renaming.

Approved by: re (bmah), brooks (mentor)

16 years agoAdd my self and my mentor.
kaiw [Sat, 29 Sep 2007 17:01:19 +0000 (17:01 +0000)]
Add my self and my mentor.

Approved by: jkoshy (mentor)
Approved by: re (bmah)

16 years agoo For dynamic rules log a parent rule number. Prefix a log message
maxim [Sat, 29 Sep 2007 15:01:41 +0000 (15:01 +0000)]
o For dynamic rules log a parent rule number.  Prefix a log message
by 'ipfw: '.

PR: kern/115755
Submitted by: sem
Approved by: re (gnn)
MFC after: 4 weeks

16 years agofix building with NO_CRYPT=true
sam [Fri, 28 Sep 2007 15:52:28 +0000 (15:52 +0000)]
fix building with NO_CRYPT=true

PR: 116439
Approved by: re (gnn)

16 years agoAdjust history.
obrien [Fri, 28 Sep 2007 15:31:44 +0000 (15:31 +0000)]
Adjust history.

Approved by: re(ken)

16 years ago- Change the description of sleepq_add(), sleepq_broadcast() and
gabor [Fri, 28 Sep 2007 11:13:40 +0000 (11:13 +0000)]
- Change the description of sleepq_add(), sleepq_broadcast() and
  sleepq_signal() to reflect recent changes

Submitted by: attilio
Approved by: re (bmah)

16 years agoFinishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile
bushman [Fri, 28 Sep 2007 10:38:08 +0000 (10:38 +0000)]
Finishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile
updated. Note added to UPDATING.

Approved by: re (kensmith, bmah), brooks (mentor)

16 years agoAdd a missing word in one place and delete an extraneous article in
bmah [Fri, 28 Sep 2007 05:14:39 +0000 (05:14 +0000)]
Add a missing word in one place and delete an extraneous article in
another.

Approved by: re (implicitly)

16 years agoNew release note: gvirstor(8).
bmah [Fri, 28 Sep 2007 05:04:13 +0000 (05:04 +0000)]
New release note:  gvirstor(8).

MFC noted:  camcontrol(8) readcap.

Approved by: re (implicitly)

16 years agoAdd fts_set_clientptr(3), fts_get_clientptr(3) and fts_get_stream(3) man
scf [Fri, 28 Sep 2007 02:22:56 +0000 (02:22 +0000)]
Add fts_set_clientptr(3), fts_get_clientptr(3) and fts_get_stream(3) man
page links to fts(3).

Approved by: wes
Approved by: re (hrs)
MFC after: 5 days

16 years agoOk I hope I got it right this time.
cognet [Thu, 27 Sep 2007 22:39:49 +0000 (22:39 +0000)]
Ok I hope I got it right this time.
After discussion with Sam, switch back to use firmware(9) instead of
having the firmware in hex format.
Put the binary firmware uuencoded into sys/contrib/dev/npe, and slap a
LICENSE file, as found on the Intel website.

Approved by: re (blanket), mux (mentor)
MFC After: 1 week

16 years agoNow that Intel changed the license for the NPE firmware, import it directly
cognet [Thu, 27 Sep 2007 21:18:34 +0000 (21:18 +0000)]
Now that Intel changed the license for the NPE firmware, import it directly
hexed into our tree, instead of requiring the user to download it.

Approved by: re (blanket)
MFC after: 1 week

16 years agoFix a comment to reflect the truth.
cognet [Thu, 27 Sep 2007 20:52:17 +0000 (20:52 +0000)]
Fix a comment to reflect the truth.

Spotted out by: Marius Nuennerich <marius.nuennerich AT gmx D0T de>
Approved by: re (blanket)

16 years agoWhen orphaning a provider, cancel events related to it.
pjd [Thu, 27 Sep 2007 20:18:34 +0000 (20:18 +0000)]
When orphaning a provider, cancel events related to it.
Without this change the following situation was possible:

1. Provider is orphaned from within class' access() method on last write
   close - orphan provider event is send.
2. GEOM detects last write close on a provider and sends new provider event.
3. g_orphan_register() is called, and calls all orphan methods of attached
   consumers.
4. New provider event is executed on orphaned provider, all classes can
   taste already orphaned provider, and some may attach consumers to it.
   Those consumers will never go away, because the g_orphan_register()
   was already called.

We end up with a zombie provider.

With this change, at step 3, we will cancel new provider event.

How to repeat this problem:

# mdconfig -a -t malloc -s 10m
# geli init -i 0 md0
# geli attach md0
# newfs -L test /dev/md0.eli
# mount /dev/ufs/test /mnt/tmp
# geli detach -l md0.eli
# umount /mnt/tmp
# glabel status
            Name  Status  Components
        ufs/test  N/A     N/A

Reviewed by: phk
Approved by: re (kensmith)

16 years agoFix previous commit: I should be in alphabetical order.
rpaulo [Thu, 27 Sep 2007 20:11:32 +0000 (20:11 +0000)]
Fix previous commit: I should be in alphabetical order.

Pointed out by: brueffer
Approved by: re (bmah), njl

16 years ago - Honor the PREEMPTION and FULL_PREEMPTION flags by setting the default
jeff [Thu, 27 Sep 2007 16:39:27 +0000 (16:39 +0000)]
 - Honor the PREEMPTION and FULL_PREEMPTION flags by setting the default
   value for kern.sched.preempt_thresh appropriately.  It can still by
   adjusted at runtime.  ULE will still use IPI_PREEMPT in certain
   migration situations.
 - Assert that we're not trying to compile ULE on an unsupported
   architecture.  To date, I believe only i386 and amd64 have implemented
   the third cpu switch argument required.

Approved by: re

16 years agoForced commit to note repocopy:
bushman [Thu, 27 Sep 2007 12:30:12 +0000 (12:30 +0000)]
Forced commit to note repocopy:

The files were copied in order to rename cached to nscd.

Approved by: re (kensmith), brooks (mentor)

16 years agoAdd myself and my mentor.
rpaulo [Thu, 27 Sep 2007 11:43:56 +0000 (11:43 +0000)]
Add myself and my mentor.

Reviewed by: njl (mentor)
Approved by: re

16 years agoCorrect an error of omission in the reimplementation of the page
alc [Thu, 27 Sep 2007 04:21:59 +0000 (04:21 +0000)]
Correct an error of omission in the reimplementation of the page
cache: vm_object_page_remove() should convert any cached pages that
fall with the specified range to free pages.  Otherwise, there could
be a problem if a file is first truncated and then regrown.
Specifically, some old data from prior to the truncation might reappear.

Generalize vm_page_cache_free() to support the conversion of either a
subset or the entirety of an object's cached pages.

Reported by: tegge
Reviewed by: tegge
Approved by: re (kensmith)

16 years agoFix typo.
brueffer [Wed, 26 Sep 2007 21:31:47 +0000 (21:31 +0000)]
Fix typo.

Approved by: re (blanket)

16 years agoBelatedly add cxgb(4).
brueffer [Wed, 26 Sep 2007 21:30:50 +0000 (21:30 +0000)]
Belatedly add cxgb(4).

Approved by: re (blanket)

16 years agogem(4) works on all archs now.
brueffer [Wed, 26 Sep 2007 21:22:56 +0000 (21:22 +0000)]
gem(4) works on all archs now.

Approved by: re (blanket)

16 years agoo Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop()
marius [Wed, 26 Sep 2007 21:14:18 +0000 (21:14 +0000)]
o Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop()
  to gem_attach() as the former access softc members not yet initialized
  at that time and gem_reset() actually is enough to stop the chip. [1]
o Revise the use of gem_bitwait(); add bus_barrier() calls before calling
  gem_bitwait() to ensure the respective bit has been written before we
  starting polling on it and poll for the right bits to change, f.e. even
  though we only reset RX we have to actually wait for both GEM_RESET_RX
  and GEM_RESET_TX to clear. Add some additional gem_bitwait() calls in
  places we've been missing them according to the GEM documentation.
  Along with this some excessive DELAYs, which probably only were added
  because of bugs in gem_bitwait() and its use in the first place, as
  well as as have of an gem_bitwait() reimplementation in gem_reset_tx()
  were removed.
o Add gem_reset_rxdma() and use it to deal with GEM_MAC_RX_OVERFLOW errors
  more gracefully as unlike gem_init_locked() it resets the RX DMA engine
  only, causing no link loss and the FIFOs not to be cleared. Also use it
  deal with GEM_INTR_RX_TAG_ERR errors, with previously were unhandled.
  This was based on information obtained from the Linux GEM and OpenSolaris
  ERI drivers.
o Turn on workarounds for silicon bugs in the Apple GMAC variants.
  This was based on information obtained from the Darwin GMAC and Linux GEM
  drivers.
o Turn on "infinite" (i.e. maximum 31 * 64 bytes in length) DMA bursts.
  This greatly improves especially RX performance.
o Optimize the RX path, this consists of:
  - kicking the receiver as soon as we've a spare descriptor in gem_rint()
    again instead of just once after all the ready ones have been handled;
  - kicking the receiver the right way, i.e. as outlined in the GEM
    documentation in batches of 4 and by pointing it to the descriptor
    after the last valid one;
  - calling gem_rint() before gem_tint() in gem_intr() as gem_tint() may
    take quite a while;
  - doubling the size of the RX ring to 256 descriptors.
  Overall the RX performance of a GEM in a 1GHz Sun Fire V210 was improved
  from ~100Mbit/s to ~850Mbit/s.
o In gem_add_rxbuf() don't assign the newly allocated mbuf to rxs_mbuf
  before calling bus_dmamap_load_mbuf_sg(), if bus_dmamap_load_mbuf_sg()
  fails we'll free the newly allocated mbuf, unable to recycle the
  previous one but a NULL pointer dereference instead.
o In gem_init_locked() honor the return value of gem_meminit().
o Simplify gem_ringsize() and dont' return garbage in the default case.
  Based on OpenBSD.
o Don't turn on MAC control, MIF and PCS interrupts unless GEM_DEBUG is
  defined as we don't need/use these interrupts for operation.
o In gem_start_locked() sync the DMA maps of the descriptor rings before
  every kick of the transmitter and not just once after enqueuing all
  packets as the NIC might instantly start transmitting after we kicked
  it the first time.
o Keep state of the link state and use it to enable or disable the MAC
  in gem_mii_statchg() accordingly as well as to return early from
  gem_start_locked() in case the link is down. [3]
o Initialize the maximum frame size to a sane value.
o In gem_mii_statchg() enable carrier extension if appropriate.
o Increment if_ierrors in case of an GEM_MAC_RX_OVERFLOW error and in
  gem_eint(). [3]
o Handle IFF_ALLMULTI correctly; don't set it if we've turned promiscuous
  group mode on and don't clear the flag if we've disabled promiscuous
  group mode (these were mostly NOPs though). [2]
o Let gem_eint() also report GEM_INTR_PERR errors.
o Move setting sc_variant from gem_pci_probe() to gem_pci_attach() as
  device probe methods are not supposed to touch the softc.
o Collapse sc_inited and sc_pci into bits for sc_flags.
o Add CTASSERTs ensuring that GEM_NRXDESC and GEM_NTXDESC are set to
  legal values.
o Correctly set up for 802.3x flow control, though #ifdef out the code
  that actually enables it as this needs more testing and mainly a proper
  framework to support it.
o Correct and add some conversions from hard-coded functions names to
  __func__ which were borked or forgotten in if_gem.c rev. 1.42.
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o In gem_pci_attach() in case attaching fails release the resources in
  the opposite order they were allocated.
o Make gem_reset() static to if_gem.c as it's not needed outside that
  module.
o Remove the GEM_GIGABIT flag and the associated code; GEM_GIGABIT was
  never set and the associated code was in the wrong place.
o Remove sc_mif_config; it was only used to cache the contents of the
  respective register within gem_attach().
o Remove the #ifdef'ed out NetBSD/OpenBSD code for establishing a suspend
  hook as it will never be used on FreeBSD.
o Also probe Apple Intrepid 2 GMAC and Apple Shasta GMAC, add support for
  Apple K2 GMAC. Based on OpenBSD.
o Add support for Sun GBE/P cards, or in other words actually add support
  for cards based on GEM to gem(4). This mainly consists of adding support
  for the TBI of these chips. Along with this the PHY selection code was
  rewritten to hardcode the PHY number for certain configurations as for
  example the PHY of the on-board ERI of Blade 1000 shows up twice causing
  no link as the second incarnation is isolated.
  These changes were ported from OpenBSD with some additional improvements
  and modulo some bugs.
o Add code to if_gem_pci.c allowing to read the MAC-address from the VPD on
  systems without Open Firmware.
  This is an improved version of my variant of the respective code in
  if_hme_pci.c
o Now that gem(4) is MI enable it for all archs.

Pointed out by: yongari [1]
Suggested by: rwatson [2], yongari [3]
Tested on: i386 (GEM), powerpc (GMACs by marcel and yongari),
sparc64 (ERI and GEM)
Reviewed by: yongari
Approved by: re (kensmith)

16 years ago- Use the actual clock frequency of the PCI bus instead of assuming
marius [Wed, 26 Sep 2007 20:10:36 +0000 (20:10 +0000)]
- Use the actual clock frequency of the PCI bus instead of assuming
  33MHz for calculating the latency timer values for its children.
  Inspired by NetBSD doing the same and Linux as well as OpenSolaris
  using a similar approach.
  While at it rename a variable and change its type to be more
  appropriate fuer values of PCI properties so the variable can be
  more easily reused.
- Initialize the cache line size register of PCI devices to a
  legal value; the cache line size is limited to 64 bytes by the
  Fireplane/Safari, JBus and UPA interconnection busses. Setting
  it to an unsupported value caused bad performance at least with
  GEM as it causes them to not do cache line bursts and to not
  issue cache line commands on the PCI bus.

Approved by: re (kensmith)
MFC after: 1 week

16 years agoUse the correct expanded name for SCTP.
brueffer [Wed, 26 Sep 2007 20:05:07 +0000 (20:05 +0000)]
Use the correct expanded name for SCTP.

PR: 116496
Submitted by: koitsu
Reviewed by: rrs
Approved by: re (kensmith)

16 years agoFix the description of the formula used to autosize the number of
ru [Wed, 26 Sep 2007 11:22:23 +0000 (11:22 +0000)]
Fix the description of the formula used to autosize the number of
buffers in the buffer cache.

Approved by: re (kensmith)

16 years agoMention that autoboot_delay also accepts the "NO" value.
ru [Wed, 26 Sep 2007 08:38:25 +0000 (08:38 +0000)]
Mention that autoboot_delay also accepts the "NO" value.

Approved by: re (kensmith)

16 years agoForce -O1 compilation when targeted for ia64. GCC 4 generates
marcel [Wed, 26 Sep 2007 01:31:28 +0000 (01:31 +0000)]
Force -O1 compilation when targeted for ia64. GCC 4 generates
bad code at -O2. Since this is likely caused by the low-level
optimizer, testing TARGET_ARCH rather than MACHINE_ARCH should
handle ia64 cross-compilation as well. With this work-around
in place, we can release using the current GCC and Binutils
code at the default optimization level on ia64.

Approved by: re (kensmith)

16 years agoFix possible uninitialized variable insert due to previous commit.
edwin [Tue, 25 Sep 2007 21:41:22 +0000 (21:41 +0000)]
Fix possible uninitialized variable insert due to previous commit.

Pointy hat to: me and my absence of -Wall in my CFLAGS.

MFC will happen at the same time of the earlier commit.

Thanks to ru@ for spotting.

Approved by: re (Ken Smith), grog@ (mentor)

16 years agoFix for a very rare race, caused by the nfsiod wakeup and nfsiod idle
mohans [Tue, 25 Sep 2007 21:08:49 +0000 (21:08 +0000)]
Fix for a very rare race, caused by the nfsiod wakeup and nfsiod idle
timeout occurring at exactly the same time. If this happens, the nfsiod
exits although there may be a queued async IO request for it.

Found by : Kris Kennaway
Approved by: re

16 years agoif_axe.c 1.54 and if_axereg.h 1.15 were obtained from OpenBSD.
imp [Tue, 25 Sep 2007 21:08:33 +0000 (21:08 +0000)]
if_axe.c 1.54 and if_axereg.h 1.15 were obtained from OpenBSD.

Pointed out by: sam@
Obtained from: openbsd (prev rev)
Approved by: re@
Pointy stick to the eye: imp@

16 years agoCorrect an error in the previous revision, specifically,
alc [Tue, 25 Sep 2007 21:01:10 +0000 (21:01 +0000)]
Correct an error in the previous revision, specifically,
vm_object_madvise() should request that the reactivated, cached page
not be busied.

Reported by: Rink Springer
Approved by: re (kensmith)

16 years agoAdd support for the AX88178 and AX88772 based devices.
imp [Tue, 25 Sep 2007 20:47:24 +0000 (20:47 +0000)]
Add support for the AX88178 and AX88772 based devices.

Submitted by: sam@
Approved by: re@ (blanket)

16 years agoAssorted spelling, punctuation and mdoc fixes.
brueffer [Tue, 25 Sep 2007 16:48:08 +0000 (16:48 +0000)]
Assorted spelling, punctuation and mdoc fixes.

Approved by: re (blanket)

16 years agoo enable use of EAP methods w/o modification to the base system; use
sam [Tue, 25 Sep 2007 16:08:16 +0000 (16:08 +0000)]
o enable use of EAP methods w/o modification to the base system; use
  WPA_SUPPLICANT_CFLAGS, etc. (consult the Makefile's for details)
o enable ipv6 support in hostapd (for communication w/ a radius backend)

PR: bin/116164
Submitted by: "Scot Hetzel" <swhetzel@gmail.com>
Approved by: re (gnn)
MFC after: 2 weeks

16 years ago- Use the correct expanded name for SCTP (1)
brueffer [Tue, 25 Sep 2007 16:03:10 +0000 (16:03 +0000)]
- Use the correct expanded name for SCTP (1)
- Remove empty section

PR: 116496 (1)
Submitted by: koitsu
Approved by: re (blanket)

16 years agoChange the management of cached pages (PQ_CACHE) in two fundamental
alc [Tue, 25 Sep 2007 06:25:06 +0000 (06:25 +0000)]
Change the management of cached pages (PQ_CACHE) in two fundamental
ways:

(1) Cached pages are no longer kept in the object's resident page
splay tree and memq.  Instead, they are kept in a separate per-object
splay tree of cached pages.  However, access to this new per-object
splay tree is synchronized by the _free_ page queues lock, not to be
confused with the heavily contended page queues lock.  Consequently, a
cached page can be reclaimed by vm_page_alloc(9) without acquiring the
object's lock or the page queues lock.

This solves a problem independently reported by tegge@ and Isilon.
Specifically, they observed the page daemon consuming a great deal of
CPU time because of pages bouncing back and forth between the cache
queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE).  The source of
this problem turned out to be a deadlock avoidance strategy employed
when selecting a cached page to reclaim in vm_page_select_cache().
However, the root cause was really that reclaiming a cached page
required the acquisition of an object lock while the page queues lock
was already held.  Thus, this change addresses the problem at its
root, by eliminating the need to acquire the object's lock.

Moreover, keeping cached pages in the object's primary splay tree and
memq was, in effect, optimizing for the uncommon case.  Cached pages
are reclaimed far, far more often than they are reactivated.  Instead,
this change makes reclamation cheaper, especially in terms of
synchronization overhead, and reactivation more expensive, because
reactivated pages will have to be reentered into the object's primary
splay tree and memq.

(2) Cached pages are now stored alongside free pages in the physical
memory allocator's buddy queues, increasing the likelihood that large
allocations of contiguous physical memory (i.e., superpages) will
succeed.

Finally, as a result of this change long-standing restrictions on when
and where a cached page can be reclaimed and returned by
vm_page_alloc(9) are eliminated.  Specifically, calls to
vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and
return a formerly cached page.  Consequently, a call to malloc(9)
specifying M_NOWAIT is less likely to fail.

Discussed with: many over the course of the summer, including jeff@,
   Justin Husted @ Isilon, peter@, tegge@
Tested by: an earlier version by kris@
Approved by: re (kensmith)

16 years agoAllow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be
jhb [Mon, 24 Sep 2007 20:49:39 +0000 (20:49 +0000)]
Allow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be
set via loader tunables.  They are already tunable via sysctl.

MFC after: 1 week
Approved by: re (kensmith)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r172314,
jkim [Mon, 24 Sep 2007 17:12:36 +0000 (17:12 +0000)]
This commit was generated by cvs2svn to compensate for changes in r172314,
which included commits to RCS files with non-trunk default branches.

16 years agoFix global lock recursion bug.
jkim [Mon, 24 Sep 2007 17:12:36 +0000 (17:12 +0000)]
Fix global lock recursion bug.

This patch was part of ACPI-CA 20070508 release and the
following is excerpt from its change log:

Fixed a problem where the Global Lock handle was not properly
updated if a thread that acquired the Global Lock via executing
AML code then attempted to acquire the lock via the
AcpiAcquireGlobalLock interface. Reported by Joe Liu.

Approved by: re (kensmith)
Tested by: ambrisko
Obtained from: Intel

16 years agoRewrite the EC driver event model. The main goal is to avoid
njl [Mon, 24 Sep 2007 16:59:06 +0000 (16:59 +0000)]
Rewrite the EC driver event model.  The main goal is to avoid
polling/interrupt-driven fallback and instead use polling only during
boot and pure interrupt-driven mode after boot.  Polled mode could be
relegated completely to a legacy role if we could enable interrupts
during boot.  Polled mode can be forced after boot by setting
debug.acpi.ec.polled="1", i.e. if there are timeouts.

- Use polling only during boot, shutdown, or if requested by the user.
  Otherwise, use a generation count of GPEs, incremented atomically.  This
  prevents an old status value from being used if the EC is really slow
  and the same condition (i.e. multiple IBEs for a write transaction) is
  being checked.
- Check for and run the query handler directly if the SCI bit is set in
  the status register during boot.  Previously, the query handler wouldn't
  run until interrupts were finally enabled late in boot.
- During boot and after starting a command, check if the event appears
  to already have occurred before we even start waiting.  If so, it's
  possible the EC is very slow and we might accept an old status value.
  Print a warning in this case.  Once we've booted, interrupt-driven mode
  should work just fine but polled mode could be unreliable.  There's not
  much more we can do about this until interrupts are enabled during boot.
- In the above case, we also do one final check if the interrupt-driven
  mode gets a timeout.  If the status is complete, it will force the
  system back into polled mode since interrupt mode doesn't work.  For
  polled mode during boot, if the status appears to be already complete
  before beginning the check loop, it waits 10 us before actually checking
  the status, just in case the EC is really slow and hasn't gotten to work
  on the new request yet.
- Use upper-case hex for the _Qxx method
- Use device_printf for errors, don't hide them under verbose
- Increase default total timeout to 750 ms and decrease polling interval
  to 5 us.
- Don't pass the status value via the softc.  Just read it directly.
- Remove the mutex. We use the sx lock for transaction serialization
  with the query handler.
- Remove the Intel copyright notice as no code of theirs was ever
  present in this file (verified against rev 1.1)
- Allow KTR module-only builds for ease of testing

Thanks to jkim and Alexey Starikovskiy for helpful discussions and testing.

Approved by: re
MFC after: 2 weeks

16 years agoRevert rev. 1.94. After recent tcp backouts, tcp_close() may return NULL.
kib [Mon, 24 Sep 2007 14:46:27 +0000 (14:46 +0000)]
Revert rev. 1.94. After recent tcp backouts, tcp_close() may return NULL.
Check the return value of tcp_close() being NULL before dereferencing it
in #ifdef TCPDEBUG block.

Reviewed by: rwatson
Approved by: re (gnn)

16 years agoForced commit to note, that the last commit fixed my bug, and was not
pjd [Mon, 24 Sep 2007 06:14:27 +0000 (06:14 +0000)]
Forced commit to note, that the last commit fixed my bug, and was not
because of differences between how tinderbox compile LINT - after this
change I only compiled LINT on i386 and the bug shows up on 64bit platforms.

Requested by: des
Approved by: re (implicitly)

16 years agoTwo changes:
silby [Mon, 24 Sep 2007 05:26:24 +0000 (05:26 +0000)]
Two changes:

- Reintegrate the ANSI C function declaration change
  from tcp_timer.c rev 1.92

- Reorganize the tcpcb structure so that it has a single
  pointer to the "tcp_timer" structure which contains all
  of the tcp timer callouts.  This change means that when
  the single tcp timer change is reintegrated, tcpcb will
  not change in size, and therefore the ABI between
  netstat and the kernel will not change.

Neither of these changes should have any functional
impact.

Reviewed by: bmah, rrs
Approved by: re (bmah)

16 years ago - Bound the interactivity score so that it cannot become negative.
jeff [Mon, 24 Sep 2007 00:28:54 +0000 (00:28 +0000)]
 - Bound the interactivity score so that it cannot become negative.

Approved by: re

16 years agoCertain consumers of rtalloc like gif(4) and if_stf(4) lookup the
csjp [Sun, 23 Sep 2007 17:50:17 +0000 (17:50 +0000)]
Certain consumers of rtalloc like gif(4) and if_stf(4) lookup the
route and once they are done with it, call rtfree().  rtfree() should
only be used when we are certain we hold the last reference to the
route.  This bug results in console messages like the following:

rtfree: 0xc40f7000 has 1 refs

This patch switches the rtfree() to use RTFREE_LOCKED() instead,
which should handle the reference counting on the route better.

Approved by: re@ (gnn)
Reviewed by: bms
Reported by: many via net@ and current@
Tested by: many

16 years agoo Cosmetic: fix the issue when "ipfw(8) show" produces "not" twice:
maxim [Sun, 23 Sep 2007 16:29:22 +0000 (16:29 +0000)]
o Cosmetic: fix the issue when "ipfw(8) show" produces "not" twice:

$ ipfw -n add 1 allow layer2 not mac-type ip
00001 allow ip from any to any layer2 not not mac-type 0x0800

PR: bin/115372
Submitted by: Andrey V. Elsukov
Approved by: re (hrs)
MFC after: 3 weeks

16 years agoo s/filesystem/file system/g.
maxim [Sun, 23 Sep 2007 16:06:37 +0000 (16:06 +0000)]
o s/filesystem/file system/g.

Pointed out by: ru
Approved by: re (bmah)
MFC after: 3 days

16 years agoLINT compiled just fine for me, but it seems it breaks tinerbox way of
pjd [Sun, 23 Sep 2007 15:10:48 +0000 (15:10 +0000)]
LINT compiled just fine for me, but it seems it breaks tinerbox way of
compiling LINT.

Approved by: re (implicitly)

16 years agoRemove some of the pessimizations involving writing the fsi sector.
bde [Sun, 23 Sep 2007 14:49:32 +0000 (14:49 +0000)]
Remove some of the pessimizations involving writing the fsi sector.
All active fields in fsi are advisory/optional, so we shouldn't do
extra work to make them valid at all times, but instead we write to
the fsi too often (we still do), and we searched for a free cluster
for fsinxtfree too often.

This commit just removes the whole search and its results, so that we
write out our in-core copy of fsinxtfree instead of writing a "fixed"
copy and clobbering our in-core copy.  This saves fixing 3 bugs:
- off-by-1 error for the end of the search, resulting in fsinxtfree
  not actually being adjusted iff only the last cluster is free.
- missing adjustment when no clusters are free.
- off-by-many error for the start of the search.  Starting the search
  at 0 instead of at (the in-core copy of) fsinxtfree did more than
  defeat the reasons for existence of fsinxtfree.  fsinxtfree exists
  mainly to avoid having to start at 0 for just the first search per
  mount, but has the side effect of reducing bias towards allocating
  near cluster 0.  The bias would normally only be generated by the
  first search per mount (if fsinxtfree is not supported), but since
  we also adjusted the in-core copy of fsinxtfree here, we were doing
  extra work to maximize the bias.

Approved by: re (kensmith)

16 years agoBring in the GEOM Virtualisation class, which allows to create huge GEOM
pjd [Sun, 23 Sep 2007 07:34:23 +0000 (07:34 +0000)]
Bring in the GEOM Virtualisation class, which allows to create huge GEOM
providers with limited physical storage and add physical storage as
needed.

Submitted by: Ivan Voras
Sponsored by: Google Summer of Code 2006
Approved by: re (kensmith)

16 years agoNow that we have CDDLed code in the tree, add CDDL license.
pjd [Sun, 23 Sep 2007 07:04:50 +0000 (07:04 +0000)]
Now that we have CDDLed code in the tree, add CDDL license.

Discussed with: core
Approved by: re (kensmith)

16 years agoMake sure we do not call _arm_bzero() or _arm_memcpy() if the size is not at
cognet [Sat, 22 Sep 2007 22:47:48 +0000 (22:47 +0000)]
Make sure we do not call _arm_bzero() or _arm_memcpy() if the size is not at
least the minimum asked by the driver.

Approved by: re (blanket)

16 years agoAdd various macros for the ADMA unit.
cognet [Sat, 22 Sep 2007 22:25:24 +0000 (22:25 +0000)]
Add various macros for the ADMA unit.

Approved by: re (blanket)

16 years agoRemove PF_MPSAFE_UGID leftover.
mlaier [Sat, 22 Sep 2007 18:22:31 +0000 (18:22 +0000)]
Remove PF_MPSAFE_UGID leftover.

Spotted by: bz
Approved by: re (gnn)

16 years agoAdd a driver for the 7seg found on the CRB board, largely based on the
cognet [Sat, 22 Sep 2007 16:25:43 +0000 (16:25 +0000)]
Add a driver for the 7seg found on the CRB board, largely based on the
IQ31244 version.

Approved by: re (blanket)

16 years agoTwist the RAS logic a bit to avoid branching.
cognet [Sat, 22 Sep 2007 14:23:52 +0000 (14:23 +0000)]
Twist the RAS logic a bit to avoid branching.

MFC After: 1 week
Approved by: re (blanket)

16 years agoThe precision for a string argument in a call to warnx() needs to be cast
scf [Sat, 22 Sep 2007 02:30:44 +0000 (02:30 +0000)]
The precision for a string argument in a call to warnx() needs to be cast
to an int to remove the warning from using a size_t variable on 64-bit
platforms.

Submitted by: Xin LI <delphij@FreeBSD.org>
Approved by: wes
Approved by: re (kensmith)

16 years ago - Improve grammar. s/it's/its/.
jeff [Sat, 22 Sep 2007 02:20:14 +0000 (02:20 +0000)]
 - Improve grammar.  s/it's/its/.
 - Improve load long-term load balancer by always IPIing exactly once.
   Previously the delay after rebalancing could cause problems with
   uneven workloads.
 - Allow nice to have a linear effect on the interactivity score.  This
   allows negatively niced programs to stay interactive longer.  It may be
   useful with very expensive Xorg servers under high loads.  In general
   it should not be necessary to alter the nice level to improve interactive
   response.  We may also want to consider never allowing positively niced
   processes to become interactive at all.
 - Initialize ccpu to 0 rather than 0.0.  The decimal point was leftover
   from when the code was copied from 4bsd.  ccpu is 0 in ULE because ULE
   only exports weighted cpu values.

Reported by: Steve Kargl (Load balancing problem)
Approved by: re

16 years agoDisable multiple ntfs mounts to the same mountpoint.
rodrigc [Fri, 21 Sep 2007 23:50:15 +0000 (23:50 +0000)]
Disable multiple ntfs mounts to the same mountpoint.
Eliminates panics due to locking issues.
Idea taken from src/sys/gnu/fs/xfs/FreeBSD/xfs_super.c.

PR: 89966, 92000, 104393
Reported by: H. Matsuo <hiroshi50000 yahoo co jp>,
Chris <m2chrischou gmail.com>,
Andrey V. Elsukov <bu7cher yandex ru>,
Jan Henrik Sylvester <me janh de>
Approved by: re (kensmith)

16 years agoUpdate to calendar/calendars/hr_HR.ISO_8859-2/calendar.praznici
edwin [Fri, 21 Sep 2007 23:43:03 +0000 (23:43 +0000)]
Update to calendar/calendars/hr_HR.ISO_8859-2/calendar.praznici
with fixes and new dates.

PR: conf/26658
Submitted by: Josip Rodin <joy@gkvk.hr>
Approved by: re@ (bmah), grog@ (mentor)
MFC after: 1 week

16 years agoTranslate partitions of type "PART" to chunks of the same type
marcel [Fri, 21 Sep 2007 16:24:01 +0000 (16:24 +0000)]
Translate partitions of type "PART" to chunks of the same type
as they would have been translated from partitions of type "GPT".
This fixes sysinstall, now that geom_part has taken over from
geom_gpt.

Approved by: re (kensmith)

16 years agoOn PowerPC, geom_part has taken over the partitioning from geom_apple.
marcel [Fri, 21 Sep 2007 16:19:50 +0000 (16:19 +0000)]
On PowerPC, geom_part has taken over the partitioning from geom_apple.
Translate partitions of type "PART" to chunks of type "apple" on
PowerPC. This fixes sysinstall.

Approved by: re (kensmith)

16 years agoAdd FreeBSD history.
obrien [Fri, 21 Sep 2007 14:05:26 +0000 (14:05 +0000)]
Add FreeBSD history.

Approved by: re(ken)

16 years ago- added in missing \n for my entry
tabthorpe [Fri, 21 Sep 2007 13:03:24 +0000 (13:03 +0000)]
- added in missing \n for my entry

Submitted by: breueffer@
Approved by: re, miwi (mentor)

16 years ago- add my entry
tabthorpe [Fri, 21 Sep 2007 12:12:13 +0000 (12:12 +0000)]
- add my entry

Approved by: re (bmah), clsung/miwi (mentors)

16 years agoFix some locking cases where we ask for exclusively locked vnode, but we get
pjd [Fri, 21 Sep 2007 10:16:56 +0000 (10:16 +0000)]
Fix some locking cases where we ask for exclusively locked vnode, but we get
shared locked vnode in instead when vfs.lookup_shared is set to 1.

Discussed with: kib, kris
Tested by: kris
Approved by: re (kensmith)

16 years agoFor arguments declared as numbers always use expand_number(3).
pjd [Fri, 21 Sep 2007 10:00:05 +0000 (10:00 +0000)]
For arguments declared as numbers always use expand_number(3).
This allows to use numbers in human-readable form in many geom(8)
utilities. Such a simple change and makes live so much nicer.
Some examples:

gstripe label -s 16k
gmirror label -s 4k
gnop create -o 1g -s 128m -S 2k
gjournal label -s 2g
geli label -i 128k -s 4k

Approved by: re (kensmith)

16 years agoUse 'val' function argument instead of 'optarg' global variable.
pjd [Fri, 21 Sep 2007 09:52:43 +0000 (09:52 +0000)]
Use 'val' function argument instead of 'optarg' global variable.
This doesn't fix any real bug, because in those tw ocases we always
passed 'optarg' as 'val'.

Approved by: re (kensmith)

16 years agoDead code removal.
mav [Fri, 21 Sep 2007 08:25:55 +0000 (08:25 +0000)]
Dead code removal.

Approved by: re (kensmith), glebius (mentor)

16 years agoThis is optimization of ether and debug hooks determination. It
mav [Fri, 21 Sep 2007 08:24:08 +0000 (08:24 +0000)]
This is optimization of ether and debug hooks determination. It
simplifies code and should speedup pppoe_findsession() function which is
called for every incoming packet.

Approved by: re (kensmith), glebius (mentor)

16 years agoThis patch fixes thread unsafe usage of global pkt_hdr
mav [Fri, 21 Sep 2007 08:16:33 +0000 (08:16 +0000)]
This patch fixes thread unsafe usage of global pkt_hdr
variable. Second part is not so important, but IMO is also good.

Approved by: re (kensmith), glebius (mentor)

16 years ago - Redefine p_swtime and td_slptime as p_swtick and td_slptick. This
jeff [Fri, 21 Sep 2007 05:07:07 +0000 (05:07 +0000)]
 - Redefine p_swtime and td_slptime as p_swtick and td_slptick.  This
   changes the units from seconds to the value of 'ticks' when swapped
   in/out.  ULE does not have a periodic timer that scans all threads in
   the system and as such maintaining a per-second counter is difficult.
 - Change computations requiring the unit in seconds to subtract ticks
   and divide by hz.  This does make the wraparound condition hz times
   more frequent but this is still in the range of several months to
   years and the adverse effects are minimal.

Approved by:    re

16 years agoFix the archive_write_data() function so it always returns
kientzle [Fri, 21 Sep 2007 04:52:43 +0000 (04:52 +0000)]
Fix the archive_write_data() function so it always returns
number of bytes written, even when used to write files to
disk.  Extend the test suite to verify the correct return
values for archive_write_data() and archive_write_data_block().

Thanks to: Bruce Mah, for stepping in promptly to back out the
   earlier broken version of this fix
Thanks to: Colin Percival, for pointing out the correct fix
MFC after: 5 days
Approved by: re (ksmith)
Pointy hat: \me

16 years ago- fix (global) address handling in the presence of duplicates, the
rrs [Fri, 21 Sep 2007 04:19:33 +0000 (04:19 +0000)]
- fix (global) address handling in the presence of duplicates, the
  last interface should own the address, but the current code
  fumbles the handoff. This fixes that.
- move address related debugs to PCB4 and add additional ones to
  help in debugging address problems.

Approved by: re@freebsd.org (K Smith)

16 years ago - When using kvm use the new conversion method to derive swtime.
jeff [Fri, 21 Sep 2007 04:11:34 +0000 (04:11 +0000)]
 - When using kvm use the new conversion method to derive swtime.

Approved by: re

16 years ago - Redefine p_swtime and td_slptime as p_swtick and td_slptick. This
jeff [Fri, 21 Sep 2007 04:10:23 +0000 (04:10 +0000)]
 - Redefine p_swtime and td_slptime as p_swtick and td_slptick.  This
   changes the units from seconds to the value of 'ticks' when swapped
   in/out.  ULE does not have a periodic timer that scans all threads in
   the system and as such maintaining a per-second counter is difficult.
 - Change computations requiring the unit in seconds to subtract ticks
   and divide by hz.  This does make the wraparound condition hz times
   more frequent but this is still in the range of several months to
   years and the adverse effects are minimal.

Approved by: re

16 years ago - Call sched_sleep() before we suspend threads. sched_wakeup() is already
jeff [Fri, 21 Sep 2007 04:04:22 +0000 (04:04 +0000)]
 - Call sched_sleep() before we suspend threads.  sched_wakeup() is already
   called via setrunnable().  This allows time slept while suspended to
   be accounted for swap.

Approved by: re

16 years ago- Add the device ID for the VIA VT3324 (CX700) chipset.
kevlo [Fri, 21 Sep 2007 02:10:13 +0000 (02:10 +0000)]
- Add the device ID for the VIA VT3324 (CX700) chipset.
- Set and Get aperture size correctly for VIA's AGP3 chipsets.

Approved by: re (kensmith)

16 years agoUse NULL instead of 0 for the return value of fopen().
kevlo [Fri, 21 Sep 2007 01:55:11 +0000 (01:55 +0000)]
Use NULL instead of 0 for the return value of fopen().

Approved by: re (kensmith)

16 years agoUse the udp protocol in favor of the nonexistant upd protocol in the
brooks [Fri, 21 Sep 2007 01:26:00 +0000 (01:26 +0000)]
Use the udp protocol in favor of the nonexistant upd protocol in the
sge_execd entry.

Reported by: emaste
Pointy hat to: brooks
Approved by: re (kensmith)

16 years agoFix some improper handling of malloc failures
matteo [Thu, 20 Sep 2007 22:35:24 +0000 (22:35 +0000)]
Fix some improper handling of malloc failures

PR: bin/83344 , kern/81987
Reviewed by: alfred
Approved by: re (kensmith)
MFC after: 1 week

16 years agoMore dates: Sint Maarten, Dierendag, Trinitatis
edwin [Thu, 20 Sep 2007 21:46:04 +0000 (21:46 +0000)]
More dates: Sint Maarten, Dierendag, Trinitatis
Fix spelling: Carnaval
Add more of the Royal Family.

Approved by: re@ (Ken Smith), grog@ (mentor)
MFC after: 1 week

16 years agoman(1) can't handle compressed included files.
edwin [Thu, 20 Sep 2007 21:37:29 +0000 (21:37 +0000)]
man(1) can't handle compressed included files.

Some ports will install with compressed manpages. man handles
this by looking for the .gz version of a man source file.
It is also common to include other files with the .so
directive where commands or functions share a man page.
Traditionally ports have had to handle this by either not
compressing the manpages, or using the _MLINKS macro in the
port makefile to create symlinks to the actual source file,
rather than using .so versions. Notably, the current version
of Xorg port breaks. See ports/113096 and ports/115845.

PR: bin/115850
Submitted by: Callum Gibson <callumgibson@optusnet.com.au>
Approved by: re@ (ken smith), grog@ (mentor)
MFC after: 1 week

16 years agoFix some entries in the locks static table of witness.
attilio [Thu, 20 Sep 2007 20:38:43 +0000 (20:38 +0000)]
Fix some entries in the locks static table of witness.
In particular:
- smp_tlb_mtx is no longer used, so it is axed.
- smp rendezvous lock isn't really a leaf spin-mutex. Its bad placement in
  the table, however, has been the source of a false positive LOR reporting
  with the dt_lock.  However, smp rendezvous lock would have had sched_lock
  there for older lock, so it wasn't still a leaf lock.
- allpmaps is only used in ia32 architecture, so it is inserted in the
  appropriate stub.

Addictionally:
- kse_zombie_lock is no longer present, so its definition is axed out.
- zombie_lock doesn't need to have an exported symbol, so just let's it be
  declared as static.

Tested by: kris
Approved by: jeff (mentor)
Approved by: re

16 years agoFill in cr2 in the signal context from ksi->ksi_addr.
kib [Thu, 20 Sep 2007 13:46:26 +0000 (13:46 +0000)]
Fill in cr2 in the signal context from ksi->ksi_addr.
Together with the sys/i386/i386/trap.c rev. 1.306 it fixes the PR.

Submitted by: rdivacky
Suggested by: jhb
Sponsored by: Google Summer of Code 2007
PR: kern/77710
Approved by: re (kensmith)

16 years ago- Fix a declaration example
gabor [Thu, 20 Sep 2007 10:52:08 +0000 (10:52 +0000)]
- Fix a declaration example

PR: docs/115632
Submitted by: Romain Tartiere <romain@blogreen.org>
Approved by: re (bmah)
MFC after: 3 days

16 years ago- Fix description to say "receive" instead of "send"
gabor [Thu, 20 Sep 2007 10:49:10 +0000 (10:49 +0000)]
- Fix description to say "receive" instead of "send"

PR: docs/115466
Submitted by: Bruce Cran <bruce@cran.org.uk>
Approved by: re (bmah)

16 years ago- Remove references to unexisting man pages
gabor [Thu, 20 Sep 2007 10:46:25 +0000 (10:46 +0000)]
- Remove references to unexisting man pages

PR: docs/116099
Submitted by: Ben Kaduk <minimarmot@gmail.com>
Approved by: re (bmah)
MFC after: 3 days

16 years agoSerialize output routine of terminal emulator (te_puts()) by a lock.
simokawa [Thu, 20 Sep 2007 04:05:59 +0000 (04:05 +0000)]
Serialize output routine of terminal emulator (te_puts()) by a lock.
- The output routine of low level console is not protected by any lock
by default.
- Increment and decrement of sc->write_in_progress are not atomic and
this may cause console hang.
- We also have many other states used by emulator that should be protected
by the lock.
- This change does not fix interspersed messages which PRINTF_BUFR_SIZE
kernel option should fix.

Approved by: re (bmah)
MFC after: 1 week

16 years agoAdd mmc and mmcsd, and correct a couple of comments. They are
imp [Wed, 19 Sep 2007 18:12:44 +0000 (18:12 +0000)]
Add mmc and mmcsd, and correct a couple of comments.  They are
commented out until I can re-test them on all our architectures.  I
had re@ approval to commit this a long time ago, but that's before we
were this close to the branch.

Approved by: re@

16 years agoFill in a missing 'e'
kientzle [Wed, 19 Sep 2007 16:37:45 +0000 (16:37 +0000)]
Fill in a missing 'e'

Thanks to: Kai Wang, for pointing this out
Approved by: re (bmah)
MFC after: 3 days

16 years agoUpdate the table of supported algorithms:
brueffer [Wed, 19 Sep 2007 16:28:46 +0000 (16:28 +0000)]
Update the table of supported algorithms:

- Group hash functions together and sort
- Add CRYPTO_CAMELLIA_CBC (1)

PR: 116471
Submitted by: Philip Schulz <phs@deadc0.de> (1)
Approved by: re (blanket)

16 years ago- Only assume that a PCI device on the same slot is a "neighbor" USB
jhb [Wed, 19 Sep 2007 16:21:34 +0000 (16:21 +0000)]
- Only assume that a PCI device on the same slot is a "neighbor" USB
  controller if it's sole child device has the "usb" device class.
  Previously ehci(4) would think that PCI-ISA bridges on the same slot
  (such as in some Intel ICHs) were "neighbors" resulting in spurious
  warnings about neighbor count mismatches.
- Fix a memory leak when looking for neighbors.

MFC after: 1 week
Approved by: re (kensmith)
Tested by: phk

16 years agoRemove dead code.
cognet [Wed, 19 Sep 2007 15:30:25 +0000 (15:30 +0000)]
Remove dead code.

Approved by: re (blanket)
Beer from: jadawin

16 years agoCatch up with the demise of /usr/X11R6
obrien [Wed, 19 Sep 2007 14:21:18 +0000 (14:21 +0000)]
Catch up with the demise of /usr/X11R6

Approved by: re(ken)