199260 Commits

Author SHA1 Message Date
erj
6e387585c4 Fix build issue and incompatibilites introduced by r283620.
- Re-introduce "device ixgbe" option for kernel configs. This allows
  users to continue using existing kernel configurations, while still
  letting if_ix and if_ixv exist to allow ifconfig magic to work.
  Though the amd64 GENERIC config has "device ix" and "device ixv" instead of
  "device ixgbe".

  This is achieved by making the if_ixgbe module a stub that depends
  on if_ix and if_ixv.

- Replace if_baudrate assignment with if_initbaudrate() call.

Thanks to jhb@ for the stub module suggestion and pointing out the if_baudrate
error.

Approved by:	jfv (mentor)
2015-05-28 20:56:11 +00:00
jhb
34675faa3b Fix COMPAT_FREEBSD32 build on ia64. This is a direct commit to
stable/10 since ia64 is not present in head.
2015-05-28 13:12:05 +00:00
whu
4530c56768 MFC r283053
Submitted by:	whu
Reviewed by:	royger
Approved by:	royger
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D2661
2015-05-28 09:20:35 +00:00
dim
fafc9e7ad4 MFC r283254:
Ensure that the static structs emitted by the MODULE_DEPEND() and
MODULE_VERSION() macros don't end up as .comm symbols, when all the
version fields are zero.

Normally, such symbols will end up in .bss, but for kernel module
version objects, this can lead to "garbage" version numbers.

Fix this by instructing the compiler to always put these structs in the
.data segment instead.

Reported by:	delphij, ae
2015-05-28 06:45:13 +00:00
mckusick
c94542bef3 MFC of 269533:
Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).

This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.

Reported by: Dmitry Sivachenko (demon@)
Tested by:   Dmitry Sivachenko (demon@)
2015-05-28 00:11:36 +00:00
erj
e12c5d1ed6 MFC ixgbe commits for 10.2:
- r280182 - Split the driver into independent pf/vf loadables
- r280197 - Resolve build issues
- r280204 - Fix multiple same-name devclasses
- r280228 - Fix i386 LINT build issues / remove unused variable
- r280252 - Fix building ixgbe with gcc
- r280962 - Make changes to busdma code similar to r257541
- r281772 & r281773 - Remove unused variable
- partial r282280 - stats counter update (ix-only)
- r282289 - Add X550 support
- r282290 - Add X550 makefile updates
- r282293 - Add ixgbe_x550.c to conf/files
- r282299 - Fix gcc compile (extraneous extern declaration)

Finally, add ix_txrx.c to conf/files because it's required for compile in stable/10.

Approved by:	jfv (mentor)
2015-05-27 17:44:11 +00:00
jhb
38c6ad8c69 MFC 282241:
Don't free mbufs when stopping an interface in netmap mode.

Currently if you ifconfig down a vtnet interface while it is being used
via netmap, the kernel panics due to trying to treat the cookie values
in the virtio rings as mbufs to be freed. When netmap is enabled, these
cookie values are pointers to something else.

Note that other netmap-aware drivers don't seem to need this as they
store the mbuf pointers in the software rings that mirror the hardware
descriptor rings, and since netmap doesn't touch those, the software
state always has NULL mbuf pointers causing the loops to free mbufs to
not do anything. However, vtnet reuses the same state area for both
netmap and non-netmap mode, so it needs to explicitly avoid looking at
the rings and treating the cookie values as mbufs if netmap is
enabled.

Sponsored by:	Norse Corp, Inc.
2015-05-27 14:29:39 +00:00
hselasky
1f42ff868a MFC r283064:
Fix an off-by-one error by adding proper range checks when parsing the
HDA association descriptors. This fixes a crash during device probe
for some HDA PCI devices.
2015-05-27 13:23:02 +00:00
kib
3162ff437e MFC r283162:
Set VPO_UNMANAGED on the freed page when insertion of the page into the
object queue failed, to satisfy the assertion.

MFC r283163:
Do grammar fix in the comment to record the right commit message for
r283162.
2015-05-27 08:30:16 +00:00
kib
aed85e60ed MFC r283153:
Remove the write-only variable phent.
2015-05-27 08:23:23 +00:00
luigi
cf32ec5d9e MFC: 272451, 272653 add CAP_EVENT so that we can poll() on netmap and pcap
file descriptors
2015-05-26 21:12:02 +00:00
julian
fcb7b0e8b6 MFH: r283114
Fixup to the kern_psignal manpage

  r283105 misspelled kern_psignal as kernel_psignal in one occurrence, and
added trailing whitespace.

 While here, change 'call' to the more standard 'function', and say why
 the name was changed (taken from the commit message for r225617).
2015-05-26 03:58:18 +00:00
emaste
7c2005346d MFC r283110: Add GRP_COMDAT section group flag to ELF header
Sponsored by:	The FreeBSD Foundation
2015-05-26 02:50:30 +00:00
julian
e1986546b0 MFH: r283105
Only several years late, catch the psignal man page up to the
 fact that psignal has been renamed to kern_psignal since 9.0.
2015-05-26 02:18:10 +00:00
gjb
14c563db5d MFC r283307:
Use mkimg(1) to create the i386 memstick images, similar to
 how is done for amd64.  The exception here is there is no
 EFI partition for i386.

Sponsored by:	The FreeBSD Foundation
2015-05-26 00:44:29 +00:00
gjb
e8dfad8565 MFC r282785, r282787, r282789, r282790, r282791, r282792, r282793,
r282794, r282795, r282796, r282797, r282798, r282799, r283265,
r283266, r283268, r283271, r283272, r283298, r283302:

 Add a new file, Makefile.mirrors, which is intended to replace
 a 474-line kludge of a shell script to pre-create the directory
 hierarchy on ftp-master.

 This is not in any way connected to the build, and there is no
 intention to do so.  This only intent here is to try to make
 things a little bit easier.

 Always use the 'make install' directory as the source for images.
 For RE purposes, we use the default (/R within the chroot), so
 this helps avoid copying files multiple times and xz(1)-compressing
 additional times when not needed.

 Fix staging virtual machine images for ftp propagation.

 This Makefile is not for general consumption.

Sponsored by:	The FreeBSD Foundation
2015-05-25 22:12:30 +00:00
avg
b7743f6ee4 MFC r282475: zfs: do not hold an extra reference on a root vnode 2015-05-25 11:35:27 +00:00
avg
d1a5bd2d1e MFC r282473: dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails 2015-05-25 11:33:45 +00:00
avg
5456df9c8c MFC r282632: MFV r282630: 5809 Blowaway full receive in v1 pool causes kernel panic 2015-05-25 11:32:10 +00:00
ian
a210991c80 MFC r283033, r283062, r283066, r283069:
Do not set preload_addr_relocate for ARM.

  Refactor net_getparams() to make it easier to get params from sources other
  than bootp and rarp.

  Add a routine to obtain netboot parameters from the U-Boot env vars

  Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
2015-05-25 01:29:45 +00:00
ian
e82e4a2984 MFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:
Add support for booting relocatable kernels on PowerPC.

  Add code to support loading relocatable kernels at offsets that are
  not zero.

  Move ubldr text section to the start of the output file, so that when you
  create a stripped .bin file from it the entry point is the first byte of
  the file.  (Will allow "load $addr $file ; go $addr" in u-boot.)

  Create a relocatable instance of ubldr for ARM (ubldr.bin).

  Re-link ubldr when any of its libraries change.

  An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
2015-05-25 01:06:55 +00:00
sbruno
78deac1ab8 MFC r283290
Bump rx_overruns when indicated by the ICR mask.

PR:		199716
Sponsored by:	Limelight Networks
2015-05-25 00:30:26 +00:00
ian
1cf579b9a3 MFC r282516:
Add the code necessary to run the imx6 chip at its lowest clock/power
  operating point (396MHz/950mV).
2015-05-24 19:00:46 +00:00
ian
d6c6dd582e MFC r268838, r277644:
Add support for Toradex Apalis i.MX6 development board.

  Add support for imx6 audio transmitting, include drivers for:
  o Digital Audio Multiplexer (AUDMUX)
  o Smart Direct Memory Access Controller (SDMA)
  o Synchronous Serial Interface (SSI)
2015-05-24 18:59:45 +00:00
ian
83a17cbb77 MFC r282418:
On an icache sync by address/len, round the length up if the operation
  spans a cacheline boundary.
2015-05-24 18:23:57 +00:00
ian
6bbf63ab35 MFC r281371: Use OF_getencpropalloc() to handle endianess of the properties. 2015-05-24 18:00:29 +00:00
ian
ad1acff252 MFC r281073, r281074, r281077, r281200:
Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
  us the wrong data in the failure case if shift was not zero.

  Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
  here also use OF_getencprop in uart_fdt_get_clock.

  Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
  not build uart_cpu_fdt.c in all configs.

  Fix uart_fdt_get_clock. It should have been using the cell variable passed
  in, not value on the stack.
2015-05-24 17:57:29 +00:00
ian
ef273b2b34 MFC r279368, r280772, r280848:
Allow creating subclass of FDT simplebus

  Make simplebus a base class of ofwbus.

  Fix bug in xrefinfo_find() for 64-bit platforms
2015-05-24 17:51:57 +00:00
mav
5562aba4db MFC r282881: Do not promote large async writes to sync.
Present implementation of large sync writes is too strict and so can be
quite slow.  Instead of doing that, execute large async write in chunks,
syncing each chunk separately.

It would be good to fix large sync writes too, but I leave it to somebody
with more skills in this area.
2015-05-24 17:16:30 +00:00
ian
e7adedb422 MFC r280194:
Fix fdt_platform_fixups() mem region handling.
2015-05-24 15:29:56 +00:00
ian
bc7a934b2f MFC r279850:
Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems.

  Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.
2015-05-24 15:21:47 +00:00
ian
29f247a63e MFC r279837:
Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
2015-05-24 14:57:17 +00:00
ian
8b432f3b56 MFC r276004: Fix the indentation to simplify comparing the ARM config files. 2015-05-24 14:25:03 +00:00
kib
0d8ee7566b MFC r282708:
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.
2015-05-24 07:32:02 +00:00
arybchik
b7a860bb3a MFC: r283278
sfxge: relax assertion to allow RST flag in TSO packets

Kernel under stress load, mixed MC reboot and sfupdate really
generates TSO packet with RST flag.
It will generate many TCP packets with RST flag set.
May be RST flag should be set in the last segment only, but it could be
dropped. So, it is safer to keep the flag in all packets to be sure that
connection is reset.

Sponsored by:   Solarflare Communications, Inc.
2015-05-24 06:53:10 +00:00
trasz
531e259796 MFC r279554:
Make periphdriver_register() take XPT lock when modifying the periph_drivers
array.

This fixes a panic that sometimes occured when kldloading ctl.ko.

PR:		200384
Sponsored by:	The FreeBSD Foundation
2015-05-24 04:14:09 +00:00
gjb
e65a83355e MFC r283252:
Include the TARGET in the EC2 AMI name.

  Without this, AWS rejects subsequent image uploads of a different
  architecture because the name conflicts.

Sponsored by:	The FreeBSD Foundation
2015-05-24 02:15:18 +00:00
pkelsey
ccae88f4a6 MFC r283093:
Added description of POSIX-specified behavior when invoked on a key from within that key's destructor.
2015-05-24 01:52:22 +00:00
pkelsey
19d4f6b6bf MFC r282978:
When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.

Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.
2015-05-24 01:48:33 +00:00
ian
245fcec60e MFC r280221:
Update ucom(4) with information about the new PPS capture abilities.
2015-05-24 01:09:51 +00:00
ian
b92e1caf1c MFC r279728, r279729, r279756, r279773, r282424, r281367:
Add mutex support to the pps_ioctl() API in the kernel.

  Add PPS support to USB serial drivers.

  Use correct mode variable for PPS support.

  Switch polarity of USB serial PPS events.

  The ftdi "get latency" and "get bitmode" device commands are read
  operations, not writes.

  Implement a mechanism for making changes in the kernel<->driver PPS
  interface without breaking ABI or API compatibility with existing drivers.

  Bump version number to indicate the new PPS ABI version changes in the
  pps_state structure.
2015-05-24 00:53:43 +00:00
ian
884316392a MFC r262409, r267129, r267130, r280709:
Move the declaration for mpentry() into a header file

  Fix broken SMP startup on Armada XP after r265694

  Avoid using hard-coded SoC's register address in mptramp code for Armada XP

  Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying
  the startup trampoline code.
2015-05-23 23:35:19 +00:00
ian
45e1cf60a1 MFC r280278, r280402:
Allow to override default kernel virtual address assignment on ARM.

  Do not save/restore the TLS pointer on context switch for armv6.
2015-05-23 23:27:00 +00:00
ian
9e0f8345df MFC r279816, r279826:
Attach the prcm clock driver early, so it can set the mpcore timer frequency.

  Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
2015-05-23 23:08:54 +00:00
ian
98dff7fa06 MFC r279810, r279811:
Clean data cache before instruction cache in armv7_icache_sync_range().

  Add minimum cache line sizes to struct cpuinfo, use them in the new cache
  maintenance routines.  Also add a routine to invalidate the branch cache.
2015-05-23 23:05:31 +00:00
ian
68a3dfa740 MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32. 2015-05-23 22:48:54 +00:00
ian
011666b0a8 MFC r277098, r279235:
Introduce ofw_bus_reg_to_rl() to replace part of common bus code

  Fix endianness on FDT read in ARM GIC
2015-05-23 22:36:41 +00:00
ian
132e8a35de MFC r274711:
Stop using early_putc immediately after configuring console with cninit()
2015-05-23 22:34:25 +00:00
ian
a17d85346e MFC r274249, r274484, r275583:
Avoid panic in ofwbus caused by not released resource list entry

  Fix typo in ARM GIC device_printf()

  Fix buffer overflow in Marvell PCI/PCIe driver
2015-05-23 22:33:06 +00:00
ian
0c377e52af MFC r276021, r279766:
Reduce the diff in the Ti aintc between head and arm_intrng

  Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in
  both the post-filter and post-thread callbacks.
2015-05-23 21:12:51 +00:00