Commit Graph

221203 Commits

Author SHA1 Message Date
Alan Somers
48415c8b1b Increase WARNS for libproc tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:09:30 +00:00
Alan Somers
b70d2a2aa5 Increase WARNS for libpathconv tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:08:46 +00:00
Alan Somers
528c1219c7 Increase WARNS for libmp tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:08:11 +00:00
Alan Somers
51f86375f4 Increase WARNS for libcrypt tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:07:04 +00:00
Alan Somers
a55051c487 Document that the msun tests require WARNS=0
ATF tests have a default WARNS of 0, unlike other usermode programs.  This
change is technically a noop, but it documents that the msun tests don't
work with any warnings enabled, at least not on all architectures.

Reviewed by:  ngie
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:04:59 +00:00
Alan Somers
5a5a9018dc Increase WARNS for nss tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933
2017-03-11 00:03:41 +00:00
Alan Somers
b08fc26cbd Increase WARNS for iconv tests
ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:	ngie
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
Differential Revision:	https://reviews.freebsd.org/D9933
2017-03-11 00:02:05 +00:00
Oleksandr Tymoshenko
5faab58bd0 [fdt] Make DTBs generated by make_dtb.sh overlay-ready
Generate symbols node when compiling dts files so they can be modified
during boot-time by applying overlays.
2017-03-10 22:45:07 +00:00
Alexander Motin
ad0f05e629 Abort all ATIOs and INOTs queued to SIM on LUN disable.
Some SIMs may not abort them implicitly, that either fail the LUN disable
request or just make us wait for those CCBs forever.  With this change
I can successfully disable LUNs on mpt(4).  For isp(4), which aborts them
implicitly, this change should be irrelevant.

MFC after:	2 weeks
2017-03-10 21:09:33 +00:00
Alexander Motin
832529c5bd Switch work_queue from TAILQ to STAILQ.
It is mostly FIFO and we don't need random removal there.

MFC after:	2 weeks
2017-03-10 20:20:00 +00:00
Alexander Motin
45400376e0 Request change of SIM target role only when it is different.
Separate WWNs change into separate request to know what actually failed.

MFC after:	2 weeks
2017-03-10 19:43:45 +00:00
Oleksandr Tymoshenko
947d877109 [loader][fdt] Fix applying overlays without __local_fixups__ node
Do not return error if __local_fixups__ node is missing in DTB overlay
because local fixup data is optional.

Reported by:	Manuel Stuhn
MFC after:	1 week
2017-03-10 19:15:57 +00:00
Mark Johnston
7554e75851 Typo.
MFC after:	3 days
2017-03-10 19:13:38 +00:00
Gleb Smirnoff
d9646465e3 Typo. 2017-03-10 19:08:31 +00:00
Dimitry Andric
817a00731b Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
We were already very close to the last release candidate, so this is a
pretty minor update.

Relnotes:	yes
MFC after:	1 month
X-MFC-With:	r314564
2017-03-10 19:02:41 +00:00
Oleksandr Tymoshenko
dc17dead6f [dtc] regenerate version file if upstream Makefile has been changed
Keep version file in sync by adding dependency to upstream Makefile
2017-03-10 17:37:55 +00:00
Oleksandr Tymoshenko
b718842baa Merge from vendor branch importing dtc 1.4.3
Major new feature in this import is FDT overlay support
2017-03-10 17:36:05 +00:00
Sean Bruno
09dced1093 r314948 seems to be missing a variable or two that will break
TFTP/MFSRoot booting via PXE.  For the TFTP_LOADER case, go ahead and
fire off the old bootp() request to ensure that whatever is missing is
populated.

Sponsored by:	Limelight Networks
2017-03-10 17:14:08 +00:00
Pedro F. Giffuni
e12a957f8d localedef(1): Add comment markings for license. 2017-03-10 16:12:16 +00:00
Pedro F. Giffuni
56b1edd680 localedef(1): Fix mismatch.
Obtained from:	illumos
X-MFC with:	r314974
2017-03-10 16:06:14 +00:00
Jilles Tjoelker
8999a290ab sh: Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst).
The parsed internal representation of words consists of a byte string with a
list of nodes (commands in command substitution). Each unescaped CTLBACKQ or
CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list.

If param in ${param#%##%%word} is not set, the word is not expanded (in a
deviation of POSIX shared with other ash variants and ksh93). Erroneously,
the pointer in the list of commands (argbackq) was not advanced. This caused
the wrong command to be executed later if the outer word contained another
command substitution.

Example:
  echo "${unsetvar#$(echo a)}$(echo b)"
wrote "a" but should write "b".

MFC after:	1 week
2017-03-10 16:04:00 +00:00
Alexander Motin
ead3ad6b5c Add PIM_EXTLUNS support to mpt(4).
Target mode is still limited to 256 LUNs due to the way driver is written,
but initiator can now use full 8 byte LUN space.

MFC after:	2 weeks
2017-03-10 14:44:59 +00:00
Bruce Evans
eeb7d30e06 Rename scteken_revattr() to scteken_sc_to_te_attr(). scteken_revattr()
looked like it might handle reverse attributes, but it actually handles
conversion of attributes in the direction indicated by the new name.
Reverse attributes are just broken.

Rename scteken_attr() to scteken_te_to_sc_attr().  scteken_attr() looked
like it might give teken attributes, but it actually gives sc attributes.

Change scteken_te_to_sc_attr() to return int instead of unsigned int.
u_char would be enough, and it promotes to int, and syscons uses int
or u_short for its attributes everywhere else (u_short holds a shifted
form and it promotes to int too).
2017-03-10 14:25:38 +00:00
Alexander Motin
501b16854f Improve residuals reporting in target mode.
MFC after:	2 weeks
2017-03-10 13:39:16 +00:00
Alexander Motin
4461a4a5ed Fix panic on wildcard target LUN disable.
MFC after:	2 weeks
2017-03-10 13:14:06 +00:00
Bruce Evans
8f2cc27067 Start fixing some bugs in attribute handling.
This change just does cleanups missed in r56043 17 years ago.  The
default attributes were still stored in structs for the purpose of
changing them and passing around pointers to the defaults, but r56043
added another layer that made the defaults invariant and only used for
initialization and reset.  Just use the defaults directly.  This was
already done for the kernel defaults.  The defaults for reverse
attributes aren't actually used, but are ignored in layers that no
longer support them.
2017-03-10 11:44:09 +00:00
Alexander Motin
93612a52c7 Fix FC target mode in mpt(4), broken in multiple ways.
- Not set BufferLength caused receive of empty ATIOs.
 - CDB length guessing was broken at least for RC16.
 - mpt_req_untimeout() was called with wrong req parameter.
 - Sense data reporting was broken in several ways.

With this change my LSI7204EP-LC can pass at least basic tests as target.
The code is still far from perfect, but finally I found second hw/driver
after isp(4) that really can work in CAM target mode.

MFC after:	2 weeks
2017-03-10 10:35:52 +00:00
Bruce Evans
1b835e81ca Fix compilation on sparc64. The frame buffer address is in a field that
is unavailable on sparc64 only.  This makes the new ec_putc() a non-op
on sparc64 but still calls it.  On other non-x86 arches, it should
compile but might not work.

Reported by:	gjb
2017-03-10 10:25:48 +00:00
Mahdi Mokhtari
32a1fb0d3d Fix NULL pointer dereference and panic with shm file pread/pwrite.
PR:		217429
Reported by:	Tim Newsham <tim.newsham@nccgroup.trust>
Reviewed by:	kib
Approved by:	dchagin
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9844
2017-03-10 10:09:44 +00:00
Jeremie Le Hen
fde6665233 Add a very natural, binary version of the ASCII table.
Reviewed by:	bcr, eadler
Obtained from:	https://garbagecollected.org/2017/01/31/four-column-ascii/
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D9902
2017-03-10 09:58:10 +00:00
Marcelo Araujo
c86932b61b Use nitems() from sys/param.h.
Reviewed by:	ngie
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9940
2017-03-10 06:25:54 +00:00
Marcelo Araujo
97942dfb4f Use nitems() from sys/param.h.
Reviewed by:	ngie
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9936
2017-03-10 06:23:15 +00:00
Marcelo Araujo
4e7ecee633 Use nitems() from sys/param.h and also remove the cast.
Reviewed by:	markj
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9937
2017-03-10 04:49:40 +00:00
Marcelo Araujo
807bd0d9f0 Use nitems() from sys/param.h.
Reviewed by:	ume
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9938
2017-03-10 04:30:31 +00:00
Marcelo Araujo
a0fb90916a Use nitems() from sys/param.h.
Reviewed by:	asomers
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9944
2017-03-10 04:24:21 +00:00
Oleksandr Tymoshenko
f059bd1ebf Import dtc 1.4.3
Obtained from:  https://www.kernel.org/pub/software/utils/dtc/dtc-1.4.3.tar.gz
2017-03-10 03:28:43 +00:00
Dimitry Andric
16787c9ce0 Vendor import of lld 4.0.0 release r297347:
https://llvm.org/svn/llvm-project/lld/tags/RELEASE_400/final@297347
2017-03-09 22:51:16 +00:00
Dimitry Andric
868847c690 Vendor import of libc++ 4.0.0 release r297347:
https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_400/final@297347
2017-03-09 22:51:07 +00:00
Dimitry Andric
b52119637f Vendor import of clang 4.0.0 release r297347:
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final@297347
2017-03-09 22:50:47 +00:00
Dimitry Andric
31bbf64f3a Vendor import of llvm 4.0.0 release r297347:
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_400/final@297347
2017-03-09 22:50:27 +00:00
Pedro F. Giffuni
1bb0ddf99d localedef(1): Fix small coverity issues.
- Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
- Buffer not null terminated (BUFFER_SIZE_WARNING)

CID:	1338557, 1338565

Obtained from:	illumos
MFC after:	5 days
2017-03-09 21:49:11 +00:00
Konstantin Belousov
12c81769b6 Avoid bind lock recursion.
When dlclose(3) unloads an object with filtees, it recursively calls
dlclose(3) on each filtee in free_needed_filtees().  Introduce
dlclose_locked() helper, called from free_needed_filtees() instead of
dlclose(), and pass the bind lockstate down to avoid recursing.

Reported and tested by:	jhibbits
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-09 21:05:47 +00:00
Pedro F. Giffuni
c48c87b790 Revert r314969, r314961:
The localdef(1) changes are breaking world:

00:18:40.750 /usr/src/share/colldef/af_ZA.UTF-8.src: 2421: error: Bad file
descriptor

I will fix them offline.

Reported by:	lwshu and many others
2017-03-09 19:02:36 +00:00
Hans Petter Selasky
f73286645f Fix implementation of the DECLARE_WORK() macro in the LinuxKPI to fully
initialize the declared work structure and not only the function callback
pointer.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-03-09 18:37:17 +00:00
Hans Petter Selasky
9760ac0a3e Implement support for mutexes with deadlock avoidance in the LinuxKPI.
When locking a mutex and deadlock is detected the first mutex lock
call that sees the deadlock will return -EDEADLK .

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-03-09 18:33:40 +00:00
Pedro F. Giffuni
5f6fcdca5b localedef(1): Fix mismatch in previous commit.
delete_category is meant to replace fclose() and unlink().
This broke world.

Found by:	kib
Pointedhat:	pfg
2017-03-09 18:06:48 +00:00
Alexander Motin
471f963d40 Report some more data in XPT_PATH_INQ.
I am not sure they are used anywhere, but why not.

MFC after:	2 weeks
2017-03-09 17:53:37 +00:00
Alexander Motin
555dbebf3d Add support for XPT_GET_SIM_KNOB in FC mode.
MFC after:	2 weeks
2017-03-09 17:35:35 +00:00
Alexander Motin
4f38902fba Report FC link speed.
MFC after:	2 weeks
2017-03-09 17:06:34 +00:00
Hans Petter Selasky
4f688d19fb Cleanup the LinuxKPI mutex wrappers.
Add support for using mutexes during KDB and shutdown. This is also
required for doing mode-switching during panic for drm-next.

Add new mutex functions mutex_init_witness() and mutex_destroy()
allowing LinuxKPI mutexes to be tracked by witness.

Declare mutex_is_locked() and mutex_is_owned() like inline functions
to get cleaner warnings. These functions are used inside WARN_ON()
statements which might look a bit odd if these functions get fully
expanded.

Give mutexes better debug names through the mutex_name() macro when
WITNESS_ALL is defined. The mutex_name() macro can prefix parts of the
filename and line number before the mutex name.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-03-09 17:01:00 +00:00