summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Begin fleshing out the TX FIFO support.adrian2012-08-112-1/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ATH_TXQ_FIRST() for easy tasting of what's on the list; * Add an "axq_fifo_depth" for easy tracking of how deep the current FIFO is; * Flesh out the handoff (mcast, hw) functions; * Begin fleshing out a TX ISR proc, which tastes the TX status FIFO. The legacy hardware stuffs the TX completion at the end of the final frame descriptor (or final sub-frame when doing aggregate.) So it's feasible to do a per-TXQ drain and process, as the needed info is right there. For EDMA hardware, there's a separate TX completion FIFO. So the TX process routine needs to read the single FIFO and then process the frames in each hardware queue. This makes it difficult to do a per-queue process, as you'll end up with frames in the TX completion FIFO for a different TXQ to the one you've passed to ath_tx_draintxq() or ath_tx_processq(). Testing: I've tested the TX queue and TX completion code in hostap mode on an AR9380. Beacon frames successfully transmit and the completion routine is called. Occasional data frames end up in TXQ 1 and are also successfully completed. However, this requires some changes to the beacon code path as: * The AR9380 beacon configuration API is now in TU/8, rather than TU; * The AR9380 TX API requires the rate control is setup using a call to setup11nratescenario, rather than having the try0 series setup (rate/tries for the first series); so the beacon won't go out. I'll follow this up with commits to the beacon code.
* Some more minor tunings inspired by bde@.mav2012-08-112-25/+31
|
* Add __always_inline to __ieee754_rem_pio2() and __ieee754_rem_pio2f(),dim2012-08-112-2/+2
| | | | | | | since some older versions of gcc refuse to inline these otherwise. Requested by: bde MFC after: 1 week
* Allow idle threads to steal second threads from other cores on systems withmav2012-08-111-6/+0
| | | | | | | | | | | | 8 or more cores to improve utilization. None of my tests on 2xXeon (2x6x2) system shown any slowdown from mentioned "excess thrashing". Same time in pbzip2 test with number of threads more then number of CPUs I see up to 10% speedup with SMT disabled and up 5% with SMT enabled. Thinking about trashing I was trying to limit that stealing within same last level cache, but got only worse results. Present code any way prefers to steal threads from topologically closer cores. Sponsored by: iXsystems, Inc.
* Rename aux.c to auxv.c.ed2012-08-112-1/+1
| | | | | | | | | | | On Windows, AUX is the auxiliary device, usually pointing to COM1. Therefore it is forbidden to create a file named aux.c. To make it a bit easier for Windows users to check out our source code, rename this file to auxv.c. MFC after: 1 month Discussed with: kib Suggested by: Eric van Gyzen <eric vangyzen net>
* Change a few extern inline functions in libm to static inline, sincedim2012-08-116-28/+23
| | | | | | | | | | | they need to refer to static constants, which C99 does not allow for extern inline functions. While here, change a comment in e_rem_pio2f.c to mention the correct number of bits. Reviewed by: bde MFC after: 1 week
* Move the decoding of the swi instruction to the syscall function. With theandrew2012-08-111-7/+4
| | | | | | ARM EABI the syscall value will be moved to a register to ease adding thumb support. When this happens decoding of the instruction will no longer be required.
* Correct the PLLA setting functions and centralize.imp2012-08-115-70/+41
|
* Update comments about setting PLLA and refernce the tables in theimp2012-08-111-6/+15
| | | | datasheet that express the limits.
* Don't use C++ comments.imp2012-08-111-11/+12
|
* tvtohz will print out an error message if a negative value is givendavidxu2012-08-111-9/+13
| | | | | | to it, avoid this problem by detecting timeout earlier. Reported by: pho
* Some minor tunings/cleanups inspired by bde@ after previous commits:mav2012-08-103-45/+73
| | | | | | | | | | - remove extra dynamic variable initializations; - restore (4BSD) and implement (ULE) hogticks variable setting; - make sched_rr_interval() more tolerant to options; - restore (4BSD) and implement (ULE) kern.sched.quantum sysctl, a more user-friendly wrapper for sched_slice; - tune some sysctl descriptions; - make some style fixes.
* Always initialize sc_ekey, because as of r238116 it is always used.pjd2012-08-101-12/+13
| | | | | | | | | | | | | | | | | | | If GELI provider was created on FreeBSD HEAD r238116 or later (but before this change), it is using very weak keys and the data is not protected. The bug was introduced on 4th July 2012. One can verify if its provider was created with weak keys by running: # geli dump <provider> | grep version If the version is 7 and the system didn't include this fix when provider was initialized, then the data has to be backed up, underlying provider overwritten with random data, system upgraded and provider recreated. Reported by: Fabian Keil <fk@fabiankeil.de> Tested by: Fabian Keil <fk@fabiankeil.de> Discussed with: so MFC after: 3 days
* sched_rr_interval() seems always returned period in hz ticks, but samemav2012-08-101-1/+1
| | | | always it was used as rate. Fix use side units to period in hz ticks.
* Style.hselasky2012-08-101-6/+0
| | | | MFC after: 2 weeks
* Remove unused structure field.hselasky2012-08-105-21/+0
| | | | MFC after: 2 weeks
* Take advantage of new UCOM and bus functionality so thathselasky2012-08-1021-42/+520
| | | | | | | | | | | the device_detach() function doesn't block on UCOM device drivers until the TTY handle is closed by the userspace application. This is implemented by a postpone of the softc free where the UCOM structures reside until the TTY references are gone. Discussed with: kib, ed MFC after: 2 weeks
* Switch unit management in UCOM to unrhdr.hselasky2012-08-103-70/+183
| | | | | | | | | | | | | | | | | | | | | | | Extend the callback table of UCOM to include a "ucom_free" function pointer which is called when all refs on a UCOM super structure is gone. Implement various helper functions to handle refcounting and draining on the UCOM super structure. Implement macro which can be used in device drivers to avoid module unload before all pending TTY references are gone. The UCOM API is backwards compatible after this change and device drivers require no changes to function with this change. Only a recompilation of UCOM device drivers is required. The FreeBSD version has been bumped in that regard. Discussed with: kib, ed MFC after: 2 weeks
* Add new device method to free the automaticallyhselasky2012-08-103-4/+26
| | | | | | | | | | | | | | | allocated softc structure which is returned by device_get_softc(). This method can be used to easily implement softc refcounting. This can be desirable when the softc has memory references which are controlled by userspace handles for example. This solves the problem of blocking the caller of device_detach() for a non-deterministic time. Discussed with: kib, ed MFC after: 2 weeks
* Style.hselasky2012-08-101-2/+2
| | | | MFC after: 2 weeks
* Fix spelling.hselasky2012-08-101-1/+1
| | | | MFC after: 2 weeks
* Add missing FAILED event to g_raid_subdisk_event2str() to print it properlymav2012-08-101-0/+2
| | | | | | in debug messages. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* Eliminate an unnecessary acquisition and release of the page queues lockalc2012-08-101-2/+0
| | | | | | | from pmap_pte(). PT_SET_MA() is not a queued mapping update, but instead an immediate mapping update, so the page queues lock is not required here. Reviewed by: cperciva
* Merge r134393 from amd64/i386:alc2012-08-101-12/+0
| | | | | | | | The machine-independent parts of the virtual memory system always pass a valid pmap to the pmap functions that require one. Remove the checks for NULL. (These checks have their origins in the Mach pmap.c that was integrated into BSD. None of the new code written specifically for FreeBSD included them.)
* RFC 2289 requires all hashes be stored in little endian format beforedelphij2012-08-102-0/+18
| | | | | | | | | | | | folding to 64 bits, while SHA1 code is big endian. Therefore, a bswap32 is required before using the value. Without this change, the implementation does not conform to test vector found in RFC 2289. PR: bin/170519 Submitted by: Arthur Mesh <arthurmesh gmail com> (with changes) MFC after: 1 week
* More comments about setting PLLA, or rather that we never do.imp2012-08-101-7/+12
|
* Add charge pump current register.imp2012-08-101-0/+5
|
* Add a missing HAL_DMA_ADDR definition.adrian2012-08-091-0/+1
|
* Add HAL_DMA_ADDR.adrian2012-08-093-0/+3
|
* nftw(): POSIX says directories causing loops should be silently skipped.jilles2012-08-093-4/+144
| | | | Formerly, loops caused nftw() to abort the traversal with ELOOP.
* Rework r220198 change (by fabient). I believe it solves the problem frommav2012-08-092-9/+14
| | | | | | | | | | | | | | | | | | | | | the wrong direction. Before it, if preemption and end of time slice happen same time, thread was put to the head of the queue as for only preemption. It could cause single thread to run for indefinitely long time. r220198 handles it by not clearing TDF_NEEDRESCHED in case of preemption. But that causes delayed context switch every time preemption happens, even when not needed. Solve problem by introducing scheduler-specifoc thread flag TDF_SLICEEND, set when thread's time slice is over and it should be put to the tail of queue. Using SW_PREEMPT flag for that purpose as it was before just not enough informative to work correctly. On my tests this by 2-3 times reduces run time deviation (improves fairness) in cases when several threads share one CPU. Reviewed by: fabient MFC after: 2 months Sponsored by: iXsystems, Inc.
* Refresh with OpenBSD RCS ID changes to reflect that we now have essentionallydelphij2012-08-091-7/+1
| | | | the same file.
* SCHED_4BSD scheduling quantum mechanism appears to be broken for some time.mav2012-08-091-33/+36
| | | | | | | | | | | With switchticks variable being reset each time thread preempted (that is done regularly by interrupt threads) scheduling quantum may never expire. It was not noticed in time because several other factors still regularly trigger context switches. Handle the problem by replacing that mechanism with its equivalent from SCHED_ULE called time slice. It is effectively the same, just measured in context of stathz instead of hz. Some unification is probably not bad.
* Merge r132141 and r111272 from amd64/i386:alc2012-08-092-63/+38
| | | | | | | | | | | | | Reduce the size of a PV entry by eliminating pv_ptem. There is no need to store a pointer to the page table page in the PV entry because it is easily computed during the walk down the page table. Eliminate the ptphint from the pmap. Long, long ago, page table pages belonged to a vm object, and we would look up page table pages based upon their offset within this vm object. In those days, this hint may have had tangible benefits. Tested by: jchandra
* ftw(): Do not check the maxfds argument against OPEN_MAX.jilles2012-08-091-2/+1
| | | | | | | | | | Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX does not require us to check this. POSIX does have a requirement on the application that maxfds not exceed {OPEN_MAX}, but does not require the implementation to check it ("may fail"). PR: 95239
* nftw(): Do not check the maxfds argument against OPEN_MAX.jilles2012-08-091-2/+1
| | | | | | | | | Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX does not require us to check this. PR: 95239 Submitted by: Todd Miller
* Improve lock and unlock symmetryemaste2012-08-091-15/+14
| | | | | | | | | | | | | | | - Move destruction of per-ring locks to netmap_dtor_locked to mirror the initialization that happens in NIOCREGIF. Otherwise unloading a netmap- capable interface that was never put into netmap mode would try to mtx_destroy an uninitialized mutex, and panic. - Destroy core_lock in netmap_detach, mirroring init in netmap_attach. - Also comment out the knlist_destroy for now as there is currently no knlist_init. Sponsored by: ADARA Networks Reviewed by: luigi@
* Be more descriptive about poll error / timeout when transmitting.emaste2012-08-081-3/+8
|
* More rototilling with target mode in an attemp to get multiplemjacob2012-08-082-581/+630
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CCB at a time outstanding reliable. It's not there yet, but this is the direction to go in so might as well commit. So far, multiple at a time CCBs work (see ISP_INTERNAL_TARGET test mode), but it fails if there are more downstream than the SIM wants to handle and SRR is sort of confused when this happens, plus it is not entirely quite clear what one does if a CCB/CTIO fails and you have more in flight (that don't fail, say) and more queued up at the SIM level that haven't been started yet. Some of this is driven because there apparently is no flow control to requeue XPT_CONTINUE_IO requests like there are for XPT_SCSI_IO requests. It is also more driven in that the few target mode periph drivers there are are not really set up for handling pushback- heck most of them don't even check for errors (and what would they really do with them anyway? It's the initiator's problem, really....). The data transfer arithmetic has been worked over again to handle multiple outstanding commands, so you have a notion of what's been moved already as well as what's currently in flight. It turns that this led to uncovering a REPORT_LUNS bug in the ISP_INTERNAL_TARGET code which was sending back 24 bytes of rpl data instead of the specified 16. What happened furthermore here is that sending back 16 bytes and reporting an overrun of 8 bytes made the initiator (running FC-Tape aware f/w) mad enough to request, and keep requesting, another FCP response (I guess it didn't like the answer so kept asking for it again). Sponsored by: Spectralogic MFC after: 1 month
* Fix an incorrect comment.adrian2012-08-081-1/+1
|
* Fix whitespace (missing newline)emaste2012-08-081-1/+2
|
* Clarify comments about number of tx / rx ringsemaste2012-08-082-3/+4
|
* Round displayed pps (instead of truncating)emaste2012-08-081-1/+1
|
* Import compiler-rt r160957.andrew2012-08-0887-124/+665
|\ | | | | | | | | | | This is mostly a no-op other than for ARM where it adds missing __aeabi_mem* and __aeabi_*divmod functions. Even on ARM these will remain unused until the rest of the ARM EABI code is merged.
| * Import compiler-rt r160957.andrew2012-07-30356-5271/+22991
| |
| * Import compiler-rt r147467.ed2012-01-033-4/+6
| |
* | The assertion that I added in r238889 could legitimately fail when aalc2012-08-081-1/+2
| | | | | | | | | | | | | | debugger creates a breakpoint. Replace that assertion with a narrower one that still achieves my objective. Reported and tested by: kib
* | Always initialize pl_event.kib2012-08-081-0/+1
| | | | | | | | | | Submitted by: Andrey Zonov <andrey@zonov.org> MFC after: 3 days
* | Commit device IDs for the (eventually upcoming) AR9380 HAL.adrian2012-08-071-0/+9
| | | | | | | | Obtained from: Qualcomm Atheros, Linux ath9k
* | During TSC synchronization test, use rdtsc() rather than rdtsc32(), tojimharris2012-08-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | protect against 32-bit TSC overflow while the sync test is running. On dual-socket Xeon E5-2600 (SNB) systems with up to 32 threads, there is non-trivial chance (2-3%) that TSC synchronization test fails due to 32-bit TSC overflow while the synchronization test is running. Sponsored by: Intel Reviewed by: jkim Discussed with: jkim, kib
OpenPOWER on IntegriCloud