]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years ago- Remove more files when MK_CASPER == no
Dmitry Marakasov [Tue, 31 Mar 2015 04:31:42 +0000 (04:31 +0000)]
- Remove more files when MK_CASPER == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years agoFix a misparenthesization that could cause a crash if TERM is not set.
Mark Johnston [Tue, 31 Mar 2015 02:49:05 +0000 (02:49 +0000)]
Fix a misparenthesization that could cause a crash if TERM is not set.

Reported by: Coverity (internal)
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoPartially revert r278118 now that the required logic for deciding whether
Colin Percival [Tue, 31 Mar 2015 01:44:29 +0000 (01:44 +0000)]
Partially revert r278118 now that the required logic for deciding whether
freebsd-update can be useful has moved into the firstboot_freebsd_update
script.

9 years agoProvide workaround for a performance issue with the popcnt instruction
Konstantin Belousov [Tue, 31 Mar 2015 01:44:07 +0000 (01:44 +0000)]
Provide workaround for a performance issue with the popcnt instruction
on Intel processors.  Clear spurious dependency by explicitely xoring
the destination register of popcnt.

Use bitcount64() instead of re-implementing SWAR locally, for
processors without popcnt instruction.

Reviewed by: jhb
Discussed with: jilles (previous version)
Sponsored by: The FreeBSD Foundation

9 years agoAdd bits for building EC2 disk images. Make logic for uploading these
Colin Percival [Tue, 31 Mar 2015 01:28:33 +0000 (01:28 +0000)]
Add bits for building EC2 disk images.  Make logic for uploading these
to create EC2 AMIs will come in a later commit.

9 years agocxgbe/tom: return rx credits promptly if the socket buffer's low water
Navdeep Parhar [Tue, 31 Mar 2015 01:22:20 +0000 (01:22 +0000)]
cxgbe/tom: return rx credits promptly if the socket buffer's low water
mark cannot be reached because the window advertised to the peer isn't
wide enough.  While here, tweak the normal credit return too.

MFC after: 1 month

9 years agoAdopt jhb's suggested changes, updated comments and callout_migration() moving
Randall Stewart [Tue, 31 Mar 2015 00:18:00 +0000 (00:18 +0000)]
Adopt jhb's suggested changes, updated comments and callout_migration() moving
to kern/kern_timeout.c

This does *not* address his -1 -> NOCPU comment.

Sponsored by: Netflix Inc.

9 years agoChange the c_iflags and c_flags fields to short rather then int. This
Randall Stewart [Tue, 31 Mar 2015 00:15:27 +0000 (00:15 +0000)]
Change the c_iflags and c_flags fields to short rather then int. This
allows us to keep the KPI the same.

Discussed and brain-stormed with imp (thanks for the help Warner!)
Sponsored by: Netflix Inc.

9 years agoFix --one-file-system to include the directory encountered rather than
Bryan Drewery [Tue, 31 Mar 2015 00:00:47 +0000 (00:00 +0000)]
Fix --one-file-system to include the directory encountered rather than
excluding it.  This was broken in 3.0.4 (r238856).

Obtained from: https://github.com/libarchive/libarchive/commit/fa9e61
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoCatch up on r271387 and remove unused parameter from
Gleb Smirnoff [Mon, 30 Mar 2015 22:49:26 +0000 (22:49 +0000)]
Catch up on r271387 and remove unused parameter from
VOP_GETPAGES_ASYNC().

9 years agoRestore setting cpufuncs on arm1176, it was removed by accident with the
Andrew Turner [Mon, 30 Mar 2015 20:44:08 +0000 (20:44 +0000)]
Restore setting cpufuncs on arm1176, it was removed by accident with the
arm1136 code.

Reviewed by: ian

9 years agoAdd llvm patch corresponding to r280865.
Dimitry Andric [Mon, 30 Mar 2015 20:23:06 +0000 (20:23 +0000)]
Add llvm patch corresponding to r280865.

9 years agoWait 100 microseconds for a local APIC to dispatch each startup-related IPI
John Baldwin [Mon, 30 Mar 2015 20:13:22 +0000 (20:13 +0000)]
Wait 100 microseconds for a local APIC to dispatch each startup-related IPI
rather than 20.  The MP 1.4 specification states in Appendix B.2:

  "A period of 20 microseconds should be sufficient for IPI dispatch to
   complete under normal operating conditions".

(Note that this appears to be separate from the 10 millisecond (INIT) and
200 microsecond (STARTUP) waits after the IPIs are dispatched.)  The
Intel SDM is silent on this issue as far as I can tell.

At least some hardware requires 60 microseconds as noted in the PR, so
bump this to 100 to be on the safe side.

PR: 197756
Reported by: zaphod@berentweb.com
MFC after: 1 week

9 years agollvm: Backport upstream r229195 to fix arm64 TLS relocations
Ed Maste [Mon, 30 Mar 2015 20:01:41 +0000 (20:01 +0000)]
llvm: Backport upstream r229195 to fix arm64 TLS relocations

  As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU
  linkers ld.bfd and ld.gold currently only support a subset of the
  whole range of AArch64 ELF TLS relocations. Furthermore, they assume
  that some of the code sequences to access thread-local variables are
  produced in a very specific sequence.  When the sequence is not as the
  linker expects, it can silently mis-relaxe/mis-optimize the
  instructions.
  Even if that wouldn't be the case, it's good to produce the exact
  sequence, as that ensures that linkers can perform optimizing
  relaxations.

  This patch:

  * implements support for 16MiB TLS area size instead of 4GiB TLS area
    size. Ideally clang would grow an -mtls-size option to allow support
    for both, but that's not part of this patch.
  * by default doesn't produce local dynamic access patterns, as even
    modern ld.bfd and ld.gold linkers do not support the associated
    relocations. An option (-aarch64-elf-ldtls-generation) is added to
    enable generation of local dynamic code sequence, but is off by
    default.
  * makes sure that the exact expected code sequence for local dynamic
    and general dynamic accesses is produced, by making use of a new
    pseudo instruction. The patch also removes two
    (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing
    AArch64-specific pseudo SDNode instructions that are superseded by
    the new one (TLSDESC_CALLSEQ).

Submitted by: Kristof Beyls
Differential Revision: https://reviews.freebsd.org/D2175

9 years agoPull in r233552 from upstream libc++ trunk (by Eric Fiselier):
Dimitry Andric [Mon, 30 Mar 2015 19:36:33 +0000 (19:36 +0000)]
Pull in r233552 from upstream libc++ trunk (by Eric Fiselier):

  [libcxx] Fix PR22771 - Support access control SFINAE in the library
  version of is_convertible.

  Summary:
  Currently the conversion check does not take place in a context where
  access control SFINAE is applied. This patch changes the context of
  the test expression so that SFINAE occurs if access control does not
  permit the conversion.

  Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771

  Reviewers: mclow.lists, rsmith, dim

  Reviewed By: dim

  Subscribers: dim, rodrigc, emaste, cfe-commits

  Differential Revision: http://reviews.llvm.org/D8461

This fixes building clang, and other programs using libc++, with newer
versions of gcc (specifically, gcc 4.8 and higher).

Reported by: rodrigc
MFC after: 1 week

9 years agoAdd pthread_md.h for arm64.
Andrew Turner [Mon, 30 Mar 2015 19:10:09 +0000 (19:10 +0000)]
Add pthread_md.h for arm64.

Differential Revision: https://reviews.freebsd.org/D2137
Reviewed by: kib
Sponsored by: The FreeBSD Foundation

9 years agoSigh. s/AutoSize/Growfs/ following upstream commit r761.
Glen Barber [Mon, 30 Mar 2015 19:08:37 +0000 (19:08 +0000)]
Sigh.  s/AutoSize/Growfs/ following upstream commit r761.

MFH: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoSwitch to ELF toolchain readelf(1)
Ed Maste [Mon, 30 Mar 2015 17:38:25 +0000 (17:38 +0000)]
Switch to ELF toolchain readelf(1)

ELF toolchain readelf lacked some functionality at the time other tools
(like size, strip, nm, etc.) were switched over to the ELF toolchain
versions. That has been addressed as of the last update, so we can add
it to the list.

PR: 198950 [exp-run]
Reviewed by: bapt, imp, rpaulo
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2156

9 years agoFill out arm64 dynamic relocation #defines
Ed Maste [Mon, 30 Mar 2015 17:15:48 +0000 (17:15 +0000)]
Fill out arm64 dynamic relocation #defines

Sponsored by: The FreeBSD Foundation

9 years agoCorrect mrs_fpcr and mrs_fpsr macros in arm64 fenv.h
Ed Maste [Mon, 30 Mar 2015 16:42:08 +0000 (16:42 +0000)]
Correct mrs_fpcr and mrs_fpsr macros in arm64 fenv.h

Submitted by: andrew
Sponsored by: The FreeBSD Foundation

9 years agocompiler-rt: Build additional quad precision floating point builtins
Ed Maste [Mon, 30 Mar 2015 14:28:31 +0000 (14:28 +0000)]
compiler-rt: Build additional quad precision floating point builtins

These are needed for arm64

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2160

9 years ago- Remove more files when MK_INET6 == no
Dmitry Marakasov [Mon, 30 Mar 2015 14:13:01 +0000 (14:13 +0000)]
- Remove more files when MK_INET6 == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_FORTH == no
Dmitry Marakasov [Mon, 30 Mar 2015 14:00:17 +0000 (14:00 +0000)]
- Remove more files when MK_FORTH == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years agoPeriodically wake up threads waiting for vmem(9) resources, so they could
Alexander Motin [Mon, 30 Mar 2015 13:30:53 +0000 (13:30 +0000)]
Periodically wake up threads waiting for vmem(9) resources, so they could
ask for resource reclamation again.

This is kind of dirty hack, but as last resort this is better then stuck
indefinitely because of KVA fragmentation, waiting until some random event
free something sufficient.  OpenSolaris also has this hack in its vmem(9).

MFC after: 2 weeks

9 years agoMFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Cy Schubert [Mon, 30 Mar 2015 13:30:15 +0000 (13:30 +0000)]
MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)

Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by: roberto

9 years agoFix bug in xrefinfo_find() for 64-bit platforms
Zbigniew Bodek [Mon, 30 Mar 2015 09:49:54 +0000 (09:49 +0000)]
Fix bug in xrefinfo_find() for 64-bit platforms

uintptr_t may be 64-bit on some platforms, therefore when
finding xrefinfo by pointer to device the high word is being
cut off due to cast to phandle_t which is 32-bit long by definition.
Due to that we loose the high word of the address to compare with
xi->dev's address.
To fix that, first argument of xrefinfo_find() is extended to
uintptr_t and is being cast to appropriate type (phandle_t)
when compared.

Submitted by:  Zbigniew Bodek <zbb@semihalf.com>
Reviewed by:   nwhitehorn
Obtained from: Semihalf

9 years agoRemove support for CPU_XSCALE_80200. None of our configs support it, and
Andrew Turner [Mon, 30 Mar 2015 09:29:45 +0000 (09:29 +0000)]
Remove support for CPU_XSCALE_80200. None of our configs support it, and
there wasn;t an option to enable it.

While here remove a check for CPU_ARM10 being defined as it has also been
removed.

9 years agoImprove check for whether ${DESTDIR}/dev is mounted.
Colin Percival [Mon, 30 Mar 2015 09:08:24 +0000 (09:08 +0000)]
Improve check for whether ${DESTDIR}/dev is mounted.

Submitted by: gcooper

9 years agoAdd some additional quirks for various Western Digital Caviar MHDDs
Eitan Adler [Mon, 30 Mar 2015 09:05:20 +0000 (09:05 +0000)]
Add some additional quirks for various Western Digital Caviar MHDDs

Submitted by: Jeremy Chadwick
PR: 188685
MFC After: 1 month

9 years agoAnd it turns out someone beat me to it....
Eitan Adler [Mon, 30 Mar 2015 08:54:59 +0000 (08:54 +0000)]
And it turns out someone beat me to it....

PR: 199013

9 years agoAdd support for "MosChip MCS9922 PCIe to Peripheral Controller" to uart
Eitan Adler [Mon, 30 Mar 2015 08:48:35 +0000 (08:48 +0000)]
Add support for "MosChip MCS9922 PCIe to Peripheral Controller" to uart

Submitted by: <mlsemon35@gmail.com>
PR: 199013
MFC After: 1 month

9 years agoRemove support for CPU_FA626TE. It's unused by any of our kernel configs.
Andrew Turner [Mon, 30 Mar 2015 08:38:18 +0000 (08:38 +0000)]
Remove support for CPU_FA626TE. It's unused by any of our kernel configs.

9 years agoOnly build cpufunc_asm_armv4.S when needed.
Andrew Turner [Mon, 30 Mar 2015 08:37:03 +0000 (08:37 +0000)]
Only build cpufunc_asm_armv4.S when needed.

9 years agoClean up filesystem unmounting in vmimage builds:
Colin Percival [Mon, 30 Mar 2015 08:33:19 +0000 (08:33 +0000)]
Clean up filesystem unmounting in vmimage builds:
* Remove vm_umount_base function which is currently unused.
* Add umount_loop function which loops attempting to unmount one filesystem.
* Replace calls to umount with calls to umount_loop.
* Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted.

The looping is necessary because sometimes umount fails due to filesystems
being busy.  The most common cause of such busyness is periodic(8) jobs
running `find / ...`.

Reviewed by: gjb

9 years agoxen: add a handler for the debug interrupt
Roger Pau Monné [Mon, 30 Mar 2015 07:09:07 +0000 (07:09 +0000)]
xen: add a handler for the debug interrupt

Handle the VIRQ_DEBUG signal and print a stack trace of each vCPU on the Xen
console. This is only used for debug purposes and is triggered by the
administrator of the Xen host.

Sponsored by: Citrix Systems R&D
MFC after: 1 week

9 years agoFix ping(8) and ping6(8) usage in a couple of ip provider tests, and
Mark Johnston [Mon, 30 Mar 2015 04:06:36 +0000 (04:06 +0000)]
Fix ping(8) and ping6(8) usage in a couple of ip provider tests, and
update expected test output to reflect differences in default TTL and
payload length.

MFC after: 1 week

9 years agoFix ping(8) usage in funcs/tst.system.d so that the test actually completes.
Mark Johnston [Mon, 30 Mar 2015 04:03:01 +0000 (04:03 +0000)]
Fix ping(8) usage in funcs/tst.system.d so that the test actually completes.

MFC after: 1 week

9 years agoReplace dtest.pl, the upstream DTrace test suite harness, with a shell
Mark Johnston [Mon, 30 Mar 2015 04:01:49 +0000 (04:01 +0000)]
Replace dtest.pl, the upstream DTrace test suite harness, with a shell
script. This reimplementation is much simpler than dtest.pl and is more
amenable to being run under Kyua - dtest.pl writes error output to a
temporary directory that is deleted when the run finishes, making it hard
to debug test failures. This change also removes the test suite's dependency
on perl.

9 years agoImport a missing piece of commit b8fac8e162eda7e98d from illumos-gate.
Mark Johnston [Mon, 30 Mar 2015 03:55:51 +0000 (03:55 +0000)]
Import a missing piece of commit b8fac8e162eda7e98d from illumos-gate.

This adds an upper bound, dtrace_ustackdepth_max, to the number of frames
traversed when computing the userland stack depth. Some programs - notably
firefox - are otherwise able to trigger an infinite loop in
dtrace_getustack_common(), causing a panic.

MFC after: 1 week

9 years agoarm11_sleep is no longer needed, remove it.
Andrew Turner [Sun, 29 Mar 2015 22:46:07 +0000 (22:46 +0000)]
arm11_sleep is no longer needed, remove it.

9 years agopj4b_config and pj4bv7_setup are only used when CPU_MV_PJ4B is defined.
Andrew Turner [Sun, 29 Mar 2015 22:45:33 +0000 (22:45 +0000)]
pj4b_config and pj4bv7_setup are only used when CPU_MV_PJ4B is defined.

9 years agoBuild the cpufunc_asm_* files based on the cpu type, not which config file
Andrew Turner [Sun, 29 Mar 2015 22:43:39 +0000 (22:43 +0000)]
Build the cpufunc_asm_* files based on the cpu type, not which config file
we happen to be building.

9 years agowordexp(): Add testcase for non-default IFS in environment.
Jilles Tjoelker [Sun, 29 Mar 2015 22:00:24 +0000 (22:00 +0000)]
wordexp(): Add testcase for non-default IFS in environment.

The non-default IFS is expected to be used.

MFC after: 1 week

9 years agoAdd initial support for the HAL channel survey support to the AR9300 HAL.
Adrian Chadd [Sun, 29 Mar 2015 21:53:08 +0000 (21:53 +0000)]
Add initial support for the HAL channel survey support to the AR9300 HAL.

This is used by the 'athsurvey' command to print out channel survey
statistics - % busy times transmit, receive and airtime.

It's as buggy and incomplete as the rest of the HAL survey support -
notably, tying into the ANI code to read channel stats and occasionally
getting garbage counters isn't very nice.  It also doesn't (yet!) get
channel survey information during a scan.  But it's good enough for
basic air-time debugging, which is why I'm committing it in this state.

Tested:

* AR9380, STA mode

9 years agoMove the HAL channel survey support out to be in the top-level HAL,
Adrian Chadd [Sun, 29 Mar 2015 21:50:21 +0000 (21:50 +0000)]
Move the HAL channel survey support out to be in the top-level HAL,
rathe than private in each HAL module.

Whilst here, modify ath_hal_private to always have the per-channel
noisefloor stats, rather than conditionally.  This just makes
life easier in general (no strange ABI differences between different
HAL compile options.)

Add a couple of methods (clear/reset, add) rather than using
hand-rolled versions of things.

9 years agoAdd a new field to HAL_ANISTATS - the extension channel busy count.
Adrian Chadd [Sun, 29 Mar 2015 21:45:48 +0000 (21:45 +0000)]
Add a new field to HAL_ANISTATS - the extension channel busy count.

This is only used by the AR9300 HAL for now - but just be careful if
you decide to recompile the kernel with NO_CLEAN=1.

9 years agoRemove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used.
Andrew Turner [Sun, 29 Mar 2015 21:45:28 +0000 (21:45 +0000)]
Remove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used.

9 years agoFix more ticks wrapping bugs exposed by the ticks wrapping bug check.
Adrian Chadd [Sun, 29 Mar 2015 21:41:05 +0000 (21:41 +0000)]
Fix more ticks wrapping bugs exposed by the ticks wrapping bug check.

This symptom is "calibrations don't ever run", which may cause some
pretty spectacularly bad behaviour in noisy environments or with longer
uptimes.

Thanks to dtrace to make it easy to check if specific non-inlined functions
are getting called by things like the ANI and calibration HAL methods.
Grr.

Tested:

* AR9380, STA mode

9 years agoRemove arm1136 support. We don't have any configs that use it, and I don't
Andrew Turner [Sun, 29 Mar 2015 21:12:59 +0000 (21:12 +0000)]
Remove arm1136 support. We don't have any configs that use it, and I don't
expect us to add support for any more arm11 SoCs.

9 years agoRemove the bootconfig parsing. We never used it and always passed either an
Andrew Turner [Sun, 29 Mar 2015 20:37:28 +0000 (20:37 +0000)]
Remove the bootconfig parsing. We never used it and always passed either an
empty string or NULL to the setup functions that called into it.

9 years agoSome cosmetic polishing. No functional change.
Alexander Motin [Sun, 29 Mar 2015 20:28:18 +0000 (20:28 +0000)]
Some cosmetic polishing.  No functional change.

MFC after: 1 week

9 years agoWe only need cpufunc_asm_arm11.S on bcm2835, not bcm2836
Andrew Turner [Sun, 29 Mar 2015 20:21:59 +0000 (20:21 +0000)]
We only need cpufunc_asm_arm11.S on bcm2835, not bcm2836

9 years agoClean some spaces vs tabs.
Pedro F. Giffuni [Sun, 29 Mar 2015 20:20:45 +0000 (20:20 +0000)]
Clean some spaces vs tabs.

No, this file doesn't conform with KNF at all.

9 years agoFormatting changes to the pthread_testcancel(3).
Konstantin Belousov [Sun, 29 Mar 2015 19:37:41 +0000 (19:37 +0000)]
Formatting changes to the pthread_testcancel(3).

Use list for the cancellation points enumeration.  Move notes about
functions into the list inline.

The discussion of the idiomatic use of cancellation facilities does
not belong to RETURN VALUES section, move it to NOTES.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoMake kevent(2) a cancellation point.
Konstantin Belousov [Sun, 29 Mar 2015 19:14:41 +0000 (19:14 +0000)]
Make kevent(2) a cancellation point.

Note that to cancel blocked kevent(2) call, changelist must be empty,
since we cannot cancel a call which already made changes to the
process state.  And in reverse, call which only makes changes to the
kqueue state, without waiting for an event, is not cancellable.  This
makes a natural usage model to migrate kqueue loop to support
cancellation, where existing single kevent(2) call must be split into
two: first uncancellable update of kqueue, then cancellable wait for
events.

Note that this is ABI-incompatible change, but it is believed that
there is no cancel-safe code that relies on kevent(2) not being a
cancellation point.  Option to preserve the ABI would be to keep
kevent(2) as is, but add new call with flags to specify cancellation
behaviour, which only value seems to add complications.

Suggested and reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRemove ARM9_CACHE_WRITE_THROUGH, none of our configs define it.
Andrew Turner [Sun, 29 Mar 2015 18:59:04 +0000 (18:59 +0000)]
Remove ARM9_CACHE_WRITE_THROUGH, none of our configs define it.

9 years agoChange compiler setting to make default visibility of the symbols for
Konstantin Belousov [Sun, 29 Mar 2015 18:53:21 +0000 (18:53 +0000)]
Change compiler setting to make default visibility of the symbols for
rtld on x86 to be hidden.  This is a micro-optimization, which allows
intrinsic references inside rtld to be handled without indirection
through PLT.  The visibility of rtld symbols for other objects in the
symbol namespace is controlled by a version script.

Reviewed by: kan, jilles
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRemove the unused armv5 cpufunc code.
Andrew Turner [Sun, 29 Mar 2015 18:46:12 +0000 (18:46 +0000)]
Remove the unused armv5 cpufunc code.

9 years agodrm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1
Jean-Sébastien Pédron [Sun, 29 Mar 2015 18:45:51 +0000 (18:45 +0000)]
drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1

Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri May 31 12:17:08 2013 +0000

    drm: Sort connector modes based on vrefresh

    Keeping the modes sorted by vrefresh before the pixel clock makes the
    mode list somehow more pleasing to the eye.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
PR: 198936
Obtained from: Linux
MFC after: 1 month
MFC with: r280183

9 years agoRemove unused cpufunc arm11 and armv6 code. While here only define the
Andrew Turner [Sun, 29 Mar 2015 18:44:15 +0000 (18:44 +0000)]
Remove unused cpufunc arm11 and armv6 code. While here only define the
remaining functions in the context we use them in.

9 years agoWe don't use cpufunc_asm_armv5.S in any of these configs, remove it.
Andrew Turner [Sun, 29 Mar 2015 18:41:43 +0000 (18:41 +0000)]
We don't use cpufunc_asm_armv5.S in any of these configs, remove it.

9 years agoRemove unused arm10_* functions. The remaining functions are only used in
Andrew Turner [Sun, 29 Mar 2015 17:42:32 +0000 (17:42 +0000)]
Remove unused arm10_* functions. The remaining functions are only used in
mv configs.

9 years agoStop building unused cpuvunc_* files, we don't need anything from these.
Andrew Turner [Sun, 29 Mar 2015 17:33:03 +0000 (17:33 +0000)]
Stop building unused cpuvunc_* files, we don't need anything from these.

9 years agoRemove support for CPU_ARM10. No kernel configs could possibly use this as
Andrew Turner [Sun, 29 Mar 2015 17:13:44 +0000 (17:13 +0000)]
Remove support for CPU_ARM10. No kernel configs could possibly use this as
it's not an available option. Along with this we will never support this
cpu type as very few arm10 chips were made.

9 years agoReorder to help with moving the efi loader parts to sys/boot/efi. As these
Andrew Turner [Sun, 29 Mar 2015 15:43:24 +0000 (15:43 +0000)]
Reorder to help with moving the efi loader parts to sys/boot/efi. As these
will depend on ficl having been built, and are set via bsd.arch.inc.mk we
need to place this after ficl.

As Makefile.amd64 is now late enough we can add the i386 directory to this.

9 years agosfxge: fix bug in TSO when a DMA segment has both header and data
Andrew Rybchenko [Sun, 29 Mar 2015 15:18:04 +0000 (15:18 +0000)]
sfxge: fix bug in TSO when a DMA segment has both header and data

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2163

9 years agoAdd four new DDB commands to display vmem(9) statistics.
Alexander Motin [Sun, 29 Mar 2015 10:02:29 +0000 (10:02 +0000)]
Add four new DDB commands to display vmem(9) statistics.

In particular, such DDB commands were added:
        show vmem <addr>
        show all vmem
        show vmemdump <addr>
        show all vmemdump

As possible usage, that allows to see KVA usage and fragmentation.

9 years agoFix a long-standing bug with the early MAC address initialisation path,
Adrian Chadd [Sun, 29 Mar 2015 06:05:00 +0000 (06:05 +0000)]
Fix a long-standing bug with the early MAC address initialisation path,
which showed up after I started changing addresses this early.

It turns out that there's some other malarky going on behind the scenes
in the HAL and merely setting the net80211/ifp mac address this early
isn't enough.  If the MAC is set from kenv at attach time, the HAL
also needs to be programmed early.

Without this, the VAP wouldn't work enough for finishing association -
probe requests would be fine as they're broadcast, but association
request would fail.

9 years agocdefs.h: Fix macros for pre-C99 compilers.
Pedro F. Giffuni [Sun, 29 Mar 2015 03:16:52 +0000 (03:16 +0000)]
cdefs.h: Fix macros for pre-C99 compilers.

Older compilers, and compatibility modes, may not support variadic macros.
I normally wouldn't go out of my way to support those old compilers but
there is a prescendent in other system headers for using the same macro
multiple times, and the solution (although non-elegant IMHO) works.

Requested by: bde
Solution by: tijl

9 years agoAdd hints to set the board MAC address and derived values for each interface.
Adrian Chadd [Sat, 28 Mar 2015 23:42:59 +0000 (23:42 +0000)]
Add hints to set the board MAC address and derived values for each interface.

This allows the TL-WDR3600 to use the correct MAC address for ath0, ath1
and arge0.  arge1 isn't used; until I disable it entirely it'll just
show up with a randomly generated MAC.

9 years agoUpdate if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address.
Adrian Chadd [Sat, 28 Mar 2015 23:41:23 +0000 (23:41 +0000)]
Update if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address.

This is used by the AR71xx platform code to choose a local MAC based on
the "board MAC address", versus whatever potentially invalid/garbage
values are stored in the Atheros calibration data.

9 years agoBegin moving support for board MAC addresses over to being explicitly defined.
Adrian Chadd [Sat, 28 Mar 2015 23:40:29 +0000 (23:40 +0000)]
Begin moving support for board MAC addresses over to being explicitly defined.

A lot of these dinky atheros based MIPS boards don't have a nice, well,
anything consistent defining their MAC addresses for things.

The Atheros reference design boards will happily put MAC addresses
into the wifi module calibration data like they should, and individual
ethernet MAC addresses into the calibration area in flash.
That makes my life easy - "hint.arge.X.eeprommac=<addr>" reads from
that flash address to extract a MAC, and everything works fine.

However, aside from some very well behaved vendors (eg the Carambola 2
board), everyone else does something odd.

eg:

* a MAC address in the environment (eg ubiquiti routerstation/RSPRO)
   that you derive arge0/arge1 MAC addresses from.
* a MAC address in flash that you derive arge0/arge1 MAC addresses from.
* The wifi devices having their own MAC addresses in calibration data,
  like normal.
* The wifi devices having a fixed, default or garbage value for a MAC
  address in calibration data, and it has to be derived from the
  system MAC.

So to support this complete nonsense of a situation, there needs to be
a few hacks:

* The "board" MAC address needs to be derived from somewhere and squirreled
  away.  For now it's either redboot or a MAC address stored in calibration
  flash.

* Then, a "map" set of hints to populate kenv with some MAC addresses
  that are derived/local, based on the board address.  Each board has
  a totally different idea of what you do to derive things, so each
  map entry has an "offset" (+ve or -ve) that's added to the board
  MAC address.

* Then if_arge (and later, if_ath) should check kenv for said hint and
  if it's found, use that rather than the EEPROM MAC address - which may
  be totally garbage and not actually work right.

In order to do this, I've undone some of the custom redboot expecting
hacks in if_arge and the stuff that magically adds one to the MAC
address supplied by the board - instead, as I continue to test this
out on more hardware, I'll update the hints file with a map explaining
(a) where the board MAC should come from, and (b) what offsets to use
for each device.

The aim is to have all of the tplink, dlink and other random hardware
we run on have valid MAC addresses at boot, so (a) people don't get
random B:S:D:x:x:x ethernet MACs, and (b) the wifi MAC is valid
so it works rather than trying to use an invalid address that
actually upsets systems (think: multicast bit set in BSSID.)

Tested:

* TP-Link TL_WDR3600 - subsequent commits will add the hints map
  and the if_ath support.

TODO:

* Since this is -HEAD, and I'm all for debugging, there's a lot of
  printf()s in here.  They'll eventually go under bootverbose.
* I'd like to turn the macaddr routines into something available
  to all drivers - too many places hand-roll random MAC addresses
  and parser stuff.  I'd rather it just be shared code.
  However, that'll require more formal review.
* More boards.

9 years agoMake debug.vmem_check a tunable. It is useful to set it early.
Konstantin Belousov [Sat, 28 Mar 2015 23:30:51 +0000 (23:30 +0000)]
Make debug.vmem_check a tunable.  It is useful to set it early.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoTurns out the AR933x looks like the AR7240/AR7241 switch as far as VLAN
Adrian Chadd [Sat, 28 Mar 2015 23:20:46 +0000 (23:20 +0000)]
Turns out the AR933x looks like the AR7240/AR7241 switch as far as VLAN
configuration is concerned.

So, remove the now-erroneous comment.

Tested:

* AR9331 - Carambola2, with transmitting dot1q tagged packets around.

9 years agoRemove the second MODULES_OVERRIDE; add if_vlan to the list.
Adrian Chadd [Sat, 28 Mar 2015 23:01:59 +0000 (23:01 +0000)]
Remove the second MODULES_OVERRIDE; add if_vlan to the list.

9 years agoWrap #ifdef guards around pmap_bootstrap ap. It's only used in SMP, and
Justin Hibbits [Sat, 28 Mar 2015 21:39:42 +0000 (21:39 +0000)]
Wrap #ifdef guards around pmap_bootstrap ap.  It's only used in SMP, and
building without SMP causes a build failure.

MFC after: 1 month

9 years agopmcstat.8: fix -a flag description; improve -m flag to match
Eric van Gyzen [Sat, 28 Mar 2015 21:28:22 +0000 (21:28 +0000)]
pmcstat.8: fix -a flag description; improve -m flag to match

The -a flag reads a file saved by -O, not -o.

The -m flag requires the -R flag.  Copy that paragraph from -a.

Reviewed by: adrian
Approved by: kib (mentor)
MFC after: 1 week
Sponsored by: Dell Inc

9 years agoClean up some cosmetic nits in kern_umtx.c, found during recent work
Eric van Gyzen [Sat, 28 Mar 2015 21:21:40 +0000 (21:21 +0000)]
Clean up some cosmetic nits in kern_umtx.c, found during recent work
in this area and by the Clang static analyzer.

Remove some dead assignments.

Fix a typo in a panic string.

Use umtx_pi_disown() instead of duplicate code.

Use an existing variable instead of curthread.

Approved by: kib (mentor)
MFC after: 3 days
Sponsored by: Dell Inc

9 years agoAdd the MAC address hints for arge0/arge1 on the CARAMBOLA2.
Adrian Chadd [Sat, 28 Mar 2015 19:59:33 +0000 (19:59 +0000)]
Add the MAC address hints for arge0/arge1 on the CARAMBOLA2.

Obtained from: Linux OpenWRT

9 years agoRemove all the handcrafted assembly in hwpmc_armv7.c and use the
Bjoern A. Zeeb [Sat, 28 Mar 2015 18:57:13 +0000 (18:57 +0000)]
Remove all the handcrafted assembly in hwpmc_armv7.c and use the
common (autogenerated) versions.   Removes extra vertical space,
and makes it easier to grep for usage throughout the tree.
Conditionally compile only for arm6 [1] (yes sounds odd but is right).

Submitted by: andrew [1]
Reviewed by: gnn, andrew (ian earlier version I think)
Differential Revision: https://reviews.freebsd.org/D2159
Obtained from: Cambridge/L41
Sponsored by: DARPA, AFRL

9 years agoImport lldb r233478: Fix build failure on Freebsd with gcc 4.9.
Ed Maste [Sat, 28 Mar 2015 18:29:13 +0000 (18:29 +0000)]
Import lldb r233478: Fix build failure on Freebsd with gcc 4.9.

llvm.org/pr23051

Submitted by: rodrigc

9 years agoVNETalize random IP ID engine.
Gleb Smirnoff [Sat, 28 Mar 2015 16:59:57 +0000 (16:59 +0000)]
VNETalize random IP ID engine.

Sponsored by: Nginx, Inc.

9 years agoInitialize random IP ID engine via SYSINIT() instead of doing that on
Gleb Smirnoff [Sat, 28 Mar 2015 16:06:46 +0000 (16:06 +0000)]
Initialize random IP ID engine via SYSINIT() instead of doing that on
first packet.  This allow to use M_WAITOK and cut down some error handling.

Sponsored by: Nginx, Inc.

9 years agoTry to unbreak !SMP kernels broken in r280785 by using the proper macros
Bjoern A. Zeeb [Sat, 28 Mar 2015 15:07:19 +0000 (15:07 +0000)]
Try to unbreak !SMP kernels  broken in r280785 by using the proper macros
to access cc_cpu.

9 years agoChange the callout to supply -1 to indicate we are not changing
Randall Stewart [Sat, 28 Mar 2015 12:50:24 +0000 (12:50 +0000)]
Change the callout to supply -1 to indicate we are not changing
CPU, also add protection against invalid CPU's as well as
split c_flags and c_iflags so that if a user plays with the active
flag (the one expected to be played with by callers in MPSAFE) without
a lock, it won't adversely affect the callout system by causing a corrupt
list. This also means that all callers need to use the macros and *not*
play with the falgs directly (like netgraph used to).

Differential Revision: htts://reviews.freebsd.org/D1894
Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky
             tested by hiren and netflix.
Sponsored by: Netflix Inc.

9 years agoRe-enable using -mllvm -enable-load-pre=false in CLANG_OPT_SMALL for
Dimitry Andric [Sat, 28 Mar 2015 12:23:15 +0000 (12:23 +0000)]
Re-enable using -mllvm -enable-load-pre=false in CLANG_OPT_SMALL for
clang versions before 3.5.0.  This should enable building head's version
of sys/boot/i386/boot2 on 9.x and 10.x again.

Reported by: bz

9 years agosfxge: set correct RSS hash type instead of opaque
Andrew Rybchenko [Sat, 28 Mar 2015 10:20:20 +0000 (10:20 +0000)]
sfxge: set correct RSS hash type instead of opaque

Reviewed by:    adrian, gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2124

9 years agoAdd an SCTP symbol which was missed in
Michael Tuexen [Sat, 28 Mar 2015 09:08:57 +0000 (09:08 +0000)]
Add an SCTP symbol which was missed in
https://svnweb.freebsd.org/base?view=revision&revision=169622
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783
Thanks to Jukka Ukkonen for reporting the bug and providing a fix.

MFC after: 3 days

9 years agoMake it possible for the signal handler to act on #ss. Load the
Konstantin Belousov [Sat, 28 Mar 2015 09:03:54 +0000 (09:03 +0000)]
Make it possible for the signal handler to act on #ss.  Load the
canonical user data segment' selector into %ss when calling the
handler.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoThe #ss fault handler erronously does not check for the fault
Konstantin Belousov [Sat, 28 Mar 2015 09:02:19 +0000 (09:02 +0000)]
The #ss fault handler erronously does not check for the fault
originated from the return to usermode. #ss must be handled same as
#np.

Reported by: Andrew Lutomirski through secteam
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoSet VM_KMEM_SIZE_SCALE=1 for the AR91xx SoCs.
Adrian Chadd [Sat, 28 Mar 2015 06:54:18 +0000 (06:54 +0000)]
Set VM_KMEM_SIZE_SCALE=1 for the AR91xx SoCs.

Without this the autotuning fails for small amounts of RAM (32mb),
which all the AR91xx shipping products seemed to have.

Thanks to gjb for reminding me to re-test this stuff.

Tested:

* AR91xx, TP-Link TL-WR1043nd v1

9 years agoFix the RTC device model to operate correctly in 12-hour mode. The following
Neel Natu [Sat, 28 Mar 2015 02:55:16 +0000 (02:55 +0000)]
Fix the RTC device model to operate correctly in 12-hour mode. The following
table documents the values in the RTC 'hour' field in the two modes:

Hour-of-the-day 12-hour mode 24-hour mode
12 AM 12 0
[1-11] AM [1-11] [1-11]
12 PM 0x80 | 12 12
[1-11] PM 0x80 | [1-11] [13-23]

Reported by: Julian Hsiao (madoka@nyanisore.net)
MFC after: 1 week

9 years ago - Eliminate pagequeue locking in the dirty code in vm_pageout_scan().
Jeff Roberson [Sat, 28 Mar 2015 02:36:49 +0000 (02:36 +0000)]
 - Eliminate pagequeue locking in the dirty code in vm_pageout_scan().
 - Use a more precise series of tests to see if the page changed while we
   were locking the vnode.

Reviewed by: alc
Sponsored by: EMC / Isilon

9 years agotcp provider tests: sleep for a bit after closing the socket so that
Mark Johnston [Sat, 28 Mar 2015 01:11:18 +0000 (01:11 +0000)]
tcp provider tests: sleep for a bit after closing the socket so that
libdtrace has a chance to capture the traced data.

MFC after: 1 week

9 years agoMake simplebus a base class of ofwbus. This allows the elimination of
Ian Lepore [Fri, 27 Mar 2015 23:10:15 +0000 (23:10 +0000)]
Make simplebus a base class of ofwbus.  This allows the elimination of
duplicated code in the two classes, and also allows devices in FDT-based
systems to declare simplebus as their parent and still work correctly
when the FDT data describes the device at the root of the tree rather
than as a child of a simplebus (which is common for interrupt, clock,
and power controllers).

Differential Revision: https://reviews.freebsd.org/D1990
Submitted by: Michal Meloun

9 years agoRevert the __ALWAYS_NO stuff. It had already been committed as BROKEN.
Warner Losh [Fri, 27 Mar 2015 21:47:15 +0000 (21:47 +0000)]
Revert the __ALWAYS_NO stuff. It had already been committed as BROKEN.

9 years agolldb: Move debug register output into __amd64__
Ed Maste [Fri, 27 Mar 2015 19:42:38 +0000 (19:42 +0000)]
lldb: Move debug register output into __amd64__

This debug register diagnostic is really only applicable to amd64 at
present.

Sponsored by: The FreeBSD Foundation

9 years agocrunchide: arm64 support
Ed Maste [Fri, 27 Mar 2015 19:34:24 +0000 (19:34 +0000)]
crunchide: arm64 support

Submitted by: andrew@
Sponsored by: The FreeBSD Foundation

9 years agoFix variable casting:
Hans Petter Selasky [Fri, 27 Mar 2015 19:08:11 +0000 (19:08 +0000)]
Fix variable casting:
- Jiffies or ticks in FreeBSD have integer type and are not long.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoFix remaining warnings.
Xin LI [Fri, 27 Mar 2015 18:23:06 +0000 (18:23 +0000)]
Fix remaining warnings.

MFC after: 2 weeks