summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r291149, r291367:ian2016-01-245-16/+46
| | | | | | | | | | | | | | Update the imx5/imx6 cpu_reset() implementation based on a new understanding of the SRS (software reset) bit in the watchdog control register. Despite what the manual seems to imply, this bit DOES trigger an immediate reset, as opposed to simply flagging the type of reset as software-triggered. Rename sysctl node hw.imx6 to hw.imx. Move its definition to imx_machdep.c so that code shared between imx5 and imx6 can work with OIDs under that node. Add last_reset_status (integer) and last_reset_reason (string) OIDs that provide info about the last chip reset (power-on, software reset, watchdog timeout).
* MFC r289618, r290316:ian2016-01-244-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix printf format to allow for bus_size_t not being u_long on all platforms. Fix an alignment check that is wrong in half the busdma implementations. This will enable the elimination of a workaround in the USB driver that artifically allocates buffers twice as big as they need to be (which actually saves memory for very small buffers on the buggy platforms). When deciding how to allocate a dma buffer, armv4, armv6, mips, and x86/iommu all correctly check for the tag alignment <= maxsize as enabling simple uma/malloc based allocation. Powerpc, sparc64, x86/bounce, and arm64/bounce were all checking for alignment < maxsize; on those platforms when alignment was equal to the max size it would fall back to page-based allocators even for very small buffers. This change makes all platforms use the <= check. It should be noted that on all platforms other than arm[v6] and mips, this check is relying on undocumented behavior in malloc(9) that if you allocate a block of a given size it will be aligned to the next larger power-of-2 boundary. There is nothing in the malloc(9) man page that makes that explicit promise (but the busdma code has been relying on this behavior all along so I guess it works). Arm and mips code uses the allocator in kern/subr_busdma_buffalloc.c, which does explicitly implement this promise about size and alignment. Other platforms probably should switch to the aligned allocator.
* MFC r289727:ian2016-01-241-37/+120
| | | | | | | | | | | | | | | | | | | | Add FDT compatibility to the icee driver. The FDT bindings for eeprom parts don't include any metadata about the device other than the part name encoded in the compatible property. Instead, a driver is required to have a compiled-in table of information about the various parts (page size, device capacity, addressing scheme). So much for FDT being an abstract description of hardware characteristics, huh? In addition to the FDT-specific changes, this also switches to using the newer iicbus_transfer_excl() mechanism which holds bus ownership for the duration of the transfer. Previously this code held the bus across all the transfers needed to complete the user's IO request, which could be up to 128KB of data which might occupy the bus for 10-20 seconds. Now the bus will be released and re-aquired between every page-sized (8-256 byte) transfer, making this driver a much nicer citizen on the i2c bus. The hint-based configuration mechanism is still in place for non-FDT systems.
* MFC r289726:ian2016-01-242-0/+17
| | | | | | | Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction while holding exclusive ownership of the bus. This is the routine most slave drivers should use unless they have a need to acquire and hold the bus across a series of related operations that involves multiple transfers.
* MFC r289704:ian2016-01-243-4/+8
| | | | | | | | | | | Fix parsing of I2C addresses properties in fdt data. I2C address is represented in 7-bits format in DT files, but system expect it in 8-bit format. Also, fix two drivers that locally hack around this bug. This includes a direct-commit change to the beaglebone dts data in the 10-stable branch to adjust the i2c slave addresses directly. In -current the equivelent change happened with a switch from homegrown to standard fdt data.
* MFC r289619:ian2016-01-241-2/+1
| | | | | Follow the advice of the misplaced comment and don't access the map struct after freeing it. Remove the comment whose uselessness has been revealed.
* MFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,des2016-01-2453-22220/+152
| | | | | | r294320, r294322, r294324, r294330, r294469, r294494, r294466) Reduce diffs to head in preparation for removing HPN and None.
* MFC r293073:ngie2016-01-248-107/+67
| | | | | | | | | | - Use attach_md instead of hardcoding md(4) provider unit numbers - Implement a gmirror_test_cleanup function, which in turn calls geom_test_cleanup to clean up all md(4) providers allocated in the test run. - Remove duplicate logic in test scripts for removing md(4) providers. - Don't create files in /tmp (outside the kyua sandbox); use the current directory instead
* MFC r293860vangyzen2016-01-241-1/+1
| | | | | | | | | | | | | | | | | bsdinstall: Suggest the GPT+Active workaround on Dell T5810 The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode without the Active flag in the Protective MBR. Suggest the workaround during installation. Since an increasing number of Dell systems exhibit this behavior, I imagine all Dells past a certain date will do so. I would like to suggest the workaround for all Dells with a BIOS date of, say, 2014 or later, but I would need to test a variety of systems before committing such a change. Relnotes: We should probably suggest using GPT+Active on "recent" Dells. Sponsored by: Dell Inc.
* MFC: r285732allanjude2016-01-231-2/+54
| | | | | | | | | Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround MFC: r287843 Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list Sponsored by: ScaleEngine Inc.
* MFC r294125:ngie2016-01-232-5/+5
| | | | | | | | | Test for EPROTOTYPE not EPROTONOSUPPORT - `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4) - localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so the prototype is invalid (this isn't explicitly documented anywhere I could find)
* MFC r293858vangyzen2016-01-231-2/+3
| | | | | | | | | libthr: const-ify two variables Make the default umutex and urwlock initializers const, because they can be, and as a microoptimization. Sponsored by: Dell Inc.
* MFC r294235:ian2016-01-231-21/+24
| | | | | | | | | | | | Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783. Previously the polarity was for TTL levels, which are the reverse of RS-232. Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl value, the same as was recently added to uart(4), so that people using TTL level connections can request a logical inverting of the signal. Use the named constants from the new dev/uart/uart_ppstypes.h for the pps capture modes and option bits.
* MFC 294366:jhb2016-01-231-1/+1
| | | | | | | | | | | | | | Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0. If a driver's Linux mmap callback passed vm_page_prot through unchanged, then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx value 0 is to the mapping. On x86, VM_MEMATTR_DEFAULT is the PAT value for write-back (WB) which is 6, while 0 maps to the PAT value for uncacheable (UC). Thus, any mmap request that did not explicitly set page_prot was tried to map memory as UC triggering the warning in sg_pager_getpages(). Sponsored by: Chelsio Communications
* MFC r289453:trasz2016-01-232-7/+89
| | | | | | | Add -w flag to iscsictl(8) utility, to make it wait for successfull session establishment. Scripting is kind of hard without it. Sponsored by: The FreeBSD Foundation
* MFC r294137:kib2016-01-231-15/+45
| | | | | Do not panic when the filesystem which carries the audit files, is unmounted and audit is active. Do not write to the suspended fs.
* MFC r293059:kib2016-01-231-3/+3
| | | | | Hide transient EBADF errors caused by the parallel revoke(2) or forced unmount of devfs mounts, by restarting the failed syscall.
* MFC 292892:jhb2016-01-231-8/+3
| | | | | | | Call kern_thr_exit() instead of duplicating it. This code is missing the racct_subr() call from kern_thr_exit() and would require further code duplication in future changes.
* MFC 286974,291653:jhb2016-01-233-8/+7
| | | | | | | | | | | | | | | | 286974: Remove reference to non-existent kern_openat(9). 291653: The cdevpriv_dtr_t typedef was not able to be used in a function prototype like the various d_*_t typedefs since it declared a function pointer rather than a function. Add a new d_priv_dtor_t typedef that declares the function and can be used as a function prototype. The previous typedef wasn't useful outside of the cdevpriv implementation, so retire it. The name d_priv_dtor_t was chosen to be more consistent with cdev methods since it is commonly used in place of d_close_t even though it is not a direct pointer in struct cdevsw.
* Make it possible to override NO_INSTALLEXTRAKERNELS.glebius2016-01-221-1/+1
| | | | Submitted by: ngie
* MFC r294554: MFV r294491: ntp 4.2.8p6.delphij2016-01-22201-3500/+6686
| | | | | | | | Security: CVE-2015-7973, CVE-2015-7974, CVE-2015-7975 Security: CVE-2015-7976, CVE-2015-7977, CVE-2015-7978 Security: CVE-2015-7979, CVE-2015-8138, CVE-2015-8139 Security: CVE-2015-8140, CVE-2015-8158 With hat: so
* MFC r293048,r293444:ngie2016-01-221-15/+27
| | | | | | | | | | | | | | | | | r293048: - Use a temporary file for the temporary md(4) devices instead of hardcoding it - Remove the temporary file in the cleanup routine r293444: - Move functions that might be used in class-specific cleanup functions (geom_test_cleanup, etc) down so the testcases don't emit noise when bailing - Conform to the TAP protocol better when dealing with classes that can't be loaded and with temporary files that can't be allocated for tracking md(4) devices.
* Revert r294271:pfg2016-01-224-80/+34
| | | | | | | ext4: add support for reading sparse files Our older GCC can't handle anonymous unions, so ia64 and powerpc LINT kernels are now failing.
* MFC r294234: utimensat(2): Correct description of [EINVAL] error.jilles2016-01-211-3/+6
|
* MFC 294233:dchagin2016-01-211-0/+1
| | | | | Prevent double free of control in common sendmsg path as sosend already freeing it.
* MFC 292953:bz2016-01-211-2/+2
| | | | | | This code is not in modules that need KPI stability so no need to use the wrapper functions as used in r252511 (head). We can directly use the locking macros.
* MFC r292604:bz2016-01-211-3/+17
| | | | | | | | | | | If vnets are torn down while ifconfig runs an ioctl to say, destroy an epair(4), we may hit if_detach_internal() without holding a lock and by the time we aquire it the interface might be gone. We should not panic() in this case as it is our fault for not holding the lock all the way. It is not ideal to return silently without error to user space, but other callers will all ignore the return values so do not change the entire KPI for little benefit for now. The ifp will be dealt with one way or another still.
* MFC r292603:bz2016-01-212-2/+2
| | | | | | | | | If bootverbose is enabled every vnet startup and virtual interface creation will print extra lines on the console. We are generally not interested in this (repeated) information for each VNET. Thus only print it for the default VNET. Virtual interfaces on the base system will remain printing information, but e.g. each loopback in each vnet will no longer cause a "bpf attached" line.
* MFC r292602:bz2016-01-211-12/+2
| | | | | | | Simplify bringup order by removing a SYSINIT making it a static list initialization. Obtained from: p4 @180384,180385
* iicbus: Use device_delete_children() instead of explicit child removaldumbbell2016-01-214-19/+6
| | | | | | | | | | | | | | | | | If the bus is detached and deleted by a call to device_delete_child() or device_delete_children() on a device higher in the tree, I²C children were already detached and deleted. So the device_t pointer stored in sc points to freed memory: we must not try to delete it again. By using device_delete_children(), we let subr_bus.c figure out if there are children to take care of. While here, make sure iicbus_detach() and iicoc_detach() call device_delete_children() too, to be safe. Reviewed by: jhb, imp Approved by: jhb, imp Differential Revision: https://reviews.freebsd.org/D3926
* iicbus: Remove trailing whitespacesdumbbell2016-01-211-4/+4
| | | | MFC of: r289656
* MFC r294126:ngie2016-01-212-4/+2
| | | | | | | | | | | | | Fix warnings with gcc 5.0 reconnect.c: - Convert the K&R prototype of main to an ANSI prototype to mute a warning from gcc 4.2.1 - Close s_sock2 after finishing off the last test to plug a leak and mute a warning from gcc 5.0 about a -Wunused-but-set variable sendfile.c: - Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)
* MFC r294127:ngie2016-01-212-33/+33
| | | | | | | | | Fix warnings with clang/gcc - Get rid of unused argc/argv variables in main - Exit on failure with a return code of 1 instead of -1 with err/errx as a return code of -1 is implementation dependent - Bump WARNS to 6
* MFC r294183:jamie2016-01-212-18/+4
| | | | | | | | | | | | Clear errno before calling getpw*. MFC r294196: Don't bother checking an ip[46].addr netmask/prefixlen. This is already handled by ifconfig, and it was doing it wrong when the paramater included extra ifconfig options. PR: 205926
* MFC r294042: Add rotationrate to geom disk dumpconfrpokala2016-01-211-0/+17
| | | | | | Parse and report the nominal rotation rate reported by the drive. Approved by: jhb
* MFC 292682:jhb2016-01-213-7/+7
| | | | | | | | | | | | Fix remaining direct tests of the carry flag in the v86 %eflags via a magic number to use V86_CY() instead. These should have been fixed as part of the cleanup in r226746 but were missed. The md5 sums of the object files were unchanged, so there should be no functional change. PR: 205424 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>
* MFC: r294191allanjude2016-01-211-1/+3
| | | | | | Never 4k align the MBR bootpool because zfsldr can not deal with a gap Sponsored by: ScaleEngine Inc.
* Add strlcat and strlcpy to libstand on ia64. This is conceptually partian2016-01-201-0/+1
| | | | | of the MFC done in r294342, but since ia64 is gone in -current this is a direct commit to 10-stable to add the functions.
* Leave temporary ia64 loader.sym behind if the build failsemaste2016-01-201-1/+0
| | | | | This facilitates investigation of the build failure, and is the same way it's done for other architectures using EFI.
* MFC r276539: Update ELF headers to include additional definesemaste2016-01-204-29/+240
| | | | | | | | | | | | The elftoolchain project includes these additional defines for various userland programs. Given that arch-specific defines are still interesting in the context of userland programs reading or writing ELF metadata, they should be included in top-level ELF headers. Remove duplicate defines from ARM and MIPS elf headers. Submitted by: will (initial version) Sponsored by: The FreeBSD Foundation
* MFC r293856:brooks2016-01-201-1/+1
| | | | | | | | | | | Avoid reading pass the end of the source buffer when it is not NUL terminated. If this buffer is adjacent to an unmapped page or a version of C with bounds checked is used this may result in a crash. PR: 206178 Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
* MFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definitionemaste2016-01-201-0/+1
|
* MFC r293855:brooks2016-01-201-1/+1
| | | | | | | | | | | Avoid reading pass the end of the source buffer when it is not NUL terminated. If this buffer is adjacent to an unmapped page or a version of C with bounds checked is used this may result in a crash. PR: 206177 Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
* MFC r288083, r288138: elfdump: report MIPS-specific ELF section typesemaste2016-01-201-0/+2
|
* MFC r293245: loader.efi style(9) cleanupemaste2016-01-201-35/+29
| | | | Submitted by: smh
* MFC r293234: Enable the beastie menu for the UEFI consoleemaste2016-01-203-11/+4
| | | | | | | As of r294445 [in stable/10] the UEFI console includes basic terminal emulator support. Relnotes: Yes
* MFC r293233: loader.efi: add terminal emulation supportemaste2016-01-204-20/+406
| | | | | | | This is based on the vidconsole implementation. Submitted by: Toomas Soome <tsoome@me.com> Relnotes: Yes
* MFC r293281: Use standard name for ASCII LF and FF control codesemaste2016-01-202-7/+7
| | | | PR: 205778
* MFC r277215, r277291, r277418, r280953 and r280954:royger2016-01-2016-94/+989
| | | | | | | | | loader: implement multiboot support for Xen Dom0 Note that only the subset of the multiboot specification needed in order to boot a Xen Dom0 is implemented. Sponsored by: Citrix Systems R&D
* MFC r294372arybchik2016-01-201-1/+1
| | | | | | sfxge: refresh version to note matching version of out-of-tree driver Sponsored by: Solarflare Communications, Inc.
OpenPOWER on IntegriCloud