Commit Graph

192433 Commits

Author SHA1 Message Date
Alan Cox
01a8fb7db5 Automatically prefault a limited number of mappings to resident pages in
shmat(2), just like mmap(2).

MFC after:	5 days
Sponsored by:	EMC / Isilon Storage Division
2014-08-31 17:38:41 +00:00
Ian Lepore
f2e71517e0 In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo).
The EABI unwind info requires a .fnend for every .fnstart, and newer
binutils will complain about seeing two .fnstart in a row.  This change
allows newer tools to compile our code.

Reported by:	bapt
Reviewed by:	imp
2014-08-31 17:21:51 +00:00
Ian Lepore
93844d3203 Put option FDT into the base IMX6 config and remove it from the config
of boards based on IMX6.
2014-08-31 15:25:40 +00:00
Ian Lepore
46dd56e781 The Marvell PJ4B cpu family is armv7, not armv6. 2014-08-31 15:23:49 +00:00
Gleb Smirnoff
ccbefc2dfa Toss fields so that no padding field is required to achieve alignment. 2014-08-31 13:30:54 +00:00
Gleb Smirnoff
09a8241fc9 It is actually possible to have if_t a typedef to non-void type,
and keep both converted to drvapi and non-converted drivers
compilable.

o Make if_t typedef to struct ifnet *.
o Remove shim functions.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-08-31 12:48:13 +00:00
Gleb Smirnoff
997d2d833f Provide pointer from struct ifnet to struct netmap_adapter,
instead of abusing spare field.
2014-08-31 11:33:19 +00:00
Gavin Atkinson
91804910e2 Fix character case in examples for "camcontrol security" - should be
"-U user" not "-u user".

PR:		193179
Submitted by:	milios ccsys com
MFC after:	3 days
2014-08-31 10:28:31 +00:00
Peter Wemm
d903c21a64 Move the restored #ifdef i386 test back inside the #ifdef _KERNEL block
where it originally was.
2014-08-31 09:05:02 +00:00
Gleb Smirnoff
e6485f73de o Remove struct if_data from struct ifnet. Now it is merely API structure
for route(4) socket and ifmib(4) sysctl.
o Move fields from if_data to ifnet, but keep all statistic counters
  separate, since they should disappear later.
o Provide function if_data_copy() to fill if_data, utilize it in routing
  socket and ifmib handler.
o Provide overridable ifnet(9) method to fetch counters. If no provided,
  if_get_counters_compat() would be used, that returns old counters.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-08-31 06:46:21 +00:00
Gleb Smirnoff
546451a2e5 Use macros instead of referencing struct if_data that resides in ifnet.
Sponsored by:	Nginx, Inc.
2014-08-31 06:30:50 +00:00
Gleb Smirnoff
178b14d674 Remove ability to write to struct if_data residing in struct ifnet
via net.link.generic.IFMIB_IFDATA.*.IFDATA_GENERAL sysctl. Reasons
for removal are:
- No code in tree uses this possibility.
- The documentation ifmib(4) doesn't say that such possibility
  exist. The example provided in manual page only reads data.
- On many interfaces the feature simply doesn't work, since they
  do accounting in hardware, and overwrite if_data on tick.

Sponsored by:	Nginx, Inc.
2014-08-31 06:23:54 +00:00
Ian Lepore
1ec2d237e0 Allow the make_dtb script to work outside of a "make buildkernel" context
by setting MACHINE from uname -m if it's not set already.

Reviewed by:	imp, tuexen
2014-08-30 22:39:15 +00:00
Ian Lepore
4863c75af7 Fix the handling of MMU type in the AP entry code. The ARM_MMU_V6/V7
symbols are always #defined to 0 or 1, so use #if SYM not #if defined(SYM).
Also, it helps if you include the header file that defines the symbols.
2014-08-30 22:21:57 +00:00
Steven Hartland
92ac3eb59f Ensure that ZFS ARC free memory checks include cached pages
Also restore kmem_used() check for i386 as it has KVA limits that the raw
page counts above don't consider

PR:		187594
Reviewed by:	peter
X-MFC-With: r270759
Review:	D700
Sponsored by:	Multiplay
2014-08-30 21:44:32 +00:00
Michael Tuexen
65d495a87e Enable SCTP support. It runs perfectly fine on a Wandboard quad.
MFC after: 3 days
2014-08-30 20:18:47 +00:00
Michael Tuexen
3cb6ceedb7 Remove FDT option, since it is in every file, which includes this one. 2014-08-30 20:00:18 +00:00
Neel Natu
4c98655ece The "SUB" instruction used in getcc() actually does 'x -= y' so use the
proper constraint for 'x'. The "+r" constraint indicates that 'x' is an
input and output register operand.

While here generate code for different variants of getcc() using a macro
GETCC(sz) where 'sz' indicates the operand size.

Update the status bits in %rflags when emulating AND and OR opcodes.

Reviewed by:	grehan
2014-08-30 19:59:42 +00:00
Gleb Smirnoff
1bffa9511f Use define from if_var.h to access a field inside struct if_data,
that resides in struct ifnet.

Sponsored by:	Nginx, Inc.
2014-08-30 19:55:54 +00:00
Neel Natu
04da7226c4 Set the 'inst_length' to '0' early on before any error conditions are detected
in the emulation of the task switch. If any exceptions are triggered then the
guest %rip should point to instruction that caused the task switch as opposed
to the one after it.
2014-08-30 18:35:16 +00:00
Gavin Atkinson
dba11782c4 Replace cvsweb link wihg svnweb URL in bktr(4) release notes. 2014-08-30 18:01:45 +00:00
John Baldwin
0f68c1833b Save and restore FPU state across suspend and resume. In earlier revisions
of this patch, resumectx() called npxresume() directly, but that doesn't
work because resumectx() runs with a non-standard %cs selector.  Instead,
all of the FPU suspend/resume handling is done in C.

MFC after:	1 week
2014-08-30 17:48:38 +00:00
Steve Kargl
53c7f22849 Fix the order of "const volatile" to be consistent with
the rest of msun.
2014-08-30 17:31:53 +00:00
Steve Kargl
79c2e69a3f Make tiny volatile to prevent the compiler(s) from
constant folding expressions of the form "1 - tiny",
which are used to raise FE_INEXACT.
2014-08-30 17:14:47 +00:00
Pedro F. Giffuni
ec4a0b4408 Minor space/tab cleanups.
Most of them were ripped from the GSoC 2104
SMAP + kpatch project.
This is only a cosmetic change.

Taken from:	Oliver Pinter (op@)
MFC after:	5 days
2014-08-30 15:41:07 +00:00
Christian Brueffer
fc1dccd59c Allow the iwn(4) fw 100 to be compiled into the kernel and update the
relevant manpages.
2014-08-30 13:47:05 +00:00
Hiroki Sato
cec7c03d34 Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured.
Discussed on:	-net@
2014-08-30 07:08:10 +00:00
Mateusz Guzik
6662ce5aab Add missing proctree locking to fill_kinfo_proc consumers.
This fixes r270444.

Pointy hat:	mjg
Reported by:	many
MFC after:	1 week
2014-08-30 03:10:55 +00:00
Warner Losh
0375d6f5f9 We were returning 20 bytes as the FIS size to send, but only
initializing 16. Initialize all 20 so we don't send garbage in the
Auxiliary register. The SATA standard mandates a 5 dword length for
the Host to Device FIS.

Sponsored by: Netflix
2014-08-30 02:13:09 +00:00
Warner Losh
2da8d262e0 Add a few defines and packet types for SATA 3.2 and FPDMA (First Party
DMA).

Sponsored by: Netflix
2014-08-30 02:13:04 +00:00
Warner Losh
a83c9ec1e5 Update the date for last example.
Sponsored by: Netflix
2014-08-30 02:12:58 +00:00
John Baldwin
d9abd30d22 When anouncing link state changes on an 802.11 interface with a vap,
announce the change on the vap's ifnet instead of the main ifnet.  This
matches the behavior of other wireless drivers in the tree and allows the
default devd configuration to correctly start dhclient automatically after
an ndis wireless device associates.

MFC after:	2 weeks
2014-08-29 22:01:47 +00:00
Andreas Tobler
5be725d7e8 Rename shm_dict_init to shm_init to fix a compiler warning.
Reviewed by:	jhb
2014-08-29 21:50:32 +00:00
John Baldwin
89871cdeb6 - Add a new structure type for the ACPI 3.0 SMAP entry that includes the
optional attributes field.
- Add a 'machdep.smap' sysctl that exports the SMAP table of the running
  system as an array of the ACPI 3.0 structure.  (On older systems, the
  attributes are given a value of zero.)  Note that the sysctl only
  exports the SMAP table if it is available via the metadata passed from
  the loader to the kernel.  If an SMAP is not available, an empty array
  is returned.
- Add a format handler for the ACPI 3.0 SMAP structure to the sysctl(8)
  binary to format the SMAP structures in a readable format similar to
  the format found in boot messages.

MFC after:	2 weeks
2014-08-29 21:25:47 +00:00
John Baldwin
1a83a822d2 Fix a typo. 2014-08-29 21:20:36 +00:00
John Baldwin
4c7785afaf MFamd64: Add a machdep.bootmethod sysctl to inform the installer which
firmware method was used for booting.  This is hardcoded to BIOS on i386.

PR:		192962
Reviewed by:	nwhitehorn
MFC after:	1 week
2014-08-29 21:08:40 +00:00
John Baldwin
c5d2e21369 Add the new shm_ino field to struct shmfd. Missed in 270823.
Reported by:	peter
Pointy hat to:	jhb
2014-08-29 20:50:49 +00:00
John Baldwin
610a2b3c45 Use a unit number allocator to provide suitable st_dev and st_ino values
for POSIX shared memory descriptors.  The implementation is similar to
that used for pipes.

MFC after:	1 week
2014-08-29 18:18:29 +00:00
Alexander V. Chernikov
ea463f2dc0 * Add SIOCGI2C driver ioctl used to retrieve i2c info.
* Convert ixgbe to use this ioctl
* Convert ifconfig to use generic i2c handler for  "ix" interfaces.

Approved by:	Eric Joyner (ixgbe part)
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-08-29 18:02:58 +00:00
Bjoern A. Zeeb
a10816090b Forward declare struct kiocb, which is only used for an unsued function
argument but not actually defined anywhere.

This fixes the compile complaining about
"declaration of 'struct kiocb' will not be visible outside of this function".

MFC after:	2 weeks
X-MFC with:	whatever changed caused the breakage ;-)
2014-08-29 14:47:05 +00:00
Bjoern A. Zeeb
452fd26522 Try to also unbreak powerpc complaining about
"cast from pointer to integer of different size".

MFC after:	3 days
X-MFC with:	r270755
2014-08-29 14:38:57 +00:00
Bjoern A. Zeeb
3ad95447c8 These functions are #defined to "osdep" specific names without the "_mem"
extension.  Provide prototypes for the actual implementations.
Correct function arguments to match the implementations.

MFC after:	3 days
X-MFC with:	r270755
2014-08-29 12:48:38 +00:00
Bjoern A. Zeeb
b555c6140d Properly place #ifdef INET and #ifdef INET6 around variable declarations
and code to make the code compile.

Give the function seems to be slightly mixed with csum and tso,
make it non-fatal if we try to setup thing on a kernel without IP
support.  In practise the printf on the console will probably still
make your machine unhappy.

MFC after:	3 days
X-MFC with:	r270755
2014-08-29 12:45:14 +00:00
Bjoern A. Zeeb
f894ad8848 Properly handle prefetch only for amd64 and i386 as we do elsewhere.
In general theraven is right that we should factr this out and provide
a general and per-arch implementation that everything can use.

MFC after:	3 days
X-MFC with:	r270755
2014-08-29 12:40:01 +00:00
Konstantin Belousov
d3b06cf2be Document the whole settings needed to build a debug version of rtld.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2014-08-29 10:44:58 +00:00
Konstantin Belousov
74b0daf4f9 Optimize r270798, only do the second pass over non-plt relocations
when the first pass found IFUNCs.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-08-29 10:43:56 +00:00
Bjoern A. Zeeb
ff21e856ec First try on fixing some more compile errors without actually testing:
- use proper __FreeBSD_version check and more importantly check for __am64__
  to be defined.  Whether the FreeBSD(_version) checks are needed is a
  different question.
- cast uint64_t to uintmax_t and use %jx for printing.

Note: there are more values that could be printed in that status function
	but leave that for the future;  printf doesn't seem to be the right
	way to do it anyway.
Note: there is more breakage related to i40e_allocate_dma*() having
	conflicting declarations, so more fixes to come.

PR:		193112
MFC after:	3 days
X-MFC with:	r270755
2014-08-29 09:37:18 +00:00
Konstantin Belousov
14c3564759 IFUNC symbol type shall be processed for non-PLT relocations,
e.g. when a global variable is initialized with a pointer to ifunc.
Add symbol type check and call resolver for STT_GNU_IFUNC symbol types
when processing non-PLT relocations, but only after non-IFUNC
relocations are done.  The two-phase proceessing is required since
resolvers may reference other symbols, which must be ready to use when
resolver calls are done.

Restructure reloc_non_plt() on x86 to call find_symdef() and handle
IFUNC in single place.

For non-x86 reloc_non_plt(), check for call for IFUNC relocation and
do nothing, to avoid processing relocs twice.

PR:	193048
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-08-29 09:29:10 +00:00
Konstantin Belousov
c6fef2d49a Direct access to the quota files, in particular, lookup, causes lock
conflict with the quota metadata access.  Mark quota vnode lock as
recursive and always exclusive to avoid the problem.

Reported by:	hrs
Tested by:	hrs, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-08-29 09:04:24 +00:00
Konstantin Belousov
575e02d94f Add function and wrapper to switch lockmgr and vnode lock back to
auto-promotion of shared to exclusive.

Tested by:	hrs, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-08-29 09:02:01 +00:00