]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC 275412:
jhb [Mon, 23 Feb 2015 21:16:02 +0000 (21:16 +0000)]
MFC 275412:
The runtime linker needs to include a path to itself in the link map
it exports to the debugger.  It currently has two choices: it can use
a compiled-in path (/libexec/ld-elf.so.1) or it can use the path stored
in the interpreter path in the binary being executed.  The runtime linker
currently prefers the second.  However, this is usually wrong for compat32
binaries since the binary specifies the path of rtld on a 32-bit system
(/libexec/ld-elf.so.1) instead of the actual path (/libexec/ld-elf32.so.1).
For now, always assume the compiled in path (/libexec/ld-elf32.so.1) as
the rtld path and ignore the path in the binary for the 32-bit runtime
linker.

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

9 years agoMFC 274817,274878,276801,276840,278976:
jhb [Mon, 23 Feb 2015 18:38:41 +0000 (18:38 +0000)]
MFC 274817,274878,276801,276840,278976:
Improve support for XSAVE with debuggers.
- Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed
  to match what Linux does in that 1) it dumps the entire XSAVE area
  including the fxsave state, and 2) it stashes a copy of the current
  xsave mask in the unused padding between the fxsave state and the
  xstate header at the same location used by Linux.
- Teach readelf() to recognize NT_X86_XSTATE notes.
- Change PT_GET/SETXSTATE to take the entire XSAVE state instead of
  only the extra portion. This avoids having to always make two
  ptrace() calls to get or set the full XSAVE state.
- Add a PT_GET_XSTATE_INFO which returns the length of the current
  XSTATE save area (so the size of the buffer needed for PT_GETXSTATE)
  and the current XSAVE mask (%xcr0).

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

9 years agoMFC r278857:
pluknet [Mon, 23 Feb 2015 08:45:42 +0000 (08:45 +0000)]
MFC r278857:
   kdump: sendfile(2) "flags" argument needs casting on 64-bit platforms.

Sponsored by: Nginx, Inc.

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

9 years agoMFC r278983:
markj [Mon, 23 Feb 2015 01:24:10 +0000 (01:24 +0000)]
MFC r278983:
Free the zlib stream once the CTF section is decompressed.

MFC r278984:
Remove unnecessary checks for a NULL return value from malloc.

MFC r279089:
Let vn_rdwr() check for short reads.

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

9 years agoMFC r278871:
kib [Mon, 23 Feb 2015 01:17:45 +0000 (01:17 +0000)]
MFC r278871:
Array cannot be NULL, remove always true comparision.

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

9 years agoMFC r278840:
kevlo [Sun, 22 Feb 2015 15:30:08 +0000 (15:30 +0000)]
MFC r278840:
Xref the following in wlan(4):

- rsu(4)
- urtwn(4)

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

9 years agoMFC r277481:
kevlo [Sun, 22 Feb 2015 15:28:49 +0000 (15:28 +0000)]
MFC r277481:
Typo: ivalid -> invalid.

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

9 years agoMFC r278551:
kevlo [Sun, 22 Feb 2015 15:27:02 +0000 (15:27 +0000)]
MFC r278551:
Add preliminary support for the Ralink RT5390 and RT5392 chipsets.
Committed over the D-Link DWA-525 rev A2 on amd64 with WPA.

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

9 years agoMFC r278790, r278802:
pfg [Sun, 22 Feb 2015 02:14:49 +0000 (02:14 +0000)]
MFC r278790, r278802:
Initialize the allocation of variables related to the ext2 allocator.

Use malloc to clear the values and initialize e2fs_contigdirs
during allocation.  free() e2fs_contigdirs upon error.

While here clean up small style issues.

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

9 years agoMFC r278791:
pfg [Sun, 22 Feb 2015 01:42:45 +0000 (01:42 +0000)]
MFC r278791:
Reuse value of cursize instead of recalculating.

Reported by: Clang static checker

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

9 years agoMFC r278803, r278905:
pfg [Sun, 22 Feb 2015 01:31:28 +0000 (01:31 +0000)]
MFC r278803, r278905:
ulimit(3): Fix broken check.

The existing implementation had a broken comparison that could
overflow and return confusing values.  Replace this with a check
that avoids the overflow before it happens.

Consistently return a maximum value also on the case of negative
arguments since negative is considered an overflow and means
infinity for our current setrlimit().

New revamped version is credited to Bruce Evans.

CID: 1199295

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

9 years agoUpdate commented last revision.
gjb [Fri, 20 Feb 2015 20:33:43 +0000 (20:33 +0000)]
Update commented last revision.

Sponsored by: The FreeBSD Foundation

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

9 years agoAdd 'Generic Storage' section.
gjb [Fri, 20 Feb 2015 20:30:04 +0000 (20:30 +0000)]
Add 'Generic Storage' section.

Document r279002, r279055:
 ctld(8) update to control non-iSCSI CTL ports
 CTL LUN mapping rewrite

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r277583, arc_meta_limit exposed via kstats.
gjb [Fri, 20 Feb 2015 20:30:01 +0000 (20:30 +0000)]
Document r277583, arc_meta_limit exposed via kstats.

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r277434, fstyp(8) addition.
gjb [Fri, 20 Feb 2015 20:29:59 +0000 (20:29 +0000)]
Document r277434, fstyp(8) addition.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r278658:
rpaulo [Fri, 20 Feb 2015 20:02:47 +0000 (20:02 +0000)]
MFC r278658:

  Teach libproc how to find debugging symbols in /usr/lib/debug.

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

9 years agoDocument r278982, pmc callchain depths increased.
gjb [Fri, 20 Feb 2015 18:06:33 +0000 (18:06 +0000)]
Document r278982, pmc callchain depths increased.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r278594: Add missing asprintf() status checks.
mav [Fri, 20 Feb 2015 17:10:46 +0000 (17:10 +0000)]
MFC r278594: Add missing asprintf() status checks.

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

9 years agoMFC r278354: Teach ctld(8) to control non-iSCSI CTL ports.
mav [Fri, 20 Feb 2015 17:09:49 +0000 (17:09 +0000)]
MFC r278354: Teach ctld(8) to control non-iSCSI CTL ports.

This change introduces new target option "port", that assigns current target
to specified CTL port.  On config application ctld(8) will apply LUN mapping
according to target configuration to specified port and bring the port up.
On shutdown cltd(8) will remove the mapping and put the port down.

This change allows to configure both iSCSI and FibreChannel targets in the
same configuration file in alike way.

Kernel side support was added earlier at r278037.

Relnotes: yes
Sponsored by: iXsystems, Inc.

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

9 years agoMFC r278311: Some NetGraph debug polishing.
mav [Fri, 20 Feb 2015 11:52:46 +0000 (11:52 +0000)]
MFC r278311: Some NetGraph debug polishing.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC r278889:
kib [Fri, 20 Feb 2015 09:25:13 +0000 (09:25 +0000)]
MFC r278889:
Restore the extern qualifier on __cleanup.

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

9 years agoMFC r278856:
hselasky [Thu, 19 Feb 2015 17:42:12 +0000 (17:42 +0000)]
MFC r278856:
The "frag_info" pointer is already pointing to an array index.
Don't index twice.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r278301, r278315:
pfg [Thu, 19 Feb 2015 16:24:27 +0000 (16:24 +0000)]
MFC r278301, r278315:
tdelete(3): don't delete the node we are about to return.

CID: 272528
Obtained from: NetBSD (CVS rev. 1.4)

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

9 years agoMFC r278300, r278314:
pfg [Thu, 19 Feb 2015 16:17:44 +0000 (16:17 +0000)]
MFC r278300, r278314:
getdiskbyname(): plug resource leak

Variable cq going out of scope leaks the storage it points to.

CID: 270511
Phabric: D1775
Reviewed by: imp
Obtained from: NetBSD (CVS rev. 1.34)

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

9 years agoMFC r278322: Add support for multiple portal groups per target.
mav [Thu, 19 Feb 2015 14:52:01 +0000 (14:52 +0000)]
MFC r278322: Add support for multiple portal groups per target.

This change allows multiple "portal-group" options to be specified per
target.  Each of them may include new optional auth-group name parameter
to override per-target auth parameters for specific portal group.

Kernel side support was added earlier at r278161.

Sponsored by: iXsystems, Inc.

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

9 years agoMFC r278672: Teach CTL to ask GEOM devices about BIO_DELETE support.
mav [Thu, 19 Feb 2015 14:40:50 +0000 (14:40 +0000)]
MFC r278672: Teach CTL to ask GEOM devices about BIO_DELETE support.

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

9 years agoMFC r278625: Make XCOPY and WUT commands respect physical block size/offset.
mav [Thu, 19 Feb 2015 14:36:03 +0000 (14:36 +0000)]
MFC r278625: Make XCOPY and WUT commands respect physical block size/offset.

This change by 2-3 times improves performance of misaligned XCOPY and WUT
commands by avoiding unneeded read-modify-write cycles inside ZFS.

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

9 years agoMFC r278161: Bring some more order into iSCSI portal group tags support.
mav [Thu, 19 Feb 2015 14:33:46 +0000 (14:33 +0000)]
MFC r278161: Bring some more order into iSCSI portal group tags support.

While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.

Sponsored by: iXsystems, Inc.

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

9 years agoMFC r278037: CTL LUN mapping rewrite.
mav [Thu, 19 Feb 2015 14:31:16 +0000 (14:31 +0000)]
MFC r278037: CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports.  By default all ports are created without LUN mapping, exposing all
CTL LUNs as before.  But, if needed, LUN mapping can be manually set on
per-port basis via ctladm.  For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition.  LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed.  It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Relnotes: yes
Sponsored by: iXsystems, Inc.

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

9 years agoMFC r274853:
mav [Thu, 19 Feb 2015 14:28:47 +0000 (14:28 +0000)]
MFC r274853:
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.

This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.

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

9 years agoMFC r274804:
mav [Thu, 19 Feb 2015 14:26:49 +0000 (14:26 +0000)]
MFC r274804:
In conf_apply() remove iSCSI ports from kernel before removing LUNs.

Previous order confused initiators with messages about "removed" LUNs
during simple ctld restart without any real config change.  After this
commit initiators only reestablish lost connection, receive "Power on
occurred" UNIT ATTENTION status and continue normal operation.

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

9 years agoMFC r278619: Make WRITE SAME commands respect physical block size.
mav [Thu, 19 Feb 2015 13:06:38 +0000 (13:06 +0000)]
MFC r278619: Make WRITE SAME commands respect physical block size.

This change by 2-3 times improves performance of misaligned WRITE SAME
commands by avoiding unneeded read-modify-write cycles inside ZFS.

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

9 years agoMFC r278627:
kib [Thu, 19 Feb 2015 09:30:42 +0000 (09:30 +0000)]
MFC r278627:
Update libthr(3) man page to reflect the work done to support dlopen.

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

9 years agoMFC r277458, r277536, r277606, r277609, r277836, r277839,
gjb [Thu, 19 Feb 2015 03:57:47 +0000 (03:57 +0000)]
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:

 r277458:
  Move virtual machine / cloud provider targets and
  options from release/Makefile to their own Makefile.

  Add glue to allow enabling building cloud provider VM images
  by default.

  Add a 'vm-cloudware' target, used to drive all targets in
  CLOUDTARGETS.

  Add examples for WITH_CLOUDWARE to release.conf.sample.
  Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.

  Rewrite to consolidate VM image build scripts into one.

  Fix duplicated mkimg(1) call in vm_create_disk().

  Add primitive (untested) PowerPC/PowerPC64 VM image support.

  Note: As it is currently written, the /boot/pmbr and
  /boot/{gptboot,boot1.hfs} use the build host and not the
  target build.  Fixing this is likely going to be a hack in
  itself.

  mount(8) and umount(8) devfs(5) as needed.

  Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that
  it is consolidated into one file.

  Fix paths for the base image and output disk image files.

  Set the boot partition type to 'apple-boot' for powerpc.

  In vm_install_base(), copy the host resolv.conf into the build
  chroot before attempting to do anything that requires working DNS
  (i.e., pkg bootstrap).

  In vm_extra_pre_umount(), remove the resolv.conf before the disk
  image is unmounted from the backing md(4).

  Silence errors when umounting the chroot's /dev, since it probably
  doesn't exist when we're running this.

  Unmount filesystems before attempting to destroy the md which
  holds them.

  Unmount filesystem and destroy md before we read the vnode from
  disk and package it into a disk image.  Otherwise we end up
  packaging an unclean filesystem.

  Merge duplicative vm-CLOUDTYPE targets before additional duplication
  gets added by the impending arrival of ec2 and gcloud.

  Add NOSWAP option which can be set by a vmimage.conf file to specify
  that no swap space should be created in the image.  This will be used
  by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral"
  disks which are physically attached to the Xen host node.

  In vm_extra_install_packages(), only bootstrap pkg(8) if
  VM_EXTRA_PACKAGES is empty.

  In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was
  bootstrapped earlier.

  In vm_extra_install_base(), do not install waagent in the openstack
  image, because it is not used.  This appears to be a copy mistake.

  Remove vm_extra_install_base() from the openstack.conf entirely,
  since it does not need to be overridden.

  Enable password-less sudo for openstack images.

  Update the VM_EXTRA_PACKAGES list for the openstack images.

  Remove vm_extra_install_base() for the Azure image, now that the
  waagent exists in the ports tree.

  Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list.

  In vm_extra_pre_umount(), remove the explicit pkg(8) install
  list, as dependencies are resolved by sysutils/azure-agent.

  Add a 'list-cloudware' target to print the list of supported CLOUDWARE
  values and a description.

  Add the AZURE_DESC and OPENSTACK_DESC descriptions.

  Update release(7)

  Add 'list-vmtargets' target, which produces a list of all supported
  VM and cloud provider images.

  Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions.

  Update release(7) to document the list-vmtargets target.

  Add initial support for the GCE (Google Compute Engine) cloud hosting
  provider image.

  Remove the console setting from rc.conf(5), which is not used there.
  While here, set console to include vidconsole in the loader.conf(5).

  Remove the pkg-clean(8) call from vm_extra_pre_umount() since the
  function is often overridden.

  Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated
  code.

  Move resolv.conf(5) removal back to vm_extra_pre_umount() where it
  belongs.

  The GCE image needs resolv.conf(5) to exist (created as part of the
  image setup), so it cannot be removed.

  Comment the line that configures ttys(5) to 'off', which makes it
  impossible to test that the image boots.

  Add a note explaining why the line is commented, and not (yet) removed
  entirely.

  Move the 'install' bits that are specific to virtual machine images
  from the Makefile to Makefile.vm.

  Rename the 'install' target to 'release-install', and add a new
  'vm-install' target.

  Add a new 'install' target that invokes the new targets.

  Add WITH_CLOUDWARE to the list of make(1) variables for the release
  build.

  Remove hw.vga.textmode=1 from the VM image loader.conf, which was
  included during test builds and not intended to be included when
  merging this project branch back to head.

  Remove mk-azure.sh, which is no longer needed.

 r277536:
  Rename the 'release' target to 'real-release', and add two targets,
  'vm-release' and 'cloudware-release', that are invoked if
  WITH_VMIMAGES and WITH_CLOUDWARE are not empty.

  This fixes an issue where 'make release' would not build the cloud
  provider targets because CLOUDWARE was not yet set.

  Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to Makefile.vm.

  Note: There is no 'cloudware-install' target yet, since some of the
  disk image names may need to be specific to the provider, so this is
  probably best handled by the build scripts.

 r277606:
  Provide a recipe of "true" for building the "release" target once
  its prerequisites are satisfied, in order to avoid having an implicit
  rule triggered by the presence of release.sh.

 r277609:
  When iterating through VMFORMATS, the VMBASE file is not removed
  or truncated to a zero-size file, which if used to create more
  than one disk image format, can result in accidental pollution of
  the target formatted disk image.

  Instead of using a single VMBASE image (vm.img, by default), use
  a single base file for each format, named as VMFORMAT.img, which
  produces VMBASE.VMFORMAT as the final formatted image.

 r277836:
  Rename the 'system' target to 'disc1', which is specific to the
  disc1.iso installer image.

  Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
  to CLEANDIRS.

  Ensure the 'dvd' target depends on 'packagesystem'.

  Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
  target, not 'disc1' (previously 'system').

  Use .TARGET as the target installation directory for the disc1.iso
  and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
  respectively, mimicking the behavior of the 'dvd' target.

  Remove '@true' from the 'release' target, and instead use
  'touch ${.TARGET}' to prevent multiple iterations of
  'make release' from clobbering previously-built installer
  medium.

 r277839:
  Update release(7) to reflect renaming the 'system' target to 'disc1'.

 r278118:
  Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
  deduplicate.

  Evaluate if firstboot_freebsd_update should be enabled based on
  UNAME_r, because it is not supported for the -CURRENT or -STABLE
  branches.

 r278119:
  Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)

 r278206:
  Bump copyright after r277458.

 r278502:
  In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
  VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
  a character device before it is sourced.

  While here, be sure to exit if usage() is called.

  This should effectively be no-op, but the usage() output was
  discovered while investigating a larger issue.

* Several changes local to stable/10 were needed in order to handle
  UEFI images that are specific to this branch.

Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r275140: Increase default and maximum callchain depths
emaste [Thu, 19 Feb 2015 02:56:34 +0000 (02:56 +0000)]
MFC r275140: Increase default and maximum callchain depths

Bump the default from 16 to 32, to accommodate kernel flamegraphs.
Bump the maximum from 32 to 128, to accommodate deep user stacks.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC 278228:
ken [Wed, 18 Feb 2015 23:08:13 +0000 (23:08 +0000)]
MFC 278228:

The __FreeBSD_version has been changed to 1001508 for the addition of the
CDAI_TYPE_EXT_INQ request type.

  ------------------------------------------------------------------------
  r278228 | ken | 2015-02-04 17:12:21 -0700 (Wed, 04 Feb 2015) | 32 lines

  Add support for probing the SCSI VPD Extended Inquiry page (0x86).

  This VPD page is effectively an extension of the standard Inquiry
  data page, and includes lots of additional bits.

  This commit includes support for probing the page in the SCSI probe code,
  and an additional request type for the XPT_DEV_ADVINFO CCB.  CTL already
  supports the Extended Inquiry page.

  Support for querying this page in the sa(4) driver will come later.

  sys/cam/scsi/scsi_xpt.c:
   Probe the Extended Inquiry page, if the device supports it, and
   return it in response to a XPT_DEV_ADVINFO CCB if it is requested.

  sys/cam/scsi/cam_ccb.h:
   Define a new advanced information CCB data type, CDAI_TYPE_EXT_INQ.

  sys/cam/cam_xpt.c:
   Free the extended inquiry data in a device when the device goes
   away.

  sys/cam/cam_xpt_internal.h:
   Add an extended inquiry data pointer and length to struct cam_ed.

  sys/sys/param.h
   Bump __FreeBSD_version for the addition of the new
   CDAI_TYPE_EXT_INQ advanced information type.

  Sponsored by: Spectra Logic
  MFC after: 1 week

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

9 years agoMFC r276893: mkimg: Add MBR EFI partition type
emaste [Wed, 18 Feb 2015 19:42:37 +0000 (19:42 +0000)]
MFC r276893: mkimg: Add MBR EFI partition type

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r278827
sbruno [Wed, 18 Feb 2015 16:28:55 +0000 (16:28 +0000)]
MFC r278827

Check for required arguments before accessing argv[0] and core dumping.

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

9 years agoMFC r278795:
kib [Wed, 18 Feb 2015 08:10:13 +0000 (08:10 +0000)]
MFC r278795:
Reparenting done by debugger attach can leave reaper without direct
children.  Handle the situation instead asserting that it is
impossible.

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

9 years agoMFC r278794:
kib [Wed, 18 Feb 2015 08:08:09 +0000 (08:08 +0000)]
MFC r278794:
Return with the process locked.

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

9 years agoMFC r278606:
kib [Wed, 18 Feb 2015 08:06:36 +0000 (08:06 +0000)]
MFC r278606:
Registers definitions for the new capabilities.

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

9 years agoMFC r278605:
kib [Wed, 18 Feb 2015 08:04:03 +0000 (08:04 +0000)]
MFC r278605:
vm_page_lookup() accepts read-locked object.

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

9 years agoMFC r278739:
delphij [Tue, 17 Feb 2015 19:14:16 +0000 (19:14 +0000)]
MFC r278739:

Disallow pattern spaces which would cause intermediate calculations to
overflow size_t.

Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon)
Security: CERT VU#695940

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

9 years agoMFC r278500: Do not abort already aborted tasks.
mav [Tue, 17 Feb 2015 17:34:45 +0000 (17:34 +0000)]
MFC r278500: Do not abort already aborted tasks.

This fixes abort of new tasks with the same tags as previously aborted,
but still remaining on the queue.

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

9 years agoMFC r278751:
kib [Tue, 17 Feb 2015 01:03:06 +0000 (01:03 +0000)]
MFC r278751:
Properly interpose libc spinlocks, was missed in r276630.

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

9 years agoMFC r278321
scottl [Mon, 16 Feb 2015 22:33:44 +0000 (22:33 +0000)]
MFC r278321

Use direct hardware access for internal requests for KCS and SMIC.  In
particular, updates to the watchdog should no longer sleep.
- Add a new IPMI_IO_LOCK for low-level I/O access.  Use this for
  kcs_polled_request() and smic_polled_request().
- Add a new backend callback "ipmi_driver_request" to handle a driver
  request.  The new callback performs the request sychronously for KCS
  and SMIC.  SSIF still defers the work to the worker thread since the
  worker thread sleeps during request processing anyway.
- Allocate driver requests on the stack rather than using malloc().

Submitted by: jhb

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

9 years agoMFC r278379:
dchagin [Mon, 16 Feb 2015 20:58:20 +0000 (20:58 +0000)]
MFC r278379:

Add Neoway WM620 module ID.

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

9 years agoClamp too large hwpmc callchaindepth to maximum
emaste [Sun, 15 Feb 2015 20:55:26 +0000 (20:55 +0000)]
Clamp too large hwpmc callchaindepth to maximum

If the depth requested by the user is too large, it's better to provide
the maximum than the smaller default.

MFC of: r274766
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC: r266990 (missed in r265946)
marius [Sun, 15 Feb 2015 20:53:50 +0000 (20:53 +0000)]
MFC: r266990 (missed in r265946)

Fix build UDP-Lite with VIMAGE enabled when building with gcc.

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

9 years agoMFC: r278532
marius [Sun, 15 Feb 2015 20:02:29 +0000 (20:02 +0000)]
MFC: r278532

Fix compilation with GCC in the PAE case.

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

9 years agoMFC of r278472
rrs [Sun, 15 Feb 2015 13:57:44 +0000 (13:57 +0000)]
MFC of r278472
This fixes a bug in the way that the LLE timers for nd6
and arp were being used. They basically would pass in the
mutex to the callout_init. Because they used this method
to the callout system, it was possible to "stop" the callout.
When flushing the table and you stopped the running callout, the
callout_stop code would return 1 indicating that it was going
to stop the callout (that was about to run on the callout_wheel blocked
by the function calling the stop). Now when 1 was returned, it would
lower the reference count one extra time for the stopped timer, then
a few lines later delete the memory. Of course the callout_wheel was
stuck in the lock code and would then crash since it was accessing
freed memory. By using callout_init(c, 1) we always get a 0 back
and the reference counting bug does not rear its head. We do have
to make a few adjustments to the callouts themselves though to make
sure it does the proper thing if rescheduled as well as gets the lock.

Sponsored by: Netflix Inc.

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

9 years agoMFC of r278469, r278623
rrs [Sun, 15 Feb 2015 13:24:32 +0000 (13:24 +0000)]
MFC of r278469, r278623

278469:
This fixes two conditions that can incur when migration
is being done in the callout code and harmonizes the macro
use.:
1) The callout_active() will lie. Basically if a migration
   is occuring and the callout is about to expire and the
   migration has been deferred, the callout_active will no
   longer return true until after the migration. This confuses
   and breaks callers that are doing callout_init(&c, 1); such
   as TCP.
2) The migration code had a bug in it where when migrating, if
   a two calls to callout_reset came in and they both collided with
   the callout on the wheel about to run, then the second call to
   callout_reset would corrupt the list the callout wheel uses
   putting the callout thread into a endless loop.
3) Per imp, I have fixed all the macro occurance in the code that
   were for the most part being ignored.

278623:

This fixes a bug I in-advertantly inserted when I updated the callout
code in my last commit. The cc_exec_next is used to track the next
when a direct call is being made from callout. It is *never* used
in the in-direct method. When macro-izing I made it so that it
would separate out direct/vs/non-direct. This is incorrect and can
cause panics as Peter Holm has found for me (Thanks so much Peter for
all your help in this). What this change does is restore that behavior
but also get rid of the cc_next from the array and instead make it
be part of the base callout structure. This way no one else will get
confused since we will never use it for non-direct.

Sponsored by: Netflix Inc.

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

9 years agoMFC r277917 (by ken), r278598:
mav [Sun, 15 Feb 2015 08:52:09 +0000 (08:52 +0000)]
MFC r277917 (by ken), r278598:
Improve SCSI Extended Inquiry VPD page (0x86) support.

sys/cam/scsi/scsi_all.h:
        In struct scsi_extended_inquiry_data:
        - Increase the length field to 2 bytes, as it is 2 bytes in SPC-4.
        - Add bit definitions for the various Activiate Microcode actions.
        - Add the Sequential Access Logical Block Protection support bit,
          since we need that in the sa(4) driver.  (For modifications
          that will come later.)
        - Add definitions for the various Multi I_T Nexus Microcode
          Download modes.

sys/cam/ctl/ctl.c:
        As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED"
        is to be given per I_T nexus.  Once it is reported, the unit
        attention condition should be cleared for all LUNS attached to
        an I_T nexus.

        Previously that only happened when a REPORT LUNS command was
        processed.

        This behavior may be different (according to SAM-5) when the
        UA_INTLCK_CTRL bits are non-zero in the control mode page but
        CTL does not currently support that.

        So, in view of the spec, whenever we report a LUN inventory
        change unit attention, clear it on all LUNs for that
        particular I_T nexus.

        Add a new function, ctl_clear_ua() that will clear a unit
        attention on all LUNs for the given I_T nexus.

        One field in the extended inquiry data that we could potentially
        report at some point is the maximum supported sense data length.
        To do that, we would the SIM to report (via path inquiry
        perhaps) how much sense data it is able to send.

        Add comments to explain some of the bits that are set in the
        Extended Inquiry VPD page.

        Add a few comments to make it more clear which functions handle
        various VPD pages.

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

9 years agoMFC r278621: Fix man page to match real option names.
mav [Sun, 15 Feb 2015 08:38:43 +0000 (08:38 +0000)]
MFC r278621: Fix man page to match real option names.

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

9 years agoAdd clang patches corresponding to r278788.
dim [Sat, 14 Feb 2015 23:28:09 +0000 (23:28 +0000)]
Add clang patches corresponding to r278788.

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

9 years agoPull in r201130 from upstream clang trunk (by Ted Kremenek):
dim [Sat, 14 Feb 2015 23:25:39 +0000 (23:25 +0000)]
Pull in r201130 from upstream clang trunk (by Ted Kremenek):

  Fix PCH deserialization bug with local static symbols being treated
  as local extern.

  This triggered a miscompilation of code using Boost's
  function_template.hpp when it was included inside a PCH file.  A
  local static within that header would be treated as local extern,
  resulting in the wrong mangling.  This only occurred during PCH
  deserialization.

  Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.

This fixes a crash in audio/murmur, which is using both PCH and Boost.

Direct commit to stable/10 and stable/9, since head has clang 3.5.1,
which already includes this change.

Reported by: smh
PR: 197389

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

9 years agoMFC r274670, r274671, r276168:
loos [Sat, 14 Feb 2015 21:16:19 +0000 (21:16 +0000)]
MFC r274670, r274671, r276168:

Moves all the duplicate code to a single function.

Verify for invalid modes and unwanted flags before pass the new flags to
driver.

Make gpio_default_map_gpios() static.  No functional changes.

Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.

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

9 years agoMFC r274642, 274643:
loos [Sat, 14 Feb 2015 21:02:33 +0000 (21:02 +0000)]
MFC r274642, 274643:

Remove unnecessary code.

After r273566, the gpiobus version of bus_print_child() also works on FDT
systems.

Fix gpiobus_child_location_str() to return a real string with the mapped
pins.

Make gpiobus_print_pins() static again.

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

9 years agoMFC r274638:
loos [Sat, 14 Feb 2015 20:57:27 +0000 (20:57 +0000)]
MFC r274638:

Add basic interrupt management code to gpiobus and ofw_gpiobus.

This is the general support to allow the use of GPIO pins as interrupt
sources for direct gpiobus children.

The use of GPIO pins as generic interrupt sources (for an ethernet driver
for example) will only be possible when arm/intrng is complete.  Then, most
of this code will need to be rewritten, but it works for now, is better
than what we have and will allow further developments.

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

9 years agoMFC r273917, r273926:
loos [Sat, 14 Feb 2015 20:50:38 +0000 (20:50 +0000)]
MFC r273917, r273926:

Fix the gpiobus locking by using a more sane model where it isn't necessary
hold the gpiobus lock between the gpio calls.

gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus
what to do when the bus is already busy.

When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep
until the bus became free.

With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right
away and then it can act upon.

This fixes the gpioiic(4) locking issues that arises when doing multiple
concurrent access on the bus.

Fix the build of non-FDT systems by moving the gpiobusvar.h header outside
the FDT #ifdef.

While here remove a few unused headers.

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

9 years agoMFC r273799:
loos [Sat, 14 Feb 2015 20:37:33 +0000 (20:37 +0000)]
MFC r273799:

Make the GPIO children attach to the first unit available and not only to
unit 0.

This fix a bug where a GPIO controller could fail to attach its children
(gpioc and gpiobus) if another GPIO driver attach first.

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

9 years agoMFC r273566, r273569:
loos [Sat, 14 Feb 2015 20:32:24 +0000 (20:32 +0000)]
MFC r273566, r273569:

Provide a working GPIOBUS_IVAR() macro for FDT systems.

Move the duplicated code to a single function.

No functional changes.

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

9 years agosync the code with the version in head. which the exception of
luigi [Sat, 14 Feb 2015 19:41:26 +0000 (19:41 +0000)]
sync the code with the version in head. which the exception of
svn 275358 (M_FLOWID deprecation, only a couple of lines)
which cannot be merged.

if_lem_netmap.h, if_re_netmap.h:
- use the same (commented out) function to update the stat counters
  as in HEAD. This is a no-op here

netmap.c
- merge 274459 (support for private knote lock)
  and minor changes on nm_config and comments

netmap_freebsd.c
- merge 274459 (support for private knote lock)
- merge 274354 (initialize color if passed as argument)

netmap_generic.c
- fix a comment

netmap_kern.h
- revise the lock macros, using sx locks;
  merge 274459 (private knote lock)

netmap_monitor.c
- use full memory barriers

netmap_pipe.c
- use full memory barriers, use length from the correct queue
  (mostly cosmetic, since the queues typically have the same size)

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

9 years agoMFC: r273264, r274409, r278212, r278213:
loos [Sat, 14 Feb 2015 19:28:26 +0000 (19:28 +0000)]
MFC: r273264, r274409, r278212, r278213:

Add a workaround needed to fix a bug of Arasan Host Controller where it may
lose the contents of consecutive writes (that happens within two SD card
clock cycles).

This fixes the causes of instability during the SD card detection and
identification on Raspberry Pi (which happens at 400 kHz and so was much
more vulnerable to this issue).

Remove the previous workaround which clearly can't provide the same effect.

Remove stale comments about the issues with HS mode.

Remove a previous workaround to limit the minimum sdhci frequency that
isn't needed anymore.

Remove some duplicate calls to bus_release_resource() and destroy the mutex
on error cases.

While here remove unnecessary includes.

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

9 years agosync with the version in head (r274338):
luigi [Sat, 14 Feb 2015 19:18:56 +0000 (19:18 +0000)]
sync with the version in head (r274338):
fix one comment, and return kernel-supplied error if available.
no API changes.

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

9 years agoMFC r273999:
hrs [Sat, 14 Feb 2015 18:56:44 +0000 (18:56 +0000)]
MFC r273999:

Do not try to create a /dev/log symlink in a jail.

PR: 179828

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

9 years agoMFC r276298, r276303:
loos [Sat, 14 Feb 2015 18:45:43 +0000 (18:45 +0000)]
MFC r276298, r276303:

Remove the '#undef DEBUG' that should not be committed.

Removes unused and duplicate headers.

Bring the wait limit on mailbox write to a more sane value.

Fix a off-by-one bug on wait time limit.

Remove extra blank line.

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

9 years agoMFC r276296, r277207:
loos [Sat, 14 Feb 2015 18:37:36 +0000 (18:37 +0000)]
MFC r276296, r277207:

Make consistent use of the correct debug macros across the file.

Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl.

Remove the unused temperature conversion macros.

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

9 years agoMFC r278362: Fix couple issues in ctlstat header printing.
mav [Sat, 14 Feb 2015 08:52:09 +0000 (08:52 +0000)]
MFC r278362: Fix couple issues in ctlstat header printing.

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

9 years agoMFC r277643:
kib [Sat, 14 Feb 2015 08:44:12 +0000 (08:44 +0000)]
MFC r277643:
Remove Giant from /dev/mem and /dev/kmem.

MFC r277743:
Arm: ensure that _tmppt KVA is used exclusively.

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

9 years agoMFC r278364:
ngie [Sat, 14 Feb 2015 06:58:32 +0000 (06:58 +0000)]
MFC r278364:

r278364:

  Remove kdb_backtrace extern; get the definition for kdb_backtrace from
  <sys/kdb.h> instead

  Fix whitespace in WARN_ON macro definition

  Reviewed by: np
  Differential Revision: https://reviews.freebsd.org/D1799
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r278603, r278607:
gjb [Sat, 14 Feb 2015 01:33:11 +0000 (01:33 +0000)]
MFC r278603, r278607:

 r278603:
   Ensure ORGANIZATION_NAME is quoted when ORGANIZATION
   could contain strings of two or more words.

 r278607:
   Reduce number of lines to set ORGANIZATION_NAME in
   freebsd-organization.h.

PR:  197540
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r278032:
ian [Fri, 13 Feb 2015 23:43:59 +0000 (23:43 +0000)]
MFC r278032:

  Do not skip setting the memory 'reg' property if the fdt data already
  contains one.

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

9 years agoMFC r278031: Remove a stale comment.
ian [Fri, 13 Feb 2015 23:37:56 +0000 (23:37 +0000)]
MFC r278031:  Remove a stale comment.

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

9 years agoMFC r277655, r277989: Reimplement fdt_clock_register_provider() correctly.
ian [Fri, 13 Feb 2015 23:37:11 +0000 (23:37 +0000)]
MFC r277655, r277989:  Reimplement fdt_clock_register_provider() correctly.

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

9 years agoMFC r277555, r277568:
ian [Fri, 13 Feb 2015 23:34:40 +0000 (23:34 +0000)]
MFC r277555, r277568:

  Enable all sd device clocks on imx6.

  Add imx5/6 pinmux driver support for encoded input register configs.

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

9 years agoMFC r277523: Add last_fault_code when DEBUG is defined.
ian [Fri, 13 Feb 2015 23:32:03 +0000 (23:32 +0000)]
MFC r277523:  Add last_fault_code when DEBUG is defined.

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

9 years agoMFC r277532, r277533: Add Maxmem global for arm.
ian [Fri, 13 Feb 2015 23:30:48 +0000 (23:30 +0000)]
MFC r277532, r277533:  Add Maxmem global for arm.

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

9 years agoMFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,
ian [Fri, 13 Feb 2015 22:32:02 +0000 (22:32 +0000)]
MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,
    r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479,
    r277480, r277512, r277516:

  Add inline implementations of arm bus_space_read/write_N().

  Revise the arm bus_space implementation to avoid dereferencing the tag on
  every operation to retrieve the bs_cookie value almost nothing actually uses.

  Use the explicit member initializer style to init the bus_space struct.

  Use arm/bus_space-v6.c for all armv6 systems

  Consolidate many identical implementations of bus_space to a single
  common tag and implementation shared by armv4 and armv6.

  Micro-optimize the new arm inline bus_space implementation by grouping all
  the data the inline functions access together at the start of the bus_space
  struct so that they all fit in a single cache line.

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

9 years agoMFC r272103: Move s3c2xx0 into the samsung directory.
ian [Fri, 13 Feb 2015 22:08:19 +0000 (22:08 +0000)]
MFC r272103:  Move s3c2xx0 into the samsung directory.

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

9 years agoSynchronize the default C++ stack in stable/10 with head, by merging
dim [Fri, 13 Feb 2015 22:05:54 +0000 (22:05 +0000)]
Synchronize the default C++ stack in stable/10 with head, by merging
almost all recent changes to libc++ and libcxxrt.

MFC r256642:
  Since C++ typeinfo objects are currently not guaranteed to be merged at
  runtime by the dynamic linker, check for their equality in libcxxrt by
  not only comparing the typeinfo's name pointers, but also comparing the
  full names, if necessary.  (This is similar to what GNU libstdc++ does
  in its default configuration.)  The 'deep' check can be turned off again
  by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt.

  Reviewed by: theraven

MFC r270522 (by rdivacky):
  The standard we compile libc++ with is called c++11 not c++0x.

MFC r273066 (by bapt):
  Import patch from libc++ r197313 which allows using libc++ headers with gcc

  Differential Revision: https://reviews.freebsd.org/D942
  Reviewed by: imp

MFC r273381 (by bapt):
  Add support for __cxa_throw_bad_array_new_length in libcxxrt

  It is required for use with newer g++49

  Differential Revision: https://reviews.freebsd.org/D982
  Reviewed by: theraven
  Approved by: theraven

MFC r273382 (by bapt):
  Fix build by marking the new functions as weak
  This is a temporary fix

MFC r273407 (by bapt):
  When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a
  fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy
  its links dependencies in the least hackish way.
  Please note that this hacky libstds++ never get installed on the final system

  Reviewed by: imp

MFC r273434 (by bapt):
  Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
  when used in combinaison with libcxxrt since it is now defined there already.
  This fixes building world

MFC r276417:
  Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.

  Interesting fixes:
  76584a0  Reorganize code to use only 32bit atomic ops for 32bit platforms
  30d2ae5  Implement __cxa_throw_bad_array_new_length

  Reviewed by: bapt
  Differential Revision: https://reviews.freebsd.org/D1390

MFC r277217:
  Import libc++ trunk r224926.  This fixes a number of bugs, completes
  C++14 support[1], adds more C++1z features[2], and fixes the following
  LWG issues[3]:

  1450: Contradiction in regex_constants
  2003: String exception inconsistency in erase.
  2075: Progress guarantees, lock-free property, and scheduling
assumptions
  2104: unique_lock move-assignment should not be noexcept
  2112: User-defined classes that cannot be derived from
  2132: std::function ambiguity
  2135: Unclear requirement for exceptions thrown in
condition_variable::wait()
  2142: packaged_task::operator() synchronization too broad?
  2182: Container::[const_]reference types are misleadingly specified
  2186: Incomplete action on async/launch::deferred
  2188: Reverse iterator does not fully support targets that overload
operator&
  2193: Default constructors for standard library containers are explicit
  2205: Problematic postconditions of regex_match and regex_search
  2213: Return value of std::regex_replace
  2240: Probable misuse of term "function scope" in [thread.condition]
  2252: Strong guarantee on vector::push_back() still broken with C++11?
  2257: Simplify container requirements with the new algorithms
  2258: a.erase(q1, q2) unable to directly return q2
  2263: Comparing iterators and allocator pointers with different
const-character
  2268: Setting a default argument in the declaration of a member
function assign of std::basic_string
  2271: regex_traits::lookup_classname specification unclear
  2272: quoted should use char_traits::eq for character comparison
  2278: User-defined literals for Standard Library types
  2280: begin / end for arrays should be constexpr and noexcept
  2285: make_reverse_iterator
  2288: Inconsistent requirements for shared mutexes
  2291: std::hash is vulnerable to collision DoS attack
  2293: Wrong facet used by num_put::do_put
  2299: Effects of inaccessible key_compare::is_transparent type are not
clear
  2301: Why is std::tie not constexpr?
  2304: Complexity of count in unordered associative containers
  2306: match_results::reference should be value_type&, not const
value_type&
  2308: Clarify container destructor requirements w.r.t. std::array
  2313: tuple_size should always derive from integral_constant<size_t, N>
  2314: apply() should return decltype(auto) and use decay_t before
tuple_size
  2315: weak_ptr should be movable
  2316: weak_ptr::lock() should be atomic
  2317: The type property queries should be UnaryTypeTraits returning
size_t
  2320: select_on_container_copy_construction() takes allocators, not
containers
  2322: Associative(initializer_list, stuff) constructors are
underspecified
  2323: vector::resize(n, t)'s specification should be simplified
  2324: Insert iterator constructors should use addressof()
  2329: regex_match()/regex_search() with match_results should forbid
temporary strings
  2330: regex("meow", regex::icase) is technically forbidden but should
be permitted
  2332: regex_iterator/regex_token_iterator should forbid temporary
regexes
  2339: Wording issue in nth_element
  2341: Inconsistency between basic_ostream::seekp(pos) and
basic_ostream::seekp(off, dir)
  2344: quoted()'s interaction with padding is unclear
  2346: integral_constant's member functions should be marked noexcept
  2350: min, max, and minmax should be constexpr
  2356: Stability of erasure in unordered associative containers
  2357: Remaining "Assignable" requirement
  2359: How does regex_constants::nosubs affect basic_regex::mark_count()?
  2360: reverse_iterator::operator*() is unimplementable

  [1] http://libcxx.llvm.org/cxx1y_status.html
  [2] http://libcxx.llvm.org/cxx1z_status.html
  [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html

  Exp-run: antoine

MFC r277944:
  Partially revert r273382, to reduce diffs against upstream.  This was a
  temporary fix to solve a conflict with an older version of libc++, and
  it is no longer relevant.

MFC r278010:
  Revert r256642, not only to reduce diffs against upstream libcxxrt, but
  also because it is the wrong approach: comparing typeinfo names deeply
  causes trouble if two loaded DSOs use independent types of the same
  name.

  In addition, this particular change was never merged to FreeBSD 10.x and
  9.x, so let's get rid of it before it ends up in an 11.x release.

  Discussed with: theraven, joerg@netbsd

MFC r278016:
  Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc.

  Interesting fixes:
  1cb607e Correct gcc version check for __cxa_begin_catch() declaration
          with or without throw()

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

9 years agoMFC r257740, r257739: Switch to using common armv6 bus_space tag.
ian [Fri, 13 Feb 2015 22:01:14 +0000 (22:01 +0000)]
MFC r257740, r257739:  Switch to using common armv6 bus_space tag.

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

9 years agoRegen src.conf(5)
ngie [Fri, 13 Feb 2015 21:46:22 +0000 (21:46 +0000)]
Regen src.conf(5)

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

9 years agoMFC r277678:
ngie [Fri, 13 Feb 2015 21:32:05 +0000 (21:32 +0000)]
MFC r277678:

r277678:

  Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271931:
dim [Fri, 13 Feb 2015 21:31:43 +0000 (21:31 +0000)]
MFC r271931:

Add a few missing llvm/clang patches, update the other ones to be able
to apply with the same patch options onto a fresh upstream llvm/clang
3.4.1 checkout, and use approximately the same header tempate for them.

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

9 years agoMFC r272605: Use -mfpu=none when building arm kernels.
ian [Fri, 13 Feb 2015 21:26:45 +0000 (21:26 +0000)]
MFC r272605:  Use -mfpu=none when building arm kernels.

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

9 years agoMFC r277677:
ngie [Fri, 13 Feb 2015 21:24:32 +0000 (21:24 +0000)]
MFC r277677:

r277677:

  Add MK_BSDINSTALL knob for building and installing bsdinstall

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277676:
ngie [Fri, 13 Feb 2015 21:19:54 +0000 (21:19 +0000)]
MFC r277676:

r277676:

  Add MK_TALK knob for building the talk and talkd

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271025, r271029, r271030 (by sbruno):
dim [Fri, 13 Feb 2015 21:19:02 +0000 (21:19 +0000)]
MFC r271025, r271029, r271030 (by sbruno):

MFV:  Only emit movw on ARMv6T2

Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain
test cases (found building qmake4/5 for ARM).  Don't do that, moreover, the AS
in base doesn't understand this instruction for this target.  One would need
to use --integrated-as to get this to build if desired.

http://llvm.org/viewvc/llvm-project?view=revision&revision=216989

Submitted by: ian
Reviewed by: dim
Obtained from: llvm.org

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

9 years agoMFC r277355: For armv6 builds, add -mfloat-abi=softfp.
ian [Fri, 13 Feb 2015 20:49:49 +0000 (20:49 +0000)]
MFC r277355:  For armv6 builds, add -mfloat-abi=softfp.

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

9 years agoMFC r277306, r277307, r277346:
ian [Fri, 13 Feb 2015 20:38:39 +0000 (20:38 +0000)]
MFC r277306, r277307, r277346:

  Add defines for SDHCI 3.0 controllers.

  Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT.

  Save the command-and-flags value into shadow register when it is written.

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

9 years agoMFC r277305: Minor cleanups, comment changes.
ian [Fri, 13 Feb 2015 20:23:06 +0000 (20:23 +0000)]
MFC r277305:  Minor cleanups, comment changes.

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

9 years agoMFC r277265: Enable the snoop control unit during MP startup
ian [Fri, 13 Feb 2015 20:21:13 +0000 (20:21 +0000)]
MFC r277265: Enable the snoop control unit during MP startup

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

9 years agoMFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi.
ian [Fri, 13 Feb 2015 20:18:29 +0000 (20:18 +0000)]
MFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi.

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

9 years agoMFC r276003:
ian [Fri, 13 Feb 2015 20:15:10 +0000 (20:15 +0000)]
MFC r276003:

  Start to clean up the armv6 kernel configs by reducing the diff between
  them in the first sections and the later FDT support.

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

9 years agoMFC r263245, r269233, r267101, r275961: Config style cleanups.
ian [Fri, 13 Feb 2015 20:05:37 +0000 (20:05 +0000)]
MFC r263245, r269233, r267101, r275961: Config style cleanups.

Some of these are effectively record-only merges, because the actual
merge happened during conflict resolution of some prior merge.

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

9 years agoMFC r271220:
ian [Fri, 13 Feb 2015 19:52:16 +0000 (19:52 +0000)]
MFC r271220:

  Create a common i.MX53 config and use it with the two existing i.MX53 boards.

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

9 years agoMFC 272315 272757 274091 274902
sbruno [Fri, 13 Feb 2015 19:06:22 +0000 (19:06 +0000)]
MFC 272315 272757 274091 274902

for real this time

r272315
Explicitly return None for negative event indices.  Prior to this,
eventat(-1) would return the next-to-last event causing the back button
to cycle back to the end of an event source instead of stopping at the
start.

r272757
Add schedgraph traces for callout handlers.  Specifically, a callwheel logs
a running event each time it executes a callout function.  The event
includes the function pointer, argument, and whether or not it was run from
hardware interrupt context.  The callwheel is marked idle when each handler
completes.  This effectively logs the duration of each callout routine in
the graph.

r274091
Bind Ctrl-Q as a global hotkey to exit.  Bind Ctrl-W as a hotkey to close
dialogs.

r274902
Add a new thread state "spinning" to schedgraph and add tracepoints at the
start and stop of spinning waits in lock primitives.

Reviewed by: jhb

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

9 years agoRevert r278650. Definite layer 8 bug.
sbruno [Fri, 13 Feb 2015 18:45:44 +0000 (18:45 +0000)]
Revert r278650.  Definite layer 8 bug.

Submitted by: dhw and Thomas Mueller <tmueller@sysgo.com>

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

9 years agoMFC r275962: Clean up style of CUBIEBOARD2 config.
ian [Fri, 13 Feb 2015 18:37:22 +0000 (18:37 +0000)]
MFC r275962: Clean up style of CUBIEBOARD2 config.

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