Commit Graph

196383 Commits

Author SHA1 Message Date
dim
80ec3980a5 MFC r269948:
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by:	Jos Chrispijn <ports@webrz.net>
2014-08-17 13:08:15 +00:00
kib
94d67906ea MFC r269457:
Remove Giant acquisition from the mount and unmount pathes.
2014-08-17 09:07:21 +00:00
mjg
75d88c0d5a MFC r269020:
Cosmetic changes to unp_internalize

Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.
2014-08-17 07:24:23 +00:00
mjg
fd678d23e5 MFC r268636:
Plug p_pptr null test in do_execve. It is always true.
2014-08-17 07:22:40 +00:00
mjg
46f8d5c454 MFC r268634:
Manage struct sigacts refcnt with atomics instead of a mutex.
2014-08-17 07:20:37 +00:00
mjg
789b35542c MFC r264114, r264310, r268570:
r264114 by davidxu:

Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

r264310 by davidxu:

Add kqueue support for devctl.

r268570:

Clear nonblock and async on devctl close instaed of open.

This is a purely cosmetic change.
2014-08-17 07:16:03 +00:00
mjg
9e281fe64e MFC r268514:
Eliminate plim and vtmp local vars in exit1.

No functional changes.
2014-08-17 07:06:55 +00:00
mjg
8a70582e79 MFC r259407:
proc exit: don't take PROC_LOCK while freeing rlimits

Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.
2014-08-17 07:05:30 +00:00
mjg
ce59684e4d MFC r268505, r268507:
Avoid relocking filedesc lock when closing fds during fdp destruction.

Don't call bzero nor fdunused from fdfree for such cases. It would do
unnecessary work and complain that the lock is not taken.

=======

Don't zero fd_nfiles during fdp destruction.

Code trying to take a look has to check fd_refcnt and it is 0 by that time.

This is a follow up to r268505, without this the code would leak memory for
tables bigger than the default.
2014-08-17 07:00:47 +00:00
mjg
8fa92f4d0b MFC r268365:
Don't call crdup nor uifind under vnode lock.

A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.
2014-08-17 06:58:14 +00:00
mjg
98ac4e9b08 MFC r268136:
Plug gcc warning after r268074 about unitialized newsigacts
2014-08-17 06:56:22 +00:00
mjg
9cebe2439f MFC r268087:
Don't call crcopysafe or uifind unnecessarily in execve.
2014-08-17 06:54:49 +00:00
mjg
f377401ca1 MFC r268074:
Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.
2014-08-17 06:52:35 +00:00
grehan
766feae596 MFC r267338
Replace enum forward declarations with complete definitions
2014-08-17 03:01:56 +00:00
ian
93369e5cce MFC r269688: m4 now requires libohash, build it when bootstrapping. 2014-08-17 02:40:44 +00:00
ian
504042caa3 MFC r269769, r269770:
Use a separate variable for resource id, because 'i' may increment at a
  rate greater than 1 on each iteration.

  Handle various ways that interrupt config data can be malformed by
  warning and assuming more or less reasonable values.
2014-08-17 01:59:54 +00:00
ian
266195b56b MFC r269646: Use a SYSINIT to init the array of interrupt names on arm. 2014-08-17 01:48:12 +00:00
ian
704fa959ad MFC r269607, r269698:
Cache the imx6 SoC type in a static var so that it only has to be figured
  out by sniffing hardware registers once.

  Add a missing clock register definition.
2014-08-17 01:32:33 +00:00
ian
2cc6abb7fb MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS.

  Define names that drivers can use to adjust their position relative to
  other drivers within a BUS_PASS

  Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
  a platform can attach some other bus first if necessary.

  Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.

  Attach arm generic interrupt and timer drivers in the middle of
  BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

  Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
  device attachment on arm platforms.  If this is defined, nexus attaches
  early in BUS_PASS_BUS, and other busses and devices attach later, in the
  pass number they are set up for.  Without it defined, nexus attaches in
  BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
2014-08-17 01:28:03 +00:00
grehan
46d28d66fb MFC r267311, r267330, r267811, r267884
Turn on interrupt window exiting unconditionally when an ExtINT is being
injected into the guest.

Add helper functions to populate VM exit information for rendezvous and
astpending exits.

Provide APIs to directly get 'lowmem' and 'highmem' size directly.

Expose the amount of resident and wired memory from the guest's vmspace
2014-08-17 01:23:52 +00:00
grehan
c00f011a6e MFC r267178, r267300
Support guest accesses to %cr8

Add reserved bit checking when doing %CR8 emulation and inject #GP if required.
2014-08-17 01:16:40 +00:00
ian
799b3dd5bf MFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s. 2014-08-17 01:15:34 +00:00
grehan
7a365d2c05 MFC r267216
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained
by vmm.ko. This allows the virtual machine to be restarted without having
to destroy it first.
2014-08-17 01:00:42 +00:00
grehan
e83027edbb MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.
2014-08-17 00:52:07 +00:00
rmacklem
c64921fe8d MFC: r269771
Change the NFS server's printf related to hitting
the DRC cache's flood level so that it suggests
increasing vfs.nfsd.tcphighwater.
2014-08-16 21:36:22 +00:00
bz
fe69d82910 MFC r264601,264646,265766,267918,267919,267920:
Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded
 CPU Ethernet Core.

 The current version operates on a simple PIO based interface connected
 to a NetFPGA-10G port.

 To avoid confusion: this driver operates on a CPU running on the FPGA,
 e.g. BERI/mips, and is not suited for the PCI host interface.

 Adjust the register layout to allow for 64bit registers in the
 future for nf10bmac(4).  Also, add support for and enable RX interrupts.

 Allow switching between 32bit and 64bit bus width data access at compile
 time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
 variable and return value widths.

 Adjust comments to indicate the 32 or 64bit register widths.

Relnotes:	yes
Sponsored by:	DARPA/AFRL
2014-08-16 14:30:46 +00:00
bz
919a837058 MFC r263632:
For BERI on NetFPGA assume HZ=100 by default.

 Remove the uart support in favour of a "jtag-uart" interface imitation
 providing a much simpler interface, directly exported to the host,
 allowing the toolchain to be shared with BERI on Altera. [1]

 Submitted by:	Jong Hun HAN (jong.han cl.cam.ac.uk) [1]
Sponsored by:	DARPA/AFRL
2014-08-16 14:21:03 +00:00
bz
62c1685fc5 MFC r264542:
Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
 rather than the magic number 2.

 While here fix a typo in a comment.

 No functional changes.

Sponsored by:	DARPA/AFRL
2014-08-16 14:17:09 +00:00
bz
fdfedc3bb4 MFC r264605:
Based on xlp_machdep.c and completed the list of options based on
 boot/mips/beri/loader/metadata.c allow FDT configuration to set
 command line options.
 This leads to an interesting quesiton of future interactions with loader.
 However for configurations without loader this allows bootverbose or boot
 single user to be set by compiling a new kernel, which is good enough for
 testing and debugging.

 Reviewed by:	rwatson
Sponsored by:	DARPA/AFRL
2014-08-16 14:14:29 +00:00
bz
1344b41f0b MFC r266907:
While PAWS is disabled, there are no consumers for the tcp options
 argument to tcp_twcheck();  thus mark it __unused.
2014-08-16 14:09:26 +00:00
bz
9d2fdc5f67 MFC r266620:
Remove the prototpye for the static inline function
 tcp_signature_verify_input().
 The function is defined before first use already.
2014-08-16 14:05:31 +00:00
bz
f8953220b8 MFC r266619:
syncache_lookup() is a file local function.  Make it static and
 take it out of the public KPI; seems it was never used elsewhere.
2014-08-16 14:03:00 +00:00
bz
a0d3819845 MFC r266618:
Make tcp_twrespond() file local private;  this removes it from the
 public KPI; it is not used anywhere else and seems it never was.
2014-08-16 13:58:45 +00:00
bz
5876bf013b MFC r266606:
Only do a ports check if this is a NAT-T SA.  Otherwise other
 lookups providing ports may get unexpected results.
2014-08-16 13:55:44 +00:00
bz
dd062e6c84 MFC r266597:
Remove the prototypes for things that are no longer file local but were
 moved to the header file.

 Was suppoed to be MFCed with: r266596
 Pointy hat to:	bz
2014-08-16 13:53:05 +00:00
bz
6f5b0b94bc MFC r266596:
Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
 functions to the tcp_var.h header file in order to avoid further
 duplication with upcoming commits.

 Reviewed by:	np
2014-08-16 13:50:15 +00:00
bz
a771dfd28a MFC r264539:
When switching variables to flags in r243185 a few cases were missed.
 After r263152 (in head) this leaves unused variables if route(8) is
 compiled without INET support.
 Switch the remaining variable accesses to flags and remove now obsolete
 variables.

 Reviewed by:	glebius
2014-08-16 13:47:04 +00:00
bz
4e0609eb85 MFC r261525:
Print the MD5 signature information introduced in r221023 (head) in the
 TCP statistics output.
2014-08-16 13:25:49 +00:00
bz
10ac38c809 MFC r259886:
Bite the bullet and start removing the first compile time warnings
 by removing unsued file local functions and then unused callees.
 A lot more warnings to resolve but someone had to break the ice.

 X-Comment:	I am not the new maintainer; chime in, it's ours.
2014-08-16 13:23:23 +00:00
bz
f57b2f8c40 MFC r259916:
Use feature_present(3) to determine whether to open an INET or an
 INET6 socket when needed to allow pfctl to work on noinet and noinet6
 kernels (and try to provide a fallback using AF_LINK as best effort).
 Adjust the Makefile to also respect relevant src.conf(5) options
 for compile time decisions on INET and INET6 support.

 Reviewed by:	glebius (no objections)
2014-08-16 13:20:44 +00:00
bz
7aec0e65a0 MFC r259885:
As constantly reported during kernel compilation, m_buflen is unsigned so
 can never be < 0.  Remove the expression, which can never be true.
2014-08-16 13:11:59 +00:00
bz
2ec5bb69f4 MFC r259884:
Correct warnings comparing unsigned variables < 0 constantly reported
 while building kernels.  All instances removed are indeed unsigned so
 the expressions could not be true.
2014-08-16 13:09:40 +00:00
bz
1843acbd6d MFC r269583:
Provide -o vers= support for mount_nfs.

 Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version.
 OSX (these days), Solaris, and Linux use -o vers=<2,3,4>.

 With the upcoming autofs support we can make a lot of (entrerprisy) setups
 getting mount options from LDAP just work by providing -o vers= compatibility.

 Reviewed by:	wblock, bjk (man page), rmacklem, emaste
 Sponsored by:	DARPA,AFRL
PR:		192379
2014-08-16 13:06:11 +00:00
bz
b067654da5 MFC r269669:
Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant
 and export the kern_ version needed by an upcoming linuxolator change.

 Sponsored by:	DARPA,AFRL
2014-08-16 12:59:47 +00:00
kib
9cb3300d88 MFC r269909:
Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.
2014-08-16 08:38:53 +00:00
kib
6f9f1bcfb8 MFC r269908:
Style.
2014-08-16 08:37:13 +00:00
pfg
ae3a2a5c84 MFC r268924:
Update fflush(3) to return success on a read-only stream.

This is done for compliance with SUSv3. The changes cause
no secondary effects in the gnulib tests (we pass them).

Obtained from:	Apple Inc. (Libc 997.90.3 with changes)
Reviewed by:	bde
Phabric:	D440
2014-08-16 01:29:49 +00:00
pfg
2e2e6c6d48 MFC r269953:
Use "NO NAME" as the default unnamed label.

Microsoft recommends avoiding the use of spaces in the
string structures for FAT. Unfortunately they do just
that by default in the case of unlabeled filesystems.

Follow the default MS behavior to avoid confusion in
common tools like file(1). This was actually the
default behavior before r203868.

Obtained from:	NetBSD (CVS rev. 1.39)
2014-08-16 01:06:23 +00:00
pfg
885e369762 MFC r269901:
Minor style tweaks.

Obtained from:	OpenBSD (CVS rev. 1.7)
2014-08-16 01:03:51 +00:00
pfg
b9f92aa016 MFC r269695:
Const-ify character string

Obtained from:  Apple Inc. (Libc 997.90.3)
MFC after:	3 days
2014-08-16 01:00:37 +00:00