dragonfly.git
7 years agosys/dev/disk/dm: Cleanups
Tomohiro Kusumi [Sat, 26 Nov 2016 05:58:26 +0000 (14:58 +0900)]
sys/dev/disk/dm: Cleanups

This part is unclear for no reason.

7 years agosys/dev/disk/dm: Remove dm_dev::dev_type
Tomohiro Kusumi [Sat, 26 Nov 2016 05:17:43 +0000 (14:17 +0900)]
sys/dev/disk/dm: Remove dm_dev::dev_type

This is unused, and also not necessary.

dm core shouldn't need to be aware of target driver type.
Target dependent actions are handled by target dependent handlers.
dm targets have oop-like structure, so we don't want/need
dm core to be able to do things like below.

Also see d471f1f9 and 49784e7d.

switch (dev->dev_type) {
case DM_LINEAR_DEV:
    do_something_specific_to_linear(); break;
case DM_STRIPE_DEV:
    do_something_specific_to_striped(); break;
case ...:
    ...; break;
}

7 years agosys/dev/disk/dm: Remove dm/targets/ directory and move its entries to dm/
Tomohiro Kusumi [Sat, 26 Nov 2016 03:46:41 +0000 (12:46 +0900)]
sys/dev/disk/dm: Remove dm/targets/ directory and move its entries to dm/

Device mapper targets' path
sys/dev/disk/dm/targets/<name>/dm_target_<name>.c
are too deep for no reason.

This commit removes targets/ directory which isn't necessary at all,
assuming userspace has no dependencies on this (and it shouldn't either).

Neither NetBSD (sys/dev/dm/dm_target_*.c) nor Linux kernel (drivers/md/dm*.c)
has a directory tree like this, which is better.

7 years agolibc: Fix up compat-43 a bit.
Sascha Wildner [Sat, 26 Nov 2016 15:55:19 +0000 (16:55 +0100)]
libc: Fix up compat-43 a bit.

* Functions in libc/compat-43 aren't syscalls so move their manual
  pages to section 3.

* Move the stuff that is still POSIX to libc/gen: creat, gethostid,
  getwd, killpg. compat-43 isn't the right place for them.

* While here, a non-existant .PATH in compat-43/Makefile.inc.

7 years agoipfw3: 'or' supports more filters
Bill Yuan [Sat, 26 Nov 2016 11:51:21 +0000 (11:51 +0000)]
ipfw3: 'or' supports more filters

7 years agosyscons - Remove unneeded NULL check from register_framebuffer().
Imre Vadász [Sat, 26 Nov 2016 00:25:56 +0000 (01:25 +0100)]
syscons - Remove unneeded NULL check from register_framebuffer().

* While there use tabs for indenting register_framebuffer() to reduce
  diff of a following change.

7 years agosyscons - Handle kms framebuffer activation better when not in text mode.
Imre Vadász [Fri, 25 Nov 2016 00:26:32 +0000 (01:26 +0100)]
syscons - Handle kms framebuffer activation better when not in text mode.

* We shouldn't just silently remove the GRAPHICS_MODE or UNKNOWN_MODE flags,
  instead try to handle those cases a bit more graceful.

* This avoid's Xorg's VT being silently switched back from UNKNOWN_MODE
  to text mode, when the drm driver module is automatically loaded while
  Xorg is starting.

7 years agodrm/radeon: restore the fbdev mode in lastclose
Imre Vadász [Sat, 19 Nov 2016 20:33:54 +0000 (21:33 +0100)]
drm/radeon: restore the fbdev mode in lastclose

restore the fbdev state if a drm app like X is killed.

Taken-From: Linux git 8c70e1cda04b966b50ddfefafbd0ea376ed8edd5

7 years agoiwm - Reduce gratuitous differences with Linux iwlwifi in struct naming.
Imre Vadász [Fri, 25 Nov 2016 22:13:42 +0000 (23:13 +0100)]
iwm - Reduce gratuitous differences with Linux iwlwifi in struct naming.

* Rename some structs and struct members for firmware handling.

7 years agodrm/linux: add circ_buf.h needed for guc client bits
zrj [Fri, 25 Nov 2016 10:41:12 +0000 (11:41 +0100)]
drm/linux: add circ_buf.h needed for guc client bits

Found on github implemented by mattmacy@ FreeBSD repo

7 years agodrm/linux: Add request_firmware_nowait()
François Tigeot [Fri, 25 Nov 2016 09:07:48 +0000 (10:07 +0100)]
drm/linux: Add request_firmware_nowait()

7 years agodrm/linux: Improve request_firmware() compatibility
François Tigeot [Fri, 25 Nov 2016 08:06:16 +0000 (09:06 +0100)]
drm/linux: Improve request_firmware() compatibility

request_firmware() takes a pointer to a Linux struct device as
third parameter.

7 years agobinutils227: Symlink liblto_plugin.so from default base gcc compiler too.
zrj [Sun, 20 Nov 2016 14:06:25 +0000 (16:06 +0200)]
binutils227: Symlink liblto_plugin.so from default base gcc compiler too.

Now that alternative binutils are updated, further work towards making
binutils 2.27 as default can continue.
Also documment bfd-plugins/ directory in hier(7).

7 years agortld: Fix handling of DT_TEXTREL for object with multiple read-only segments.
zrj [Fri, 16 Sep 2016 04:47:19 +0000 (07:47 +0300)]
rtld: Fix handling of DT_TEXTREL for object with multiple read-only segments.

Taken-from: FreeBSD (r296319)

7 years agoRetire the binutils-2.24.
zrj [Sun, 20 Nov 2016 13:47:14 +0000 (15:47 +0200)]
Retire the binutils-2.24.

Remove contrib sources and build Makefiles.

7 years agoReplace binutils 2.24 with latest binutils 2.27.
zrj [Sat, 19 Nov 2016 18:52:45 +0000 (20:52 +0200)]
Replace binutils 2.24 with latest binutils 2.27.

7 years agobinutils227: Add build dirs.
zrj [Sat, 19 Nov 2016 18:50:38 +0000 (20:50 +0200)]
binutils227: Add build dirs.

It is unclear weather -Wl,z,relro should be on by default in ld.gold.

7 years agobinutil227: Add DF README's and local modifications.
zrj [Sat, 19 Nov 2016 17:46:44 +0000 (19:46 +0200)]
binutil227: Add DF README's and local modifications.

7 years agoMerge remote-tracking branch 'origin/vendor/BINUTILS227'
zrj [Thu, 24 Nov 2016 15:28:14 +0000 (17:28 +0200)]
Merge remote-tracking branch 'origin/vendor/BINUTILS227'

7 years agoInitial import of binutils 2.27 on vendor branch vendor/BINUTILS227
zrj [Thu, 24 Nov 2016 07:20:38 +0000 (09:20 +0200)]
Initial import of binutils 2.27 on vendor branch

7 years agoSync ACPICA with Intel's version 20161117.
Sascha Wildner [Wed, 23 Nov 2016 20:04:50 +0000 (21:04 +0100)]
Sync ACPICA with Intel's version 20161117.

* Fixed regression introduced in 20160729 in the table manager. Also,
  add a new public interface, AcpiPutTable().

* Fix a problem where runtime implicit conversion as incorrectly
  disabled for some ASL operators.

* Various fixes and improvements for iasl(8).

* In acpixtract(8), add handling for both LF and CR/LF line
  termination to accept acpidump output from any system.

* In acpibin(8), add new -a and -o options.

For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.

7 years agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 23 Nov 2016 19:03:05 +0000 (20:03 +0100)]
Update the pciconf(8) database.

October 29, 2016 snapshot from http://pciids.sourceforge.net/

7 years agokernel/if_re: Adjust permissions.
Sascha Wildner [Wed, 23 Nov 2016 17:46:53 +0000 (18:46 +0100)]
kernel/if_re: Adjust permissions.

7 years agore: Leverage Realtek driver's chip/PHY initialization/reset.
Sepherosa Ziehau [Thu, 3 Nov 2016 06:16:26 +0000 (14:16 +0800)]
re: Leverage Realtek driver's chip/PHY initialization/reset.

It is mainly used to solve all kinds of weirdness, e.g. hanging after
watchdog timeout, and PHY read failure, we have encountered so far on
these chips.

The DEVMETHODs, ifnet setup, and data path are still ours.  miibus(4)
is no longer used, ifmedia(4) is used directly.

NOTE: This change drops the 8139C+ and 8169 w/ external PHY support,
which are deemed to be too old.

Realtek's driver is taken from their website: version 1.92 (2016/10/25).

Tested-by: dillon, zrj
7 years agoefi - Add EFI run-time ABI support (3)
Matthew Dillon [Wed, 23 Nov 2016 02:07:25 +0000 (18:07 -0800)]
efi - Add EFI run-time ABI support (3)

* Cleanup debugging code that is no longer needed.

7 years agoefi - Add EFI run-time ABI support (2)
Matthew Dillon [Tue, 22 Nov 2016 23:12:34 +0000 (15:12 -0800)]
efi - Add EFI run-time ABI support (2)

* Files forgotten in last commit.  Fix ABI (microsoft call ABI is used
  for EFI direct calls).

7 years agoefi - Add EFI run-time ABI support
Matthew Dillon [Tue, 22 Nov 2016 22:53:50 +0000 (14:53 -0800)]
efi - Add EFI run-time ABI support

* Add EFI run-time ABI support, ability to query and set the time,
  scan EFI BIOS variables, etc.

* Port from FreeBSD.  Use our vmspace management functions to handle
  the specialized pmap requirements instead of rerolling the page
  table.  Make adjustments for differences in the device API.  etc.

Ported-by: swildner, dillon
Ported-from: FreeBSD, Warner Losh

7 years agosys/dev/disk/dm: Sync with Linux changes in flakey read behavior
Tomohiro Kusumi [Tue, 22 Nov 2016 14:50:01 +0000 (23:50 +0900)]
sys/dev/disk/dm: Sync with Linux changes in flakey read behavior

Synw with the following Linux kernel commits.
99f3c90d0d85708e7401a81ce3314e50bf7f2819
299f6230bc6d0ccd5f95bb0fb865d80a9c7d5ccc

Note that above commits and this commit change read behavior.
It seems the existing read behavior was not what dm-flakey was
originally designed to be.

DragonFly's dm-flakey basically just does what Linux dm-flakey
does, so this commit just syncs with above changes.

7 years agoudp: Don't propagate connect error, as long as the inpcb has local port.
Sepherosa Ziehau [Tue, 22 Nov 2016 02:57:13 +0000 (10:57 +0800)]
udp: Don't propagate connect error, as long as the inpcb has local port.

This fixes the UDP socket disconnect->[read/write] support; before this
fix, the immediate read/write after disconnect will get EAFNOTSUPPORT.

7 years agotest/udp: Add echo test for connected->disconnected socket.
Sepherosa Ziehau [Tue, 22 Nov 2016 02:56:22 +0000 (10:56 +0800)]
test/udp: Add echo test for connected->disconnected socket.

7 years agogcc50: Activate workaround for libgcc_pic.a.
zrj [Mon, 21 Nov 2016 14:24:01 +0000 (16:24 +0200)]
gcc50: Activate workaround for libgcc_pic.a.

For now to ease up dports compilations (affects only c++ -pthread -shared).

In-discussion-with: marino

7 years agosvc(8): Link as static.
zrj [Mon, 21 Nov 2016 11:14:08 +0000 (13:14 +0200)]
svc(8): Link as static.

Depends on libpthread.so that is in /usr/lib and symlink.
Avoids problems on split / and /usr layout installations.

7 years agolibsmb: Install .so.2 into /lib to unbreak mount_smbfs(8).
zrj [Mon, 21 Nov 2016 11:28:20 +0000 (13:28 +0200)]
libsmb: Install .so.2 into /lib to unbreak mount_smbfs(8).

Fixes issue for /sbin/mount_smbfs on split / and /usr layout installations.

7 years agolibdevstat: Install .so.3 into /lib to unbreak vinum(8).
zrj [Mon, 21 Nov 2016 11:17:15 +0000 (13:17 +0200)]
libdevstat: Install .so.3 into /lib to unbreak vinum(8).

Fixes issue for /sbin/vinum on split / and /usr layout installations.

Reported-by: Stefan Unterweger
7 years agodrm: Use struct fb_info * as arg for syscons fb restore helper function.
Imre Vadász [Tue, 15 Nov 2016 23:34:04 +0000 (00:34 +0100)]
drm: Use struct fb_info * as arg for syscons fb restore helper function.

* This makes the framebuffer api handling in drm slightly nicer, and
  reduces the diffs in drm/radeonkms/i915 a bit.

* Renames the cookie element in struct fb_info to par, to avoid diffs
  in drm, radeonkms and i915.

* While there, use drm_fb_helper_alloc_fbi() in drm/radeon as well for
  allocating the struct fb_info, and uncomment drm_fb_helper_release_fbi(),
  which is needed in an error handler there.

7 years agoRemove /usr/include/readline from mtree too.
Sascha Wildner [Sat, 19 Nov 2016 11:19:09 +0000 (12:19 +0100)]
Remove /usr/include/readline from mtree too.

7 years agoi386 removal, part 61/x: Adjust some further #ifdefs.
Sascha Wildner [Sat, 19 Nov 2016 10:09:06 +0000 (11:09 +0100)]
i386 removal, part 61/x: Adjust some further #ifdefs.

7 years agoi386 removal, part 60/x: Generalize a buildkernel error message a bit.
Sascha Wildner [Sat, 19 Nov 2016 09:41:08 +0000 (10:41 +0100)]
i386 removal, part 60/x: Generalize a buildkernel error message a bit.

Pointed-out-by: zrj
7 years agoi386 removal, part 59/x: Revert a i386 specific local change in dma(8).
Sascha Wildner [Sat, 19 Nov 2016 09:38:44 +0000 (10:38 +0100)]
i386 removal, part 59/x: Revert a i386 specific local change in dma(8).

7 years agoRemove some old architecture handling.
Sascha Wildner [Sat, 19 Nov 2016 09:34:53 +0000 (10:34 +0100)]
Remove some old architecture handling.

Affected #ifdefs:

__arm__
hp300
__ia64__
__mips__
__powerpc__
__sparc64__

7 years agoi386 removal, part 58/x: Remove <sys/link_aout.h>.
Sascha Wildner [Sat, 19 Nov 2016 09:08:12 +0000 (10:08 +0100)]
i386 removal, part 58/x: Remove <sys/link_aout.h>.

Its last user was removed in aeaecd482b46e655e59bf281f04e91d0bb4f773b.

7 years agodrm - Fix lock order reversal
Matthew Dillon [Sat, 19 Nov 2016 05:55:50 +0000 (21:55 -0800)]
drm - Fix lock order reversal

* Lock order reversal caused by holding dev_pager_mtx() across
  the object->un_pager.devp.ops->cdev_pg_dtor() call.  devpgr -> drmslk.

* Move the lock from before to after the call.  Holding the mutex shouldn't
  be necessary across the call.  This also fixes the reversal as devpgr is
  no longer held across the call.

* Fixes a lock order reversal against drm_ioctl() which obtains drmslk first
  and recurses into a device pager operation which gets devpgr.

* Fix a few other incidental bugs that would normally not be triggered by
  the DRM code due to outer locks held by the DRM code.  Plus some formatting
  fixes.

7 years agokernel - Fix swap warning message when swap is full
Matthew Dillon [Fri, 18 Nov 2016 23:24:45 +0000 (15:24 -0800)]
kernel - Fix swap warning message when swap is full

* Wrong variable tested caused confusing warning to be output.  Output
  swap full warning instead of 'no swap space configured' warning when
  swap is full and swap space has been configured.

Reported-by: tuxillo
7 years agoLIBPRIV: Add private includes for dfuife_curses.
zrj [Fri, 18 Nov 2016 17:02:10 +0000 (19:02 +0200)]
LIBPRIV: Add private includes for dfuife_curses.

installer(1) is only built during make release or WANT_INSTALLER=yes.

7 years agoRelocate readline and ncurses headers to /usr/include/priv
John Marino [Thu, 17 Nov 2016 20:46:24 +0000 (14:46 -0600)]
Relocate readline and ncurses headers to /usr/include/priv

Having public headers for private libraries can cause confusion for
software that assumes the presence of headers leads to the availability
of the libraries.

Discussed-with: dillon

7 years agosys/vfs/hammer: Fix wrong comment
Tomohiro Kusumi [Fri, 18 Nov 2016 08:40:27 +0000 (17:40 +0900)]
sys/vfs/hammer: Fix wrong comment

7f1e2b68 should have had 4TB, not 4GB.

7 years agowlan - Don't check bgscanidle setting in net80211 for full-offload scan.
Imre Vadász [Thu, 17 Nov 2016 22:06:29 +0000 (23:06 +0100)]
wlan - Don't check bgscanidle setting in net80211 for full-offload scan.

* If full-offload scan is used, the NIC driver (or rather the firmware of
  the NIC) should take care of interrupting and continuing the background
  scan. So net80211 should ignore the vap->iv_bgscanidle setting then,
  instead the NIC driver might look at this setting and pass it on to the
  firmware in some way if possible.

* Since full-offload scans won't be explicitly interrupted by net80211, it
  also doesn't really make sense to check the vap->iv_bgscanidle condition
  in that case, before starting a background scan. If the NIC driver
  advertises background scan support and full-offload scanning, the firmware
  should be able to execute that scan without interfering too much with our
  data traffic.

Taken-From: FreeBSD (svn r308785)

7 years agodrm/linux: add sg_pcopy_{from/to}_buffer()
zrj [Thu, 17 Nov 2016 18:40:57 +0000 (20:40 +0200)]
drm/linux: add sg_pcopy_{from/to}_buffer()

Needed for i915 guc fw loading.

Found on github implemented by mattmacy@ FreeBSD repo

7 years agodrm/linux: Add ida_simple_get()
François Tigeot [Thu, 17 Nov 2016 16:39:10 +0000 (17:39 +0100)]
drm/linux: Add ida_simple_get()

Inspired-by: NetBSD
7 years agodrm/linux: add few ida_* functions.
zrj [Thu, 17 Nov 2016 16:05:38 +0000 (17:05 +0100)]
drm/linux: add few ida_* functions.

Needed for i915 guc submission.

zRJ-note: technically should be in idr(9) but for now will do.

Found on github implemented by mattmacy@ FreeBSD repo

7 years agodrm/linux: Add cache_line_size()
François Tigeot [Tue, 15 Nov 2016 20:38:53 +0000 (21:38 +0100)]
drm/linux: Add cache_line_size()

7 years agodrm/linux: add atomic64_cmpxchg()
zrj [Tue, 15 Nov 2016 19:19:33 +0000 (20:19 +0100)]
drm/linux: add atomic64_cmpxchg()

Found on github implemented by mattmacy@ FreeBSD repo

7 years agodrm/i915/trace: Add missing include files
François Tigeot [Tue, 15 Nov 2016 16:16:37 +0000 (17:16 +0100)]
drm/i915/trace: Add missing include files

7 years agodrm/linux: MODULE_FIRMWARE is defined in linux/module.h
François Tigeot [Tue, 15 Nov 2016 16:12:59 +0000 (17:12 +0100)]
drm/linux: MODULE_FIRMWARE is defined in linux/module.h

7 years agodrm/linux: implement div64_u64_rem() helper in math64.h
zrj [Tue, 15 Nov 2016 12:08:26 +0000 (13:08 +0100)]
drm/linux: implement div64_u64_rem() helper in math64.h

7 years agodntpd: Fix typo.
Sascha Wildner [Mon, 14 Nov 2016 17:35:02 +0000 (18:35 +0100)]
dntpd: Fix typo.

7 years agogcc50: Add alternative variant of pthread presence checking.
zrj [Mon, 14 Nov 2016 08:47:36 +0000 (10:47 +0200)]
gcc50: Add alternative variant of pthread presence checking.

There are few issues that ld.gold is having with DragonFly libgcc_pic.a.
This alternative variant is less strict when linking c++ projects.

7 years agoLINT64: Fix buildkernel with WANT_HAMMER2=yes.
zrj [Sun, 13 Nov 2016 17:52:15 +0000 (19:52 +0200)]
LINT64: Fix buildkernel with WANT_HAMMER2=yes.

Mostly #if DEBUG paths, also use panic() in z_error() for kernel.

7 years agonvi: Convert catalog creation to use hostprog.
zrj [Fri, 11 Nov 2016 12:51:43 +0000 (14:51 +0200)]
nvi: Convert catalog creation to use hostprog.

nvi dump utility is not part of btools, so just split vidump as hostprog.
There were few issues:
 * build races like dump and say spanish get created twice (and raced)
 * buildworld failures, from time to time i hit ./dump linking race (rare)
 * ./dump being used as target program (problems on crosscompilations)
 * missing env LANG=C for sort, minor issues in awk script and SHAREDIR.

Now even "cd usr.bin/vi && make -j9 depend all" should be race free.

7 years agogcc47: Remove bits/ handling.
zrj [Thu, 10 Nov 2016 18:43:24 +0000 (20:43 +0200)]
gcc47: Remove bits/ handling.

Not used by any active sources.
Now quickworld should not delete libstdcxx .depend on no source changes.

7 years agogcc50: Fix logic in cxx hostlib.
zrj [Thu, 10 Nov 2016 18:41:54 +0000 (20:41 +0200)]
gcc50: Fix logic in cxx hostlib.

Now quickworld should not delete libstdcxx .depend on no source changes.

7 years agoinstaller - Fix a bug in survey_storage()
Antonio Huete Jimenez [Thu, 10 Nov 2016 22:59:50 +0000 (23:59 +0100)]
installer - Fix a bug in survey_storage()

- survey_storage() issues DIOCGPART on every disk present in
  kern.disks in order to retrieve information about it.
  The problem was that a failure to get that information from
  any disk in the list caused the whole storage survey to be
  marked as failed. This happens, for example, with some card
  readers that present the disk devices even though there is no
  media inserted on the corresponding slot.

- Fix the logic in the installer and allow to check all disks
  in the system.

7 years agoinstaller - Allow to specify cmdnames file path
Antonio Huete Jimenez [Thu, 10 Nov 2016 22:26:45 +0000 (23:26 +0100)]
installer - Allow to specify cmdnames file path

7 years agoif_iwm - Check sc->sc_attached flag in suspend/resume callbacks.
Imre Vadász [Sun, 13 Nov 2016 21:36:16 +0000 (22:36 +0100)]
if_iwm - Check sc->sc_attached flag in suspend/resume callbacks.

* There is (almost) nothing to do in suspend/resume if if_iwm has failed
  during initialization (e.g. because of firmware load failure) and was
  already uninitialized by iwm_detach_local().

7 years agosys/vfs/hammer: Fix comments
Tomohiro Kusumi [Sat, 12 Nov 2016 15:45:04 +0000 (00:45 +0900)]
sys/vfs/hammer: Fix comments

7 years agosys/vfs/hammer: Remove wrong comment
Tomohiro Kusumi [Sat, 12 Nov 2016 15:44:51 +0000 (00:44 +0900)]
sys/vfs/hammer: Remove wrong comment

7 years agosys/vfs/hammer: Use HAMMER_HEAD_DOALIGN()
Tomohiro Kusumi [Sat, 12 Nov 2016 09:57:41 +0000 (18:57 +0900)]
sys/vfs/hammer: Use HAMMER_HEAD_DOALIGN()

7 years agosbin/hammer: sbin/hammer: Fix hammer show-undo output format
Tomohiro Kusumi [Sat, 12 Nov 2016 09:48:50 +0000 (18:48 +0900)]
sbin/hammer: sbin/hammer: Fix hammer show-undo output format

Add some ondisk redo fields.

7 years agosys/vfs/hammer: Change unused ondisk redo_mtime to reserved
Tomohiro Kusumi [Sat, 12 Nov 2016 09:26:13 +0000 (18:26 +0900)]
sys/vfs/hammer: Change unused ondisk redo_mtime to reserved

It was never used after added in 6048b411 in 2010.

7 years agoif_iwm - Move iwm_read_firmware() call into iwm_attach().
Imre Vadász [Sat, 12 Nov 2016 12:41:49 +0000 (13:41 +0100)]
if_iwm - Move iwm_read_firmware() call into iwm_attach().

* We should load the firmware exactly once before the driver really
  initializes the hardware the first time, and unload it at detach time.
  There is no need to retrieve the firmware during execution of
  iwm_mvm_load_ucode_wait_alive(), we should make sure we already have the
  firmware data at hand before that.

* The existing sc_preinit_hook code fails to deal with the case where
  if_iwm is loaded by the loader (or is statically linked) and the
  firmware needs to be loaded from disk. So we can just call
  iwm_read_firmware() from iwm_attach() directly.

* A separate solution will have to be added to properly defer the firmware
  loading during bootup, until the necessary filesystem is mounted.

7 years agoDo 3b5eca529baf58ea74a485139963552cc4c1d977 a bit better.
Sascha Wildner [Sat, 12 Nov 2016 11:45:01 +0000 (12:45 +0100)]
Do 3b5eca529baf58ea74a485139963552cc4c1d977 a bit better.

FWIW, keep the NO_CRYPT dependency in lib/libcrypt for various sources.

7 years agoif_iwm - Attach to new AC3168 and AC8265 chipsets (untested).
Imre Vadász [Fri, 11 Nov 2016 20:09:05 +0000 (21:09 +0100)]
if_iwm - Attach to new AC3168 and AC8265 chipsets (untested).

7 years agoiwmfw - Add version 22 firmwares for AC3168 and AC8265 chipsets.
Imre Vadász [Fri, 11 Nov 2016 20:08:29 +0000 (21:08 +0100)]
iwmfw - Add version 22 firmwares for AC3168 and AC8265 chipsets.

7 years agosbin/hammer: Fix hammer show-undo output format
Tomohiro Kusumi [Sat, 12 Nov 2016 06:25:41 +0000 (15:25 +0900)]
sbin/hammer: Fix hammer show-undo output format

The whole size should be in %d since data size is in %d as well.

7 years agosys/vfs/hammer: Add hammer_xlate_to_undo()
Tomohiro Kusumi [Sat, 12 Nov 2016 05:37:26 +0000 (14:37 +0900)]
sys/vfs/hammer: Add hammer_xlate_to_undo()

7 years agosbin/hammer: Refactor left/right boundary elms in hammer show
Tomohiro Kusumi [Sat, 12 Nov 2016 04:11:10 +0000 (13:11 +0900)]
sbin/hammer: Refactor left/right boundary elms in hammer show

hammer show doesn't need to pass around pointers to left/right
boundary elms in every function while walking the B-Tree.

Left/right elms are there to test whether a B-Tree node in
question fits in boundaries defined by its parent, which means
that hammer show always requires the right elm be (left+1), but
not some random elm after the left elm. Because of this, it
only needs to pass around the left elm.

The code is more efficient plus look better without bunch of
left/right stuff.

7 years agosbin/hammer: Cleanup zone statistics
Tomohiro Kusumi [Fri, 11 Nov 2016 18:23:52 +0000 (03:23 +0900)]
sbin/hammer: Cleanup zone statistics

7 years agosbin/hammer: Cleanup hammer show-undo
Tomohiro Kusumi [Fri, 11 Nov 2016 18:14:49 +0000 (03:14 +0900)]
sbin/hammer: Cleanup hammer show-undo

7 years agosbin/hammer: Make hammer show-undo support zone statistics
Tomohiro Kusumi [Fri, 11 Nov 2016 18:09:39 +0000 (03:09 +0900)]
sbin/hammer: Make hammer show-undo support zone statistics

7 years agosys/vfs/hammer: Add HAMMER_UNDO_DOALIGN()
Tomohiro Kusumi [Wed, 9 Nov 2016 15:56:25 +0000 (00:56 +0900)]
sys/vfs/hammer: Add HAMMER_UNDO_DOALIGN()

The only reason it's "DOALIGN" instead of just "ALIGN" is
because that's how macros have been named in HAMMER1/2.
"ALIGN" macros represent alignment size.

7 years agosbin/hammer: Cleanup blockmap
Tomohiro Kusumi [Wed, 9 Nov 2016 15:41:31 +0000 (00:41 +0900)]
sbin/hammer: Cleanup blockmap

7 years agodrm/linux: Add clamp_val()
François Tigeot [Fri, 11 Nov 2016 11:25:55 +0000 (12:25 +0100)]
drm/linux: Add clamp_val()

Obtained-from: FreeBSD

7 years agodrm/linux: Add ktime_get_boottime and ktime_ms_delta()
François Tigeot [Fri, 11 Nov 2016 11:09:29 +0000 (12:09 +0100)]
drm/linux: Add ktime_get_boottime and ktime_ms_delta()

7 years agogcc50: Install liblto_plugin.so as +x.
zrj [Fri, 11 Nov 2016 07:17:44 +0000 (09:17 +0200)]
gcc50: Install liblto_plugin.so as +x.

Sad but this limitation in gcc driver requires that utility be executable.
This matches how it is done on standard installations, so follow along.
Some ports rely on gcc -print-prog-name=liblto_plugin.so working.

7 years agobuild: Suppress exessive echoing.
zrj [Fri, 11 Nov 2016 07:02:07 +0000 (09:02 +0200)]
build: Suppress exessive echoing.

7 years agoLIBPRIV: Add common PRIVATELIB_LDFLAGS definitions.
zrj [Wed, 9 Nov 2016 17:14:52 +0000 (19:14 +0200)]
LIBPRIV: Add common PRIVATELIB_LDFLAGS definitions.

Simply being able to change it in two places is easier than everywhere.
Also add PRIVATELIB_BLDFLAGS that is intended for bootsrapping only.
While there, perform some cleanup for dup entries.

7 years agoLIBPRIV: Introduce PRIVATELIB knob (just like INTERNALLIB).
zrj [Wed, 9 Nov 2016 15:36:05 +0000 (17:36 +0200)]
LIBPRIV: Introduce PRIVATELIB knob (just like INTERNALLIB).

Collect common private libraries path handling bits into share/mk/bsd.lib.mk.
It is cleaner this way, prevents issues like manual paths and/or ignoring stale
.depend for /usr/obj/usr/src/world_x86_64/usr/lib/priv/priv/libprivate_ncurses.a

7 years agoflex: Break the hardlinks to fix quickworld issues.
zrj [Wed, 9 Nov 2016 10:25:23 +0000 (12:25 +0200)]
flex: Break the hardlinks to fix quickworld issues.

Upon repeated quickworld run when install -C installs the libfl.a it breaks
the previous hardlink and retrigers relink for anything that depends on -ll.

Solve this by changing logic to install compat libs for install target only.
During buildworld only main ${LIBL} should be used where needed.

Fix a single case where -lfl was used in binutils. Add missing DPADD too.

7 years agoflex: Rename and install the main libl.a as primary one.
zrj [Wed, 9 Nov 2016 10:12:41 +0000 (12:12 +0200)]
flex: Rename and install the main libl.a as primary one.

libfl and libln are only used as compat ones for external sources linkage.
Whole base makefile system uses the ${LIBL}.

7 years agosys/vfs/hammer: Add HAMMER_ZONE_LAYER2_NEXT_OFFSET()
Tomohiro Kusumi [Wed, 9 Nov 2016 13:06:18 +0000 (22:06 +0900)]
sys/vfs/hammer: Add HAMMER_ZONE_LAYER2_NEXT_OFFSET()

Note that this is different from HAMMER_BLOCKMAP_LAYER2_OFFSET().
HAMMER_BLOCKMAP_LAYER2_OFFSET() is an offset of layer2 entry within
a big-block for layer2, but not zone offset itself.

7 years agosys/vfs/hammer: Add HAMMER_ZONE_LAYER1_NEXT_OFFSET()
Tomohiro Kusumi [Wed, 9 Nov 2016 12:52:21 +0000 (21:52 +0900)]
sys/vfs/hammer: Add HAMMER_ZONE_LAYER1_NEXT_OFFSET()

Note that this is different from HAMMER_BLOCKMAP_LAYER1_OFFSET().
HAMMER_BLOCKMAP_LAYER1_OFFSET() is an offset of layer1 entry within
a big-block for layer1, but not zone offset itself.

7 years agobsd.crunchgen.mk: Sync with FreeBSD.
zrj [Mon, 7 Nov 2016 12:33:52 +0000 (14:33 +0200)]
bsd.crunchgen.mk: Sync with FreeBSD.

This finally allows not to relink rescue image if there are no changes and
have clean stage of "4d: building everything.."!
Helps a lot on LTO quick rebuilds.

While there, remove hack from crunchgen(1), it no longer should be needed.
Please report build races if any.

Taken-from: FreeBSD

7 years agobsd.crunchgen.mk: Split few monolitic targets.
zrj [Mon, 7 Nov 2016 11:32:11 +0000 (13:32 +0200)]
bsd.crunchgen.mk: Split few monolitic targets.

For easier debug.

Taken-from: FreeBSD

7 years agobsd.crunchgen.mk: Simplify mk logic a bit.
zrj [Mon, 7 Nov 2016 11:12:54 +0000 (13:12 +0200)]
bsd.crunchgen.mk: Simplify mk logic a bit.

Just provide defaults if needed.

7 years agobsd.crunchgen.mk: Remove dub handling of CANONICALOBJDIR.
zrj [Mon, 7 Nov 2016 10:40:29 +0000 (12:40 +0200)]
bsd.crunchgen.mk: Remove dub handling of CANONICALOBJDIR.

It is already handled in bsd.obj.mk.
While there, drop non functional NO_DEBUG_FILES and update bsd.README.

7 years agobsd.crunchgen.mk: No longer exclude -P option.
zrj [Mon, 7 Nov 2016 08:48:16 +0000 (10:48 +0200)]
bsd.crunchgen.mk: No longer exclude -P option.

It was used only when fmake.
While there, do not hardcode crunchgen name and add env handling.

Taken-from: FreeBSD

7 years agobsd.crunchgen.mk: Use single style for variables.
zrj [Mon, 7 Nov 2016 08:40:22 +0000 (10:40 +0200)]
bsd.crunchgen.mk: Use single style for variables.

No functional change.

7 years agoif_iwm - Advertise full-offload scan support, fixes scan while associated.
Imre Vadász [Mon, 7 Nov 2016 21:02:31 +0000 (22:02 +0100)]
if_iwm - Advertise full-offload scan support, fixes scan while associated.

* This avoids the firmware panics previously experienced when starting a
  wlan scan (e.g. with "ifconfig wlan0 scan" or "scan" command in a
  wpa_supplicant user-interface), while associated to an AP.

7 years agowlan - Import initial full-offload scan support from FreeBSD.
Imre Vadász [Mon, 7 Nov 2016 20:45:45 +0000 (21:45 +0100)]
wlan - Import initial full-offload scan support from FreeBSD.

This is a very simple addition to the net80211 scan support.

It doesn't implement a replacement scan interface - it just disables
the pieces that we should disable to make this lifecycle a bit
more managable.

There's more work to come before full scan offload support is available
but it should be good enough for driver work.

* add a flag to say "full offload"
* don't do probe requests when scanning full-offload - firmware can do that
* don't do powersave transitions and buffering - firmware can do that
* don't abort a background scan upon reception of a single packet.
  Full offload drivers don't need this behaviour - they do it in firmware.

Taken-From: FreeBSD (svn r307602, r308007 and r308008)

7 years agosys/vfs/hammer: Use HAMMER_BUFSIZE_DOALIGN() and variants
Tomohiro Kusumi [Mon, 7 Nov 2016 15:12:54 +0000 (00:12 +0900)]
sys/vfs/hammer: Use HAMMER_BUFSIZE_DOALIGN() and variants

This should have been in bbc5e78b (failed to catch these).