Commit Graph

212441 Commits

Author SHA1 Message Date
Gleb Smirnoff
e987742995 The SA-16:19 wouldn't have happened if the sockargs() had properly typed
argument for length.  While here make it static and convert to ANSI C.

Reviewed by:	C Turt
2016-05-18 22:05:50 +00:00
Gleb Smirnoff
9aa8749970 Revert r299830, it has couple of fatal errors.
The CMSG_ family of macros take care of alignment, so we don't need r299830
at all, even if it was correct.  Put NO_WCAST_ALIGN into Makefile.

Together with:	peter
2016-05-18 22:02:19 +00:00
Warner Losh
631dbc3b78 mipsn32el is not a thing, remove it from the list of valid
architectures. There's no definition for it, nobody uses it
and it is unlikely to ever work. We can put it back when someone
demonstrates it running...

The new default for armv6 is hard float, so extend that default
to the external toolchain support.
2016-05-18 20:49:09 +00:00
Bjoern A. Zeeb
ad4e911678 Rather than having the if_vmove() code intermixed in the vnet_destroy()
function in vnet.c move it to if.c where it logically belongs and put
it under a VNET_SYSUNINIT() call.
To not change the current behaviour make sure it runs first thing
during teardown. In the future this will allow us more flexibility
on changing the order on when we want to get rid of interfaces.

Stop exporting if_vmove() and make it file static.

Reviewed by:		gnn
Sponsored by:		The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6438
2016-05-18 20:06:45 +00:00
Pedro F. Giffuni
44444759e5 libufs: Simplify generation number calculation.
UFS generation numbers have been unsigned since 2013 (r256435).
2016-05-18 19:59:05 +00:00
Gleb Smirnoff
fefbf77024 Comment fix: the getsockaddr() is actually meant here.
Reviewed by:	rmacklem
2016-05-18 17:40:53 +00:00
Bryan Drewery
ecb92e2d47 Combine restage/reinstall in a safe way.
Sponsored by:	EMC / Isilon Storage Division
2016-05-18 17:08:29 +00:00
Ravi Pokala
08907ec39d Fix misleading comments in bus_if.m
While looking at r300073, I noticed these incorrect comments in the context
of the diff.

Reviewed by:	imp, jhb
Differential Revision:	https://reviews.freebsd.org/D6431
2016-05-18 16:25:34 +00:00
Alexander Motin
93d07b9a26 Unify Multi ID target code by reusing isp_find_chan_by_did(). 2016-05-18 16:15:09 +00:00
Warner Losh
19831537a9 Fix typo.
Spotted by: Matteo Riondato
2016-05-18 15:57:13 +00:00
Bjoern A. Zeeb
94081f88e8 Add a "vnet_state" field to struct vnet.
This is set to the SI_SUB_* value before executing any VNET_SYSINIT
or VNET_SYSUNINT.  While good for debugging especially VNET teardown
problems having a chance to know at which level during teardown we are,
it will also be used to identify to detcted a "stable state"
(as in fully up and running) later on.

Obtained from:	projects/vnet
Sponsored by:	The FreeBSD Foundation
2016-05-18 15:50:52 +00:00
Scott Long
fc614c29c1 Activate the NO_64BIT_ATOMICS code for mips and powerpc 2016-05-18 15:45:12 +00:00
Scott Long
c7762913ac Remove assertions that don't make sense for the data type. 2016-05-18 15:44:45 +00:00
Pedro F. Giffuni
872a3a62ae libutil: minor spelling fixes. 2016-05-18 15:25:45 +00:00
Bjoern A. Zeeb
00e36a5c7c Add a dummy VNET_SYSINIT that will make sure all VNETs started will
always end on SI_SUB_VNET_DONE.

Obtained from:	projects/vnet
Sponsored by:	The FreeBSD Foundation
2016-05-18 15:25:19 +00:00
Pedro F. Giffuni
416970ad85 Minor spelling fixes. 2016-05-18 15:18:18 +00:00
Andrew Turner
9346e9130d Return the struct intr_pic pointer from intr_pic_register. This will be
needed in later changes where we may not be able to lock the pic list lock
to perform a lookup, e.g. from within interrupt context.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-18 15:05:44 +00:00
Bjoern A. Zeeb
5fa0728b7d Split 'show vnets' into 'show vnet' and 'show all vnets'.
While here adjust some db_printf format string.

Document the two show commands in ddb.4.

Sponsored by:	The FreeBSD Foundation
2016-05-18 14:43:17 +00:00
Bjoern A. Zeeb
aaeb188af3 Make compile without INET or without IP support in the kernel by hiding
variables and lro function calls behind approriate #ifdefs.

Also move the #includes for "opt_*" to the place where they should be.
2016-05-18 14:18:03 +00:00
Warner Losh
e530e62312 Also add comment about the bug I comments in the forth. 2016-05-18 14:09:56 +00:00
Andriy Gapon
fabe7e4ecc add vop_print methods to vnode operatios of various zfsctl node types
This should help with diagnostics of zfsctl problems.

MFC after:	2 weeks
2016-05-18 13:21:29 +00:00
Andrew Turner
cda142c5b9 Implement atomic_cmpset_acq_64 and atomic_cmpset_rel_64 on arm and armeb.
This should allow r300113 to build there.

Sponsored by:	ABT Systems Ltd
2016-05-18 13:09:52 +00:00
Andrey V. Elsukov
96e84c57e1 Move protocol state handling code from lookup_dyn_rule_locked() function
into dyn_update_proto_state(). This allows eliminate the second state
lookup in the ipfw_install_state().
Also remove MATCH_* macros, they are defined in ip_fw_private.h as enum.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2016-05-18 12:53:21 +00:00
Konstantin Belousov
3f7ca894de Ensure that ftruncate(2) is performed synchronously when file is
opened in O_SYNC mode, at least for UFS.  This also handles
truncation, done due to the O_SYNC | O_TRUNC flags combination to
open(2), in synchronous way.

Noted by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-05-18 12:03:57 +00:00
Andriy Voskoboinyk
4938741ac5 targets/Makefile: fix a typo (derrived -> derived). 2016-05-18 10:59:16 +00:00
Andriy Voskoboinyk
2baa84d244 README: remove nonexistent 'games' directory.
Games were moved to usr.bin in r288485.

(todo: add/describe 'targets' directory)
2016-05-18 10:43:13 +00:00
Zbigniew Bodek
b02a807b46 Add support for MSI/MSIX deallocation on GICv3-ITS
Allow to deallocate previously allocated ITS device along with
its interrupts. Interrupt numbers are being freed when the last
LPI number is no longer busy.

Reviewed by:	wma
Obtained from:	Semihalf
Sponsored by:	Cavium
Differential Revision:	https://reviews.freebsd.org/D6351
2016-05-18 10:09:07 +00:00
Andrew Rybchenko
b108666635 sfxge(4): cleanup: remove trailing whitespaces
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-18 09:57:11 +00:00
Andriy Gapon
e34c8d727b move zfsctl_freebsd_root_lookup right next to zfsctl_root_lookup
That makes it easier to reason about the code.

MFC after:	5 weeks
2016-05-18 08:29:39 +00:00
Andriy Gapon
a4bbed22d2 zfsctl_common_fid: remove redundant assignment
"Reinterpret cast" to zfid_short_t and assignment of zf_len
do the job already.

MFC after:	1 week
2016-05-18 08:26:09 +00:00
Andriy Gapon
e6d4eefe2a zfsctl: tighten an assertion and remove an unused definition
There are only two entries under .zfs and 'shares' has an ID of a
special persistent object in its filesystem.

MFC after:	1 week
2016-05-18 08:23:39 +00:00
Andriy Gapon
439e9b6804 zfs_root: no need to set the root flag here
That was both redundant as zfs_znode_sa_init() already does the job and
insufficient as the root vnode can be reached via other means.

MFC after:	1 weeks
2016-05-18 08:19:41 +00:00
Andriy Gapon
74a3df2b1f zfsctl_freebsd_root_lookup: gfs_vop_lookup may return a doomed vnode
gfs code is (almsot) completely agnostic of FreeBSD VFS locking, so it
does not handle doomed but not yet dead vnodes and may return them.
Check for those vnodes here and retry a lookup.
Note that ZFS and gfs have additional protections that ensure that a
parent vnode of the current vnode is never doomed.

The fixed problem is an occasional failure to lookup a 'snapshot' or
'shares' directories under .zfs.

Note that for the above reason all uses of zfsctl_root_lookup() are
better be replaced with VOP_LOOKUP.

MFC after:	5 weeks
2016-05-18 08:02:49 +00:00
Sepherosa Ziehau
a2dc39b5e6 hyperv/vmbus: Use consistent device description as other devices
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6418
2016-05-18 07:18:11 +00:00
Adrian Chadd
dbc06ae538 [siba] fix incorrect SPROM offsets.
All my fault.
2016-05-18 07:17:30 +00:00
Sepherosa Ziehau
4910efc98e hyperv/vmbus: Minor function definition style fixup
Reviewed by:	Jun Su <junsu microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6417
2016-05-18 07:09:44 +00:00
Sepherosa Ziehau
50b2a96140 hyperv/vmbus: Fix SYSINIT function prototype and usage.
Reviewed by:	Jun Su <junsu microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6416
2016-05-18 07:01:32 +00:00
Adrian Chadd
957d19d07c [siba] use the correct SPROM offsets.
I transcribed the linux ssb offsets and .. didn't pick up that our SIBA
SPROM code has an offset of 0x1000.

This fixes a bunch of odd parsing values that showed up when I tried
using a newer NIC.  The NIC still doesn't yet work but now the SPROM
values are right.

Oops!
2016-05-18 07:01:22 +00:00
Sepherosa Ziehau
6279cdb1fb hyperv/vmbus: Reindent and cleanup devmethods.
While I'm here, use DEVMETHOD_END.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6415
2016-05-18 06:52:20 +00:00
Sepherosa Ziehau
1c21090e08 hyperv/vmbus: Staticize vmbus_devclass
Reviewed by:	Jun Su <junsu microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6414
2016-05-18 06:43:15 +00:00
Sepherosa Ziehau
27ba130d14 hyperv: Set vm_guest to VM_GUEST_VM, if hypervisor is not Hyper-V
Reviewed by:	kib
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6412
2016-05-18 06:36:28 +00:00
Sepherosa Ziehau
9627a270d2 hyperv/vmbus: Nuke unnecessary function indirection
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6411
2016-05-18 06:29:03 +00:00
Sepherosa Ziehau
fee8b5f96d hyperv/vmbus: Remove useless modevent handler
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6410
2016-05-18 06:19:22 +00:00
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Glen Barber
c42a9b6a73 Revert r300003, and use proper grammar.
While here, bump .Dd, which should have been done with
previous commit.
2016-05-18 06:00:32 +00:00
Warner Losh
9a0b26ec6f Fix several instances where the boot loader ignored pager_output
return value when it could return 1 (indicating we should stop).
Fix a few instances of pager_open() / pager_close() not being called.
Actually use these routines for the environment variable printing code
I just committed.
2016-05-18 05:59:05 +00:00
Warner Losh
4a619be4bb Fix build breakage on arm64 by papering over the problem. We implement
a slightly non-standard %S that's more useful in the UEFI environment,
so ignore printf errors. There's no good cast to use. We'll need to
revisit this in the future.
2016-05-18 05:58:58 +00:00
Warner Losh
0f897f87b9 Explain why extra sutff always outputs even when it shouldn't for the
'?' command. Wasted a bunch of time tracking it down tonight.
2016-05-18 05:58:57 +00:00
Adrian Chadd
a74bf02069 [bwn] add initial 5xx firmware API support
* Add the new TX/RX frame formats;
* Use the right TX/RX format based on the frame info;
* Disable the 5xx firmware check, since now it should
  somewhat work (but note, we don't yet use it unless
  you manually add ucode11/initvals11 from the 5.x driver
  to bwn-kmod-firmware;

* Misc: update some comments/debugging now I know what's
  actually going on.

Tested:

* BCM4321MC, STA mode, both 4xx and 666 firmware, DMA mode

TODO:

* The newer firmware ends up logging "warn: firmware state (0)";
  not sure yet what's going on there.  But, yes, it still works.
  I'm committing this via a BCM4321MC, 11a station, firmware
  rev 666.

Obtained from:	Linux b43 (TX/RX descriptor format for 5xx)
2016-05-18 05:56:25 +00:00
Scott Long
4c7070db25 Import the 'iflib' API library for network drivers. From the author:
"iflib is a library to eliminate the need for frequently duplicated device
independent logic propagated (poorly) across many network drivers."

Participation is purely optional.  The IFLIB kernel config option is
provided for drivers that want to transition between legacy and iflib
modes of operation.  ixl and ixgbe driver conversions will be committed
shortly.  We hope to see participation from the Broadcom and maybe
Chelsio drivers in the near future.

Submitted by:   mmacy@nextbsd.org
Reviewed by:    gallatin
Differential Revision:  D5211
2016-05-18 04:35:58 +00:00