]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
10 years agoMFC r261137, r261393
ian [Thu, 15 May 2014 15:40:05 +0000 (15:40 +0000)]
MFC r261137, r261393

  Correct the alignment of sp through functions that use UNWINDSVCFRAME.

  Update all arm code that manipulates the PSR registers to use modern syntax.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266144 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265012, r265191, r265289, r265310
loos [Thu, 15 May 2014 15:15:23 +0000 (15:15 +0000)]
MFC r265012, r265191, r265289, r265310

r265012:
Fix the gpio-specifier decoding by respecting the GPIO controller's
#gpio-cells property.

Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO
controller to implement its own mapping to deal with gpio-specifiers,
allowing the decoding of gpio-specifiers to be controller specific.

The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells =
<2>) and the FreeBSD standard (#gpio-cells = <3>).

It pass the gpio-specifier flag field to the children as an ivar variable so
they can act upon.

r265191:
Remove unnecessary headers.  Sort out the headers.  Add a missing header on
ofw_gpiobus.c (it was working because of sys/libkern.h).

r265289:
eally sort out the headers.

sys/systm.h must always come after sys/param.h.

Remove sys/types.h which should never be included together with sys/param.h.

Add sys/malloc.h for correctness even if it seems to don't be needed.

Remove more unused headers found by unusedinc (from bde@).

r265310:
Move gpiobus routines to dev/gpio.  Avoid polluting ofw_bus with bus
specific parts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266135 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257207, r261161, r261163:
ian [Thu, 15 May 2014 15:02:48 +0000 (15:02 +0000)]
MFC r257207, r261161, r261163:

  Update the hard-float version of the fenv functions to use the VFP unit.
  Any other floating-point unit is unsupported on ARM.

  Use __fenv_static for all static inline functions.

  Correctly shift the mask when masking/unmasking exceptions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266133 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261215, r261257
ian [Thu, 15 May 2014 14:37:52 +0000 (14:37 +0000)]
MFC r261215, r261257

  Merge from vendor branch importing dtc git
  rev 6a15eb2350426d285130e4c9d84c0bdb6575547a

  Don't build BSDL dtc if the GPL dtc is enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266130 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404,
ian [Thu, 15 May 2014 14:26:11 +0000 (14:26 +0000)]
MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404,
    r261405

  Open Firmware interrupt specifiers can consist of arbitrary-length byte
  strings and include arbitrary information (IRQ line/domain/sense). When the
  ofw_bus_map_intr() API was introduced, it assumed that, as on most systems,
  these were either 1 cell, containing an interrupt line, or 2, containing
  a line number plus a sense code. It turns out a non-negligible number of
  ARM systems use 3 (or even 4!) cells for interrupts, so make this more
  general.

  Provide a simpler and more standards-compliant simplebus implementation to
  get the Routerboard 800 up and running with the vendor device tree. This
  does not implement some BERI-specific features (which hopefully won't be
  necessary soon), so move the old code to mips/beri, with a higher attach
  priority when built, until MIPS interrupt domain support is rearranged.

  Allow nesting of simplebuses.

  Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
  process "status" properties of OF nodes.

  Fix one remnant endian flaw in nexus.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266128 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264850
smh [Thu, 15 May 2014 12:39:28 +0000 (12:39 +0000)]
MFC r264850

Add the ability to set a minimum ashift size for ZFS pool creation or root level
vdev addition.

Change max_auto_ashift sysctl to error when an invalid value is requested instead
of silently limiting it.

Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/10@266122 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258546: Add watchdog driver for rk3188.
ian [Thu, 15 May 2014 03:22:57 +0000 (03:22 +0000)]
MFC r258546: Add watchdog driver for rk3188.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266113 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,
ian [Thu, 15 May 2014 02:41:23 +0000 (02:41 +0000)]
MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,
    r261353

  Fix the name of the dts file for the HL201...

  When mapping an address, the bsh needs the same offset we do for other things.

  Add explicit depends on bus_if.h and device_if.h to avoid a
  chicken and egg problem in some compilation environments.

  Switch to using PAs rather than VAs for the addresses we map for
  devices. This is a nop, except for what's reported by atmelbus for the
  resources.

  Comment cleanups.  Move things around for diff reduction against FDT work.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266110 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r266092
loos [Thu, 15 May 2014 01:37:17 +0000 (01:37 +0000)]
MFC r266092

gpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266106 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,
loos [Thu, 15 May 2014 01:27:53 +0000 (01:27 +0000)]
MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,
    r261844, r261845, r261846, r262194, r262522, r262559

r258046:
Fix a typo on a comment in ofw_bus_if.m, the default method will return -1
when a node doesn't exist.

r258047:
Move the KASSERT() check to the point before the increase of number of pins.

r258050:
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.

Give a chance for GPIO devices that implement the device_identify method to
attach.

r259035:
Remove unnecessary includes and an unused softc variable.  While here apply
two minor style(9) fixes.

r259036:
Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function.  This makes gpioled(4) works even if the pin
is accidentally set to an input.

r259037:
Fix the pin value reading on AM335x.  Because of the inverted logic it was
always returning '0' for all the reads, even for the outputs.  It is now
known to work with gpioiic(4) and gpioled(4).

r261842:
Add an OFW GPIO compatible bus.  This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

r261843:
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

r261844:
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

r261845:
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio.  With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

r261846:
Make the gpioled(4) work out of the box on BBB.

Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

r262194:
Remove an unnecessary header.

r262522:
Fix make depend for iicbus.

r262559:
Inspired by r262522, fix make depend.  This fixes the build of gpio modules.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266105 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262665:
markj [Thu, 15 May 2014 00:52:17 +0000 (00:52 +0000)]
MFC r262665:
Expose a few DTrace parameters as sysctls under kern.dtrace and add
descriptions for several existing sysctls.

PR: 187027

git-svn-id: svn://svn.freebsd.org/base/stable/10@266102 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258209, r258210, r261211,
ian [Wed, 14 May 2014 23:57:07 +0000 (23:57 +0000)]
MFC r258209, r258210, r261211,

  Add a driver for the Texas Instruments Mailbox hardware.

  Add a driver for the TI Programmable Realtime Unit Subsystem.

  fix args to mtx_init

git-svn-id: svn://svn.freebsd.org/base/stable/10@266098 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260886, r261165, r261171, r261172, r261214
ian [Wed, 14 May 2014 23:51:07 +0000 (23:51 +0000)]
MFC r260886, r261165, r261171, r261172, r261214

  Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no
  parameters.

  Bus space handles need to be the VA of the requested resource, not the
  rounded page VA. Correct so the DBGU device can be mapped for FDT
  console since it isn't on a page boundary.

  Make early printf output nicer by inserting a carriage return before
  any linefeeds that are output.

  Before resetting the USART, delay a bit to allow the transmitter to
  finish the current character to drain to avoid glitching. Also,
  simplify the code a smidge.

  Remove extra parens to silence clang warning.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266097 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258044, r258679, r263990
loos [Wed, 14 May 2014 23:33:38 +0000 (23:33 +0000)]
MFC r258044, r258679, r263990

Adds gpioiic.4 and gpioled.4 man pages.  Moves some of the information that
was previously available on gpio.4 to their respectives pages.  Add the
cross references on gpioctl.8.

Add gpiobus(4) as a link to gpio(4).

git-svn-id: svn://svn.freebsd.org/base/stable/10@266096 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261083, r261092, r261126, r261127, r261128, r261129, r261130, r261131
ian [Wed, 14 May 2014 23:17:33 +0000 (23:17 +0000)]
MFC r261083, r261092, r261126, r261127, r261128, r261129, r261130, r261131

  Add Atmel serial drivers.

  uart clock-frequency is a FreeBSD-specific extention. Make it optional and
  allow the client uart drivers to decide if a frequency is required.

  Remove redundant declaration for uart devclass.
  Commit some unrelated, but harmless, FDT ifdefs.

  Add at91 NAND support, Fix comment.

  Remove obsolete options and fix comments

git-svn-id: svn://svn.freebsd.org/base/stable/10@266095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261038, r261039, r261040, r261041
ian [Wed, 14 May 2014 22:52:16 +0000 (22:52 +0000)]
MFC r261038, r261039, r261040, r261041

  Implement generic support for early printf.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260921: Add nand to arm NOTES
ian [Wed, 14 May 2014 20:49:10 +0000 (20:49 +0000)]
MFC r260921: Add nand to arm NOTES

git-svn-id: svn://svn.freebsd.org/base/stable/10@266090 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260893: Free dma memory from the dma map before destroying the map.
ian [Wed, 14 May 2014 20:47:51 +0000 (20:47 +0000)]
MFC r260893: Free dma memory from the dma map before destroying the map.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259728, r260752
ian [Wed, 14 May 2014 20:38:05 +0000 (20:38 +0000)]
MFC r259728, r260752

  Add Freescale i.MX515 vt(9) driver.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260695, r260696, r260884, r260885, r260886, r260887
ian [Wed, 14 May 2014 20:31:54 +0000 (20:31 +0000)]
MFC r260695, r260696, r260884, r260885, r260886, r260887

  Provide a simplified way to specify GPIO pins for the Atmel port.

  Add at91 data so we can convert a PIO unit number into a base address.

  Add at91 standard memory controller helper functions.

  Generalize AT91 NAND support a bit.

  Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201.

  Add nand device and NANDFS into the mix for those at91 boards that have
  support for it at the moment.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260440, r260441, r260447, r260490, r260493
ian [Wed, 14 May 2014 20:17:31 +0000 (20:17 +0000)]
MFC r260440, r260441, r260447, r260490, r260493

  Add option USB_HOST_ALIGN to configs that contain 'device usb'.

  Update dts files of Cubieboard1,2 to use 1GB memory.

  Add a function to print the contents of the static device mapping table,

git-svn-id: svn://svn.freebsd.org/base/stable/10@266086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256839, r256948, r256950, r257299, r257414, r258057, r259090
ian [Wed, 14 May 2014 20:11:20 +0000 (20:11 +0000)]
MFC  r256839, r256948, r256950, r257299, r257414, r258057, r259090

  Add configuration for the Freescale i.MX53 Quick Start Board.

  Add the Raspberry Pi BSC (I2C compliant) controller driver.

  Add Radxa Rock board (by radxa.com) support.

  Digi-CCWMX53: enable ffec and uart, USB.

  Add support for Freescale Vybrid Family VF600

  Move and rename dwc otg driver to more generic one as it appears to work
  for rk3188 SoC based board too.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266085 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,
ian [Wed, 14 May 2014 19:18:58 +0000 (19:18 +0000)]
MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,
    r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373,
    r260374, r260375

  Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs.
  Correct license statements to reflect the fact that these files were all
  derived from sys/arm/mv/bus_space.c.

  In pmap_unmapdev(), remember the size, and use that as an argument to
  kva_free(), or we'd end up always passing it a size of 0

  In pmap_mapdev(), first check whether a static mapping exists,

  Convert TI static device mapping to use the new arm_devmap_add_entry(),

  Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy.

  Eliminate use of fdt_immr_addr(), it's not needed for tegra

  Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make
  static device mappings.

  Retire machine/fdt.h as a header used by MI code, as its function is now
  obsolete. This involves the following pieces:
  - Remove it entirely on PowerPC, where it is not used by MD code either
  - Remove all references to machine/fdt.h in non-architecture-specific code
    (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat
    non-arch-specific).
  - Fix code relying on header pollution from machine/fdt.h includes
  - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource
    requests to its parent (nexus). This allows x86 FDT devices to allocate
    both memory and IO requests and removes the last notionally MI use of
    fdtbus_bs_tag.
  - On those architectures that retain a machine/fdt.h, unused bits like
    FDT_MAP_IRQ and FDT_INTR_MAX have been removed.

  Add #include <machine/fdt.h> to a few files that used to get it via pollution

  Enable the mv cesa security/crypto device by providing the required property
  in the dts source, and adding the right devices to the kernel config.

  Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs,
  related to setting up static device mappings.  Since it was only used by
  arm/mv/mv_pci.c, it's now just static functions within that file, plus
  one public function that gets called only from arm/mv/mv_machdep.c.

  Switch RPi to using arm_devmap_add_entry() to set up static device mapping.

  Allow 'no static device mappings' to potentially work.

  Don't try to find a static mapping before calling pmap_mapdev(), that logic
  is now part of pmap_mapdev() and doesn't need to be duplicated here.

 Switch a10 to using arm_devmap_add_entry() to set up static device mapping.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260281, r260282, r260283, r260285
ian [Wed, 14 May 2014 18:54:34 +0000 (18:54 +0000)]
MFC r260281, r260282, r260283, r260285

  Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table

  Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and
  OFW_BUS_CONFIG_INTR().

  Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(),
  when running on FDT systems.  Unmap memory in nexus_deactivate_resource().

  Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer
  used by anything.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260161, r260163, r260165, r260166, r260189
ian [Wed, 14 May 2014 18:25:13 +0000 (18:25 +0000)]
MFC r260161, r260163, r260165, r260166, r260189

  Add polarity and level support to ARM GIC

  Do not attach to PCI bridges in AHCI driver

  Use only mapped BIOs on ARM

  Fix race condition in DELAY for SP804 timer.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260092, r260093, r260121, r260180,
ian [Wed, 14 May 2014 18:16:32 +0000 (18:16 +0000)]
MFC r260092, r260093, r260121, r260180,

  Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files.

  Set the SoC name for the atmelbus name.

  Add support for Samsung K9F2G08U0A (256MiB SLC) NAND

  Comment updates.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260118
ian [Wed, 14 May 2014 17:43:49 +0000 (17:43 +0000)]
MFC r260118

  Delete echoed doesn't rub out the previous character, so always
  use <backspace> <space> <backspace> instead. This fixes hitting
  DELETE instead of BACKSPACE at mountroot> prompt.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266059 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258359, r258742, r258845, r259936, r259640
ian [Wed, 14 May 2014 17:40:18 +0000 (17:40 +0000)]
MFC r258359, r258742, r258845, r259936, r259640

  Apply access flags for managed and unmanaged pages properly on ARMv6/v7

  Set the PGA_WRITEABLE flag when the protections indicate write access, not
  just when the current access is a write.

  Enable missing Access Flag for secondary cores on ARMv6/v7

  Add identification and necessary type checks for Krait CPU cores.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266058 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256707, r256708, r257291, r258358
ian [Wed, 14 May 2014 17:01:35 +0000 (17:01 +0000)]
MFC r256707, r256708, r257291, r258358

  Switch to use WBWA mappings for page tables on armv6, this is needed for SMP.
  Fix PTE_SYNC() for PIPT L2 caches, using the virtual address wasn't so useful.
  Use PTE_SYNC() for >= armv6
  Spell cpu_l2cache_wb_range correctly.

  Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM

  Use values of the correct defines to determine statement's result.
  ARM_ARCH_ symbols are always defined, hence only values are relevant.

  Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7

  When emulating modified bit the executable attribute was cleared by
  mistake when calling pmap_set_prot().

git-svn-id: svn://svn.freebsd.org/base/stable/10@266050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,
ian [Wed, 14 May 2014 16:32:27 +0000 (16:32 +0000)]
MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,
    r257282, r257332

  Wait for DesignWare UART transfers completion before accessing line control

  Enable UART busy detection handling for Armada XP - based board

  Enable SATA interface on Armada XP
  Run mvs SATA driver on Armada XP instead of old mv_sata

  Retire arm_remap_nocache() and the data and constants associated with it.

  Remove hard-coded mappings related to Armada XP support

  Fix-up DTB for Armada XP registers' base according to the actual settings

  Change Armada XP kernel load address to the u-boot's end address

  Remove not working and deprecated PJ4Bv6 support

  Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU

  Add missing ARMv6 CPU functions to ARM Makefile

git-svn-id: svn://svn.freebsd.org/base/stable/10@266046 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265535
marius [Wed, 14 May 2014 16:18:08 +0000 (16:18 +0000)]
MFC: r265535

- Sprinkle const and static as appropriate.
- Fix whitespace bugs.
- Remove pointless returns in void functions.
- Nuke pointless switch cases mirroring the default.

Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/10@266043 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r256561
marius [Wed, 14 May 2014 16:16:23 +0000 (16:16 +0000)]
MFC: r256561

Prevent an unlikely, but real double free issue in gvinum(8).

Coverity ID: 1018965

git-svn-id: svn://svn.freebsd.org/base/stable/10@266042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265072:
bdrewery [Wed, 14 May 2014 15:35:01 +0000 (15:35 +0000)]
MFC r265072:

  Remove redundant include

git-svn-id: svn://svn.freebsd.org/base/stable/10@266036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264499:
bdrewery [Wed, 14 May 2014 15:30:49 +0000 (15:30 +0000)]
MFC r264499:

  Make g_access() KASSERT() more useful.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266031 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264918:
bdrewery [Wed, 14 May 2014 15:24:25 +0000 (15:24 +0000)]
MFC r264918:

  Fix spelling error.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266030 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264465:
bdrewery [Wed, 14 May 2014 15:23:06 +0000 (15:23 +0000)]
MFC r264465:

  Prefer /etc/login.conf for some of these environment values.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266029 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoAdd missing mergeinfo for r266026
bdrewery [Wed, 14 May 2014 15:22:08 +0000 (15:22 +0000)]
Add missing mergeinfo for r266026

git-svn-id: svn://svn.freebsd.org/base/stable/10@266027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264795:
bdrewery [Wed, 14 May 2014 15:21:27 +0000 (15:21 +0000)]
MFC r264795:

  Fix grammar error and trailing newline.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266026 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264385:
bdrewery [Wed, 14 May 2014 15:16:02 +0000 (15:16 +0000)]
MFC r264385:

  Use proper MFSNAMELEN for fs type.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259517, r259518
ian [Wed, 14 May 2014 14:37:27 +0000 (14:37 +0000)]
MFC r259517, r259518

Add vt support for RPi. (No early stage yet.)

git-svn-id: svn://svn.freebsd.org/base/stable/10@266022 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,
ian [Wed, 14 May 2014 14:17:51 +0000 (14:17 +0000)]
MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,
    r259199, r259484, r259513, r259514, r259516

  The kernel stack guard pages are only below the stack pointer, not above.

  Remove unnecessary double-setting of the thread's onfault state in
  copyinstr().

  Open Firmware mandates that certain cross-references, in particular those
  in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles,
  since FDT has no concept of ihandles. Have the OF FDT CI module interpret
  queries about ihandles as cross-reference phandles.

  Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use
  the right type.

  Rearchitect platform memory map parsing to make it less
  Open Firmware-centric.

  Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of
  this file is also slated for future demolition.

  Return the correct IEEE 1275 code for "nextprop".

  Use the common Open Firmware PCI interrupt routing code instead of the
  duplicate version in dev/fdt.

  Configure interrupt sense based on device tree information.

  Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf
  internally instead of requiring the caller to allocate it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266020 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258268, r258271, r258272, r258274, r258275, r258427, r258694, r258696,
ian [Wed, 14 May 2014 14:08:45 +0000 (14:08 +0000)]
MFC r258268, r258271, r258272, r258274, r258275, r258427, r258694, r258696,
    r258697, r258757

  Do not assume a value for #address-cells when parsing the OF translations
  map. This allows the kernel to get farther with OpenBIOS on 64-bit CPUs.

  Actually look up #address-cells instead of assuming it is correlated with
  the Uninorth version number.

  #interrupt-cells belongs to the iparent, not the device parent.

  Add a sysctl to allow disabling resetting the OF syscons.

  For PCI<->PCI bridges, #address-cells may be 3.

  Make RTAS calls, which call setfault() to recover from machine checks,
  preserve any existing fault buffer.

  badaddr() is used only in the grackle PCI driver, so move its definition
  there. Clean up a spurious setfault() declaration as well.

  This [phyp_console] driver doesn't need the /options node, so don't check
  for it.

  Use the Open Firmware-based CPU frequency determination as a generic
  fallback if we can't measure CPU frequency. This is also useful on a
  variety of embedded systems using FDT.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266019 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265362
brueffer [Wed, 14 May 2014 13:54:07 +0000 (13:54 +0000)]
MFC: r265362

Mention the axge(4) driver in the hardware notes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265454
marius [Wed, 14 May 2014 13:47:50 +0000 (13:47 +0000)]
MFC: r265454

- Allow foot shooting with the resetconfig command via the -f option.
- Fix typos preventing -f to actually work with the create command.
- Initialize flags to zero rather than using stack garbage when handling
  the grow command.

Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/10@266014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265149
smh [Wed, 14 May 2014 09:12:01 +0000 (09:12 +0000)]
MFC r265149

Make uninteresting PCI devices with no attached drivers only print out
on a verbose boot.

Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/10@266008 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258259, r258798, r259010
ian [Wed, 14 May 2014 04:57:55 +0000 (04:57 +0000)]
MFC r258259, r258798, r259010

  Unify handling of illegal instruction faults between AIM and Book-E.

  Make uart_cpu_powerpc work on both FDT and OFW systems.

  Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for
  powerpc64.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258247, r258250, r258257
ian [Wed, 14 May 2014 04:42:38 +0000 (04:42 +0000)]
MFC r258247, r258250, r258257

  Remove a pointless #ifdef AIM. This is just PPC64 specific, including
  64-bit Book-E.

  Make single precision floating point arithmetic actually work

  Split the function of the PCB_FPU flags into two: PCB_FPU now indicates that
  the actual FPU is enabled, while PCB_FPREGS indicates that the FPU state
  structure in the PCB is valid.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266004 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257995, r258244, r258246,
ian [Wed, 14 May 2014 04:14:58 +0000 (04:14 +0000)]
MFC r257995, r258244, r258246,

 Rename the "bare" platform "mpc85xx"
 Also turn "bare" into a truly bare platform

 Move CCSR discovery into the platform module

 There is no reason Book-E needs to save XER and CTR on context switches.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258002, r258024, r258027, r258051, r258052, r258243, r258244, r258002,
ian [Wed, 14 May 2014 03:09:37 +0000 (03:09 +0000)]
MFC r258002, r258024, r258027, r258051, r258052, r258243, r258244, r258002,
    r258024, r258027, r258051, r258052, r258243,

  Follow up r223485, which made AIM use the ABI thread pointer instead of
  PCPU fields for curthread, by doing the same to Book-E.

  Use the same implementation of copyinout.c for both AIM and Book-E.

  Actually add IOMMU domain to the list of known mappings.

  Following the approach with ACPI DMAR on x86, split IOMMU handling into
  a variant PCI bus instead of trying to shoehorn it into the PCI host bridge
  adapter.

  Make sure that TLB1 mappings are aligned correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,
ian [Wed, 14 May 2014 01:53:20 +0000 (01:53 +0000)]
MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,
    r257794, r257795, r257992

  Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring
  fdtbus in most cases.

  Make OF_nextprop() work correctly for FDT by using the libfdt
  fdt_next_property_offset() API.

  Do not panic if pmap_mincore() is called.

  An addendum: it is possible, though of questionable utility, for a node
  to have no properties at all.
  Add definition for the Atheros 8021 gigabit PHY.

  Consolidate Apple firmware hacks and improve them by switching on the
  presence of mac-io devices in the tree, which uniquely identifies Apple
  hardware.

  Allow OF_decode_addr() to also be able to map resources on big-endian
  devices.

  Make tsec work with the device tree present on the RB800.

  Be more flexible about which compatible strings to accept.  This brings up
  the PCI Express bus on the RB800 using the firmware device tree.

  Rename the "bare" platform "mpc85xx", which is what it actually is, and
  add actual platform probing based on PVR.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266000 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,
ian [Wed, 14 May 2014 01:35:43 +0000 (01:35 +0000)]
MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,
    r257368, r257416

  Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe
  methods.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265999 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257180, r257195, r257196, r257198, r257209, r257295
ian [Wed, 14 May 2014 01:16:05 +0000 (01:16 +0000)]
MFC r257180, r257195,  r257196, r257198, r257209, r257295

 Add some extra sanity checking and checks to printf format specifiers.

 Try even harder to find a console before giving up.

 Make devices with registers into the KVA region work reliably.

 Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.

 Return NOKEY instead of 0 if there are no more key presses queued.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRecord mergeinfo that got run over by a bus.
ian [Wed, 14 May 2014 00:55:21 +0000 (00:55 +0000)]
Record mergeinfo that got run over by a bus.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265997 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257161, r257169, r257178, r257190, r257191
ian [Wed, 14 May 2014 00:51:26 +0000 (00:51 +0000)]
MFC r257161, r257169, r257178, r257190, r257191

 Add pmap_mapdev_attr() and pmap_kenter_attr() interfaces.

 Fix concurrency issues with TLB1 updates and make pmap_kextract() search
 TLB1 mappings as well

  Interrelated improvements to early boot mappings:
  - Remove explicit requirement that the SOC registers be found except as an
    optimization (although the MPC85XX LAW drivers still require they be found
    externally, which should change).
  - Remove magic CCSRBAR_VA value.
  - Allow bus_machdep.c's early-boot code to handle non 1:1 mappings and
    systems not in real-mode or global 1:1 maps in early boot.
  - Allow pmap_mapdev() on Book-E to reissue previous addresses if the
    area is already mapped. Additionally have it check all mappings, not
    just the CCSR area.

 Add some extra sanity checking and checks to printf format specifiers.

 Bump initial TLB size. The kernel is not necessarily less than 16 MB

 Handle (in a slightly ugly way) ePAPR-type loaders that just place a
 device tree into r3.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRecord mergeinfo that was eaten by the dog. Yeah, that's my story and
ian [Wed, 14 May 2014 00:05:35 +0000 (00:05 +0000)]
Record mergeinfo that was eaten by the dog.  Yeah, that's my story and
I'm sticking to it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRecord missing merge info caused by an erroneous "helper" script I wrote.
ian [Tue, 13 May 2014 23:56:51 +0000 (23:56 +0000)]
Record missing merge info caused by an erroneous "helper" script I wrote.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix OpenSSL NULL pointer deference vulnerability.
delphij [Tue, 13 May 2014 23:19:16 +0000 (23:19 +0000)]
Fix OpenSSL NULL pointer deference vulnerability.

Obtained from: OpenBSD
Security: FreeBSD-SA-14:09.openssl
Security: CVE-2014-0198

git-svn-id: svn://svn.freebsd.org/base/stable/10@265986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDocument r265922, mrsas(4) merge.
gjb [Tue, 13 May 2014 22:43:02 +0000 (22:43 +0000)]
Document r265922, mrsas(4) merge.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@265984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of tzdata2014c
edwin [Tue, 13 May 2014 22:35:06 +0000 (22:35 +0000)]
MFC of tzdata2014c

- Egypt will go into DST in 15 May 2014

git-svn-id: svn://svn.freebsd.org/base/stable/10@265983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257162, r257175
ian [Tue, 13 May 2014 19:12:53 +0000 (19:12 +0000)]
MFC r257162, r257175

  The old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs.
  Use it universally. Book-E traps may also need revisiting due to the
  introduction of fixed-offset traps and the deprecation of IVORs in POWER
  ISA 2.06, but that's very much an issue for another day.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257111, r257144, r257157, r257183
ian [Tue, 13 May 2014 19:09:00 +0000 (19:09 +0000)]
MFC r257111, r257144, r257157, r257183

  Test UARTs physical address instead of virtual.

  Be a bit more flexible in how we find the console from the properties on
  /chosen, following the list of allowed console properties in ePAPR. Also
  do not require that stdin be defined and equal to stdout: stdin is
  nonstandard (for ePAPR) and console in an unexpected place is after all
  better than no console.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257115, r257116, r257117
ian [Tue, 13 May 2014 18:24:02 +0000 (18:24 +0000)]
MFC r257115, r257116, r257117

 Remove dead and duplicated code.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265972 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257114, r257118
ian [Tue, 13 May 2014 18:14:31 +0000 (18:14 +0000)]
MFC r257114, r257118

  Use common OFW root code to set up fdtbus. This is an almost purely
  negative diff that should improve reliability somewhat. There should be
  no differences in behavior -- please report any that crop up. This has been
  tested on ARM and PPC systems.

  Make sure to get the right node when looking up #interrupt-cells.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257093:
ian [Tue, 13 May 2014 18:08:15 +0000 (18:08 +0000)]
MFC r257093:

  Be a little more suspicious of thermal sensors, which can have single
  crazy readings occasionally. One wild reading should not be enough to
  trigger a shutdown, so instead wait for several concerning readings in
  a row.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256994, r257016, r257055, r257059, r257060, r257075
ian [Tue, 13 May 2014 18:06:26 +0000 (18:06 +0000)]
MFC r256994, r257016, r257055, r257059, r257060, r257075

  Add two new interfaces to ofw_bus:
  - ofw_bus_map_intr()
    Maps an (iparent, IRQ) tuple to a system-global interrupt number in some
    platform dependent way. This is meant to be implemented as a replacement
    for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus
    hierarchy.
  - ofw_bus_config_intr()
    Configures an interrupt (previously mapped) based on firmware sense flags.
    This replaces manual interpretation of the sense field in bus drivers and
    will, in a follow-up, allow that interpretation to be redirected to the PIC
    drivers where it belongs. This will eventually replace the tables in
    /sys/dev/fdt/fdt_ARCH.c

  The PowerPC/AIM code has been converted to use these globally, with an
  implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming
  OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly
  be integrated into pic_if.m and bounced through nexus into the PIC tree.

  Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The
  sparc64 driver will be modified to use this shortly.

  Allow PIC drivers to translate firmware sense codes for themselves. This
  is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not
  happen quite yet.

  Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs,
  which would try to treat the previously-mapped interrupts from
  fdt_decode_intr() as interrupt line numbers on the same parent PIC.

  Remove some of the code required for supporting ssm(4) on SPARC in favor
  of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated
  into this rework, this should be (trivially) revisited.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256973, r256974
ian [Tue, 13 May 2014 18:00:41 +0000 (18:00 +0000)]
MFC r256973, r256974

 If the device tree directly contains the timebase frequency, use it. This
 property is required by ePAPR, but maintain the fallback to bus-frequency
 for compatibility.  Allow 32 or 64 bits.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:
ian [Tue, 13 May 2014 17:59:17 +0000 (17:59 +0000)]
MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:

  Add a new function (OF_getencprop()) that undoes the transformation applied
  by encode-int. Specifically, it takes a set of 32-bit cell values and
  changes them to host byte order. Most non-string instances of OF_getprop()
  should be using this function, which is a no-op on big-endian platforms.

  Use the new function all over the place.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256901, r256914 (by nwhitehorn):
ian [Tue, 13 May 2014 17:18:48 +0000 (17:18 +0000)]
MFC r256901, r256914 (by nwhitehorn):

  Catch up on 6 years of improvements in Open Firmware nexus devices by
  importing the sparc64 one. At least 90% of this code is MI and will be
  moved into /sys/dev/ofw at some point in the future.

  Ignore registers on devices where the reg property is malformed. Issue a
  warning if this happens under bootverbose. This prevents some
  strange-looking entries in dmesg for SMU devices on Apple G5 systems.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256870, r256898, r256899, r256900 (by nwhitehorn):
ian [Tue, 13 May 2014 17:12:07 +0000 (17:12 +0000)]
MFC r256870, r256898, r256899, r256900 (by nwhitehorn):

 Standards-conformance and code deduplication:
  - Use bus reference phandles in place of FDT offsets as IRQ domain keys
  - Unify the identical macio/fdt/mambo OpenPIC drivers into one
  - Be more forgiving (following ePAPR) about what we need from the device
    tree to identify an OpenPIC
  - Correctly map all IRQs into an interrupt domain
  - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of
    failing attachment for that device.

  Allow lots of interrupts (useful on multi-domain platforms) and do not
  set device_quiet() on all devices attached under nexus(4).

git-svn-id: svn://svn.freebsd.org/base/stable/10@265959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):
ian [Tue, 13 May 2014 16:59:50 +0000 (16:59 +0000)]
MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):

 - Handle 2GB of ram
 - Allow the OFW interrupt mapping code to work with PCI devices not
   enumerated by Open Firmware, as in the case of FDT.
 - Provide an interface for PCI bus drivers that need some of ofw_pci's
   metadata during attach.
 - Use standard ofw_bus helpers instead of reinventing the wheel.
 - Make hard-wired TLB allocations be at minimum one page.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.
ian [Tue, 13 May 2014 16:52:21 +0000 (16:52 +0000)]
MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code.
ian [Tue, 13 May 2014 16:50:10 +0000 (16:50 +0000)]
MFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264216, r265817, r265822:
kevlo [Tue, 13 May 2014 06:09:01 +0000 (06:09 +0000)]
MFC r264216, r265817, r265822:

Add man page for udplite(4).

git-svn-id: svn://svn.freebsd.org/base/stable/10@265947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264212,r264213,r264248,r265776,r265811,r265909:
kevlo [Tue, 13 May 2014 06:05:53 +0000 (06:05 +0000)]
MFC r264212,r264213,r264248,r265776,r265811,r265909:

- Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
  Tested with vlc and a test suite [1].
  [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz

  Reviewed by: jhb, glebius, adrian

- Fix a logic bug which prevented the sending of UDP packet with 0 checksum.

- Disable TX checksum offload for UDP-Lite completely. It wasn't used for
  partial checksum coverage, but even for full checksum coverage it doesn't
  work.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265418
alc [Tue, 13 May 2014 05:26:43 +0000 (05:26 +0000)]
MFC r265418
  Prior to r254304, a separate function, vm_pageout_page_stats(), was used
  to periodically update the reference status of the active pages.  This
  function was called, instead of vm_pageout_scan(), when memory was not
  scarce.  The objective was to provide up to date reference status for
  active pages in case memory did become scarce and active pages needed to
  be deactivated.

  The active page queue scan performed by vm_pageout_page_stats() was
  virtually identical to that performed by vm_pageout_scan(), and so r254304
  eliminated vm_pageout_page_stats().  Instead, vm_pageout_scan() is
  called with the parameter "pass" set to zero.  The intention was that when
  pass is zero, vm_pageout_scan() would only scan the active queue.
  However, the variable page_shortage can still be greater than zero when
  memory is not scarce and vm_pageout_scan() is called with pass equal to
  zero.  Consequently, the inactive queue may be scanned and dirty pages
  laundered even though that was not intended by r254304.  This revision
  fixes that.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265945 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260567
alc [Tue, 13 May 2014 05:21:54 +0000 (05:21 +0000)]
MFC r260567
  Correctly update the count of stuck pages, "addl_page_shortage", in
  vm_pageout_scan().  There were missing increments in two less common
  cases.

  Don't conflate the count of stuck pages and the pageout deficit provided
  by vm_page_alloc{,_contig}().

  Handle held pages consistently in the inactive queue scan.  In the more
  common case, we did not move the page to the tail of the queue.  Whereas,
  in the less common case, we did.  There's no particular reason to move
  the page in the less common case, so remove it.

  Perform the calculation of the page shortage for the active queue scan a
  little earlier, before the active queue lock is acquired.  The correctness
  of this calculation doesn't depend on the active queue lock being held.

  Eliminate a redundant variable, "pcount".  Use the more descriptive
  variable, "maxscan", in its place.

  Apply a few nearby style fixes, e.g., eliminate stray whitespace and
  excess parentheses.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259750, r260245: Add PPS support to the am335x timer driver.
ian [Mon, 12 May 2014 22:33:22 +0000 (22:33 +0000)]
MFC r259750, r260245: Add PPS support to the am335x timer driver.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259744, cleanups to move global vars into softc, use named values, etc.
ian [Mon, 12 May 2014 22:30:10 +0000 (22:30 +0000)]
MFC r259744, cleanups to move global vars into softc, use named values, etc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants.
ian [Mon, 12 May 2014 22:25:41 +0000 (22:25 +0000)]
MFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRevert accidental commit that tagged along with an MFC commit.
ian [Mon, 12 May 2014 22:19:37 +0000 (22:19 +0000)]
Revert accidental commit that tagged along with an MFC commit.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259099: Fix a small error in calculating length of DELAY().
ian [Mon, 12 May 2014 22:15:57 +0000 (22:15 +0000)]
MFC r259099: Fix a small error in calculating length of DELAY().

git-svn-id: svn://svn.freebsd.org/base/stable/10@265936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260235: fixes to dockstar DTS source.
ian [Mon, 12 May 2014 21:40:03 +0000 (21:40 +0000)]
MFC r260235: fixes to dockstar DTS source.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265935 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264822: Allow .WAIT to appear in SUBDIR= lists
ian [Mon, 12 May 2014 21:22:53 +0000 (21:22 +0000)]
MFC r264822:  Allow .WAIT to appear in SUBDIR= lists

git-svn-id: svn://svn.freebsd.org/base/stable/10@265934 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r264966): add sysctl OIDs for actual swap zone size and capacity
des [Mon, 12 May 2014 20:48:04 +0000 (20:48 +0000)]
MFH (r264966): add sysctl OIDs for actual swap zone size and capacity

git-svn-id: svn://svn.freebsd.org/base/stable/10@265932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265285,265320:
pluknet [Mon, 12 May 2014 19:42:16 +0000 (19:42 +0000)]
MFC r265285,265320:

Documented the pget(9) system kernel interface.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265928 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 265555
ambrisko [Mon, 12 May 2014 17:55:24 +0000 (17:55 +0000)]
MFC 265555

dd mrsas(4) driver from LSI official support of newer MegaRAID SAS
cards.  LSI has been maintaining this driver outside of the FreeBSD
tree.  It overlaps support of ThunderBolt and Invader cards that mfi(4)
supports.  By default mfi(4) will attach to cards.  If the tunable:
hw.mfi.mrsas_enable=1
is set then mfi(4) will not probe and attach to these newer cards and
allow mrsas(4) to attach.  So by default this driver will not effect
a FreeBSD system unless mfi(4) is removed from the kernel or the
tunable is enabled.

mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices
show up as /dev/daX.  mfiutil(8) does not work with mrsas.  The FreeBSD
version of MegaCli and StorCli from LSI do work with mrsas.  It appears
that StorCli only works with mrsas.  MegaCli appears to work with mfi(4)
and mrsas(4).

It would be good to add mfiutil(4) support to mrsas, emulations modes,
kernel logging, device aliases to ease the transition between mfi(4)
and mrsas(4).

Style issues should be resolved by LSI when they get committers approved.
The plan is get this driver in FreeBSD 9.3 to improve HW support.

Thanks to LSI for developing, testing and working with FreeBSD to
make this driver co-exist in FreeBSD.  This improves the overall
support of MegaRAID SAS.

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>
Sponsored by: LSI

git-svn-id: svn://svn.freebsd.org/base/stable/10@265922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265703
davidcs [Mon, 12 May 2014 15:52:49 +0000 (15:52 +0000)]
MFC r265703
Modify Copyright information and other strings to reflect
Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation

git-svn-id: svn://svn.freebsd.org/base/stable/10@265917 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256690:
ae [Mon, 12 May 2014 12:04:44 +0000 (12:04 +0000)]
MFC r256690:
  Add an automatic resize support to the GEOM_PART class.

  When parent provider has been resized, the scheme specific G_PART_RESIZE
  method does an update of scheme's metadata. But all changes are not saved
  to disk, until `gpart commit` will be called.

MFC r265336:
  Add an advice what to do when partition was automatically resized.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265912 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265318:
ae [Mon, 12 May 2014 10:19:31 +0000 (10:19 +0000)]
MFC r265318:
  For schemes that do an automatic partition aligning move this code to
  separate function.

MFC r265331:
  Prevent an unexpected shrinking on resizing due to alignment for MBR,
  PC98 and VTOC8 schemes.

MFC r265333:
  Add better error description for case when we are doing resize and
  scheme-specific method returns EBUSY.

MFC r265539:
  It is safe to allow shrinking, when aligned size is bigger than current.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265910 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265363
truckman [Mon, 12 May 2014 04:27:10 +0000 (04:27 +0000)]
MFC r265363

Avoid unsigned integer overflow which can cause
rman_reserve_resource_bound() to return incorrect results.

Continue the initial search until the first viable region is found.

Add a comment to explain the search termination test.

PR: kern/188534
Reviewed by: jhb (previous version)

git-svn-id: svn://svn.freebsd.org/base/stable/10@265901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC rev. 265260:
thomas [Sun, 11 May 2014 20:44:58 +0000 (20:44 +0000)]
MFC rev. 265260:
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR: kern/162736

git-svn-id: svn://svn.freebsd.org/base/stable/10@265894 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 263302, 264461, 264772
gnn [Sun, 11 May 2014 17:18:09 +0000 (17:18 +0000)]
MFC: 263302, 264461, 264772

 263302:
 fix mbuf leak if it does not fit in software queue

 264461:
 Commit various fixes for the SolarFlare drivers, in particular
 this set of patches fixes support for systems with > 32 cores.

 Details include

 sfxge: RXQ index (not label) comes from FW in flush done/failed events

 Change the second argument name of the efx_rxq_flush_done_ev_t and
 efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
 comes from FW in flush done and failed events.

 sfxge: TXQ index (not label) comes from FW in flush done event

 Change the second argument name of the efx_txq_flush_done_ev_t prototype to
 highlight that TXQ index (not label) comes from FW in flush done event.

 sfxge: use TXQ type as label to support more than 32 TXQs

 There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
 in all other event queues.

 264772:
 Check that port is started when MAC filter is set

 The MAC filter set may be called without softc_lock held in the case of
 SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
 flag which implies port started, but it is not guaranteed to remain.
 softc_lock shared lock can't be held in the case of these ioctls processing,
 since it results in failure where kernel complains that non-sleepable
 lock is held in sleeping thread.

 Both problems are repeatable on LAG with LACP proto bring up.

Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265884 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r261913): switch default to sha512
des [Sun, 11 May 2014 14:54:17 +0000 (14:54 +0000)]
MFH (r261913): switch default to sha512
MFH (r264964): rewrite so DES still works when not the default
MFH (r262945): clean up man page

git-svn-id: svn://svn.freebsd.org/base/stable/10@265879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265269
brueffer [Sun, 11 May 2014 09:54:38 +0000 (09:54 +0000)]
MFC: r265269

Make the HARDWARE section ready for release notes generation; sort SEE ALSO.

Compared to the original revision, the list of supported chipsets was changed to
reflect those supported in this branch.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265264, r265270
brueffer [Sat, 10 May 2014 20:45:23 +0000 (20:45 +0000)]
MFC: r265264, r265270

Add rsu(4) and urtwn(4) to the hardware notes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265856 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r257408 by kevlo
brueffer [Sat, 10 May 2014 19:47:54 +0000 (19:47 +0000)]
MFC: r257408 by kevlo

Add manpage for urtwnfw, the Realtek RTL8188CU/RTL8192CU firmware
module.  Also fix a few nits in urtwn.4.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265263
brueffer [Sat, 10 May 2014 19:10:31 +0000 (19:10 +0000)]
MFC: r265263

Make this manpage ready for hardware notes generation, add more Xrefs and perform
general cleanup.

In particular, don't claim rsu(4) devices can be configured with hostname(1)...

git-svn-id: svn://svn.freebsd.org/base/stable/10@265848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259126:
rpaulo [Sat, 10 May 2014 08:10:01 +0000 (08:10 +0000)]
MFC r259126:

Activate the device before attempt to access any of its registers.  Without
this change we may end up with a panic (Fatal kernel mode data abort:
'External Non-Linefetch Abort (S)') as described in
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.

It is now possible to bring up I2C1 and I2C2 on BBB.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265810 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoManually MFC 262714:
rpaulo [Sat, 10 May 2014 08:07:41 +0000 (08:07 +0000)]
Manually MFC 262714:
  Add a missing semicolong, noticed by the gnu dt compiler.

In head, the directory layout changed and we can't svn merge correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265809 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265275:
kib [Sat, 10 May 2014 07:53:36 +0000 (07:53 +0000)]
MFC r265275:
Overwrite the de_Name for the directories on rename to correct the dot
name.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f