aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* META MODE: Don't override DESTDIR to the default when building the toolchain.Bryan Drewery2015-11-251-1/+1
| | | | | | | | | | | | | | | For this case, the normal META MODE staging logic should be used. The BSARGS having DESTDIR= is due to Makefile.inc1 overriding DESTDIR to something when appropriate. For the toolchain stage META MODE is in charge of it, not Makefile.inc1. At least include/, if staging it to the host stagedir, was impacted from this. Staging of include.host is not yet done. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291308
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.Bryan Drewery2015-11-25161-164/+15
| | | | | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291307
* Fix tmpfs(5) '/tmp' mount point.Glen Barber2015-11-251-1/+1
| | | | | | | | | | | A stray trailing space snuck in with one of the recent changes, making r290550 and r290573 effectively no-op. MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291306
* META MODE: Remove bin/cat.host dependency.Bryan Drewery2015-11-251-1/+0
| | | | | | | | | | This likely slipped in during early testing; local.dirdeps.mk always excludes bin/cat.host now. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291305
* [ath] listen to all beacons in IBSS and software beacon miss.Adrian Chadd2015-11-251-3/+7
| | | | | | | | | | | | | | | | | | | I added MYBEACON support a while ago to listen to beacons that are only for your configured BSSID. For AR9380 and later NICs this results in a lot less chip wakeups in station mode as it then only shows you beacons that are destined to you. However in IBSS mode you really do want to hear all beacons so you can do IBSS merges. Oops. So only use MYBEACON for STA + not-scanning, and just use BEACON for the other modes it used to use BEACON for. This doesn't completely fix IBSS merges though - there are still some conditions to chase down and fix. Notes: svn path=/head/; revision=291304
* [net80211] log the A-MPDU setup attempt count as part of debugging.Adrian Chadd2015-11-251-2/+2
| | | | | | | | | | I've seen some cases where we get stuck in a loop constantly trying to negotiate A-MPDU TX which is definitely not supposed to happen. This will let me see if it's something funky with the retry count or not. Notes: svn path=/head/; revision=291303
* Update usage:Hans Petter Selasky2015-11-251-1/+3
| | | | | | | | - Add missing description of "-c" option. - Add one more usage example. Notes: svn path=/head/; revision=291302
* The r241129 description was wrong that the scenario is possibleFabien Thomas2015-11-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | only for read locks on pcbs. The same race can happen with write lock semantics as well. The race scenario: - Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB) and do in_pcbref() on it. - 1 and 2 both drop the inp hash lock. - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(), which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()! - 1 and 2 congest in INP_WLOCK(). - 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't report inp as freed, due to 2 (or 1) still helding extra reference on it. The thread tries to do smth with a disconnected pcb and crashes. Submitted by: emeric.poupon@stormshield.eu Reviewed by: gleb@ MFC after: 1 week Sponsored by: Stormshield Tested by: Cassiano Peixoto, Stormshield Notes: svn path=/head/; revision=291301
* Add simple indent wrapper tool for style(9) checking GIT/SVN patches.Hans Petter Selasky2015-11-253-0/+754
| | | | | | | | | | | The indent_wrapper tool only accepts full context diffs and works by identifying the surrounding C-block touched by a diff and passing only that to indent for styling. In the end a diff is produced or an external tool like meld can be invoked, to show the styling differences. Notes: svn path=/head/; revision=291300
* Fix the build.Andrey V. Elsukov2015-11-251-1/+0
| | | | Notes: svn path=/head/; revision=291299
* Fix udp entry of `netstat -TW'.Hajimu UMEMOTO2015-11-251-0/+2
| | | | Notes: svn path=/head/; revision=291298
* Link localeconv(3) to localeconv_l(3)Enji Cooper2015-11-251-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=291296
* Overhaul if_enc(4) and make it loadable in run-time.Andrey V. Elsukov2015-11-2515-307/+399
| | | | | | | | | | | Use hhook(9) framework to achieve ability of loading and unloading if_enc(4) kernel module. INET and INET6 code on initialization registers two helper hooks points in the kernel. if_enc(4) module uses these helper hook points and registers its hooks. IPSEC code uses these hhook points to call helper hooks implemented in if_enc(4). Notes: svn path=/head/; revision=291292
* Check that hhk_helper pointer isn't NULL before access.Andrey V. Elsukov2015-11-251-1/+2
| | | | | | | | It isn't forbidden to use NULL pointer for hook_helper in hookinfo structure when hhook_add_hook() adds new helper hook. Notes: svn path=/head/; revision=291291
* NTB: WC/WB isn't enough; set MMR region as UCConrad Meyer2015-11-252-28/+37
| | | | | | | | | | | And expose vm_memattr_t of current mapping to consumers (as well as the ability to change it to one of UC, WB, WC). After short discussion with: jhb (but no review) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291280
* sh: Remove global state from nodes.c.Jilles Tjoelker2015-11-242-38/+46
| | | | | | | No functional change is intended. Notes: svn path=/head/; revision=291267
* Correct the number of DTLB entries reported for the CPUID Leaf 2Konstantin Belousov2015-11-241-1/+1
| | | | | | | | | | descriptor 0x6c. Confirmed by: Intel MFC after: 3 days Notes: svn path=/head/; revision=291266
* Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.Alexander Motin2015-11-243-3/+3
| | | | | | | New name better repsents its meaning for modern chips. Notes: svn path=/head/; revision=291265
* urtwn(4): rework ROM reading.Andriy Voskoboinyk2015-11-243-94/+162
| | | | | | | | | | | | | | | | | | | | - Add error handling for urtwn_(r88e_)read_rom() and urtwn_efuse_*() functions. - Remove code duplication between urtwn_efuse_read() and urtwn_r88e_read_rom(). - Merge r88e_rom and (r92c_)rom structures (only one of them can be used at the same time). - Other minor fixes / improvements. Tested with RTL8188EU, STA mode (URTWN_DEBUG + USB_DEBUG, hw.usb.urtwn.debug=3, no visual differences). Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4253 Notes: svn path=/head/; revision=291264
* ntb: Add MW tunable for MMR Xeon errata workaroundConrad Meyer2015-11-241-29/+57
| | | | | | | | | | | | | | | | | | | | | | | Adds a new tunable, ntb.hw.b2b_mw_idx, which specifies the offset (from the total number of memory windows) to use for register access on hardware with the SDOORBELL_LOCKUP errata. The default is -1, i.e., the last memory window. We map BARs before the b2b_mw_idx is selected, so map them all as memory windows initially. The register memory window should not be write-combined, so we explicitly disable WC on the selected MW later. This introduces a layer of abstraction between consumer memory window indices, which exclude any exclusive errata-workaround BARs, and internal memory window indices, which include such BARs. An internal routine, ntb_user_mw_to_idx(), converts the former to the latter. Public APIs have been updated to use this instead of assuming the exclusive workaround BAR is the last available MW. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291263
* Use what we really mean (powerpc_lwsync()) rather than the Linux-compatNathan Whitehorn2015-11-241-2/+8
| | | | | | | | | | mb() here and provide some more documentation on what, exactly, makes this code safe. Requested by and discussed with: kib, alc Notes: svn path=/head/; revision=291262
* Revert inadvertent commit of an incorrect patchDag-Erling Smørgrav2015-11-241-2/+1
| | | | Notes: svn path=/head/; revision=291261
* Remove description of the now-defunct NoneEnabled option.Dag-Erling Smørgrav2015-11-242-4/+2
| | | | Notes: svn path=/head/; revision=291260
* Correct alignment of the addresses in the `netstat -aW' output.Hajimu UMEMOTO2015-11-241-12/+21
| | | | Notes: svn path=/head/; revision=291259
* Flush all kernel mappings from TLB(s) in time when they are cleared.Svatopluk Kraus2015-11-242-14/+17
| | | | | | | | | | | | | | | | | | | | Replace tlb_flush_local() by tlb_flush() as even not global mappings could be fetched to TLB(s) on other cores by speculative table walk. From OS point of view, it was not a problem as either such mappings were not used anymore or they were flushed from TLB(s) when reused. However, from hardware point of view, it was a problem. Not flushed mappings could be a target for speculative reads or prefetches (which might be quite aggresive on ARM cores). As speculative read can fill cacheline, it can cause a real problem, when physical page is reused, but mapped with different memory attributes. Anyhow, it's good to have only valid mappings in TLB(s). Approved by: kib (mentor) Notes: svn path=/head/; revision=291258
* Add myself (lidl) to the calendar.freebsd file.Kurt Lidl2015-11-241-0/+1
| | | | | | | | Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4264 Notes: svn path=/head/; revision=291257
* Add some defines needed by the coming mlx5 infiniband support.Hans Petter Selasky2015-11-241-0/+19
| | | | | | | | Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=291249
* Add missing error check after xo_parse_args() in netstat(8).Hajimu UMEMOTO2015-11-241-0/+2
| | | | | | | | Submitted by: Oliver Pinter Differential Revision: https://reviews.freebsd.org/D4233 Notes: svn path=/head/; revision=291247
* Add support for moving the DMAP range. This is needed as some AMD SoCsAndrew Turner2015-11-242-9/+30
| | | | | | | | | | | | place physical memory at an address outside the old DMAP range. This is an issue as we rely on being able to move from PA -> VA using this range. Obtained from: Patrick Wildt <patrick@bitrig.org> (earlier version) Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D3885 Notes: svn path=/head/; revision=291246
* Rework the vnode cache recycling to meet free and unused vnodesKonstantin Belousov2015-11-241-83/+233
| | | | | | | | | | | | | | | | | | | | targets. See the comment above wantfreevnodes variable for the description of the algorithm. The vfs.vlru_alloc_cache_src sysctl is removed. New code frees namecache sources as the last chance to satisfy the highest watermark, instead of selecting the source vnodes randomly. This provides good enough behaviour to keep vn_fullpath() working in most situations. The filesystem layout with deep trees, where the removed knob was required, is thus handled automatically. Submitted by: bde Discussed with: mckusick Tested by: pho MFC after: 1 month Notes: svn path=/head/; revision=291244
* On PowerPC 64bit, the linux-compat mb() definition is implemented withKonstantin Belousov2015-11-241-18/+17
| | | | | | | | | | | | | | | | | | lwsync instruction, which does not provide Store/Load barrier. Fix this by using "full" sync barrier for mb(). atomic_store_rel() does not need full barrier, change mb() call there to the lwsync instruction if not hitting the known CPU erratas (i.e. on 32bit). Provide powerpc_lwsync() helper to isolate the lwsync/sync compile time selection, and use it in atomic_store_rel() and several other places which duplicate the code. Noted by: alc Reviewed and tested by: nwhitehorn Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291242
* Add dependency to uether.Kevin Lo2015-11-2414-15/+34
| | | | | | | Reviewed by: hselasky Notes: svn path=/head/; revision=291238
* Remove unneeded libutil dependency for sendmail.Bryan Drewery2015-11-2413-12/+2
| | | | | | | | | | | | It included libutil.h for setproctitle(3), which was moved from libutil to libc in r65353 in 2000. Reviewed by: gshapiro [sendmail change] Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4261 Notes: svn path=/head/; revision=291235
* bc(1): Fix memory corruption issuesPedro F. Giffuni2015-11-241-9/+14
| | | | | | | | | | Fix crashes and hangs found by AFL. Improve handling of non-ascii chars. Obtained from: OpenBSD (CVS rev 1.49) Notes: svn path=/head/; revision=291234
* [ath] migrate ioctl and busdma memory operations out into separate source files.Adrian Chadd2015-11-2411-508/+841
| | | | | | | | | | This should be a big no-op pass; and reduces the size of if_ath.c. I'm hopefully soon going to take a whack at the USB support for ath(4) and this'll require some reuse of the busdma memory code. Notes: svn path=/head/; revision=291233
* Compute the median of the data set as the midpoint between the two middleMarcelo Araujo2015-11-241-2/+4
| | | | | | | | | | | | values when the data set has an even number of elements. PR: 201582 Submitted by: Marcus Reid <marcus@blazingdot.com> Reviewed by: imp Approved by: bapt (mentor) Notes: svn path=/head/; revision=291231
* Connect ypldap(8) to the build.Marcelo Araujo2015-11-241-0/+1
| | | | | | | Approved by: bapt (mentor) Notes: svn path=/head/; revision=291230
* Fix ld not respecting --sysroot.Bryan Drewery2015-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These need to be prefixed by '=' so that the --sysroot flag is respected. This is not a problem with buildworld since the TOOLS_PREFIX is baked into the cross-ld. However it is a problem when trying to use ld(1) with --sysroot anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot. The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld. I found this while building with META MODE with uses only --sysroot with /usr/bin/ld, and found that libraries that I had not built in its sysroot directory were leaking in. This didn't happen with ports binutils either. This would also impact external compiler support. Reviewed by: bapt, brooks MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4262 Notes: svn path=/head/; revision=291226
* Add a new -B flag for use with list mode (-l) that lists details aboutJohn Baldwin2015-11-234-18/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bridges. Currently this includes information about what resources a bridge decodes on the upstream side for use by downstream devices including bus numbers, I/O port resources, and memory resources. Windows and bus ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges. To simplify the implementation, all enumeration is done by reading the appropriate config space registers directly rather than querying the bridge driver in the kernel via new ioctls. This does result in a few limitations. First, an unimplemented window in a PCI-PCI bridge cannot be accurately detected as accurate detection requires writing to the window base register. That is not safe for pciconf(8). Instead, this assumes that any window where both the base and limit read as all zeroes is unimplemented. Second, the PCI-PCI bridge driver in a tree has a few quirks for PCI-PCI bridges that use subtractive decoding but do not indicate that via the progif config register. The list of quirks is duplicated in pciconf's source. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4171 Notes: svn path=/head/; revision=291225
* colldef(1) and mklocale(1) reappeared in r291115.Jung-uk Kim2015-11-231-4/+0
| | | | Notes: svn path=/head/; revision=291224
* There seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,Bryan Drewery2015-11-231-7/+0
| | | | | | | | | | | which is included for crunchgen builds. No change in build output occurred with this change. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291223
* Add destroy_object callback to object rewriting framework.Andrey V. Elsukov2015-11-232-2/+11
| | | | | | | | | | | It is called when last reference to named object is going to be released and allows to do additional cleanup for implementation of named objects. Obtained from: Yandex LLC Sponsored by: Yandex LLC Notes: svn path=/head/; revision=291222
* Remove "disable" hint, which duplicates system-wide "disabled".Alexander Motin2015-11-234-36/+0
| | | | Notes: svn path=/head/; revision=291221
* Revert r291170Enji Cooper2015-11-231-6/+2
| | | | | | | | | | | | | | | | | The mlx5* driver(s) are built [*]/installed separate from the OFED stack thanks to recent refactoring done in the linuxkpi(4) module. Always install the manpages instead of conditionally installing them if MK_OFED != no * Further refactoring of sys/ofed and linuxkpi(4) is pending to fully divorce mlx5* from ofed headers MFC after: never Requested by: hps Notes: svn path=/head/; revision=291220
* newfs_msdos: rework error handling for eventual use in makefsEd Maste2015-11-232-98/+191
| | | | | | | | | | | Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291219
* Update $NetBSD$ IDEd Maste2015-11-231-1/+1
| | | | | | | | | NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the license block, which had already been done in the source I imported in r289629. Notes: svn path=/head/; revision=291218
* The buffer passed to an sbuf drain callback is not necessarilyMark Johnston2015-11-231-1/+1
| | | | | | | | | | null-terminated, so don't assume that it is. Reported by: pho X-MFC-With: r291059 Notes: svn path=/head/; revision=291217
* Use #ifdef to get the file compiling without errorsAndrew Turner2015-11-231-1/+1
| | | | Notes: svn path=/head/; revision=291216
* Provide support for userland binaries using the new ELFv2 ABI. This is aNathan Whitehorn2015-11-236-32/+152
| | | | | | | | | | new, simplified, ELF ABI that avoids some of the stranger aspects of the existing 64-bit PowerPC ABI (function descriptors, in particular). Actually generating such executables requires a new version of binutils and a newer compiler (either GCC or clang) than GCC 4.2.1. Notes: svn path=/head/; revision=291211
* Only enable the first interrupt for now, we don't correctly configure orAndrew Turner2015-11-231-0/+7
| | | | | | | | | route interrupts to the needed cpu. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=291210