To be able to use printf extensions we need to turn off gcc format checking.
Following the convention of NO_WERROR and NO_WCAST_ALIGN add NO_WFORMAT,
which, when defined in Makefile, turns off compile-time format checking
(by adding -Wno-format), but still allows to use high WARNS level.
David Schultz [Mon, 7 Mar 2011 03:15:49 +0000 (03:15 +0000)]
Add some tests for cexp() and cexpf(). (I need to clean up all of
these tests some day, but in the mean time, they're a useful sanity
check for future changes.)
Allow to compress on-the-wire data using two algorithms:
- HOLE - it simply turns all-zero blocks into few bytes header;
it is extremely fast, so it is turned on by default;
it is mostly intended to speed up initial synchronization
where we expect many zeros;
- LZF - very fast algorithm by Marc Alexander Lehmann, which shows
very decent compression ratio and has BSD license.
The execution of the shebang script requires putting interpreter path,
possible option and script path in the place of argv[0] supplied to
execve(2). It is possible and valid for the substitution to be shorter
then the argv[0].
Make this makefile a little more make-like (e.g. build only things that
need to be rebuilt) and add an FTP-area target. Next will be docs and
memstick builds.
Fix various issues in how %#T is handled:
- If precision is 0, don't print period followed by no digits.
- If precision is 0 stop printing units as soon as possible
(eg. if we have three years and five days and precision is 0
print only 3y5d).
- If precision is not 0, print all units (eg. 3y0d0h0m0s.00).
Marius Strobl [Sun, 6 Mar 2011 15:20:11 +0000 (15:20 +0000)]
- With the addition of TLS support binutils started to make the addend
values for resolved symbols relative to relocbase instead of sections
so detect this case and handle as appropriate, which allows using
kernel modules linked with affected versions of binutils. Actually I
think this is a bug in binutils but given that apparently nobody
complained for nearly six years and powerpc has basically the same
workaround I decided to put it in for the sparc64 kernel, too.
- Fix R_SPARC_HIX22 relocations. Apparently these are hardly ever used.
Marius Strobl [Sun, 6 Mar 2011 12:54:00 +0000 (12:54 +0000)]
- Allocate the DMA memory used for the work area as coherent as at least
the ataahci(4) and atamarvell(4) drivers share it between the host and
the controller.
- Spell some zeros as BUS_DMA_WAITOK when used as bus_dmamem_alloc() flags.
Marius Strobl [Sun, 6 Mar 2011 12:48:15 +0000 (12:48 +0000)]
- Allocate the DMA memory shared between the host and the controller as
coherent.
- Add some missing bus_dmamap_sync() calls. This includes putting such
calls before calling reply handlers instead of calling bus_dmamap_sync()
for the request queue from individual reply handlers as these handlers
generally read back updates by the controller.
Adrian Chadd [Sun, 6 Mar 2011 00:30:43 +0000 (00:30 +0000)]
Add an EEPROM op that extracts out the power table offset.
It defaults to -5 dBm for eeproms earlier than v21.
This apparently only applies to Merlin (AR9280) or later,
earlier 11n chipsets have a power table offset of 0.
All the code in ath9k which checks the power table offset
and takes it into account first ensures the chip is
Merlin or later.
Adrian Chadd [Sat, 5 Mar 2011 21:20:18 +0000 (21:20 +0000)]
Change HALDEBUG() to be a macro that conditionally calls the debug output routine.
The earlier way of doing debugging would evaluate the function parameters
before calling the HALDEBUG. In the case of detailed register debugging
would mean a -lot- of unneeded register IO and other stuff was going on.
This method evaluates the ath_hal_debug variable before the function
parameters are evaluated, drastically reducing the amount of overhead
enabling HAL debugging during compilation.
Dmitry Chagin [Sat, 5 Mar 2011 20:36:42 +0000 (20:36 +0000)]
Partially reworked r219042.
The reason for this is a bug at ktrops() where process dereferenced
without having a lock. This might cause a panic if ktrace was runned
with -p flag and the specified process exited between the dropping
a lock and writing sv_flags.
Since it is impossible to acquire sx lock while holding mtx switch
to use asynchronous enqueuerequest() instead of writerequest().
Rename ktr_getrequest_ne() to more understandable name [1].
Add two new system calls, setloginclass(2) and getloginclass(2). This makes
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL. This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).
Navdeep Parhar [Sat, 5 Mar 2011 03:42:03 +0000 (03:42 +0000)]
Tweaks for rx:
- everything related to LRO should be in #ifdef INET blocks
- reorder sge_iq's fields so that the most frequently used are all together
- pull all rx code into t4_intr_data directly
- let go of the ingress queue lock when passing up data
- refill the freelist only if it is short of at least 32 buffers
Make acl_strip_np(3) use new trivial ACL format for NFSv4 ACls (three
entries instead of six). This makes "setfacl -b" do the right thing
for ACLs on ZFS. UFS recognizes both kinds of trivial ACLs; no change
there.
Jilles Tjoelker [Thu, 3 Mar 2011 22:34:13 +0000 (22:34 +0000)]
Fix some _POSIX minimum/maximum values in limits.h:
* Some values changed in POSIX.1-2001; provide the former value if a program
requests compliance to an earlier version of POSIX. [1]
* Add missing _POSIX_CLOCKRES_MIN constant. This is a maximum value but
otherwise works the same as the minimum values.
PR: standards/104743
Submitted by: bde [1] (not exact #ifdefs, but the values)
MFC after: 2 weeks
Adrian Chadd [Thu, 3 Mar 2011 20:41:59 +0000 (20:41 +0000)]
The sample rate module currently does the slightly wrong thing when
determining whether to use MRR or not.
It uses the 11g protection mode when calculating 11n related stuff, rather
than checking the 11n protection mode.
Furthermore, the 11n chipsets can quite happily handle multi-rate retry w/
protection; the TX path and rate control modules need to be taught about
that.
o It switches kname to be just a pointer instead of an array.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.
Robert Watson [Thu, 3 Mar 2011 11:31:08 +0000 (11:31 +0000)]
Make cap_new(2) and cap_getmode(2) symbols from libc public so applications
can link against them. Add man pages for the new system calls, with one
errant forward reference to changes not yet present in FreeBSD, but soon
will be.
Reviewed by: anderson
Obtained from: Capsicum Project
Sponsored by: Google, Inc.
Discussed with: benl, kris, pjd
MFC after: 3 months
Adrian Chadd [Thu, 3 Mar 2011 08:38:31 +0000 (08:38 +0000)]
Port over ar5416OverrideIni() from ath9k ar5008_hw_override_ini().
* change the BB gating logic to explicitly define which chips are covered;
the ath9k method isn't as clear.
* don't disable the BB gating for now, the ar5416 initvals have it, and the
ar9160 initval sets it to 0x0. Figure out why before re-enabling this.
* migrate the Merlin (ar9280) applicable WAR from the Kite (ar9285) code
(which won't get called for Merlin!) and stuff it in here.
Adrian Chadd [Thu, 3 Mar 2011 08:09:49 +0000 (08:09 +0000)]
Modify the sample rate module output to be (slightly) easier to understand.
* add dot11rate_label() which returns Mb or MCS based on legacy or HT
* use it everywhere dot11rate() is used
* in the "current selection" part at the top of the debugging output,
otuput what the rate itself is rather than the rix. The rate index
(rix) has very little meaning to normal humans who don't know how
to find the PHY settings for each of the chipsets; pointing out the
rix rate and type is likely more useful.
Adrian Chadd [Thu, 3 Mar 2011 03:02:06 +0000 (03:02 +0000)]
Disable trying to do HT/40 and short-GI TX.
These flags are just plain wrong - they're the node flags from negotiation,
not the configured flags. I'll jump in later on and figure out exactly
what should be done to properly set these two flags when in both STA mode
(ie, what the AP says is possible and what's configured) and AP mode
(ie, where the AP has a configuration, but then negotiates what's possible
with each node, so per-node configuration can and will differ.)
This allows the 11n 2.4ghz/ht20 mode to associate (but perform poorly still)
and exchange MCS rates with atheros reference APs and a Cisco/Linksys
E3000 AP.
Ulrich Spörlein [Wed, 2 Mar 2011 21:59:42 +0000 (21:59 +0000)]
Unbreak .Aq for non-ASCII output like -Tps or -Tutf8.
groff will try to produce fancy angle brackets like
Foo ⟨foo@FreeBSD.org⟩
This is nice and well, but no email client will understand them. For
ease of copy&paste keep the one-true pair of brackets 0x3c/0x3e.
Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without
preparing its environment first and installs games into its distribution
using the regular make distribute logic instead of post-processing with
a script.
Also add two new targets, packageworld and packagekernel, that tar up the
results of distributeworld and distributekernel (also new), respectively.
Expand the name of Palm Sunday holiday with more canonical Entry of the
Lord into Jerusalem.
Merge the Pentecost and Trinity Sunday holidays, they are synonyms.
Remove Body of Christ day, nonexistent holiday for Orthodox Church.
Fix typo in the name of Ioann The Baptist, introduced in previous commit.
Alan Cox [Wed, 2 Mar 2011 00:24:07 +0000 (00:24 +0000)]
Make a change to the implementation of the direct map to improve performance
on processors that support 1 GB pages. Specifically, if the end of physical
memory is not aligned to a 1 GB page boundary, then map the residual
physical memory with multiple 2 MB page mappings rather than a single 1 GB
page mapping. When a 1 GB page mapping is used for this residual memory,
access to the memory is slower than when multiple 2 MB page mappings are
used. (I suspect that the reason for this slowdown is that the TLB is
actually being loaded with 4 KB page mappings for the residual memory.)