Commit Graph

201753 Commits

Author SHA1 Message Date
Dimitry Andric
b41932d54e Add llvm patch corresponding to r285149. 2015-07-04 20:09:24 +00:00
Dimitry Andric
5f4899dbfe Pull in r241142 from upstream llvm trunk (by David Majnemer):
[SCCP] Turn loads of null into undef instead of zero initialized values

  Surprisingly, this is a correctness issue: the mmx type exists for
  calling convention purposes, LLVM doesn't have a zero representation for
  them.

  This partially fixes PR23999.

Pull in r241143 from upstream llvm trunk (by David Majnemer):

  [LoopUnroll] Use undef for phis with no value live

  We would create a phi node with a zero initialized operand instead of
  undef in the case where no value was originally available.  This was
  problematic for x86_mmx which has no null value.

These fix a "Cannot create a null constant of that type!" error when
compiling the graphics/sdl2_gfx port with MMX enabled.

Reported by:	amdmi3
2015-07-04 20:07:37 +00:00
Justin Hibbits
0936003e3d Use the correct type for physical addresses.
On Book-E, physical addresses are actually 36-bits, not 32-bits.  This is
currently worked around by ignoring the top bits.  However, in some cases, the
boot loader configures CCSR to something above the 32-bit mark.  This is stage 1
in updating the pmap to handle 36-bit physaddr.
2015-07-04 19:00:38 +00:00
Alexander Motin
8656f200dc Change comment added in r284540.
This appeared to be not card's issue, but driver's, though solution is
the same so far.
2015-07-04 18:51:54 +00:00
Alexander Motin
6bef0aa0c6 Drop discovered targets when initiator role is disabled. 2015-07-04 18:38:46 +00:00
Marcelo Araujo
68c32d3559 Remove duplicate header string.h. 2015-07-04 18:36:02 +00:00
Justin Hibbits
398973f809 Add machine check register printing
This will print out the Memory Subsystem Status Register on MPC745x (G4+ class),
and the Machine Check Status Register on Book-E class CPUs, to aid in debugging
machine checks.  Other relevant registers, for other CPUs, can be added in the
future.
2015-07-04 18:16:41 +00:00
Marcelo Araujo
a6c4189636 Remove unused variable flags reported by clang. The function zygote_clone()
always receive the flags with value 0 and this flags is never checked on
zygote_main().

Differential Revision:	D2689
Reviewed by:		rodrigc, oshogbo
2015-07-04 17:38:56 +00:00
George V. Neville-Neil
3839369c03 Enable IPSEC in all GENERIC kernels.
Universe and kernel build tests passed 4 July 2015

PR:		128030
Sponsored by:	Rubicon Communications (Netgate)
2015-07-04 17:37:00 +00:00
Marcelo Araujo
ddcc2ecb3a Remove unused variable to silence clang warning.
Differential Revision:	D2683
Reviewed by:		rodrigc, bapt
2015-07-04 17:22:07 +00:00
Mariusz Zaborski
fd10995478 Add fdclose(3) function.
This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.

Reviewed by:	wblock, jilles, jhb, pjd
Approved by:	pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D2697
2015-07-04 16:42:14 +00:00
Mariusz Zaborski
54f98da930 Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv.

The goal of this operation is to NOT install header files which shouldn't
be used outside the nvlist library.

Approved by:	pjd (mentor)
2015-07-04 16:33:37 +00:00
Luiz Otavio O Souza
06844c0f7e Install loader.rc with ARM u-boot loader (ubldr).
loader.rc is the responsible to read and process loader.conf variables.

This fix the issue of loader.conf being silently ignored.

MFC after:	3 days
2015-07-04 16:19:38 +00:00
Baptiste Daroussin
1f8d909274 Fix validation of crypted password
Small cleanups
2015-07-04 15:56:59 +00:00
Baptiste Daroussin
9d028e08ce Also validate inputs of pw groupmod -h and groupmod -H 2015-07-04 15:54:11 +00:00
Mateusz Guzik
9ca30b0e06 vfs: use shared vnode locking when looking up ".." in vop_stdvptocnp
Briefly discussed with: kib
2015-07-04 15:46:39 +00:00
Mateusz Guzik
dba0bec2bb fd: de-k&r-ify functions + some whitespace fixes
No functional changes.
2015-07-04 15:42:03 +00:00
Baptiste Daroussin
11621f9650 Validate input of pw usermod -h and pwusermod -H
Push the code that set the password into a separate function to improve
readability

Add regression tests about pw usermod -h and pw usermod -H
2015-07-04 15:27:04 +00:00
Mateusz Guzik
ee5f66f820 sysctl: get rid of sysctl_lock/unlock
Inline their contents into the only consumer.
2015-07-04 14:44:39 +00:00
Mariusz Zaborski
07929e4e77 Remove non-existent dnvlist functions.
Approved by:	pjd (mentor)
2015-07-04 10:33:33 +00:00
Mariusz Zaborski
58c86148dd Move nvlist documentation to the FreeBSD Kernel Developer's sections.
Approved by:	pjd (mentor)
2015-07-04 10:27:30 +00:00
Edward Tomasz Napierala
19c46d8cf7 Staticize some stuff in mountd(8); no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-07-04 08:40:48 +00:00
John-Mark Gurney
64ff224dd5 improve dependencies for this module a bit... not great, but at
least gives some basics...  I would add them to DPSRC, but due to the
intrinsics headers, they can't be added...
2015-07-04 08:16:32 +00:00
Mateusz Guzik
d5fc115a1a sysctl: remove a debugging printf which crept in with r285125 2015-07-04 07:01:43 +00:00
Mateusz Guzik
b8633775a8 sysctl: switch sysctllock to a sleepable rmlock
The lock is almost never taken for writing.
2015-07-04 06:54:15 +00:00
Warner Losh
8cad626fbb Cache _MPATH and pass it down into the modules build. Some NFS setups
make the find it does extremely expensive, so compute it only
once. Also make sure the 'traditional' module building method works at
the expense of a bit of duplicated code.
2015-07-04 05:43:45 +00:00
Adrian Chadd
3e307100f6 Quieten the scorpion SoC/WMAC reset path. Stuff the non-error stuff
under HALDEBUG().
2015-07-04 03:15:42 +00:00
Adrian Chadd
35aae619d7 Call the WMAC DDR flush before handling an interrupt for the
Atheros AHB (internally) connected MAC.

TODO:

* verify the interrupt was for us before doing the DDR flush.
2015-07-04 03:07:28 +00:00
Adrian Chadd
c37904e8ba Reshuffle all of the DDR flush operations into a single switch/mux,
and start teaching subsystems about it.

The Atheros MIPS platforms don't guarantee any kind of FIFO consistency
with interrupts in hardware.  So software needs to do a flush when it
receives an interrupt and before it calls the interrupt handler.

There are new ones for the QCA934x and QCA955x, so do a few things:

* Get rid of the individual ones (for ethernet and IP2);
* Create a mux and enum listing all the variations on DDR flushes;
* replace the uses of IP2 with the relevant one (which will typically
  be "PCI" here);
* call the USB DDR flush before calling the real USB interrupt handlers;
* call the ethernet one upon receiving an interrupt that's for us,
  rather than never calling it during operation.

Tested:

* QCA9558 (TP-Link archer c7 v2)
* AR9331 (Carambola 2)

TODO:

* PCI, USB, ethernet, etc need to do a double-check to see if the
  interrupt was truely for them before doing the DDR.  For now I
  prefer "correct" over "fast".
2015-07-04 03:05:57 +00:00
Adrian Chadd
52f5515397 Wake up the hardware before doing anything in sysctl.
This stops the panics that occur on MIPS platforms when doing say,
'sysctl dev.ath.0' whilst the MAC is asleep.  The MIPS platform is
rather unforgiving in getting power-save register access wrong and you
will get all kinds of odd failures if you don't have things woken
up at the right times.

Tested:

* QCA9558 (TP-Link Archer C7 v2)
* AR9331 (Carambola 2)

.. with no VAPs configured and ath0 down (thus the MAC is definitely
   asleep.)

PR:		kern/201117
2015-07-04 02:59:30 +00:00
Julio Merino
30161d035c Add support for TEST_METADATA
Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

MFC after:	1 week
2015-07-04 02:37:36 +00:00
Julio Merino
18bafc4da9 Add missing shebang
Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after:	1 week
2015-07-04 02:24:47 +00:00
Julio Merino
8e79f15196 Make cleanup routines idempotent
cleanup routines can be executed at any point during the execution of the
body, including even before the body has done any real work.  In those
cases, cleanup routines should be careful to not raise spurious errors so
as to not "override" the actual result of the test case.

This is just general good coding style but is not a problem in practice
for these specific tests.  (The way I discovered the issue, though, was
due to a regression I introduced in Kyua itself while refactoring some
internals.)

MFC after:	1 week
2015-07-04 02:22:26 +00:00
Glen Barber
a1c0309edc Revert r285018, r285019, r285076, r285078, r285082.
The true cause of the missing UFS/MSDOSFS labels has been
identified, and only affects stable/10 at the moment.

An request for commit to stable/10 will be pending RE approval
after this commit.

MFC after:	1 day
X-MFC-Note:	never
X-MFC-Never:	r285018, r285019, r285076, r285078, r285082
Sponsored by:	The FreeBSD Foundation
2015-07-04 00:01:41 +00:00
Rick Macklem
2a3508eb48 If a "principal" argument isn't provided for a Kerberized NFS mount,
the kernel would generate a bogus one with a ":/<path>" suffix.
This would only occur for the case where there was no explicit
"principal" argument and the getaddrinfo() call in mount_nfs.c failed to a
return a cannonical name for the server.
This patch fixes this unusual case.

PR:		201073
Submitted by:	masato@itc.naist.jp
MFC after:	2 weeks
2015-07-03 22:11:07 +00:00
George V. Neville-Neil
7c160e33d7 Update the date on the manual page.
Noticed by: bz
2015-07-03 20:42:31 +00:00
George V. Neville-Neil
987de84445 New AES modes for IPSec, user space components.
Update setkey and libipsec to understand aes-gcm-16 as an
encryption method.

A partial commit of the work in review D2936.

Submitted by:	eri
Reviewed by:	jmg
MFC after:	2 weeks
Sponsored by:	Rubicon Communications (Netgate)
2015-07-03 20:09:14 +00:00
Andrey V. Elsukov
cb207f93ca Keep IPv6 address specified by IPV6_PKTINFO socket option in kernel
internal form to be able handle link-local IPv6 addresses.

Reported by:	kp
Tested by:	kp
2015-07-03 19:01:38 +00:00
Luiz Otavio O Souza
50ad20b383 Add the routines to activate the GMAC clock and setup the GMAC mode.
Tested on Cubieboard 2 and Banana pi.
2015-07-03 18:39:25 +00:00
Luiz Otavio O Souza
9639a6c7c9 Rename a10_emac_gpio_config() to a10_gpio_ethernet_activate() to make the
change to GMAC easier on A20 SoCs.

On A10 only the EMAC controller is available (fast ethernet), but on A20
there is also GMAC a high (or better) performant controller (gigabit
ethernet).

On A20 the both controllers uses the same pins to talk to the ethernet PHY
(MII or RGMII) and they can be selected by the GPIO pin mux.

There is work in progress to bring in GMAC support.
2015-07-03 17:54:41 +00:00
Konstantin Belousov
eb89622653 Grammar and language fixes.
Submitted by:	wblock
Review:	https://reviews.freebsd.org/D2969
MFC after:	12 days
2015-07-03 17:30:31 +00:00
Luiz Otavio O Souza
2e33d3583d Remove duplicate and unnecessary includes.
While here remove an unused and wrong define.
2015-07-03 17:09:27 +00:00
Edward Tomasz Napierala
a2c782d103 Make ctl(4) appear in "man -k iscsi" results.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-03 16:55:08 +00:00
Marcel Moolenaar
15abbe5137 Minor update to the proto(4) man page:
1.  We now support ISA devices
2.  DMA support has been added
2015-07-03 16:20:14 +00:00
Marcel Moolenaar
194709a520 Remove commented-out and non-existent cbus(4) attachment for uart(4). 2015-07-03 16:02:06 +00:00
Marcel Moolenaar
472aa69925 Allow proto(4) to be compiled into the kernel. 2015-07-03 15:56:00 +00:00
Ermal Luçi
c1fc5e9601 Reduce overhead of IPSEC for traffic generated from host
When IPSEC is enabled on the kernel the forwarding path has an optimization to not enter the code paths
for checking security policies but first checks if there is any security policy active at all.

The patch introduces the same optimization but for traffic generated from the host itself.
This reduces the overhead by 50% on my tests for generated host traffic without and SP active.

Differential Revision:	https://reviews.freebsd.org/D2980
Reviewed by:	ae, gnn
Approved by:	gnn(mentor)
2015-07-03 15:31:56 +00:00
Ruslan Bukin
4ebd95ae06 o Add a description for virtio block device implemented
in PISM (Bluespec C-interface device)
o Add a kernel config

Sponsored by:	HEIF5
2015-07-03 14:46:57 +00:00
Ruslan Bukin
4934834d6b Allow BERI virtio-platform code to operate with no PIO devices specified.
We will use it with Bluespec simulator of CHERI processor for invalidating
caches only.
2015-07-03 14:27:28 +00:00
Ruslan Bukin
116b8d2b0b Add 'prewrite' method allowing us to run some platform-specific
code before each write happens, e.g. write-back caches.
This will help booting in Bluespec simulator of CHERI processor.
2015-07-03 14:13:16 +00:00