Commit Graph

170482 Commits

Author SHA1 Message Date
Jilles Tjoelker 23124c879c shutdown: Remove unnecessary 2-second delay. 2012-05-23 19:25:46 +00:00
Maksim Yevmenkin 251386b4b2 Tweak condition for disabling allocation from per-CPU buckets in
low memory situation. I've observed a situation where per-CPU
allocations were disabled while there were enough free cached pages.
Basically, cnt.v_free_count was sitting stable at a value lower
than cnt.v_free_min and that caused massive performance drop.

Reviewed by:	alc
MFC after:	1 week
2012-05-23 18:56:29 +00:00
Joel Dahl b59864441e Fix error reported by mandoc. 2012-05-23 18:41:45 +00:00
Xin LI dc89cfa691 Use %ju to match uintmax_t usage 2012-05-23 18:17:02 +00:00
Konstantin Belousov 4f1e1f86a1 Add 'cow' keyword to show per-process cow count.
Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-05-23 18:11:36 +00:00
Konstantin Belousov 4d34e019c4 Calculate the count of per-process cow faults. Export the count to
userspace using the obscure spare int field in struct kinfo_proc.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-05-23 18:10:54 +00:00
Xin LI 2920997423 Use %j and cast off_t to intmax_t for now to fix build.
Noticed by:	bz
2012-05-23 17:49:59 +00:00
Isabell Long af27459ace Add two new locale-specific man pages:
- libc/stdio/scanf_l.3
- libc/stdio/printf_l.3

Reviewed by:	theraven
Approved by:	gabor (mentor)
MFC after:	5 days
2012-05-23 17:13:30 +00:00
Konstantin Belousov 1f9b8fec59 The drm2 modules makefiles commit.
Still not attached to the build.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2012-05-23 17:10:22 +00:00
Konstantin Belousov 3c216b739e Add 'drmn' device as another drm child, to allow drm2 drivers to live
in parallel with drm1.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2012-05-23 17:09:14 +00:00
Jung-uk Kim 2aa7a9e686 Restore Processor object path for verbose boot message. 2012-05-23 17:03:09 +00:00
Warren Block 7b9da80729 Mention the upper hard limit for -n option. Patch slightly modified
from PR version.

PR:		168255
Submitted by:	Andy Kosela
Approved by:	gjb
MFC after:	3 days
2012-05-23 16:19:19 +00:00
Jamie Gritton 858b023a07 Note that the new jail(8) will be appearing in 9.1. 2012-05-23 15:30:13 +00:00
Joel Dahl a692c58a90 mdoc: move two sentences from synopsis to description (where they really
belong). With this change, mandoc now formats these manpages properly.
2012-05-23 15:06:13 +00:00
John Baldwin e4cd9dcff6 Rework the previous change to honor MADT processor IDs when probing
processor objects.  Instead of forcing the new-bus CPU objects to use
a unit number equal to pc_cpuid, adjust acpi_pcpu_get_id() to honor the
MADT IDs by default.  As with the previous change, setting
debug.acpi.cpu_unordered to 1 in the loader will revert to the old
behavior.

Tested by:	jimharris
MFC after:	1 month
2012-05-23 13:45:52 +00:00
John Baldwin d79a477554 Only check to see if a memory resource is a PCI ROM BAR when activating
and deactivating PCI resources.  Previously, if a device had more than
48 MSI interrupts, then activating message 48 (which has a rid == PCIR_BIOS)
would incorrectly try to enable the PCI ROM BAR.

Tested by:	Olivier Cinquin  ocinquin uci edu
MFC after:	3 days
2012-05-23 13:41:12 +00:00
Fabien Thomas 4cc50ab413 Soft PMC support for ARM.
Callgraph is not captured, only current location.

Sample system wide profiling: "pmcstat -Sclock.hard -T"
2012-05-23 13:23:40 +00:00
Andriy Gapon b6062382be vm_pager_object_lookup: small performance optimization
do not needlessly lock an object if its handle doesn't match

Reviewed by:	kib, alc
MFC after:	1 week
2012-05-23 12:51:49 +00:00
Michael Tuexen 807aad636f Use consistent text at the begining of the files.
MFC after: 3 days
2012-05-23 11:26:28 +00:00
Michael Tuexen 43dc9e2f41 Update copyright date.
MFC after: 3 days
2012-05-23 10:35:40 +00:00
Xin LI 64c06aeb8d Fix build:
- Use %ll instead of %q for explicit long long casts;
 - Use %j instead of %q in XFS and cast to intmax_t.

Tested with:	make universe
2012-05-23 06:49:50 +00:00
Pyun YongHyeon 00b6d640df Don't force max payload size to 128. Root complex and Endpoint will
negotiate with each other on the TLP payload size so blindly
forcing the size to 128 can cause a completion error which in turn
will stop device.

Reported by:	Geans Pin < geanspin <> broadcom dot com >
MFC after:	5 days
2012-05-23 03:35:08 +00:00
Pyun YongHyeon 9293eb399e Make IPMI work in the bce driver even when the interface is
configured down.  Formerly, IPMI communication was lost whenever the
interface was not up.  The reason was that the BCE_EMAC_MODE
register was not configured with the correct media settings.  There
are two parts to the fix.

First, resetting the chip in bce_reset() causes the BCE_EMAC_MODE
register to be initialized to a default value that does not
necessarily correspond to the actual media settings.  The fix
implemented here is a bit of a hack.  Ideally, at the end of
bce_reset() we would poll the PHY to determine the negotiated media,
and then we would set the BCE_EMAC_MODE register accordingly.  That
is difficult, since the PHY is abstracted behind the MII layer and is
not supposed to be queried directly from the MAC driver.  Instead,
we read the BCE_EMAC_MODE register at the beginning of bce_reset()
and then restore its media bits to their original values before
returning.  If IPMI is up and running, then the link is already
established and the BCE_EMAC_MODE register is already set appropriately
when bce_reset() is called.  If IPMI is not running, no harm is
done by preserving the BCE_EMAC_MODE settings.  The driver will set
the register properly once the interface is configured up and link
is established.

Second, bce_miibus_statchg() is sometimes called when the link is
down.  In that case, the reported media settings are invalid.
Formerly, the driver used them anyway to setup the BCE_EMAC_MODE
register.  We now avoid changing any MAC registers unless link is
active and the reported media settings are valid.

Submitted by:	jdp
Tested by:	jdp
MFC after:	5 days
2012-05-23 01:20:25 +00:00
Adrian Chadd e4f6061912 Re-up the TX ath_buf limit from 128 to 512.
I'll have to leave this high for now, until I've done some significant
surgery with how ath_bufs (and descriptors) are handled.

This should significantly cut down on the opportunities for a full TX
queue hanging traffic.  I'll continue making things work though; I'm
mostly doing this for users. :)
2012-05-22 19:50:21 +00:00
Edward Tomasz Napierala 1fb2497499 Fix use-after-free in kern_jail_set() triggered e.g. by attempts
to clear "persist" flag from empty persistent jail, like this:

jail -c persist=1
jail -n 1 -m persist=0

Submitted by:	Mateusz Guzik <mjguzik at gmail dot com>
MFC after:	2 weeks
2012-05-22 19:43:20 +00:00
Xin LI ba21c2b408 commandline -> command line
MFC after:	1 week
2012-05-22 19:40:54 +00:00
Adrian Chadd 545c886250 Fix some corner cases in the ieee80211_send_bar() handling.
* If the first call succeeded but failed to transmit, a timer would
  reschedule it via bar_timeout().  Unfortunately bar_timeout() didn't
  check the return value from the ieee80211_send_bar() reattempt and
  if that failed (eg the driver ic_raw_xmit() failed), it would never
  re-arm the timer.

* If BARPEND is cleared (which ieee80211_send_bar() will do if it can't
  TX), then re-arming the timer isn't enough - once bar_timeout() occurs,
  it'll see BARPEND is 0 and not run through the rest of the routine.
  So when rearming the timer, also set that flag.

* If the TX wasn't occuring, bar_tx_complete() wouldn't be called and the
  driver callback wouldn't be called either.  So the driver had no idea
  that the BAR TX attempt had failed.  In the ath(4) case, TX would stay
  paused.

  (There's no callback to indicate that BAR TX had failed or not;
  only a "BAR TX was attempted".  That's a separate, later problem.)

  So call the driver callback (ic_bar_response()) before the ADDBA session
  is torn down, so it has a chance of being notified that things didn't
  quite go to plan.

I've verified that yes, this does suspend traffic for ath(4), retry BAR
TX even if the driver is failing ic_raw_xmit(), and then eventually giving
up and sending a DELBA.  I'll address the "out of ath_buf" issue in ath(4)
in a subsequent commit - this commit just fixes the edge case where any
driver is (way) out of internal buffers/descriptors and fails frame TX.

PR:		kern/168170
Reviewed by:	bschmidt
MFC after:	1 month
2012-05-22 19:37:12 +00:00
Jamie Gritton cee9d6cc1d The fix in r235291 re-broke the "allow.nomount" case. Re-fix it
by testing for the right parameter name.
2012-05-22 18:30:32 +00:00
David E. O'Brien 08c5bca9c7 Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms. 2012-05-22 18:18:06 +00:00
Edward Tomasz Napierala e30345e790 Don't leak locks in prison_racct_modify().
Submitted by:	Mateusz Guzik <mjguzik at gmail dot com>
MFC after:	2 weeks
2012-05-22 17:30:02 +00:00
Baptiste Daroussin 5e2a209a27 Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
  'yyparse'

Approved by:	des (mentor)
2012-05-22 16:33:10 +00:00
Dag-Erling Smørgrav 5bfe3851cf Bump __FreeBSD_version for the byacc import, and update _bootstrap_tools. 2012-05-22 15:59:07 +00:00
Edward Tomasz Napierala ab27d5d88a Fix panic with RACCT that could occur in low memory (or out of swap)
situations, due to fork1() calling racct_proc_exit() without calling
racct_proc_fork() first.

Submitted by:	Mateusz Guzik <mjguzik at gmail dot com> (earlier version)
Reviewed by:	Mateusz Guzik <mjguzik at gmail dot com>
2012-05-22 15:58:27 +00:00
Konstantin Belousov e27f871969 Add the code for new Intel GPU driver, which supports GEM, KMS and
works with new generations of GPUs (IronLake, SandyBridge and
supposedly IvyBridge).

The driver is not connected to the build yet.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2012-05-22 11:07:44 +00:00
Konstantin Belousov 28d86329af A rewrite of the i810 bits of the agp(4) driver. New driver supports
operations required by GEMified i915.ko. It also attaches to SandyBridge
and IvyBridge CPU northbridges now.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2012-05-22 10:59:26 +00:00
Edward Tomasz Napierala 9280affe16 Fix enforcement of file size limit with O_APPEND on ZFS.
vn_rlimit_fsize takes uio->uio_offset and uio->uio_resid into account
when determining whether given write would exceed RLIMIT_FSIZE.

When APPEND flag is specified, ZFS updates uio->uio_offset to point to the
end of file.

But this happens after a call to vn_rlimit_fsize, so vn_rlimit_fsize check
can be rendered ineffective by thread that opens some file with O_APPEND
and lseeks below RLIMIT_FSIZE before calling write.

Submitted by:	Mateusz Guzik <mjguzik at gmail dot com>
MFC after:	2 weeks
2012-05-22 10:54:42 +00:00
Hartmut Brandt 7d0d2b0f86 Fix a compilation error with some compilers: __attribute__
requires two parenthesis for its argument, but instead of using
__attribute__ directly, use the appropriate __nonnull macro
from cdefs.h.
2012-05-22 09:59:49 +00:00
Grzegorz Bernacki 9c12d78912 Divide nand flash for DB6281 into two partitions. One for u-boot
and second one for general use.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
2012-05-22 09:27:57 +00:00
Grzegorz Bernacki 4ffd4dfe17 Add a new geom class which allows to divide NAND Flash chip
into partitions.

Partitions are created based on data in dts file which are
extracted and interpreted by slicer.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
2012-05-22 08:33:14 +00:00
Hartmut Brandt ac6e25ec7d Make dumptid non-static. It is used by libkvm to detect whether
this is a VNET-kernel or not. gcc used to put the static symbol into
the symbol table, clang does not. This fixes the 'netstat: no namelist'
error seen on clang+VNET systems.
2012-05-22 07:23:41 +00:00
Andrew Turner c415e17250 Fix booting on ARM.
In PHYS_TO_VM_PAGE() when VM_PHYSSEG_DENSE is set the check if we are past
the end of vm_page_array was incorrect causing it to return NULL. This
value is then used in vm_phys_add_page causing a data abort.

Reviewed by:	alc, kib, imp
Tested by:	stas
2012-05-22 07:04:23 +00:00
Ulrich Spörlein dc8cf3fc68 Fix make depend. 2012-05-22 06:33:08 +00:00
Adrian Chadd d3a6425b7c Fix up some corner cases with aggregation handling.
I've come across a weird scenario in net80211 where two TX streams will
happily attempt to setup an aggregation session together.
If we're very lucky, it happens concurrently on separate CPUs and the
total lack of locking in the net80211 aggregation code causes this stuff
to race. Badly.

So >1 call would occur to the ath(4) addba start, but only one call would
complete to addba complete or timeout.  The TID would thus stay paused.

The real fix is to implement some proper per-node (or maybe per-TID)
locking in net80211, which then could be leveraged by the ath(4) TX
aggregation code.

Whilst I'm at it, shuffle around the debugging messages a bit.
I like to keep people on their toes.
2012-05-22 06:31:03 +00:00
Dimitry Andric db763e7cdf Correct use_screen() and use_window() prototypes in curs_threads(3x).
Submitted by:	Yanhui Shen <shen.elf@gmail.com>
MFC after:	3 days
2012-05-22 06:28:53 +00:00
Mitsuru IWASAKI b12bc99f91 Ignore the power button press event for resuming rather than starting
shutdown.

MFC after:	2 days
2012-05-22 05:18:30 +00:00
Kevin Lo fcae0e3887 Remove redundant declaration of yyparse
Reported by:	tinderbox
2012-05-22 03:01:54 +00:00
Kevin Lo d52995b6cf Add missing header needed by free()
Reported by:	tinderbox
2012-05-22 01:28:32 +00:00
Jim Harris dd92530581 Wait until completion context unwinds before retrying CCBs that have been
queued internally.  This works around issue in the isci HAL where it cannot
accept new I/O to a device after a resetting->ready state transition until
the completion context has unwound.

This issue was found by submitting non-tagged CCBs through pass(4) interface
to a SATA disk with an extremely small timeout value (5ms).  This would trigger
internal resets with I/O in the isci(4) internal queues.

The small timeout value had not been intentional (and original reporter has
since changed his test to use 5sec instead), but it did uncover this corner
case that would result in a hung disk.

Sponsored by: Intel
Reported and tested by: Ravi Pokala <rpokala at panasas dot com>
Reviewed by: scottl (earlier version)
MFC after: 1 week
2012-05-21 22:54:33 +00:00
Adrian Chadd 6deb7f3271 For now, add a quick debugging patch to log when the hw TXQ != the TID/AC. 2012-05-21 22:43:38 +00:00
Adrian Chadd 4dfd450768 Rename ath_tx_cleanup() -> ath_tx_tid_cleanup() in order to not clash
with a symbol in if_ath.c
2012-05-21 22:39:13 +00:00