aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename COMMON_TSS_RSP0 to TSS_RSP0.Konstantin Belousov2018-01-112-2/+2
| | | | | | | | | | | The symbol is just an offset in the hardware TSS structure, it is not limited to the common_tss instance. Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=327817
* Update comment explaining the check, to reality.Konstantin Belousov2018-01-112-10/+6
| | | | | | | | | Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=327816
* PowerNV: add buffer for OPAL consoleWojciech Macek2018-01-111-10/+54
| | | | | | | | | | | | | | | Avoid the lock in vtophys() by providing a static direct-mapped spinlock- protected output buffer to use when the console driver cannot acquire locks for some reason. This allows the idle thread to use printf() (e.g. the SMP startup messages) without crashing the kernel. Created by: Nathan Whitehorn <nwhitehorn@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327815
* PowerNV: set LPCR[LPES] correctlyWojciech Macek2018-01-112-0/+6
| | | | | | | | | | | | | Make sure to set LPCR[LPES] so that external interrupts set SRR0 and SRR1 instead of HSRR0 and HSRR1. Without this, external interrupt handlers would get the wrong MSR value when executing, causing eventual madness. Created by: Nathan Whitehorn <nwhitehorn@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327814
* PowerNV: correctly start secondary CPUsWojciech Macek2018-01-111-9/+12
| | | | | | | | | | | Fix AP startup, which was broken. Created by: Nathan Whitehorn <nwhitehorn@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327813
* PowerNV: add reset, poweroff, OPAL consoleWojciech Macek2018-01-114-0/+239
| | | | | | | | | | | | Add basic power control (reset, power off) and bind ttyuX to opal console so that init will start login there. Created by: Nathan Whitehorn <nw@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327812
* CXGBE: fix get_filt to be endianness-awareWojciech Macek2018-01-111-4/+4
| | | | | | | | | | | | | | Unconditional 32-bit shift is not endianness-safe. Modify the logic to work both on LE and BE. Submitted by: Wojciech Macek <wma@freebsd.org> Reviewed by: np Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Differential revision: https://reviews.freebsd.org/D13102 Notes: svn path=/head/; revision=327811
* PowerNV: initial support for OPALWojciech Macek2018-01-118-0/+993
| | | | | | | | | | | OPAL is a dedicated firmware acting as a hypervisor. Add generic functions to provide all access. Created by: Nathan Whitehorn <nw@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Notes: svn path=/head/; revision=327810
* Zstd: Add bswap intrinsics for small MIPS systems (e.g., Onion Omega)Conrad Meyer2018-01-111-0/+14
| | | | | | | | Reported by: mizhka Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327807
* awk(1): Add necessary bits for connecting tests, but leave disconnectedKyle Evans2018-01-113-0/+41
| | | | | | | | | | | | The NetBSD test suite has 24 tests for awk, and we pass exactly 4 of them. Add the necessary pieces for interested parties to easily connect the tests and run them, but leave them disconnected for the time being. Some of these tests outright segfault in our awk, others just exhibit the wrong behavior. Notes: svn path=/head/; revision=327806
* When we crash, we'll stop the scheduler before we call theWarner Losh2018-01-111-2/+8
| | | | | | | | | | | | | | | | shutdown_post_sync event. For adashutdown, this causes problems because we need to poll for completion of the commands, but we're not yet officially dumping yet, so the code from r326964 assumed we could use the interrupt-driven commands rather than the polled ones. This lead to a hang. Prevent this by also checking to see if the scheduler is stopped to do the polling. Reported by: markj@ Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D13845 Notes: svn path=/head/; revision=327805
* Flesh out static dtrace probes for /dev/crypto ioctl errors.John Baldwin2018-01-111-18/+84
| | | | | | | | | | | In particular, no probes were present for AEAD requests, but also for some other error cases in other ioctl requests. MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=327803
* Add encrypt+authenticate modes to cryptotest toolConrad Meyer2018-01-101-25/+60
| | | | | | | | | | | | | | | | | | | | Like jhb's cryptocheck (uncommitted so far), express encrypt+authenticate modes as "-a <encalg>+<authalg>". Example use with aesni(4) on AMD Zen family: $ ./cryptotest -d aesni0 -a aes256 10000 $((128*1024)) 2.331 sec, 20000 aes256 crypts, 131072 bytes, 1124707930 byte/sec, 8580.8 Mb/sec $ ./cryptotest -d aesni0 -a sha256 10000 $((128*1024)) 1.109 sec, 10000 sha256 crypts, 131072 bytes, 1181577161 byte/sec, 9014.7 Mb/sec $ ./cryptotest -d aesni0 -a aes256+sha256 10000 $((128*1024)) 3.805 sec, 10000 sha256+aes256 crypts, 131072 bytes, 344460116 byte/sec, 2628.0 Mb/sec Reported by: jhb Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327802
* x86: Document purpose of _safe variants of {rd,wr}msr()Conrad Meyer2018-01-102-4/+8
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327801
* malloc.9: Fix minor typo from rewording in r327796Conrad Meyer2018-01-101-1/+1
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327800
* Fix minor locking issues in the Power Mac Uninorth PCI bridge driver.Landon J. Fuller2018-01-102-10/+27
| | | | | | | | | | | | | | | - Call resource_int_value() once during attach, rather than within the pci_(read|write)_config() code path; this avoids taking a blocking mutex to read kenv variables. - Use a spin lock to protect non-atomic config space accesses; this matches the behavior of Darwin's AppleMacRiscPCI driver. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D13839 Notes: svn path=/head/; revision=327798
* mallocarray(9): panic if the requested allocation would overflowConrad Meyer2018-01-103-14/+22
| | | | | | | | | | | | | | | Additionally, move the overflow check logic out to WOULD_OVERFLOW() for consumers to have a common means of testing for overflowing allocations. WOULD_OVERFLOW() should be a secondary check -- on 64-bit platforms, just because an allocation won't overflow size_t does not mean it is a sane size to request. Callers should be imposing reasonable allocation limits far, far, below overflow. Discussed with: emaste, jhb, kp Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327796
* Add a regression test for r327794.Mark Johnston2018-01-103-0/+38
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=327795
* Fix an off-by-one in dt_opt_setenv().Mark Johnston2018-01-101-9/+10
| | | | | | | | | | | | The bug would cause incorrect behaviour when attempting to override an already set environment variable with -x setenv, as long as the variable is not the last one in the array. Reported by: Samuel Lepetit <slepetit@apple.com> MFC after: 2 weeks Notes: svn path=/head/; revision=327794
* Don't store shadow copies of per-process AIO limits.John Baldwin2018-01-101-16/+8
| | | | | | | | | | | | | | | | | | | | Previously the AIO subsystem would save a snapshot of the currently configured per-process limits the first time a process used AIO. The process would continue to use the snapshotted limits ignoring any changes to the global limits during the rest of its lifetime. This change removes the snapshotted values and changes the AIO code to always check the global values which can be toggled at runtime. This means an administrator can now change the effective limits of existing processes. This is more consistent with how other limits configured via sysctl work in FreeBSD. Reviewed by: asomers, kib MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D13819 Notes: svn path=/head/; revision=327792
* Set the 'FR' bit in the status register for N32 kernels.John Baldwin2018-01-104-6/+9
| | | | | | | | | | | | This permits N32 hard-float binaries to use 64-bit floating point registers (which is what N32 binaries expect) matching the N64 ABI. Reviewed by: imp, jmallett Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D13830 Notes: svn path=/head/; revision=327790
* linuxkpi: Simplify kmalloc_array.Pedro F. Giffuni2018-01-101-3/+1
| | | | | | | kmalloc_array seems what we call mallocarray(9). Notes: svn path=/head/; revision=327788
* Mention switch to ld.lld for amd64 in UPDATINGEd Maste2018-01-101-0/+8
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=327787
* regen src.conf.5 after r327783, WITH_LLD_BOOTSTRAP defaultEd Maste2018-01-101-2/+2
| | | | | | | | | | | (I missed the Reviewed by and review link from r327783.) Reviewed by: brooks, dim, bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13827 Notes: svn path=/head/; revision=327784
* Enable ld.lld as bootstrap linker by default on amd64Ed Maste2018-01-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some time we have been planning to migrate to LLVM's lld linker. Having a man page was the last blocking issue for using ld.lld to link the base system kernel + userland, now addressed by r327770. Link the kernel and userland libraries and binaries with ld.lld by default, for additional test coverage. This has been a long time in the making. On 2013-04-13 I submitted an upstream tracking issue in LLVM PR 23214: [META] Using LLD as FreeBSD's system linker. Since then 85 individual issues were identified, and submitted as dependencies. These have been addressed along with two and a half years of other lld development and improvement. I'd like to express deep gratitude to upstream lld developers Rui Ueyama, Rafael Espindola, George Rimar and Davide Italiano. They put in substantial effort in addressing the issues we found affecting FreeBSD/amd64. To revert to using ld.bfd as the bootstrap linker, in /etc/src.conf set WITHOUT_LLD_BOOTSTRAP=yes If you need to set this, please follow up with a PR or post to the freebsd-toolchain mailing list explaining how default WITH_LLD_BOOTSTRAP failed for your use case. Note that GNU ld.bfd is still installed as /usr/bin/ld, and will still be used for linking ports. ld.lld can be installed as /usr/bin/ld by setting in /etc/src.conf WITH_LLD_IS_LLD=yes A followup commit will set WITH_LLD_IS_LD by default, possibly after Clang/LLVM/lld 6.0 is merged to FreeBSD. Release notes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=327783
* dev/bxe: make use of mallocarray(9).Pedro F. Giffuni2018-01-102-2/+3
| | | | | | | | Use mallocarray in a couple of cases where a calloc-like operation is taking place. Notes: svn path=/head/; revision=327782
* Use mallocarray(9) in dirhash.Pedro F. Giffuni2018-01-101-3/+4
| | | | | | | | | | | | Basic use of mallocarray to prevent overflows. Here allocation is done with M_NOWAIT so the code is prepared for the possibility of returning NULL values. Since mallocarray expects unsigned parameters, unsign some related variables to minimize sign conversions. Reviewed by: mckusick Notes: svn path=/head/; revision=327781
* Add regression tests for r327779.Mark Johnston2018-01-102-0/+112
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327780
* Fix handling of read errors during mirror synchronization.Mark Johnston2018-01-101-47/+85
| | | | | | | | | | | | | | | | | | We would previously just free the request BIO, which would either cause the disk to stay stuck in the SYNCHRONIZING state, or result in synchronization completing without having copied the block which returned an error. With this change, if the disk which returned an error is the only active disk in the mirror, the synchronizing disk is kicked out. Otherwise, the read is retried. Reported and tested by: pho (previous version) MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327779
* src.conf.5: regen after r325692 and r326888Ed Maste2018-01-101-1/+6
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=327778
* Make nullfs properly report MNT_AUTOMOUNTED set on the nullfs mount itself,Edward Tomasz Napierala2018-01-101-1/+2
| | | | | | | | | | | | instead of copying from the underlying filesystem. PR: 224851 Reported by: Jamie Landeg-Jones <jamie at dyslexicfish.net> Tested by: Jamie Landeg-Jones <jamie at dyslexicfish.net> MFC after: 2 weeks Notes: svn path=/head/; revision=327777
* Include ffsll() on riscv kernels.John Baldwin2018-01-101-0/+1
| | | | Notes: svn path=/head/; revision=327776
* amdsbwd: fix handling of timeout values beyond the supported rangeAndriy Gapon2018-01-101-13/+22
| | | | | | | | | | | | | | | The driver now fully observes watchdog(9) protocol. Previously a too large timeout was silently clamped while the correct behavior is to disable the watchdog and leave the error as is (i.e. to not report success). Also, previously a too small value caused the timer to stop while the correct behavior is to use the minimal supported value. MFC after: 2 weeks Notes: svn path=/head/; revision=327775
* inittodr(0) actually sets the time, so there's no need to callWarner Losh2018-01-102-7/+4
| | | | | | | | | | tc_setclock(). It's redundant. Tweak UPDATING based on code review of past releases. Relnotes: yes (for the removal of pmtimer) Notes: svn path=/head/; revision=327774
* Catchup to removing this directoryWarner Losh2018-01-100-0/+0
| | | | Notes: svn path=/head/; revision=327773
* Docuent pmtimer driver removal.Warner Losh2018-01-101-0/+5
| | | | Notes: svn path=/head/; revision=327772
* Move prof_machdep.c to it's more traditional place under i386/i386.Warner Losh2018-01-102-1/+1
| | | | Notes: svn path=/head/; revision=327771
* lld: introduce basic man pageEd Maste2018-01-102-1/+366
| | | | | | | | | | | | | | | | | Upstream lld has no man page. Introduce a basic one for FreeBSD based on ld.lld --help, with a brief introduction and additional detail for some options. We'll continue refining this in FreeBSD, and then submit it upstream once the first round of edits are complete. Submitted by: krion, Arshan Khanifar, emaste, bjk MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13813 Notes: svn path=/head/; revision=327770
* Remove the executable bit from some recently added test scripts.Mark Johnston2018-01-108-0/+0
| | | | Notes: svn path=/head/; revision=327769
* Clarify the use of the gmirror flag mask constants.Mark Johnston2018-01-101-0/+4
| | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327768
* Retire pmtimer driver. Move time fixing into apm driver. MoveWarner Losh2018-01-105-184/+97
| | | | | | | | | | | | Iwasaki-san's copyright over. Remove FIXME code that couldn't possibly work. Call tc_settime() with our estimate of the delta we've been alseep (the one we print) to adjust the time. Not sure what to do about callouts, so keep the small #ifdef in place there. Differential Revision: https://reviews.freebsd.org/D13823 Notes: svn path=/head/; revision=327767
* Remove vestiges of digi(4) driver, first attempted in r305235 withWarner Losh2018-01-107-383/+4
| | | | | | | | | more in r317426. There's nothing in the tree that references digiio.h (apart from digictl(8)), so no driver implements it. Since digictl(8) was only used to control digi(4) devices, it too should go. Notes: svn path=/head/; revision=327766
* Finally, fix Zstd kernel build on MIPS and RISC-VConrad Meyer2018-01-103-0/+81
| | | | | | | | | | | | | | | | | | Add an implementation of the intrinsics invoked by __builtin_ctz{,ll} and __builtin_clz{,ll}, and include this compilation unit on platforms that lack assembly intrinsics for those builtins (MIPS and RISC-V). Future cleanup work might involve bringing these into a mini libcompiler-rt for the standalone kernel environment. Or cleaning up the approach upstream takes for builtins in standalone environments (or just FreeBSD). For now, at least this builds, and doesn't require modifying the vendor code. Reported by: jeff, markj, mizhka Reviewed by: jhb (earlier version), rpokala (comment text earlier version) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327763
* Refactor code related to 'camcontrol devlist'Scott Long2018-01-101-49/+90
| | | | | | | Obtained from: Netflix Notes: svn path=/head/; revision=327762
* Implement the ability to query NVME for its controller data so that it willScott Long2018-01-101-0/+59
| | | | | | | | | be shown when issueing the 'camcontrol devlist' command. Obtained from: Netflix Notes: svn path=/head/; revision=327761
* Avoid referencing a possibly freed consumer after r327496.Mark Johnston2018-01-101-8/+7
| | | | | | | | | | | | g_mirror_regular_request() may free the gmirror consumer for a disk if that disk is being disconnected, after which we must not dereference the consumer pointer. CID: 1384280 X-MFC with: r327496 Notes: svn path=/head/; revision=327760
* Fix markup.Mariusz Zaborski2018-01-101-2/+2
| | | | Notes: svn path=/head/; revision=327759
* Convert a collection of unrelated bitwise flags to a collection of booleanIan Lepore2018-01-101-16/+14
| | | | | | | | vars in the softc. It makes the code more compact and readable, and actually uses less memory too. Notes: svn path=/head/; revision=327758
* Bugfix: don't lose the am/pm mode flag when setting the time. Unlike mostIan Lepore2018-01-101-4/+5
| | | | | | | | | RTC chips that have a control register bit for am/pm mode, the DS13xx series uses one of the high bits in the hour register. Thus, when setting the time in am/pm mode, the am/pm mode flag has to be ORed into the hour. Notes: svn path=/head/; revision=327757
* Bugfix: on RTC chips with a 32-bit binary counter, after reading the time,Ian Lepore2018-01-101-2/+1
| | | | | | | | return immediately rather than falling through to the logic that reads BCD-encoded time. Notes: svn path=/head/; revision=327756