]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years ago - Correct signedness for casts;
delphij [Wed, 23 May 2012 20:51:21 +0000 (20:51 +0000)]
 - Correct signedness for casts;
 - Wrap long line while I'm there.

Noticed by: pjd, avg

12 years agomdoc: Only use macros inside a reference block.
joel [Wed, 23 May 2012 20:29:16 +0000 (20:29 +0000)]
mdoc: Only use macros inside a reference block.

12 years agomdoc: fix .Bl -offset.
joel [Wed, 23 May 2012 20:22:09 +0000 (20:22 +0000)]
mdoc: fix .Bl -offset.

12 years agoshutdown: Remove unnecessary 2-second delay.
jilles [Wed, 23 May 2012 19:25:46 +0000 (19:25 +0000)]
shutdown: Remove unnecessary 2-second delay.

12 years agoTweak condition for disabling allocation from per-CPU buckets in
emax [Wed, 23 May 2012 18:56:29 +0000 (18:56 +0000)]
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

12 years agoFix error reported by mandoc.
joel [Wed, 23 May 2012 18:41:45 +0000 (18:41 +0000)]
Fix error reported by mandoc.

12 years agoUse %ju to match uintmax_t usage
delphij [Wed, 23 May 2012 18:17:02 +0000 (18:17 +0000)]
Use %ju to match uintmax_t usage

12 years agoAdd 'cow' keyword to show per-process cow count.
kib [Wed, 23 May 2012 18:11:36 +0000 (18:11 +0000)]
Add 'cow' keyword to show per-process cow count.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoCalculate the count of per-process cow faults. Export the count to
kib [Wed, 23 May 2012 18:10:54 +0000 (18:10 +0000)]
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

12 years agoUse %j and cast off_t to intmax_t for now to fix build.
delphij [Wed, 23 May 2012 17:49:59 +0000 (17:49 +0000)]
Use %j and cast off_t to intmax_t for now to fix build.

Noticed by: bz

12 years agoAdd two new locale-specific man pages:
issyl0 [Wed, 23 May 2012 17:13:30 +0000 (17:13 +0000)]
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

12 years agoThe drm2 modules makefiles commit.
kib [Wed, 23 May 2012 17:10:22 +0000 (17:10 +0000)]
The drm2 modules makefiles commit.
Still not attached to the build.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

12 years agoAdd 'drmn' device as another drm child, to allow drm2 drivers to live
kib [Wed, 23 May 2012 17:09:14 +0000 (17:09 +0000)]
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

12 years agoRestore Processor object path for verbose boot message.
jkim [Wed, 23 May 2012 17:03:09 +0000 (17:03 +0000)]
Restore Processor object path for verbose boot message.

12 years agoMention the upper hard limit for -n option. Patch slightly modified
wblock [Wed, 23 May 2012 16:19:19 +0000 (16:19 +0000)]
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

12 years agoNote that the new jail(8) will be appearing in 9.1.
jamie [Wed, 23 May 2012 15:30:13 +0000 (15:30 +0000)]
Note that the new jail(8) will be appearing in 9.1.

12 years agomdoc: move two sentences from synopsis to description (where they really
joel [Wed, 23 May 2012 15:06:13 +0000 (15:06 +0000)]
mdoc: move two sentences from synopsis to description (where they really
belong). With this change, mandoc now formats these manpages properly.

12 years agoRework the previous change to honor MADT processor IDs when probing
jhb [Wed, 23 May 2012 13:45:52 +0000 (13:45 +0000)]
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

12 years agoOnly check to see if a memory resource is a PCI ROM BAR when activating
jhb [Wed, 23 May 2012 13:41:12 +0000 (13:41 +0000)]
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

12 years agoSoft PMC support for ARM.
fabient [Wed, 23 May 2012 13:23:40 +0000 (13:23 +0000)]
Soft PMC support for ARM.
Callgraph is not captured, only current location.

Sample system wide profiling: "pmcstat -Sclock.hard -T"

12 years agovm_pager_object_lookup: small performance optimization
avg [Wed, 23 May 2012 12:51:49 +0000 (12:51 +0000)]
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

12 years agoUse consistent text at the begining of the files.
tuexen [Wed, 23 May 2012 11:26:28 +0000 (11:26 +0000)]
Use consistent text at the begining of the files.

MFC after: 3 days

12 years agoUpdate copyright date.
tuexen [Wed, 23 May 2012 10:35:40 +0000 (10:35 +0000)]
Update copyright date.

MFC after: 3 days

12 years agoFix build:
delphij [Wed, 23 May 2012 06:49:50 +0000 (06:49 +0000)]
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

12 years agoDon't force max payload size to 128. Root complex and Endpoint will
yongari [Wed, 23 May 2012 03:35:08 +0000 (03:35 +0000)]
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

12 years agoMake IPMI work in the bce driver even when the interface is
yongari [Wed, 23 May 2012 01:20:25 +0000 (01:20 +0000)]
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

12 years agoRe-up the TX ath_buf limit from 128 to 512.
adrian [Tue, 22 May 2012 19:50:21 +0000 (19:50 +0000)]
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. :)

12 years agoFix use-after-free in kern_jail_set() triggered e.g. by attempts
trasz [Tue, 22 May 2012 19:43:20 +0000 (19:43 +0000)]
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

12 years agocommandline -> command line
delphij [Tue, 22 May 2012 19:40:54 +0000 (19:40 +0000)]
commandline -> command line

MFC after: 1 week

12 years agoFix some corner cases in the ieee80211_send_bar() handling.
adrian [Tue, 22 May 2012 19:37:12 +0000 (19:37 +0000)]
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

12 years agoThe fix in r235291 re-broke the "allow.nomount" case. Re-fix it
jamie [Tue, 22 May 2012 18:30:32 +0000 (18:30 +0000)]
The fix in r235291 re-broke the "allow.nomount" case.  Re-fix it
by testing for the right parameter name.

12 years agoDo not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms.
obrien [Tue, 22 May 2012 18:18:06 +0000 (18:18 +0000)]
Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms.

12 years agoDon't leak locks in prison_racct_modify().
trasz [Tue, 22 May 2012 17:30:02 +0000 (17:30 +0000)]
Don't leak locks in prison_racct_modify().

Submitted by: Mateusz Guzik <mjguzik at gmail dot com>
MFC after: 2 weeks

12 years agoFix world after byacc import:
bapt [Tue, 22 May 2012 16:33:10 +0000 (16:33 +0000)]
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)

12 years agoBump __FreeBSD_version for the byacc import, and update _bootstrap_tools.
des [Tue, 22 May 2012 15:59:07 +0000 (15:59 +0000)]
Bump __FreeBSD_version for the byacc import, and update _bootstrap_tools.

12 years agoFix panic with RACCT that could occur in low memory (or out of swap)
trasz [Tue, 22 May 2012 15:58:27 +0000 (15:58 +0000)]
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>

12 years agoAdd the code for new Intel GPU driver, which supports GEM, KMS and
kib [Tue, 22 May 2012 11:07:44 +0000 (11:07 +0000)]
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

12 years agoA rewrite of the i810 bits of the agp(4) driver. New driver supports
kib [Tue, 22 May 2012 10:59:26 +0000 (10:59 +0000)]
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

12 years agoFix enforcement of file size limit with O_APPEND on ZFS.
trasz [Tue, 22 May 2012 10:54:42 +0000 (10:54 +0000)]
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

12 years agoFix a compilation error with some compilers: __attribute__
harti [Tue, 22 May 2012 09:59:49 +0000 (09:59 +0000)]
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.

12 years agoDivide nand flash for DB6281 into two partitions. One for u-boot
gber [Tue, 22 May 2012 09:27:57 +0000 (09:27 +0000)]
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

12 years agoAdd a new geom class which allows to divide NAND Flash chip
gber [Tue, 22 May 2012 08:33:14 +0000 (08:33 +0000)]
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

12 years agoMake dumptid non-static. It is used by libkvm to detect whether
harti [Tue, 22 May 2012 07:23:41 +0000 (07:23 +0000)]
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.

12 years agoFix booting on ARM.
andrew [Tue, 22 May 2012 07:04:23 +0000 (07:04 +0000)]
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

12 years agoFix make depend.
uqs [Tue, 22 May 2012 06:33:08 +0000 (06:33 +0000)]
Fix make depend.

12 years agoFix up some corner cases with aggregation handling.
adrian [Tue, 22 May 2012 06:31:03 +0000 (06:31 +0000)]
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.

12 years agoCorrect use_screen() and use_window() prototypes in curs_threads(3x).
dim [Tue, 22 May 2012 06:28:53 +0000 (06:28 +0000)]
Correct use_screen() and use_window() prototypes in curs_threads(3x).

Submitted by: Yanhui Shen <shen.elf@gmail.com>
MFC after: 3 days

12 years agoIgnore the power button press event for resuming rather than starting
iwasaki [Tue, 22 May 2012 05:18:30 +0000 (05:18 +0000)]
Ignore the power button press event for resuming rather than starting
shutdown.

MFC after: 2 days

12 years agoRemove redundant declaration of yyparse
kevlo [Tue, 22 May 2012 03:01:54 +0000 (03:01 +0000)]
Remove redundant declaration of yyparse

Reported by: tinderbox

12 years agoAdd missing header needed by free()
kevlo [Tue, 22 May 2012 01:28:32 +0000 (01:28 +0000)]
Add missing header needed by free()

Reported by: tinderbox

12 years agoWait until completion context unwinds before retrying CCBs that have been
jimharris [Mon, 21 May 2012 22:54:33 +0000 (22:54 +0000)]
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

12 years agoFor now, add a quick debugging patch to log when the hw TXQ != the TID/AC.
adrian [Mon, 21 May 2012 22:43:38 +0000 (22:43 +0000)]
For now, add a quick debugging patch to log when the hw TXQ != the TID/AC.

12 years agoRename ath_tx_cleanup() -> ath_tx_tid_cleanup() in order to not clash
adrian [Mon, 21 May 2012 22:39:13 +0000 (22:39 +0000)]
Rename ath_tx_cleanup() -> ath_tx_tid_cleanup() in order to not clash
with a symbol in if_ath.c

12 years agoMake most BPF ioctls() SMP-safe.
melifaro [Mon, 21 May 2012 22:21:00 +0000 (22:21 +0000)]
Make most BPF ioctls() SMP-safe.

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoCall bpf_jitter() before acquiring BPF global lock due to malloc() being used inside...
melifaro [Mon, 21 May 2012 22:19:19 +0000 (22:19 +0000)]
Call bpf_jitter() before acquiring BPF global lock due to malloc() being used inside bpf_jitter.

Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor creation and BIOCSBLEN ioctl.
This permits us not to allocate buffers inside bpf_attachd() which is protected by global lock.

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoFix old panic when BPF consumer attaches to destroying interface.
melifaro [Mon, 21 May 2012 22:17:29 +0000 (22:17 +0000)]
Fix old panic when BPF consumer attaches to destroying interface.
'flags' field is added to the end of bpf_if structure. Currently the only
flag is BPFIF_FLAG_DYING which is set on bpf detach and checked by bpf_attachd()
Problem can be easily triggered on SMP stable/[89] by the following command (sort of):
'while true; do ifconfig vlan222 create vlan 222 vlandev em0 up ; tcpdump -pi vlan222 & ; ifconfig vlan222 destroy ; done'

Fix possible use-after-free when BPF detaches itself from interface, freeing bpf_bif memory,
while interface is still UP and there can be routes via this interface.
Freeing is now delayed till ifnet_departure_event is received via eventhandler(9) api.

Convert bpfd rwlock back to mutex due lack of performance gain (currently checking if packet
matches filter is done without holding bpfd lock and we have to acquire write lock if packet matches)

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoFix panic on attaching to non-existent interface (introduced by r233937, pointed...
melifaro [Mon, 21 May 2012 22:13:48 +0000 (22:13 +0000)]
Fix panic on attaching to non-existent interface (introduced by r233937, pointed by hrs@)
Fix panic on tcpdump being attached to interface being removed (introduced by r233937, pointed by hrs@ and adrian@)
Protect most of bpf_setf() by BPF global lock

Add several forgotten assertions (thanks to adrian@)

Document current locking model inside bpf.c
Document EVENTHANDLER(9) usage inside BPF.

Approved by:       kib(mentor)
Tested by:         gnn
MFC in:            4 weeks

12 years agoAdd checks for memory allocation failures in appropriate places, and
ghelmer [Mon, 21 May 2012 21:10:00 +0000 (21:10 +0000)]
Add checks for memory allocation failures in appropriate places, and
avoid creating bad entries in the grp list as a result of memory allocation
failures while building new entries.

PR: bin/83340
Reviewed by: delphij (prior version of patch)

12 years agoApply style(9) to return and switch/case statements.
ghelmer [Mon, 21 May 2012 21:04:29 +0000 (21:04 +0000)]
Apply style(9) to return and switch/case statements.

Reviewed by: delphij (prior version of the patch)

12 years agoRe-add 'ic' and properly wrap it in the SUPERG macro.
adrian [Mon, 21 May 2012 17:51:26 +0000 (17:51 +0000)]
Re-add 'ic' and properly wrap it in the SUPERG macro.

12 years agoDon't recurse into libssp when MK_SSP is set to no.
marcel [Mon, 21 May 2012 16:03:44 +0000 (16:03 +0000)]
Don't recurse into libssp when MK_SSP is set to no.

12 years agoAdd missing \n when generating pkg.conf
bapt [Mon, 21 May 2012 15:45:18 +0000 (15:45 +0000)]
Add missing \n when generating pkg.conf

Reported by: beat
Approved by: des (mentor)
MFC after: 1 day

12 years agoRegenerate usb.conf
hselasky [Mon, 21 May 2012 15:01:35 +0000 (15:01 +0000)]
Regenerate usb.conf

MFC after: 3 days

12 years agoImport byacc from invisible island, it brings us lots of compatibilities with
bapt [Mon, 21 May 2012 13:31:26 +0000 (13:31 +0000)]
Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR: bin/140309 [1]
Submitted by: Philippe Pepiot <ksh@philpep.org> [1]
Approved by: des (mentor)
MFC after: 1 month

12 years agoDisable NLS catalog use in libc if built with WITHOUT_NLS option.
gleb [Mon, 21 May 2012 08:10:42 +0000 (08:10 +0000)]
Disable NLS catalog use in libc if built with WITHOUT_NLS option.

Functions affected: strerror, strsignal, gai_strerror.

12 years agoAccording to shared memory man pages, advice including <sys/types.h>
kevlo [Mon, 21 May 2012 07:52:46 +0000 (07:52 +0000)]
According to shared memory man pages, advice including <sys/types.h>
instead of <sys/param.h>

12 years agoBe a little less magical, not that these values are likely to change...
imp [Mon, 21 May 2012 07:47:57 +0000 (07:47 +0000)]
Be a little less magical, not that these values are likely to change...

12 years agoImplement pmap_mincore for arm. Now programs using it don't cause a
imp [Mon, 21 May 2012 06:56:26 +0000 (06:56 +0000)]
Implement pmap_mincore for arm.  Now programs using it don't cause a
flood of console messages.

Reviewed by: alc@

12 years ago- On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5.
stas [Mon, 21 May 2012 04:29:11 +0000 (04:29 +0000)]
- On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5.
  Reflect that in the manpage.

PR: bin/167986
Reported by: truckman@

12 years agoAnother minor re-arrangement of the code: calcualte the master clock
imp [Mon, 21 May 2012 04:24:58 +0000 (04:24 +0000)]
Another minor re-arrangement of the code: calcualte the master clock
frequency in the at91_pmc_clock_init rather than passing it in.  Allow
for frequencies >= 21MHz by rounding to the nearest 500Hz (Idea from
Ian Lapore whose company uses a similar arrangement in their product).
at91_pmc_clock_init() is now nearly independent of the rest of the pmc
driver (which means we may be able to call it much earlier in boot
soon to eliminate the master clock config file requirement for printf
to work during early boot and also eliminate some interdependencies
with the device ordering which requires pmc to be the first device
added).

12 years agoPrint key value, an index, otherwise we don't know which key is allocated.
davidxu [Mon, 21 May 2012 03:06:31 +0000 (03:06 +0000)]
Print key value, an index, otherwise we don't know which key is allocated.

12 years agoUse strcmp that I replaced by accident.
kevlo [Mon, 21 May 2012 02:45:47 +0000 (02:45 +0000)]
Use strcmp that I replaced by accident.

12 years agoFix broken ref count
kevlo [Mon, 21 May 2012 02:41:15 +0000 (02:41 +0000)]
Fix broken ref count

Submitted by: gcooper

12 years agoFix improper handling of variadic args with ICDEBUG
kevlo [Mon, 21 May 2012 02:30:22 +0000 (02:30 +0000)]
Fix improper handling of variadic args with ICDEBUG

PR: kern/168095
Submitted by: gcooper

12 years agoRemove dead code
kevlo [Mon, 21 May 2012 02:23:20 +0000 (02:23 +0000)]
Remove dead code

12 years agoMinor cleanup before some more major changes:
imp [Sun, 20 May 2012 20:50:40 +0000 (20:50 +0000)]
Minor cleanup before some more major changes:
o main_clock_hz isn't used, eliminate it
o move main clock calculation code and table so we have only one ifdef.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
alc [Sun, 20 May 2012 18:25:45 +0000 (18:25 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the PV lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained PV list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

Reviewed by: kib
X-MFC after: r235598

12 years agoDetermine kernel load address dynamically from u-boot memory map.
kientzle [Sun, 20 May 2012 18:07:35 +0000 (18:07 +0000)]
Determine kernel load address dynamically from u-boot memory map.

The generic ELF loading code maps the kernel into low memory
by subtracting KERN_BASE.  So the copyin/copyout/readin functions
are always called with low addresses.  This code finds the largest
DRAM block from the U-Boot memory map and adds that base to
the addresses.

In particular, this fixes ubldr on AM3358, which has DRAM
mapped to 0x80000000 at power-on.

12 years agoTypo and mdoc(7) style fixes.
gjb [Sun, 20 May 2012 16:43:47 +0000 (16:43 +0000)]
Typo and mdoc(7) style fixes.

PR: 168117
Submitted by: Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after: 3 days

12 years agoDon't start the sleep state transition procedure while sleep is
iwasaki [Sun, 20 May 2012 16:36:54 +0000 (16:36 +0000)]
Don't start the sleep state transition procedure while sleep is
disabled or the system is in shutdown procedure.

This should fix the problem which kernel never response to the sleep
button press events after the message `suspend request ignored (not
ready yet)'.

MFC after: 3 days

12 years agoTypo and mdoc(7) style fixes.
gjb [Sun, 20 May 2012 16:09:40 +0000 (16:09 +0000)]
Typo and mdoc(7) style fixes.

PR: 167890
Submitted by: Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after: 3 days

12 years agoReplace the list of PVOs owned by each PMAP with an RB tree. This simplifies
nwhitehorn [Sun, 20 May 2012 14:33:28 +0000 (14:33 +0000)]
Replace the list of PVOs owned by each PMAP with an RB tree. This simplifies
range operations like pmap_remove() and pmap_protect() as well as allowing
simple operations like pmap_extract() not to involve any global state.
This substantially reduces lock coverages for the global table lock and
improves concurrency.

12 years agoremove unused vap variable
bschmidt [Sun, 20 May 2012 10:02:24 +0000 (10:02 +0000)]
remove unused vap variable

MFC after: 1 week

12 years agoDiscard frames after a DELBA which where queued during an active BA
bschmidt [Sun, 20 May 2012 10:00:36 +0000 (10:00 +0000)]
Discard frames after a DELBA which where queued during an active BA
session.

MFC after: 1 week

12 years agoRemove unused variable.
bschmidt [Sun, 20 May 2012 09:46:48 +0000 (09:46 +0000)]
Remove unused variable.

12 years agoAdd some more 100/130 series device IDs.
bschmidt [Sun, 20 May 2012 09:29:14 +0000 (09:29 +0000)]
Add some more 100/130 series device IDs.

MFC after: 3 days

12 years agoRemove cpususpend IDT vector for XEN.
iwasaki [Sun, 20 May 2012 08:17:20 +0000 (08:17 +0000)]
Remove cpususpend IDT vector for XEN.
This broke XEN kernel building.

12 years agoMigrate the per-frame code out from ath_rx_proc() to ath_rx_pkt().
adrian [Sun, 20 May 2012 06:35:22 +0000 (06:35 +0000)]
Migrate the per-frame code out from ath_rx_proc() to ath_rx_pkt().

This will (eventually) be used by the EDMA RX path used by the
AR93xx and later NICs.

12 years agoRewrite nd6_sysctl_{d,p}rlist() to avoid misaligned accesses to char arrays
marius [Sun, 20 May 2012 05:12:31 +0000 (05:12 +0000)]
Rewrite nd6_sysctl_{d,p}rlist() to avoid misaligned accesses to char arrays
casted to structs by getting rid of these buffers entirely. In r169832, it
was tried to paper over this issue by 32-bit aligning the buffers. Depending
on compiler optimizations that still was insufficient for 64-bit architectures
with strong alignment requirements though.
While at it, add comments regarding the total lack of locking in this area.

Tested by: bz
Reviewed by: bz (slightly earlier version), yongari (earlier version)
MFC after: 1 week

12 years agoMigrate most of the beacon handling functions out to if_ath_beacon.c.
adrian [Sun, 20 May 2012 04:14:29 +0000 (04:14 +0000)]
Migrate most of the beacon handling functions out to if_ath_beacon.c.

This is also in preparation for supporting AR9300 and later NICs.

12 years agoMigrate the TDMA management functions out of if_ath.c into if_ath_tdma.c.
adrian [Sun, 20 May 2012 02:49:42 +0000 (02:49 +0000)]
Migrate the TDMA management functions out of if_ath.c into if_ath_tdma.c.

There's some TX path TDMA code in if_ath_tx.c which should be migrated
out, but first I should likely try and verify/fix/repair the TDMA support
in 9.x and -HEAD.

12 years ago"nvram,flash" may not be the first in the compatible list property of the
jhibbits [Sun, 20 May 2012 02:43:54 +0000 (02:43 +0000)]
"nvram,flash" may not be the first in the compatible list property of the
nvram ofw node, so check all strings in the list.

Approved by: nwhitehorn (mentor)
MFC after: 3 days

12 years ago.. and update this.
adrian [Sun, 20 May 2012 02:05:25 +0000 (02:05 +0000)]
.. and update this.

12 years agoMigrate the bulk of the RX routines out from if_ath.c to if_ath_rx.[ch].
adrian [Sun, 20 May 2012 02:05:10 +0000 (02:05 +0000)]
Migrate the bulk of the RX routines out from if_ath.c to if_ath_rx.[ch].

* migrate the rx processing out into if_ath_rx.c
* migrate the TSF functions into if_ath_tsf.h, as inlines

This is in prepration for supporting the EDMA RX routines, required to
support the AR93xx series NICs.

TODO:

* ath_start() shouldn't be private, but it's called as part of
  the RX path. I should likely migrate ath_rx_tasklet() back into
  if_ath.c and then return this to be 'static'.  The RX code really
  shouldn't need to see TX routines (and vice versa.)

* ath_beacon_* should be in if_ath_beacon.[ch].

* ath_tdma_* should be in if_ath_tdma.[ch] ...

12 years agoMFp4 bz_ipv6_fast:
bz [Sat, 19 May 2012 23:25:57 +0000 (23:25 +0000)]
MFp4 bz_ipv6_fast:

  Allow tso4 and tso6 be set individually given we have the bits.
  This will help with drivers not working as expected during the
  transition time and later.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn
MFC After: 1 week

12 years agoRegenerate after the additions of:
marcel [Sat, 19 May 2012 21:29:18 +0000 (21:29 +0000)]
Regenerate after the additions of:
WITHOUT_ED_CRYPTO
WITHOUT_LS_COLORS
WITH_NAND

Pointed out by: Garrett Cooper

12 years agoEnable the AR8316 switch on the routerstation pro board.
adrian [Sat, 19 May 2012 20:11:18 +0000 (20:11 +0000)]
Enable the AR8316 switch on the routerstation pro board.

The configuration is:

* RGMII, both ports
* arge0 - connected to PHY4 as a dedicated port (CPU port)
* arge1 - connected to the switch ports

I've verified this on my routerstation pro board.

12 years agoDocument the ED_CRYPTO and LS_COLORS options.
marcel [Sat, 19 May 2012 20:05:27 +0000 (20:05 +0000)]
Document the ED_CRYPTO and LS_COLORS options.

Obtained from: Juniper Networks, Inc.

12 years agoUnbreak LINT for ARM: DEBUG is a kernel configuration option.
marcel [Sat, 19 May 2012 18:16:49 +0000 (18:16 +0000)]
Unbreak LINT for ARM: DEBUG is a kernel configuration option.

12 years agoAdd build opton MK_LS_COLORS to control whether ls(1) supports colors
marcel [Sat, 19 May 2012 18:05:00 +0000 (18:05 +0000)]
Add build opton MK_LS_COLORS to control whether ls(1) supports colors
(and thus needs to depend on libtermcap). Embedded systems may not
want or need colors.

Obtained from: Juniper Networks, Inc.