summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix logical error.hselasky2014-09-031-1/+1
| | | | MFC after: 3 days
* Invoke make_dtb with MACHINE defined for enhanced cross buildingimp2014-09-031-2/+2
| | | | | | | friendliness. This should restore old-fashioned kernel building in a cross environment, though this has only had limited testing. Sponsored by: Netflix
* Define _DTRACE_VERSION in sdt.h rather than setting it manually. This ismarkj2014-09-022-1/+3
| | | | | similar to what illumos does, and makes it easier to enable USDT probes in third-party software that doesn't make use of the system makefiles.
* Fix regression introduced by SVN r270954. Correct way to reset getoptsdteske2014-09-021-2/+2
| | | | | | is to set OPTIND to 1, not unset it (which causes an error). Thanks to: jilles
* Allow standalone debug for non-default ${PROG} targetsemaste2014-09-021-3/+1
| | | | | | | | | | | | | | This allows WITH_DEBUG_FILES to produce standalone debug for the ELF runtime linker. We previously disabled standalone debug files for bsd.prog.mk consumers that included a non-default ${PROG} target, but this is not required. Consumers that do not support standalone debug are still handled by disabling it for statically linked binaries, and for those that specify a non-default binary format. Sponsored by: DARPA, AFRL
* Use callout(9) instead of timeout(9).jhb2014-09-021-8/+6
| | | | Tested by: danfe
* Fix for WITNESS warning while doing xpt_rescan.kadesai2014-09-022-8/+5
| | | | | | | | | | | | | | | | | | | | | This happen when converting any JBOD to RAID or creating any new RAID from Unconfigured Drives. Without this fix, user may see below call trace if WITNESS is enabled. witness_warn() at witness_warn+0x4b5/frame 0xfffffe011f929a00 uma_zalloc_arg() at uma_zalloc_arg+0x3b/frame 0xfffffe011f929a70 malloc() at malloc+0x192/frame 0xfffffe011f929ac0 mrsas_bus_scan_sim() at mrsas_bus_scan_sim+0x32/frame 0xfffffe011f929af0 mrsas_aen_handler() at mrsas_aen_handler+0x11c/frame 0xfffffe011f929b20 taskqueue_run_locked() at taskqueue_run_locked+0xf0/frame 0xfffffe011f929b80 taskqueue_thread_loop() at taskqueue_thread_loop+0x9b/frame 0xfffffe011f929bb0 fork_exit() at fork_exit+0x84/frame 0xfffffe011f929bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe011f929bf0 Submitted by: kadesai Reviewed by: ambrisko MFC after: 3 days
* Fix typo in a comment.rpaulo2014-09-021-1/+1
|
* The proper compatibility string for the AHCI device isimp2014-09-023-2/+6
| | | | | allwinner,sun4i-ahci, so use that instead of the older string which had become FreeBSD specific.
* Clean up <sys/cdefs.h> slightly.ed2014-09-021-3/+2
| | | | | | | | | | - Remove c++0x hack from <sys/cdefs.h> that was needed when Clang did not fully implement C++11. We can now safely test against C++11 to check whether thread_local is available, like we do for all other C++11 keywords. - Don't use __clang__ to test for thread safety annotation presence. It turns out we have a proper attribute for this.
* Update a comment to reflect the changes in r213408.alc2014-09-021-1/+1
| | | | MFC after: 5 days
* Fix typo.ian2014-09-021-1/+1
| | | | Pointy hat: ian
* Use OF_xref_from_device(), not OF_xref_from_node(). Also, use bzero()ian2014-09-021-3/+4
| | | | rather than memset().
* Add OF_xref_from_device() so that there's no need to have an intermediateian2014-09-022-0/+17
| | | | call to ofw_bus_get_node() to lookup info that's already in the xreflist.
* Create an interface for drivers to enable or disable their clocks as listedian2014-09-024-0/+298
| | | | | | | | | | | | | in the clocks=<...> properties of their FDT data. The clock properties consist of 2-cell tuples, each containing a clock device node reference and a clock number. A clock device driver can register itself as providing this interface, then other drivers can turn the FDT clock node reference into the corresponding device_t so that they can use the interface to query and manipulate their clocks. This provides convenience functions to enable or disable all the clocks listed in the properties for a device, so most drivers will be able to manage their clocks with a single call to fdt_clock_enable_all(dev).
* The anatop driver controls power and PLLs and needs to be available beforeian2014-09-021-5/+19
| | | | | just about anything else (other than octop which provides it config info), so make it an EARLY_DRIVER_MODULE().
* The ocotp driver provides access to registers containing chip configurationian2014-09-021-1/+2
| | | | | data that is needed by other drivers, so make it an EARLY_DRIVER_MODULE() that loads before just about anything else.
* Fix a bug where command line arguments could be misprocessed if getopts isdteske2014-09-011-0/+2
| | | | | | | | used prior to f_dialog_init() -- e.g., in a script that sets DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run automaticaly when `dialog.subr' is included. Caused by sub-shell processing of arguments inheriting prior value of $OPTIND, used by getopts. Solved by unsetting OPTIND prior to [re-]processing of positional arguments.
* Create a mechanism for looking up a device_t associated with an ofw/fdtian2014-09-012-4/+124
| | | | | | | | | | | xref handle, and for registering that association. Also use the same data for faster translations between node and xref handles. Now when fdt properties contain &othernode references, a driver can find the device instance that corresponds to &othernode, and thus can use interfaces provided by that instance. Reviewed by: nwhitehorn
* Add bsearch_b to the libc map and the stdlib header.pfg2014-09-012-7/+8
| | | | | | | | | | | | bsearch_b is the Apple blocks enabled version of bsearch(3). This was added to libc in Revision 264042 but the commit missed the declaration required to make use of it. While here move some other block-related functions to the BSD_VISIBLE block as these are non-standard. Phabric: D638 Reviewed by: theraven, wollman
* Add -Wthread-safety to WARNS=6.ed2014-09-012-0/+7
| | | | | | | | | | While there, add a NO_WTHREAD_SAFETY flag that can be used to disable this specific warning flag. Disable it for auditdistd. We can easily patch up auditdistd to have the right annotations to build, but as auditdistd is intended to be portable across other operating systems, it's not worth the effort. Approved by: brueffer@
* Add lock annotations to libcuse.ed2014-09-011-5/+7
| | | | | | | | | - Add annotations to the lock/unlock function to indicate that the function is allowed to lock and unlock the underlying pthread mutex. - Add __guarded_by() annotations to the global variables. Approved by: hselasky@
* sdhci.h has grown a dependency on sysctl.h, include the latter where needed.ian2014-09-013-0/+3
|
* According to the ISO C standard, lgamma(-integer) returnskargl2014-09-012-11/+13
| | | | | | | | | | | | inf and raises the divided-by-zero exception. Compilers constant fold one/zero to inf but do not raise the exception. Introduce a volatile vzero to prevent the constant folding. Move the declaration of zero into the main declaration block. While here, fix a nearby disordering of 'lx,ix' Discussed with: bde
* Rename OF_xref_phandle() to OF_node_from_xref() and add a new functionian2014-09-0117-21/+36
| | | | | | that provides the inverse translation, OF_xref_from_node(). Discussed with: nwhitehorn
* Add lock annotations to the threading API used by hastd.ed2014-09-012-13/+13
| | | | Approved by: pjd@
* Add lock annotations to the header files of our threading libraries.ed2014-09-012-36/+67
| | | | | | | | | | | | | | | This change extends all of the functions present in the <pthread.h> and <threads.h> headers to have lock annotations. This will allow Clang to warn about the following: - Locking a function twice, - Unlocking a function without a mutex being locked, - Forgetting to unlock a mutex before returning, - Destroying or reinitializing a mutex that is currenty locked, - Using an unlocked mutex in combination with a condition variable. Enabling these annotations already allowed me to catch a bug in one of our userspace tools (r270749).
* Enable lock annotations on HEAD when using Clang.ed2014-09-011-3/+4
| | | | MFC after: never
* Add lock annotations to <sys/cdefs.h>.ed2014-09-011-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang has support for annotating mutexes and code that uses mutexes to validate certain aspects of thread safety: - Whether acquiring/releasing locks is done properly (e.g., whether you unlock a mutex before leaving a function). - Whether a lock is held while reading/writing data from/to memory. Analysis is performed at the function level. Functions can be annotated to indicate they: - (try to) pick up a lock, - release a lock, - can only be called when (not) holding a lock, - assert that a lock is held. Variables and structure members can be annotated to indicate that they are guarded by a certain lock. In C++, these annotations can refer to both global variables, but also other class/structure members. In C, it is only possible to refer to global variables. This change adds wrappers for the annotations used by Clang to <sys/cdefs.h>. They currently have no effect, but this is on purpose. This change will be merged back to FreeBSD 9 and 10, which means we can safely experiment with these annotations on HEAD without making it harder to port changes back. Reviewed by: announced on arch@ and toolchain@ MFC after: 3 weeks
* Add vt(4) support to the console initialisation script, specifically:se2014-09-011-4/+115
| | | | | | | | | | | | | | | | | | | - Identify the console driver used and print syscons or vt as appropriate. - If vt is used and a keymap could not be loaded, then try to replace the keymap name configured in rc.conf based on a replacement list in this script. Warn about the fact, that a syscons keyname is configured and report the replacement used under vt. - If no replacement keymap is found, no keymap is loaded and a warning is displayed, which points at the conversion script and allows the conversion of keymaps not part of the official distribution. This patch has been sent to the -hackers list for review, but no comment has been received, yet. It is tested to work under syscons and vt on my system (on vt with either the syscons or vt keymap file name in rc.conf). MFC after: 3 days
* Final patches to the tools used to convert syscons keymaps for use withse2014-09-012-4/+4
| | | | | | vt. MFC after: 3 days
* Add references to vt(4) to further man-pages.se2014-09-012-6/+32
| | | | MFC after: 3 days
* Fix a tab that somehow became 8 spaces.kargl2014-09-012-10/+5
| | | | | | | | | | | | | Remove parentheses in a return statement to be consistent with the rest of the file. Rename sin_pi() in the float version to sin_pif(). Remove large comment that precedes sin_pif(). The comment duplicates a comment in e_lgamma_r.c where the algorithm is documented. Requested by: bde
* Fix typo (by -> be).se2014-09-011-1/+1
| | | | MFC after: 3 days
* Do not generate unwind info in asm functions if _STANDALONE is defined.ian2014-09-011-1/+1
| | | | | The .fnend op causes the assembler to emit RELOC references to unwind support functions that don't exist in libstand.
* Make SOCK_RAW sockets to be truly raw, not modifying received and sentglebius2014-09-014-29/+27
| | | | | | | | | | | | | | packets at all. Swapping byte order on SOCK_RAW was actually a bug, an artifact from the BSD network stack, that used to convert a packet to native byte order once it is received by kernel. Other operating systems didn't follow this, and later other BSD descendants fixed this, leaving us alone with the bug. Now it is clear that we should fix the bug. In collaboration with: Olivier Cochard-Labbé <olivier cochard.me> See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc.
* Explicitly free packet on PF_DROP, otherwise a "quick" rule withglebius2014-09-011-0/+8
| | | | | | | | "route-to" may still forward it. PR: 177808 Submitted by: Kajetan Staszkiewicz <kajetan.staszkiewicz innogames.de> Sponsored by: InnoGames GmbH
* Add the reverse part to rule #9. Also change its description in theae2014-09-012-1/+3
| | | | | | netstat(8) output. MFC after: 1 week
* Resync comments about scbus and pass for life after AHCI joined CAM.imp2014-09-0122-34/+34
| | | | Sponsored by: Netflix
* Compute sin(pi*x) without actually doing the pi*x multiplication.kargl2014-08-312-53/+49
| | | | | | | | | | sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is the precision of x. The new argument reduction is an optimization compared to the old code, and it removes a chunk of dead code. Accuracy tests in the intervals (-21,-20), (-20,-19), ... (-1,0) show no differences between the old and new code. Obtained from: bde
* - Nuke unused sdhci_softc.marius2014-08-315-42/+34
| | | | | | | | | | | | | - Static'ize sdhci_debug local to sdhci.c. - Const'ify PCI device description strings. - Nuke redundant resource ID members from sdhci_pci_softc. - Nuke unused hw.sdhci_pci.debug tunable. - Add support for using MSI instead of INTx, controllable via the tunable hw.sdhci.enable_msi (defaulting to on) and tested with a RICOH R5CE823 SD controller. - Use NULL instead of 0 for pointers. MFC after: 3 days
* GIC (Cortex A's interrupt controller) supports up to 1020 IRQs.br2014-08-311-1/+1
|
* Automatically prefault a limited number of mappings to resident pages inalc2014-08-311-3/+3
| | | | | | | shmat(2), just like mmap(2). MFC after: 5 days Sponsored by: EMC / Isilon Storage Division
* In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo).ian2014-08-3122-1/+36
| | | | | | | | | The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Reported by: bapt Reviewed by: imp
* Put option FDT into the base IMX6 config and remove it from the configian2014-08-314-3/+1
| | | | of boards based on IMX6.
* The Marvell PJ4B cpu family is armv7, not armv6.ian2014-08-311-2/+2
|
* Toss fields so that no padding field is required to achieve alignment.glebius2014-08-311-2/+1
|
* It is actually possible to have if_t a typedef to non-void type,glebius2014-08-319-180/+73
| | | | | | | | | | | and keep both converted to drvapi and non-converted drivers compilable. o Make if_t typedef to struct ifnet *. o Remove shim functions. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Provide pointer from struct ifnet to struct netmap_adapter,glebius2014-08-312-1/+3
| | | | instead of abusing spare field.
* Fix character case in examples for "camcontrol security" - should begavin2014-08-311-3/+3
| | | | | | | | "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com MFC after: 3 days
OpenPOWER on IntegriCloud