]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMETA MODE: Don't create .meta files when symlinking sources into the obj directory.
Bryan Drewery [Wed, 25 Nov 2015 19:44:43 +0000 (19:44 +0000)]
META MODE: Don't create .meta files when symlinking sources into the obj directory.

Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file.  There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Add more hosttools needed pre-universe.
Bryan Drewery [Wed, 25 Nov 2015 19:44:34 +0000 (19:44 +0000)]
META MODE: Add more hosttools needed pre-universe.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Show PATH on errors.
Bryan Drewery [Wed, 25 Nov 2015 19:44:31 +0000 (19:44 +0000)]
META MODE: Show PATH on errors.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Need to include the LEGACY_TOOLS directories into PATH.
Bryan Drewery [Wed, 25 Nov 2015 19:44:28 +0000 (19:44 +0000)]
META MODE: Need to include the LEGACY_TOOLS directories into PATH.

This is just as Makefile.inc1 does it for these phases.  Otherwise some
of the build tools are not found and used properly, such as 'make-roken'
in the kerberos5 build on older releases.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't add staged DPADDs to DIRDEPS when bootstrapping gendirdeps.
Bryan Drewery [Wed, 25 Nov 2015 19:13:45 +0000 (19:13 +0000)]
META MODE: Don't add staged DPADDs to DIRDEPS when bootstrapping gendirdeps.

This was finding libraries that were installed into DESTDIR/usr/lib,
where DESTDIR is the stage directory, and then adding in usr/lib to
DIRDEPS.  Just exclude the STAGE_ROOT if defined.

Discussed with: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Define variables this file uses that were defined elsewhere.
Bryan Drewery [Wed, 25 Nov 2015 19:13:42 +0000 (19:13 +0000)]
META MODE: Define variables this file uses that were defined elsewhere.

Discussed with: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps.
Bryan Drewery [Wed, 25 Nov 2015 19:13:39 +0000 (19:13 +0000)]
META MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps.

Reviewed by: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Rework circular dependency guard for librtld_db/libproc.
Bryan Drewery [Wed, 25 Nov 2015 19:13:35 +0000 (19:13 +0000)]
META MODE: Rework circular dependency guard for librtld_db/libproc.

librtld_db only needs libutil.h to build, not the libproc library.  So
it can safely use its header and allow libproc to depend on librtld_rb
to be built first to link.  This is required after fixing ld --sysroot
in r291226.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Revert r287879 so that 'make -V' still uses AUTO_OBJ.
Bryan Drewery [Wed, 25 Nov 2015 19:13:32 +0000 (19:13 +0000)]
META MODE: Revert r287879 so that 'make -V' still uses AUTO_OBJ.

This has caused much confusion for myself as there are quite a lot of
variables that depend on having a proper ${.OBJDIR}.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Fix 'make the-lot' with recent locale changes
Bryan Drewery [Wed, 25 Nov 2015 19:13:28 +0000 (19:13 +0000)]
META MODE: Fix 'make the-lot' with recent locale changes

Sponsored by: EMC / Isilon Storage Division

8 years agoStop building vers.c in include/ and only build the needed osreldate.h.
Bryan Drewery [Wed, 25 Nov 2015 19:10:59 +0000 (19:10 +0000)]
Stop building vers.c in include/ and only build the needed osreldate.h.

Because of how osreldate.h was being built with newvers.sh, which always
spat out a vers.c dependent on SVN or git, the meta mode build was
considering osreldate.h to depend on the current git or SVN index.  This
would lead to entire tree rebuilds when modifying git's index.  There's
no reason to be generating vers.c here so just skip it.

While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which
newvers.sh already has a default for) and remove unneeded export.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Avoid creating TESTS directories for bootstrap.
Bryan Drewery [Wed, 25 Nov 2015 19:10:56 +0000 (19:10 +0000)]
META MODE: Avoid creating TESTS directories for bootstrap.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't override DESTDIR to the default when building the toolchain.
Bryan Drewery [Wed, 25 Nov 2015 19:10:53 +0000 (19:10 +0000)]
META MODE: Don't override DESTDIR to the default when building the toolchain.

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

8 years agoMETA MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.
Bryan Drewery [Wed, 25 Nov 2015 19:10:28 +0000 (19:10 +0000)]
META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.

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

8 years agoFix tmpfs(5) '/tmp' mount point.
Glen Barber [Wed, 25 Nov 2015 19:10:04 +0000 (19:10 +0000)]
Fix tmpfs(5) '/tmp' mount point.

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

8 years agoMETA MODE: Remove bin/cat.host dependency.
Bryan Drewery [Wed, 25 Nov 2015 18:37:42 +0000 (18:37 +0000)]
META MODE: Remove bin/cat.host dependency.

This likely slipped in during early testing; local.dirdeps.mk always
excludes bin/cat.host now.

Sponsored by: EMC / Isilon Storage Division

8 years ago[ath] listen to all beacons in IBSS and software beacon miss.
Adrian Chadd [Wed, 25 Nov 2015 18:24:49 +0000 (18:24 +0000)]
[ath] listen to all beacons in IBSS and software beacon miss.

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.

8 years ago[net80211] log the A-MPDU setup attempt count as part of debugging.
Adrian Chadd [Wed, 25 Nov 2015 18:16:42 +0000 (18:16 +0000)]
[net80211] log the A-MPDU setup attempt count as part of debugging.

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.

8 years agoUpdate usage:
Hans Petter Selasky [Wed, 25 Nov 2015 14:51:44 +0000 (14:51 +0000)]
Update usage:
- Add missing description of "-c" option.
- Add one more usage example.

8 years agoThe r241129 description was wrong that the scenario is possible
Fabien Thomas [Wed, 25 Nov 2015 14:45:43 +0000 (14:45 +0000)]
The r241129 description was wrong that the scenario is possible
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

8 years agoAdd simple indent wrapper tool for style(9) checking GIT/SVN patches.
Hans Petter Selasky [Wed, 25 Nov 2015 13:26:42 +0000 (13:26 +0000)]
Add simple indent wrapper tool for style(9) checking GIT/SVN patches.
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.

8 years agoFix the build.
Andrey V. Elsukov [Wed, 25 Nov 2015 11:31:07 +0000 (11:31 +0000)]
Fix the build.

8 years agoFix udp entry of `netstat -TW'.
Hajimu UMEMOTO [Wed, 25 Nov 2015 11:20:54 +0000 (11:20 +0000)]
Fix udp entry of `netstat -TW'.

8 years agoLink localeconv(3) to localeconv_l(3)
Enji Cooper [Wed, 25 Nov 2015 09:12:30 +0000 (09:12 +0000)]
Link localeconv(3) to localeconv_l(3)

MFC after: 3 days

8 years agoOverhaul if_enc(4) and make it loadable in run-time.
Andrey V. Elsukov [Wed, 25 Nov 2015 07:31:59 +0000 (07:31 +0000)]
Overhaul if_enc(4) and make it loadable in run-time.

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).

8 years agoCheck that hhk_helper pointer isn't NULL before access.
Andrey V. Elsukov [Wed, 25 Nov 2015 07:14:58 +0000 (07:14 +0000)]
Check that hhk_helper pointer isn't NULL before access.

It isn't forbidden to use NULL pointer for hook_helper in hookinfo
structure when hhook_add_hook() adds new helper hook.

8 years agoNTB: WC/WB isn't enough; set MMR region as UC
Conrad Meyer [Wed, 25 Nov 2015 01:59:08 +0000 (01:59 +0000)]
NTB: WC/WB isn't enough; set MMR region as UC

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

8 years agosh: Remove global state from nodes.c.
Jilles Tjoelker [Tue, 24 Nov 2015 22:47:19 +0000 (22:47 +0000)]
sh: Remove global state from nodes.c.

No functional change is intended.

8 years agoCorrect the number of DTLB entries reported for the CPUID Leaf 2
Konstantin Belousov [Tue, 24 Nov 2015 19:55:11 +0000 (19:55 +0000)]
Correct the number of DTLB entries reported for the CPUID Leaf 2
descriptor 0x6c.

Confirmed by: Intel
MFC after: 3 days

8 years agoRename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
Alexander Motin [Tue, 24 Nov 2015 19:20:49 +0000 (19:20 +0000)]
Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.

New name better repsents its meaning for modern chips.

8 years agourtwn(4): rework ROM reading.
Andriy Voskoboinyk [Tue, 24 Nov 2015 19:20:45 +0000 (19:20 +0000)]
urtwn(4): rework ROM reading.

- 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

8 years agontb: Add MW tunable for MMR Xeon errata workaround
Conrad Meyer [Tue, 24 Nov 2015 18:51:17 +0000 (18:51 +0000)]
ntb: Add MW tunable for MMR Xeon errata workaround

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

8 years agoUse what we really mean (powerpc_lwsync()) rather than the Linux-compat
Nathan Whitehorn [Tue, 24 Nov 2015 16:10:21 +0000 (16:10 +0000)]
Use what we really mean (powerpc_lwsync()) rather than the Linux-compat
mb() here and provide some more documentation on what, exactly, makes this
code safe.

Requested by and discussed with: kib, alc

8 years agoRevert inadvertent commit of an incorrect patch
Dag-Erling Smørgrav [Tue, 24 Nov 2015 16:07:03 +0000 (16:07 +0000)]
Revert inadvertent commit of an incorrect patch

8 years agoRemove description of the now-defunct NoneEnabled option.
Dag-Erling Smørgrav [Tue, 24 Nov 2015 16:06:15 +0000 (16:06 +0000)]
Remove description of the now-defunct NoneEnabled option.

8 years agoCorrect alignment of the addresses in the `netstat -aW' output.
Hajimu UMEMOTO [Tue, 24 Nov 2015 14:25:40 +0000 (14:25 +0000)]
Correct alignment of the addresses in the `netstat -aW' output.

8 years agoFlush all kernel mappings from TLB(s) in time when they are cleared.
Svatopluk Kraus [Tue, 24 Nov 2015 13:57:41 +0000 (13:57 +0000)]
Flush all kernel mappings from TLB(s) in time when they are cleared.
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)

8 years agoAdd myself (lidl) to the calendar.freebsd file.
Kurt Lidl [Tue, 24 Nov 2015 13:47:21 +0000 (13:47 +0000)]
Add myself (lidl) to the calendar.freebsd file.

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4264

8 years agoAdd some defines needed by the coming mlx5 infiniband support.
Hans Petter Selasky [Tue, 24 Nov 2015 12:11:56 +0000 (12:11 +0000)]
Add some defines needed by the coming mlx5 infiniband support.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd missing error check after xo_parse_args() in netstat(8).
Hajimu UMEMOTO [Tue, 24 Nov 2015 11:07:37 +0000 (11:07 +0000)]
Add missing error check after xo_parse_args() in netstat(8).

Submitted by: Oliver Pinter
Differential Revision: https://reviews.freebsd.org/D4233

8 years agoAdd support for moving the DMAP range. This is needed as some AMD SoCs
Andrew Turner [Tue, 24 Nov 2015 11:01:43 +0000 (11:01 +0000)]
Add support for moving the DMAP range. This is needed as some AMD SoCs
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

8 years agoRework the vnode cache recycling to meet free and unused vnodes
Konstantin Belousov [Tue, 24 Nov 2015 09:45:36 +0000 (09:45 +0000)]
Rework the vnode cache recycling to meet free and unused vnodes
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

8 years agoOn PowerPC 64bit, the linux-compat mb() definition is implemented with
Konstantin Belousov [Tue, 24 Nov 2015 09:13:21 +0000 (09:13 +0000)]
On PowerPC 64bit, the linux-compat mb() definition is implemented with
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

8 years agoAdd dependency to uether.
Kevin Lo [Tue, 24 Nov 2015 08:34:48 +0000 (08:34 +0000)]
Add dependency to uether.

Reviewed by: hselasky

8 years agoRemove unneeded libutil dependency for sendmail.
Bryan Drewery [Tue, 24 Nov 2015 04:19:55 +0000 (04:19 +0000)]
Remove unneeded libutil dependency for sendmail.

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

8 years agobc(1): Fix memory corruption issues
Pedro F. Giffuni [Tue, 24 Nov 2015 04:15:13 +0000 (04:15 +0000)]
bc(1): Fix memory corruption issues

Fix crashes and hangs found by AFL.
Improve handling of non-ascii chars.

Obtained from: OpenBSD (CVS rev 1.49)

8 years ago[ath] migrate ioctl and busdma memory operations out into separate source files.
Adrian Chadd [Tue, 24 Nov 2015 03:42:58 +0000 (03:42 +0000)]
[ath] migrate ioctl and busdma memory operations out into separate source files.

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.

8 years agoCompute the median of the data set as the midpoint between the two middle
Marcelo Araujo [Tue, 24 Nov 2015 02:30:59 +0000 (02:30 +0000)]
Compute the median of the data set as the midpoint between the two middle
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)

8 years agoConnect ypldap(8) to the build.
Marcelo Araujo [Tue, 24 Nov 2015 02:27:59 +0000 (02:27 +0000)]
Connect ypldap(8) to the build.

Approved by: bapt (mentor)

8 years agoFix ld not respecting --sysroot.
Bryan Drewery [Tue, 24 Nov 2015 00:49:29 +0000 (00:49 +0000)]
Fix ld not respecting --sysroot.

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

8 years agoAdd a new -B flag for use with list mode (-l) that lists details about
John Baldwin [Mon, 23 Nov 2015 23:48:07 +0000 (23:48 +0000)]
Add a new -B flag for use with list mode (-l) that lists details about
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

8 years agocolldef(1) and mklocale(1) reappeared in r291115.
Jung-uk Kim [Mon, 23 Nov 2015 23:36:57 +0000 (23:36 +0000)]
colldef(1) and mklocale(1) reappeared in r291115.

8 years agoThere seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
Bryan Drewery [Mon, 23 Nov 2015 23:04:52 +0000 (23:04 +0000)]
There seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
which is included for crunchgen builds.

No change in build output occurred with this change.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd destroy_object callback to object rewriting framework.
Andrey V. Elsukov [Mon, 23 Nov 2015 22:06:55 +0000 (22:06 +0000)]
Add destroy_object callback to object rewriting framework.
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

8 years agoRemove "disable" hint, which duplicates system-wide "disabled".
Alexander Motin [Mon, 23 Nov 2015 20:44:49 +0000 (20:44 +0000)]
Remove "disable" hint, which duplicates system-wide "disabled".

8 years agoRevert r291170
Enji Cooper [Mon, 23 Nov 2015 19:44:39 +0000 (19:44 +0000)]
Revert r291170

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

8 years agonewfs_msdos: rework error handling for eventual use in makefs
Ed Maste [Mon, 23 Nov 2015 18:58:00 +0000 (18:58 +0000)]
newfs_msdos: rework error handling for eventual use in makefs

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

8 years agoUpdate $NetBSD$ ID
Ed Maste [Mon, 23 Nov 2015 18:56:10 +0000 (18:56 +0000)]
Update $NetBSD$ ID

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.

8 years agoThe buffer passed to an sbuf drain callback is not necessarily
Mark Johnston [Mon, 23 Nov 2015 18:45:35 +0000 (18:45 +0000)]
The buffer passed to an sbuf drain callback is not necessarily
null-terminated, so don't assume that it is.

Reported by: pho
X-MFC-With: r291059

8 years agoUse #ifdef to get the file compiling without errors
Andrew Turner [Mon, 23 Nov 2015 18:20:32 +0000 (18:20 +0000)]
Use #ifdef to get the file compiling without errors

8 years agoProvide support for userland binaries using the new ELFv2 ABI. This is a
Nathan Whitehorn [Mon, 23 Nov 2015 17:07:51 +0000 (17:07 +0000)]
Provide support for userland binaries using the new ELFv2 ABI. This is a
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.

8 years agoOnly enable the first interrupt for now, we don't correctly configure or
Andrew Turner [Mon, 23 Nov 2015 17:05:28 +0000 (17:05 +0000)]
Only enable the first interrupt for now, we don't correctly configure or
route interrupts to the needed cpu.

Sponsored by: ABT Systems Ltd

8 years agoFix target mode support for Qlogic 2200 FC adapters.
Alexander Motin [Mon, 23 Nov 2015 15:49:50 +0000 (15:49 +0000)]
Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.

8 years agoFix dumpon compatibility with dumpdev kenv
Steven Hartland [Mon, 23 Nov 2015 14:06:21 +0000 (14:06 +0000)]
Fix dumpon compatibility with dumpdev kenv

The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to
also support this which is required after r288153.

MFC after: 1 week
Sponsored by: Multiplay

8 years agoFix inconsistent use of malloc type for cdev private data.
Svatopluk Kraus [Mon, 23 Nov 2015 13:23:53 +0000 (13:23 +0000)]
Fix inconsistent use of malloc type for cdev private data.
Remove M_VCHIQ malloc type, now not used anywhere.

Reviewed by: gonzo
Approved by: kib (mentor)

8 years agoFix compile warning about shifting signed negative constant.
Hans Petter Selasky [Mon, 23 Nov 2015 12:55:37 +0000 (12:55 +0000)]
Fix compile warning about shifting signed negative constant.

MFC after: 3 days

8 years agoRetire the NONE cipher option.
Dag-Erling Smørgrav [Mon, 23 Nov 2015 12:48:13 +0000 (12:48 +0000)]
Retire the NONE cipher option.

8 years agomarkup fixes
Dag-Erling Smørgrav [Mon, 23 Nov 2015 12:47:08 +0000 (12:47 +0000)]
markup fixes

8 years agoRevert r291142.
Svatopluk Kraus [Mon, 23 Nov 2015 11:19:00 +0000 (11:19 +0000)]
Revert r291142.

The not quite consistent logic for bounce pages allocation is utilizited
by re(4) interface which can hang now.

Approved by: kib (mentor)

8 years agoRip off target mode support for parallel SCSI QLogic adapters.
Alexander Motin [Mon, 23 Nov 2015 10:06:19 +0000 (10:06 +0000)]
Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work.  And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.

8 years agoIntegrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
Enji Cooper [Mon, 23 Nov 2015 09:17:25 +0000 (09:17 +0000)]
Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
suite as tests/sys/kern/mqueue_test

MFC after: 1 week

8 years agoFix up convert.c generation
Enji Cooper [Mon, 23 Nov 2015 09:15:20 +0000 (09:15 +0000)]
Fix up convert.c generation

- Use a temporary file for convert.c to reduce likelihood of an interrupted
  build resulting in bad code being written to convert.c
- Truncate the file instead of appending to it to ensure that the file being
  touched will not result in duplicate declarations/definitions from
  kern_acct.c if/when kern_acct.c changes.

MFC after: 1 week

8 years agoUse __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
Enji Cooper [Mon, 23 Nov 2015 07:57:41 +0000 (07:57 +0000)]
Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
(HOST_SHELL is used in NetBSD)

This fixes permission denied issues when gen_ether_subr is not executable

MFC after: 3 days
Reported by: José Pérez <fbl@aoek.com>
Suggested by: bdrewery, sjg

8 years agoSplit kerne timekeep ABI structure vdso_sv_tk out of the struct
Konstantin Belousov [Mon, 23 Nov 2015 07:09:35 +0000 (07:09 +0000)]
Split kerne timekeep ABI structure vdso_sv_tk out of the struct
sysentvec.  This allows the timekeep data to be shared between similar
ABIs which cannot share sysentvec.

Make the timekeep_push_vdso() tick callback to the timekeep structures
instead of sysentvecs.  If several sysentvec share the vdso_sv_tk
structure, we would update the userspace data several times on each
tick, without the change.

Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when
sysentvec is marked with the new SV_TIMEKEEP flag.  This saves
allocation and update of unneeded vdso_sv_tk for ABIs which do not
provide userspace gettimeofday yet, which are PowerPCs arches right
now.

Make vdso_sv_tk allocator public, namely split out and export
alloc_sv_tk() and alloc_sv_tk_compat32().  ABIs which share timekeep
data now can allocate it manually and share as appropriate.

Requested by: nwhitehorn
Tested by: nwhitehorn, pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoInstall mce(4) and mlx5en(4) if MK_OFED != no
Enji Cooper [Mon, 23 Nov 2015 00:43:23 +0000 (00:43 +0000)]
Install mce(4) and mlx5en(4) if MK_OFED != no

MFC after: 1 week

8 years agoBump .Dd
Enji Cooper [Mon, 23 Nov 2015 00:40:08 +0000 (00:40 +0000)]
Bump .Dd

8 years ago- Fix bad double space between HW and LRO
Enji Cooper [Mon, 23 Nov 2015 00:39:48 +0000 (00:39 +0000)]
- Fix bad double space between HW and LRO
- Fix improperly capitalized `interface`

MFC after: 1 week

8 years agoBump .Dd
Enji Cooper [Sun, 22 Nov 2015 23:16:15 +0000 (23:16 +0000)]
Bump .Dd

8 years agoRecommend cc -Wall instead of gcc -Wall
Enji Cooper [Sun, 22 Nov 2015 23:15:44 +0000 (23:15 +0000)]
Recommend cc -Wall instead of gcc -Wall

MFC after: 1 week

8 years agoDon't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
Enji Cooper [Sun, 22 Nov 2015 23:07:07 +0000 (23:07 +0000)]
Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
already do this

MFC after: never (depends on kern.opts.mk; will not be MFCed probably)

8 years agoPrint more detailed info about the disk and partition chosen for booting.
Ian Lepore [Sun, 22 Nov 2015 20:38:50 +0000 (20:38 +0000)]
Print more detailed info about the disk and partition chosen for booting.
No behavioral changes, just cosmetics.

A partition number of zero is not a wildcard, it's the 'a' partition in
a BSD slice, so don't print it as "<auto>".  (Only slices are 1-based,
unit and partition numbers are 0-based and -1 is their wildcard marker.)

Also, after doing all the probing and choosing, print the final result as
"Booting from <disk spec>" where disk spec has all the wildcards resolved
and looks like familiar BSD slice-and-partition notation (disk0s3a, etc).

8 years agoExplicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
Alexander Motin [Sun, 22 Nov 2015 17:03:38 +0000 (17:03 +0000)]
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.

While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.

8 years agoGenerate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
Alexander Motin [Sun, 22 Nov 2015 16:55:43 +0000 (16:55 +0000)]
Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.

This makes port scanner fix absent port ID for added initiator.

8 years agoGracefully stop firmware before resetting chip when changing role.
Alexander Motin [Sun, 22 Nov 2015 15:57:54 +0000 (15:57 +0000)]
Gracefully stop firmware before resetting chip when changing role.

8 years agoAdd some more asynchronous event status codes.
Alexander Motin [Sun, 22 Nov 2015 11:44:30 +0000 (11:44 +0000)]
Add some more asynchronous event status codes.

8 years agoAdd mode mailbox command codes.
Alexander Motin [Sun, 22 Nov 2015 11:13:09 +0000 (11:13 +0000)]
Add mode mailbox command codes.

8 years agoRecord proper commit message for r291157.
Konstantin Belousov [Sun, 22 Nov 2015 09:50:13 +0000 (09:50 +0000)]
Record proper commit message for r291157.

The r289895 revision did not accounted for the block containing the
requested page, when calculating the run of pages.  Include the pages
before/after the requested page, that fit into the reqblock, into the
calculation.

Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoNoted by: glebius
Konstantin Belousov [Sun, 22 Nov 2015 09:48:03 +0000 (09:48 +0000)]
Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIgnore the inbound checksum flags when doing packet forwarding in netvsc driver.
Wei Hu [Sun, 22 Nov 2015 05:26:13 +0000 (05:26 +0000)]
Ignore the inbound checksum flags when doing packet forwarding in netvsc driver.

PR: 20363
Submitted by: whu
Reviewed by: royger, whu
Approved by: royger
MFC after: 1 week
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4131

8 years agobc: sync with OpenBSD
Pedro F. Giffuni [Sun, 22 Nov 2015 02:43:14 +0000 (02:43 +0000)]
bc: sync with OpenBSD

tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.

bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.

extern.h, Rev. 1.12
whitespace

bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability

Obtained from: OpenBSD
MFC after: 2 weeks

8 years ago[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.
Adrian Chadd [Sun, 22 Nov 2015 02:40:19 +0000 (02:40 +0000)]
[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.

8 years agoRemove unneeded includes of opt_kdtrace.h.
Mark Johnston [Sun, 22 Nov 2015 02:01:01 +0000 (02:01 +0000)]
Remove unneeded includes of opt_kdtrace.h.

As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h
is not needed when defining SDT(9) probes.

8 years agoRemove a debug panic that crept into r291151
Justin Hibbits [Sun, 22 Nov 2015 01:20:36 +0000 (01:20 +0000)]
Remove a debug panic that crept into r291151

8 years agoModernize mpc85xx PCI hostbridge driver.
Justin Hibbits [Sun, 22 Nov 2015 01:16:43 +0000 (01:16 +0000)]
Modernize mpc85xx PCI hostbridge driver.

Summary:
* Take advantage of NEW_PCIB to remove a lot of setup code.
* Fix some bugs related to multiple PCI bridges.

There's still room for more cleanup, and still some bugs leftover, but this
cleans up a lot.

Test Plan: Tested on P5020 board with IDT PCIe switch.

Differential Revision: https://reviews.freebsd.org/D4127

8 years agoWhen the nfsd threads are terminated, the NFSv4 server state
Rick Macklem [Sat, 21 Nov 2015 23:55:46 +0000 (23:55 +0000)]
When the nfsd threads are terminated, the NFSv4 server state
(opens, locks, etc) is retained, which I believe is correct behaviour.
However, for NFSv4.1, the server also retained a reference to the xprt
(RPC transport socket structure) for the backchannel. This caused
svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
a socket upcall to occur after the mutexes in the svcpool were destroyed,
causing a crash.
This patch fixes the code so that the backchannel xprt structure is
dereferenced just before svcpool_destroy() is called, so the code
does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.

Tested by: g_amanakis@yahoo.com
PR: 204340
MFC after: 2 weeks

8 years agoUpdate the imx5/imx6 cpu_reset() implementation based on a new understanding
Ian Lepore [Sat, 21 Nov 2015 23:30:47 +0000 (23:30 +0000)]
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.

8 years agoAdd a missing brace to fix vmstat -s output.
Mark Johnston [Sat, 21 Nov 2015 23:04:12 +0000 (23:04 +0000)]
Add a missing brace to fix vmstat -s output.

8 years agoIncrease maximal value of vports tunable to 254.
Alexander Motin [Sat, 21 Nov 2015 21:44:11 +0000 (21:44 +0000)]
Increase maximal value of vports tunable to 254.

I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).

8 years agoAdd support for Kana and Eisu keys to the USB keyboard driver.
Hans Petter Selasky [Sat, 21 Nov 2015 21:18:55 +0000 (21:18 +0000)]
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix scancodes for Kana and Eisu keys.
Hans Petter Selasky [Sat, 21 Nov 2015 21:14:16 +0000 (21:14 +0000)]
Fix scancodes for Kana and Eisu keys.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days