]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRename the "Reboot" option to "Exit", which reflects what it actually
nwhitehorn [Sat, 9 Apr 2011 14:18:03 +0000 (14:18 +0000)]
Rename the "Reboot" option to "Exit", which reflects what it actually
does. The rc.local wrapper script will also soon grow an option to use the
live environment after installation, so an immediate reboot isn't even
necessarily implied.

13 years agoDocument SHA256/512 modes.
markm [Sat, 9 Apr 2011 14:09:46 +0000 (14:09 +0000)]
Document SHA256/512 modes.

MFC after: 1 month

13 years agoAdd SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
markm [Sat, 9 Apr 2011 14:02:04 +0000 (14:02 +0000)]
Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
hurt us.

PR: misc/124164
Submitted by: KIMURA Yasuhiro < yasu utahime org >
MFC after: 1 month

13 years agoAdd SHA512 (Actually, this is Colin Percival's code for SHA256, with
markm [Sat, 9 Apr 2011 13:56:29 +0000 (13:56 +0000)]
Add SHA512 (Actually, this is Colin Percival's code for SHA256, with
relevant constants changed).

While I'm here clean up the tests and Makefile.

PR: misc/124164
Submitted by: KIMURA Yasuhiro < yasu utahime org >
MFC after: 1 month

13 years agoFix make buildworld -DMODULES_WITH_WORLD on i386
uqs [Sat, 9 Apr 2011 09:07:31 +0000 (09:07 +0000)]
Fix make buildworld -DMODULES_WITH_WORLD on i386

13 years agoMake it possible to use permission sets (full_set, modify_set, read_set
trasz [Sat, 9 Apr 2011 07:42:25 +0000 (07:42 +0000)]
Make it possible to use permission sets (full_set, modify_set, read_set
and write_set) with setfacl(1).

PR: kern/154113
Submitted by: Shawn Webb <lattera at gmail dot com> (earlier version)
MFC after: 1 month

13 years agoRemove a check in udp6_send() that prevented v4-mapped v6 addresses from
bz [Sat, 9 Apr 2011 02:22:49 +0000 (02:22 +0000)]
Remove a check in udp6_send() that prevented v4-mapped v6 addresses from
working.  We store v4 and v6 addresses as a union but for v4-mapped
addresses only store the 32bits w/o the ::ffff: word.  That failed the
check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1
and the IN6_IS_ADDR_V4MAPPED() never worked here.  Given we can hardly get
here with an unbound local address or invalid inp_vflags remove the check.

Reported by: tuexen
Reviewed by: tuexen
MFC after: 3 days

13 years agoAfter r219579 and r219779 unbreak v4-mapped v6 sockets for UDP
bz [Sat, 9 Apr 2011 01:29:46 +0000 (01:29 +0000)]
After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP
some more.  Similar to what we do for TCP check for v4-mapped
addresses and then handle them or the normal v6 address case.
For either set inp_vflags before calling into the pcb connect
function so that we have an unambiguous view in case we need to
set the local address or port.

Looked at: tuexen (as part of more)
MFC after: 3 days

13 years agoRemove setting of PCB_FULL_IRET at the places where we are going to call
kib [Fri, 8 Apr 2011 21:27:31 +0000 (21:27 +0000)]
Remove setting of PCB_FULL_IRET at the places where we are going to call
update_gdt_{f,g}sbase. The functions set the flag when td == curthread,
and sysarch is always called with curthread.

Reviewed by: jhb, jkim
MFC after: 1 week

13 years agoDisable local interrupts before testing the PCB_FULL_IRET flag.
kib [Fri, 8 Apr 2011 21:26:50 +0000 (21:26 +0000)]
Disable local interrupts before testing the PCB_FULL_IRET flag.
Thread might be preempted after testing, which causes the flag to be
cleared. If ast was not delivered, we will do sysret with potentially
wrong fs/gs bases.

Reviewed by: jhb, jkim
MFC after: 1 week (together with r220430, r220452)

13 years agoRefactor DELAYDEBUG as it is only useful for correcting i8254 frequency.
jkim [Fri, 8 Apr 2011 19:54:29 +0000 (19:54 +0000)]
Refactor DELAYDEBUG as it is only useful for correcting i8254 frequency.

13 years agoReintroduce the fix already discussed in r216805 (please check its history
attilio [Fri, 8 Apr 2011 18:48:57 +0000 (18:48 +0000)]
Reintroduce the fix already discussed in r216805 (please check its history
for a detailed explanation of the problems).

The only difference with the previous fix is in Solution2:
CPUBLOCK is no longer set when exiting from callout_reset_*() functions,
which avoid the deadlock (leading to r217161).
There is no need to CPUBLOCK there because the running-and-migrating
assumption is strong enough to avoid problems there.
Furthermore add a better !SMP compliancy (leading to shrinked code and
structures) and facility macros/functions.

Tested by: gianni, pho, dim
MFC after: 3 weeks

13 years ago- Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching
mav [Fri, 8 Apr 2011 14:42:29 +0000 (14:42 +0000)]
- Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching
on per-device basis.
- While adding support for per-device sysctls, merge from graid branch
support for ADA_TEST_FAILURE kernel option, which opens few more sysctl,
allowing to simulate read and write errors for testing purposes.

13 years agoAdd tunables that mirror the functionality of sysctls machdep.panic_on_nmi
rstone [Fri, 8 Apr 2011 14:39:41 +0000 (14:39 +0000)]
Add tunables that mirror the functionality of sysctls machdep.panic_on_nmi
and machdep.kdb_on_nmi.

Approved by: emaste (mentor)
MFC after: 1 week

13 years agoFix a bug in the previous change to restore the fast path for syscall
jhb [Fri, 8 Apr 2011 13:33:57 +0000 (13:33 +0000)]
Fix a bug in the previous change to restore the fast path for syscall
return.  The ast() function may cause a context switch in which case
PCB_FULL_IRET would be set in the pcb.  However, the code was not
rechecking the flag after ast() returned and would not properly restore
the FSBASE and GSBASE MSRs.  To fix, recheck the PCB_FULL_IRET flag after
ast() returns.

While here, trim an instruction (and memory access) from the doreti path
and fix a typo in a comment.

MFC after: 1 week

13 years agoCatch up to PCB_FULL_IRET becoming a pcb flag rather than a full field.
jhb [Fri, 8 Apr 2011 13:30:48 +0000 (13:30 +0000)]
Catch up to PCB_FULL_IRET becoming a pcb flag rather than a full field.

MFC after: 3 days

13 years agoAdd reference to led(4), supported now.
mav [Fri, 8 Apr 2011 12:46:47 +0000 (12:46 +0000)]
Add reference to led(4), supported now.
Add some details about supported chips.

13 years agoWhen specifying the -t option (send tag in front of message), this tag
edwin [Fri, 8 Apr 2011 12:33:07 +0000 (12:33 +0000)]
When specifying the -t option (send tag in front of message), this tag
should also be forwarded to the remote logging host, not only when the
logging is done locally.

PR: bin/154324
Submitted by: Callum Gibson <callumgibson@optusnet.com.au>
MFC after: 1 week

13 years agoPartially fix ZFS compat code for sparc64.
mm [Fri, 8 Apr 2011 11:08:26 +0000 (11:08 +0000)]
Partially fix ZFS compat code for sparc64.
Some endianess bugs still need to be resolved.

Submitted by: marius (parts of the fix)
MFC after: 1 month

13 years agoRe-add the pad[2] I deleted by accident.
adrian [Fri, 8 Apr 2011 09:56:31 +0000 (09:56 +0000)]
Re-add the pad[2] I deleted by accident.

13 years agoAdd initial support for MIMO statistics to net80211.
adrian [Fri, 8 Apr 2011 09:20:45 +0000 (09:20 +0000)]
Add initial support for MIMO statistics to net80211.

This introduces struct ieee80211_rx_stats - which stores the various kinds
of RX statistics which a MIMO and non-MIMO 802.11 device can export.

It also fleshes out the mimo export to userland (node_getmimoinfo()).

It assumes that MIMO radios (for now) export both ctl and ext channels.
Non-11n MIMO radios are possible (and I believe Atheros made at least
one), so if that chipset support is added, extra flags to the
struct ieee80211_rx_stats can be added to extend this support.

Two new input functions have been added - ieee80211_input_mimo() and
ieee80211_input_mimo_all() - which MIMO-aware devices can call with
MIMO specific statistics.

802.11 devices calling the non-MIMO input functions will still function.

13 years agoFix the completely wrong types I used in the previous commit.
adrian [Fri, 8 Apr 2011 08:49:50 +0000 (08:49 +0000)]
Fix the completely wrong types I used in the previous commit.

13 years agoBegin fleshing out a public HAL routine to export the per-chain
adrian [Fri, 8 Apr 2011 07:44:00 +0000 (07:44 +0000)]
Begin fleshing out a public HAL routine to export the per-chain
ctl/ext noise floor values.

This routine doesn't check to see whether the radio is MIMO
capable - instead, it simply returns either the raw values,
the "nominal" values if the raw values aren't yet available
or are invalid, or '0' values if there's no valid channel/
no valid MIMO values.

Callers are expected to verify the radio is a MIMO radio
(which for now means it's an 11n chipset, there are non-11n
MIMO chipsets out there but I don't think we support them,
at least in MIMO mode) before exporting the MIMO values.

13 years agoExport the per-chain ctl/ext noise floor values, raw and uncut, to the
adrian [Fri, 8 Apr 2011 06:58:01 +0000 (06:58 +0000)]
Export the per-chain ctl/ext noise floor values, raw and uncut, to the
upper-level HAL.

Right now the per-chain noise floor values aren't used anywhere in
the upper-level HAL, so the driver currently has no real reference
to compare the per-chain RSSI values to.

This is needed before per-chain RSSI values (for ctl and ext radios)
are can be thrown upstairs to the net80211 code.

13 years agoExtend the RX descriptor block to include two more EVM words.
adrian [Fri, 8 Apr 2011 06:29:41 +0000 (06:29 +0000)]
Extend the RX descriptor block to include two more EVM words.

This will be needed for later AR93xx/AR94xx 3-stream devices.

13 years agoStripped '32' suffix from linux systrace module name on i386.
art [Fri, 8 Apr 2011 06:27:43 +0000 (06:27 +0000)]
Stripped '32' suffix from linux systrace module name on i386.

Approved by: avg

13 years agoUse atomic load & store for TSC frequency. It may be overkill for amd64 but
jkim [Thu, 7 Apr 2011 23:28:28 +0000 (23:28 +0000)]
Use atomic load & store for TSC frequency.  It may be overkill for amd64 but
safer for i386 because it can be easily over 4 GHz now.  More worse, it can
be easily changed by user with 'machdep.tsc_freq' tunable (directly) or
cpufreq(4) (indirectly).  Note it is intentionally not used in performance
critical paths to avoid performance regression (but we should, in theory).
Alternatively, we may add "virtual TSC" with lower frequency if maximum
frequency overflows 32 bits (and ignore possible incoherency as we do now).

13 years agou3g.4:
gjb [Thu, 7 Apr 2011 23:14:33 +0000 (23:14 +0000)]
u3g.4:
- remove self-reference in SEE ALSO section (originally was to s/XR/Xr)

cxgbe.4:
- remove blank line
- add closing .El

Reported by: manlint
MFC after: 3 days

13 years agopcb_flags is an int, so use testl rather than testq.
jhb [Thu, 7 Apr 2011 23:13:22 +0000 (23:13 +0000)]
pcb_flags is an int, so use testl rather than testq.

Pointy hat to: jhb
Submitted by: jkim
MFC after: 1 week

13 years agoIf a system call does not request a full interrupt return, use a fast
jhb [Thu, 7 Apr 2011 21:32:25 +0000 (21:32 +0000)]
If a system call does not request a full interrupt return, use a fast
path via the sysretq instruction to return from the system call.  This was
removed in 190620 and not quite fully restored in 195486.  This resolves
most of the performance regression in system call microbenchmarks between
7 and 8 on amd64.

Reviewed by: kib
MFC after: 1 week

13 years agoRemove stale checks for RDTSC support. amd64 must have TSC support anyway.
jkim [Thu, 7 Apr 2011 21:29:34 +0000 (21:29 +0000)]
Remove stale checks for RDTSC support.  amd64 must have TSC support anyway.

13 years agoPort of the LRO fix from mxge driver to the generic
jfv [Thu, 7 Apr 2011 21:20:26 +0000 (21:20 +0000)]
Port of the LRO fix from mxge driver to the generic
LRO code. Thanks to Andrew Gallatin for the change.

MFC after:  7 days

13 years ago- Fixed a problem when multiqueue mode was enabled which caused the CQ
davidch [Thu, 7 Apr 2011 20:15:36 +0000 (20:15 +0000)]
- Fixed a problem when multiqueue mode was enabled which caused the CQ
  chain to be corrupted.
- Removed many console print warnings and replaced with driver maintained
  counters.
- Several style(9) fixes.

MFC after:      One week.

13 years agoFix a bug in mxge's LRO which can cause dup acks to
gallatin [Thu, 7 Apr 2011 13:49:44 +0000 (13:49 +0000)]
Fix a bug in mxge's LRO which can cause dup acks to
get aggregated & hence prevent TCP from entering
fast retransmit.

Pointed out by: jeff
Reviewed by: gnn
MFC after: 7 days

13 years agoAdd some more OS_MARK probes to the RX DMA setup/teardown code path.
adrian [Thu, 7 Apr 2011 13:14:51 +0000 (13:14 +0000)]
Add some more OS_MARK probes to the RX DMA setup/teardown code path.

I'm trying to debug the RX DMA path and help the ath9k guys with
"RX dma abort stuck" issue that both our drivers have.

13 years ago- Adjust a comment to actual behaviour
gabor [Thu, 7 Apr 2011 13:03:35 +0000 (13:03 +0000)]
- Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
  in case they add further improvements

Approved by: delphij (mentor)
Obtained from: The NetBSD Project

13 years ago- Simplify the fixed string pattern preprocessing code
gabor [Thu, 7 Apr 2011 13:01:03 +0000 (13:01 +0000)]
- Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by: delphij (mentor)
Obtained from: The NetBSD Project

13 years ago- Replace some strcpy()-family functions with memcpy() ones. It has been
gabor [Thu, 7 Apr 2011 12:52:46 +0000 (12:52 +0000)]
- Replace some strcpy()-family functions with memcpy() ones. It has been
  discussed earlier that the extra safeness is not required in these
  cases and we can avoid the overhead by using the more general
  memory copy functions.

Approved by: delphij (mentor)
Obtained from: The NetBSD Project

13 years agoProperly unref ng_hub nodes on shutdown, so that we don't leak them.
zec [Thu, 7 Apr 2011 11:40:10 +0000 (11:40 +0000)]
Properly unref ng_hub nodes on shutdown, so that we don't leak them.

MFC after: 3 days

13 years agoFix spelling.
mav [Thu, 7 Apr 2011 08:32:53 +0000 (08:32 +0000)]
Fix spelling.

13 years agoAdd one more ID for Marvell 88SE912x chip found on Asus U3S6 card.
mav [Thu, 7 Apr 2011 08:28:53 +0000 (08:28 +0000)]
Add one more ID for Marvell 88SE912x chip found on Asus U3S6 card.

Submitted by: Jonas Jonsson <fatbrain@gmail.com>

13 years agoMake ada(4) driver to control device write cache, same as ata(4) does.
mav [Thu, 7 Apr 2011 08:17:53 +0000 (08:17 +0000)]
Make ada(4) driver to control device write cache, same as ata(4) does.
Add kern.cam.ada.write_cache sysctl/tunable to control it alike hw.ata.wc.

13 years agoModify read/write ioctls to work with 64 bit registers too.
np [Thu, 7 Apr 2011 07:10:42 +0000 (07:10 +0000)]
Modify read/write ioctls to work with 64 bit registers too.

MFC after: 3 days

13 years ago - Don't invalidate jnewblks immediately upon discovering that the block
jeff [Thu, 7 Apr 2011 03:19:10 +0000 (03:19 +0000)]
 - Don't invalidate jnewblks immediately upon discovering that the block
   will be removed.  Permit the journal to proceed so that we don't leave
   a rollback in a cg for a very long time as this can cause terrible perf
   problems in low memory situations.

Tested by:      pho

13 years agoImplement atomic_load_acq_64(9) and atomic_store_rel_64(9) for i386. These
jkim [Wed, 6 Apr 2011 23:59:59 +0000 (23:59 +0000)]
Implement atomic_load_acq_64(9) and atomic_store_rel_64(9) for i386.  These
functions are implemented with CMPXCHG8B instruction where it is available,
i. e., all Pentium-class and later processors.  Note this instruction is
also used for atomic_store_rel_64() because a simple XCHG-like instruction
for 64-bit memory access does not exist, unfortunately.  If the processor
lacks the instruction, i. e., 80486-class CPUs, two 32-bit load/store are
performed with interrupt temporarily disabled, assuming it does not support
SMP.  Although this assumption may be little naive, it is true in reality.
This implementation is inspired by Linux.

13 years agoUpdate arcmsr(4) to vendor version 1.20.00.21. This release primarily
delphij [Wed, 6 Apr 2011 20:54:26 +0000 (20:54 +0000)]
Update arcmsr(4) to vendor version 1.20.00.21.  This release primarily
improves command timeout handling.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: Ching-Lung Huang <ching2048 areca com tw>
MFC after: 2 months

13 years agoRegenerate after r220401. It turns out makeman is clever about implied
uqs [Wed, 6 Apr 2011 20:19:07 +0000 (20:19 +0000)]
Regenerate after r220401. It turns out makeman is clever about implied
flags, so remove that part from WITHOUT_CXX again.

This is only partially regenerated, as the entries for FDT and GPIO seem to
have switched their default state, too.

13 years agoComplete WITHOUT_CXX support. It implies WITHOUT_GROFF and
uqs [Wed, 6 Apr 2011 20:08:23 +0000 (20:08 +0000)]
Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
WITHOUT_CLANG.

Don't build clang bootstrap/build-tools depending on this flag. We also
keep gperf, devd and libstdc++ around to prevent foot-shooting and to
make this a two-way street.

13 years agoAdd RACCT_NOFILE accounting.
trasz [Wed, 6 Apr 2011 19:13:04 +0000 (19:13 +0000)]
Add RACCT_NOFILE accounting.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoStyle fix.
trasz [Wed, 6 Apr 2011 19:08:50 +0000 (19:08 +0000)]
Style fix.

Submitted by: jhb@

13 years agoAdd accounting for SysV-related resources.
trasz [Wed, 6 Apr 2011 18:11:24 +0000 (18:11 +0000)]
Add accounting for SysV-related resources.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoMove getc() body before xgetc() so gcc does not emit a warning about function
rdivacky [Wed, 6 Apr 2011 17:54:12 +0000 (17:54 +0000)]
Move getc() body before xgetc() so gcc does not emit a warning about function
having no body.

Approved by:    jhb

13 years agoFix several places to ignore processes that are not yet fully constructed.
jhb [Wed, 6 Apr 2011 17:47:22 +0000 (17:47 +0000)]
Fix several places to ignore processes that are not yet fully constructed.

MFC after: 1 week

13 years agoMark getc() as inline, this has no effect on gcc but helps clang.
rdivacky [Wed, 6 Apr 2011 17:29:40 +0000 (17:29 +0000)]
Mark getc() as inline, this has no effect on gcc but helps clang.

Approved by:    jhb

13 years agoAdd ucred pointer to the SysV-related memory structures. This is required
trasz [Wed, 6 Apr 2011 16:59:54 +0000 (16:59 +0000)]
Add ucred pointer to the SysV-related memory structures.  This is required
for racct.

Note that after this commit, ipcs(1) needs to be rebuilt.  Otherwise, it will
fail with "ipcs: sysctlbyname: kern.ipc.msqids: Cannot allocate memory".

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoIn vm_daemon(), do not skip processes stopped with SIGSTOP.
trasz [Wed, 6 Apr 2011 16:27:04 +0000 (16:27 +0000)]
In vm_daemon(), do not skip processes stopped with SIGSTOP.

13 years agoAdd RACCT_RSS.
trasz [Wed, 6 Apr 2011 16:24:24 +0000 (16:24 +0000)]
Add RACCT_RSS.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoImplement mxge_init()
gallatin [Wed, 6 Apr 2011 15:45:32 +0000 (15:45 +0000)]
Implement mxge_init()

This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
did not bring the interface into a RUNNING state, like it does on
most (all?) other FreeBSD NIC drivers.

Thanks to gnn for mentioning the bug, and yongari for pointing out that
ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

MFC after: 7 days

13 years agoCorrect 'list scan' description in the examples. The previous description
gjb [Wed, 6 Apr 2011 11:20:54 +0000 (11:20 +0000)]
Correct 'list scan' description in the examples.  The previous description
was incorrect - 'list scan' does not actually do a scan, but instead lists
the results of the background 'scan' cache.

Submitted by: Fabian Keil (freebsd-listen of fabiankeil de) (via email)
Discussed with: bschmidt
MFC after: 3 days

13 years ago- Removed multiple console error messages and replaced with statistic
davidch [Tue, 5 Apr 2011 22:13:33 +0000 (22:13 +0000)]
- Removed multiple console error messages and replaced with statistic
  counters to reduce spew.
- Fixed a TSO problem when an mbuf contains both header and payload in
  the same cluster.

MFC after: One week.

13 years agoAllow strerror(0) and strerror_r(0, ...).
jilles [Tue, 5 Apr 2011 21:56:05 +0000 (21:56 +0000)]
Allow strerror(0) and strerror_r(0, ...).

Of course, strerror_r() may still fail with ERANGE.

Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.

PR: standards/151316
MFC after: 1 week

13 years agoImportant update for the igb driver:
jfv [Tue, 5 Apr 2011 21:55:43 +0000 (21:55 +0000)]
Important update for the igb driver:
  - Add the change made in em to the actual unrefreshed number
    of descriptors is used as a basis in rxeof on the way out
    to determine if more refresh is needed. NOTE: there is a
    difference in the ring setup in igb, this is not accidental,
    it is necessitated by hardware behavior, when you reset the
    newer adapters it will not let you write RDH, it ALWAYS sets
    it to 0. Thus the way em does it is not possible.
  - Change the sysctl handling of flow control, it will now make
    the change dynamically when the variable setting changes rather
    than requiring a reset.
  - Change the eee sysctl naming, validation found the old unintuitive :)
  - Last but not least, some important performance tweaks in the TX
    path, I found that UDP behavior could be drastically hindered or
    improved with just small changes in the start loop. What I have
    here is what testing has shown to be the best overall. Its interesting
    to note that changing the clean threshold to start at a full half of
    the ring, made a BIG difference in performance.  I hope that this
    will prove to be advantageous for most workloads.

MFC in a week.

13 years agoBe far more persistent in reclaiming blocks and inodes before giving
mckusick [Tue, 5 Apr 2011 21:26:05 +0000 (21:26 +0000)]
Be far more persistent in reclaiming blocks and inodes before giving
up and declaring a filesystem out of space. Especially necessary when
running on a small filesystem. With this improvement, it should be
possible to use soft updates on a small root filesystem.

Kudos to: Peter Holm
Testing by: Peter Holm
MFC: 2 weeks

13 years agoAdd accounting for most of the memory-related resources.
trasz [Tue, 5 Apr 2011 20:23:59 +0000 (20:23 +0000)]
Add accounting for most of the memory-related resources.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoAdd missing stubs.
trasz [Tue, 5 Apr 2011 19:50:34 +0000 (19:50 +0000)]
Add missing stubs.

13 years agoFix buildworld -DMODULES_WITH_WORLD
uqs [Tue, 5 Apr 2011 19:41:18 +0000 (19:41 +0000)]
Fix buildworld -DMODULES_WITH_WORLD

13 years ago* Add the readline(3) API to libedit. The libedit versions of
obrien [Tue, 5 Apr 2011 18:41:01 +0000 (18:41 +0000)]
* Add the readline(3) API to libedit.  The libedit versions of
  {readline,history}.h are in /usr/include/edit so as to not conflict with
  the GNU libreadline versions.  To use the libedit readline(3) one should
  add "-I/usr/include/edit" to their Makefile
  (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree).

* Enable its use in the BSD licensed utilities that support readline(3).

* To make it easier to sync libedit development with NetBSD, histedit.h
  is moved into libedit's directory as history shows shown we keep merging
  it into that location.

Obtained from: NetBSD
Sponsored by: Juniper Networks

13 years agoLower the bar for ACPI-fast on real machines slightly. Empirical evidences
jkim [Tue, 5 Apr 2011 18:40:19 +0000 (18:40 +0000)]
Lower the bar for ACPI-fast on real machines slightly.  Empirical evidences
show that there are perfectly working PM timers with occasional "hiccups",
probably because of an SMI.  Now we ignore the maximum if it happens once in
the test loop and the width is small enough.  Also, relax normal width a bit
to count in a boundary case.

13 years agoAdd initial jumbo frame support for BCM5714/BCM5715 and BCM5780.
yongari [Tue, 5 Apr 2011 17:41:54 +0000 (17:41 +0000)]
Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780.
Unlike other controllers which have more advanced jumbo support,
these controllers have one send ring, one standard receive producer
ring and one receive return ring. In order to receive jumbo frames
on the controllers, driver now will increase Rx buffer size to 9k.
Two Rx modes are supported on these controllers and I chose
standard Rx BDs over extended Rx BDs. The extended Rx BD mode
allows up to 4 segmentations for each Rx BDs such that kernel does
not have to allocate large buffer of contiguous memory for
receiving. The extended Rx BD mode is already used on controllers
that have separate jumbo receive ring. However, using extended Rx
BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256
entries which in turn may reduce the performance.  Also UMA backed
page allocator for jumbo frame returns contiguous memory so using
extended Rx BD has no advantage on FreeBSD unless highly customized
local allocator implemented in driver is used.
To use jumbo buffers in standard receive ring, Rx buffer allocation
handler was changed to allocate MJUM9BYTES sized mbuf.

PR: kern/155192
Tested by: Vijay Singh <vijju.singh <> gmail dot com>
Submitted by: mjacob (initial version)

13 years agoMake the alq log path tunable
adrian [Tue, 5 Apr 2011 16:14:54 +0000 (16:14 +0000)]
Make the alq log path tunable

13 years ago* re-enable marker stuff, I accidentally disabled it during debugging
adrian [Tue, 5 Apr 2011 16:12:38 +0000 (16:12 +0000)]
* re-enable marker stuff, I accidentally disabled it during debugging
* correct arg check

13 years agoFlesh out a simple tool to print the ALQ dump generated by the HAL.
adrian [Tue, 5 Apr 2011 15:11:09 +0000 (15:11 +0000)]
Flesh out a simple tool to print the ALQ dump generated by the HAL.

13 years agoAdd the ability to manage the state of write caching when the battery
jhb [Tue, 5 Apr 2011 14:19:05 +0000 (14:19 +0000)]
Add the ability to manage the state of write caching when the battery
back-up is missing or dead.  The current state of this field is reported
in 'mfiutil cache <volume>' and can be adjusted via
'mfiutil cache <volume> bad-bbu-write-cache <enable|disable>'.  This
setting should generally be disabled to avoid data loss.

MFC after: 1 week

13 years agoExtend the DDB command "watchdog" with the ability to specify a timeout
attilio [Tue, 5 Apr 2011 14:15:58 +0000 (14:15 +0000)]
Extend the DDB command "watchdog" with the ability to specify a timeout
value.

The timeout is expressed in the form T(N) = (2^N * nanoseconds) and can
be easilly extracted from the watchdog interface as a WD_TO_* macro.
That new functionality is supposed to fix re-entering the kernel from DDB
re-enabling the watchdog again (previously disabled) and also offer the
possibility to break for deadlocked DDB commands.

Please note that retro-compatibility is retained.

Sponsored by: Sandvine Incorporated
Approved by: des
MFC after: 10 days

13 years agoMFi386: revision 220337
nyan [Tue, 5 Apr 2011 13:48:53 +0000 (13:48 +0000)]
MFi386: revision 220337

  Build boot2 with -mregparm=3.

13 years agoThe xpaBiasLvlFreq[] fields in the modal header also need swapping
adrian [Tue, 5 Apr 2011 13:14:17 +0000 (13:14 +0000)]
The xpaBiasLvlFreq[] fields in the modal header also need swapping
when the EEPROM contents are byte-swapped.

13 years agoMake clang default on x86 and powerpc, but not on other architectures.
imp [Tue, 5 Apr 2011 08:49:47 +0000 (08:49 +0000)]
Make clang default on x86 and powerpc, but not on other architectures.
Make fdt default on arm and powerpc.

This now includes cross compiled targets, where before we tried to
make it host-based.

Also, move the lists of default yes and no options to a variable.

In general, only build tools should get this treatment in bsd.own.mk.
Also, the use of TARGET* in the bsd.*mk files is discouraged, but
necessary here due to the ordering of things in buildworld.  We make
the native case work by testing MACHINE_ARCH after TARGET_ARCH.

13 years agoDocument -w for swapuse.
pluknet [Tue, 5 Apr 2011 07:56:40 +0000 (07:56 +0000)]
Document -w for swapuse.

PR: docs/156089
Submitted by: Andrey Ignatov <rdna att rdna.ru>
MFC after: 1 week

13 years agoif_arge has had a strange bug that only appears during high traffic
adrian [Tue, 5 Apr 2011 06:46:07 +0000 (06:46 +0000)]
if_arge has had a strange bug that only appears during high traffic
levels. TX would hang, RX wouldn't. A bit of digging showed the interface
send queue was full, but IFF_DRV_OACTIVE was clear and the hardware TX
queue was empty.

It turns out that there wasn't a check to drain the interface send
queue once hardware TX had completed, so if the interface send queue
had filled up in the meantime, subsequent packets would be dropped
by the higher layers and if_start (and thus arge_start()) would never
be called.

The fix is simple - call arge_start_locked() in the software interrupt
handler after the hardware TX queue has been handled or a TX underrun
occured. This way the interface send queue gets drained.

13 years ago* Add some more debugging to if_arge
adrian [Tue, 5 Apr 2011 06:33:35 +0000 (06:33 +0000)]
* Add some more debugging to if_arge
* Make doubly sure that IFF_DRV_OACTIVE is set if the hardware TX queue is full

13 years agoPut the ARGE_DEBUG behind a kernel config option.
adrian [Tue, 5 Apr 2011 05:29:10 +0000 (05:29 +0000)]
Put the ARGE_DEBUG behind a kernel config option.

13 years agoBegin fleshing out a functioning debugging setup for if_arge.
adrian [Tue, 5 Apr 2011 05:15:48 +0000 (05:15 +0000)]
Begin fleshing out a functioning debugging setup for if_arge.

I'm seeing TX hangs when doing large amounts of TX traffic;
an interface reset fixes it. This will hopefully help me identify
why.

13 years agoCheck correctly for whether there are any available wireless networks. This
nwhitehorn [Tue, 5 Apr 2011 03:11:21 +0000 (03:11 +0000)]
Check correctly for whether there are any available wireless networks. This
was tested on a train in the middle of an upstate New York swamp.

13 years agoImprove logging by always sending stderr to the installation log file.
nwhitehorn [Tue, 5 Apr 2011 03:09:44 +0000 (03:09 +0000)]
Improve logging by always sending stderr to the installation log file.
Reduce warnings by making sure the temporary etc directory exists.

13 years agoUse cpu_ticks() for get_cyclecount(9) rather than checking existence of TSC
jkim [Mon, 4 Apr 2011 22:56:33 +0000 (22:56 +0000)]
Use cpu_ticks() for get_cyclecount(9) rather than checking existence of TSC
at run-time on i386.  cpu_ticks() is set to use RDTSC early enough on i386
where it is available.  Otherwise, cpu_ticks() is driven by the current
timecounter hardware as binuptime(9) does.  This also avoids unnecessary
namespace pollution from <machine/cputypes.h>.

13 years agoAdd a manpage for the nvram2env driver.
adrian [Mon, 4 Apr 2011 22:30:12 +0000 (22:30 +0000)]
Add a manpage for the nvram2env driver.

13 years agoMove a trivial acpi_TimerDelta() to acpivar.h to make it inlineable.
jkim [Mon, 4 Apr 2011 18:39:04 +0000 (18:39 +0000)]
Move a trivial acpi_TimerDelta() to acpivar.h to make it inlineable.

13 years agoBuild boot2 with -mregparm=3, ie. pass upto 3 arguments via registers.
rdivacky [Mon, 4 Apr 2011 18:23:55 +0000 (18:23 +0000)]
Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers.
This modifies CFLAGS and tweaks sio.S to use the new calling convention.
The sio_init() and sio_putc() prototypes are modified so that other
users of this code know the correct calling convention.

This makes the code smaller when compiled with clang.

Reviewed by:    jhb
Tested by:      me and Freddie Cash <fjwcash gmail com>

13 years agoAlways check the current minimum value to make the test more predictable.
jkim [Mon, 4 Apr 2011 17:44:26 +0000 (17:44 +0000)]
Always check the current minimum value to make the test more predictable.
Use INT32_MAX instead of an arbitrary big number for the initial minimum.

13 years agoerrno.h: fix couple of whitespace nits
avg [Mon, 4 Apr 2011 17:39:30 +0000 (17:39 +0000)]
errno.h: fix couple of whitespace nits

Submitted by: bde (a half of the changes)
MFC after: 1 week

13 years agoFix bogus logic to calculate delta between two values from ACPI timers.
jkim [Mon, 4 Apr 2011 17:30:33 +0000 (17:30 +0000)]
Fix bogus logic to calculate delta between two values from ACPI timers.

13 years agoLower the bar for ACPI-fast on virtual machines. The current logic depends
jkim [Mon, 4 Apr 2011 17:00:50 +0000 (17:00 +0000)]
Lower the bar for ACPI-fast on virtual machines.  The current logic depends
on the fact that real hardware has almost fixed cost to read the ACPI timer.
It is virtually always false for hardware emulation and it makes no sense to
read it multiple times, which is already quite expensive for full emulation.

13 years agoFix a long standing bug where file_load() passes down the global loadaddr
marcel [Mon, 4 Apr 2011 16:59:46 +0000 (16:59 +0000)]
Fix a long standing bug where file_load() passes down the global loadaddr
to the l_load() method in the file_formats structure, while being passed
an address as an argument (dest). With file_load() calling arch_loadaddr()
now, this bug is a little bit more significant.

Spotted by: nyan@ (nice catch!)

13 years agoAdd inline to acpi_timer_read() to reduce unnecessary jumps and calls.
jkim [Mon, 4 Apr 2011 16:47:42 +0000 (16:47 +0000)]
Add inline to acpi_timer_read() to reduce unnecessary jumps and calls.

13 years ago"Tag" the "2010/08/04 20:29:18 UTC" import.
obrien [Mon, 4 Apr 2011 16:24:05 +0000 (16:24 +0000)]
"Tag" the "2010/08/04 20:29:18 UTC" import.

13 years agoVendor import NetBSD's libedit of "2010/08/04 20:29:18 UTC".
obrien [Mon, 4 Apr 2011 16:23:32 +0000 (16:23 +0000)]
Vendor import NetBSD's libedit of "2010/08/04 20:29:18 UTC".

Obtained from: NetBSD

13 years agoRemove malloc type M_NETADDR unused since splitting into vfs_subr.c
pluknet [Mon, 4 Apr 2011 16:23:01 +0000 (16:23 +0000)]
Remove malloc type M_NETADDR unused since splitting into vfs_subr.c
and vfs_export.c.

MFC after: 1 week

13 years agoCommit missing bits from the last commit:
adrian [Mon, 4 Apr 2011 14:53:36 +0000 (14:53 +0000)]
Commit missing bits from the last commit:

* add the hal capability flag
* make sure its disabled for the ar9280/ar9285.

13 years agoAdd a HAL capability bit for supporting self-linked RX descriptors and disable it...
adrian [Mon, 4 Apr 2011 14:52:31 +0000 (14:52 +0000)]
Add a HAL capability bit for supporting self-linked RX descriptors and disable it for the 11n chipsets.

From the ath9k source:

==

11N: we can no longer afford to self link the last descriptor.
MAC acknowledges BA status as long as it copies frames to host
buffer (or rx fifo). This can incorrectly acknowledge packets
to a sender if last desc is self-linked.

==

Since this is useful for pre-AR5416 chips that communicate PHY errors
via error frames rather than by on-chip counters, leave the support
in there, but disable it for AR5416 and later.

13 years agoAt least set the coverage class value here; worry about populating the
adrian [Mon, 4 Apr 2011 11:01:53 +0000 (11:01 +0000)]
At least set the coverage class value here; worry about populating the
register values at a later date.