]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoRemove hwlist.asr macro, asr(4) removed in r276526.
gjb [Fri, 2 Jan 2015 21:09:54 +0000 (21:09 +0000)]
Remove hwlist.asr macro, asr(4) removed in r276526.

Sponsored by: The FreeBSD Foundation

9 years agoAdd a manual page for phttpget(8).
delphij [Fri, 2 Jan 2015 21:02:41 +0000 (21:02 +0000)]
Add a manual page for phttpget(8).

MFC after: 1 month

9 years agocxgbe/tom: log some more details in send_flowc_wr.
np [Fri, 2 Jan 2015 20:52:51 +0000 (20:52 +0000)]
cxgbe/tom: log some more details in send_flowc_wr.

MFC after: 1 week

9 years agoreadelf: Correct rounding on note padding
emaste [Fri, 2 Jan 2015 20:49:43 +0000 (20:49 +0000)]
readelf: Correct rounding on note padding

In general 64-bit ELF notes use 4-byte padding, not 8, despite what is
claimed in various specs.

Upstream elftoolchain ticket 472
https://sourceforge.net/p/elftoolchain/tickets/472/

Sponsored by: The FreeBSD Foundation

9 years agoGarbage collect the empty directory.
jkim [Fri, 2 Jan 2015 20:47:52 +0000 (20:47 +0000)]
Garbage collect the empty directory.

9 years agoRemove gnu/ info pages to unbreak the build with MK_GCC != no, etc
ngie [Fri, 2 Jan 2015 20:34:55 +0000 (20:34 +0000)]
Remove gnu/ info pages to unbreak the build with MK_GCC != no, etc

Reported by: Ivan Klymenko <fidaj@ukr.net>
Reviewed by: bapt
Differential Revision: D1412

9 years agoCast *path to silence clang -Wpointer-sign warning.
dchagin [Fri, 2 Jan 2015 19:29:32 +0000 (19:29 +0000)]
Cast *path to silence clang -Wpointer-sign warning.

MFC after: 1 week

9 years agoIn mbuf_to_synq_entry(), use M_START() and M_SIZE() to calculate an offset
rwatson [Fri, 2 Jan 2015 19:06:27 +0000 (19:06 +0000)]
In mbuf_to_synq_entry(), use M_START() and M_SIZE() to calculate an offset
into mbuf storage, to reduce knowledge about mbuf/cluster layout in the
cxgb device driver.

Reviewed by: np
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove info pages
bapt [Fri, 2 Jan 2015 19:05:39 +0000 (19:05 +0000)]
Remove info pages

9 years agoRegen after removal of texinfo
bapt [Fri, 2 Jan 2015 19:01:36 +0000 (19:01 +0000)]
Regen after removal of texinfo

9 years agoFix typo
bapt [Fri, 2 Jan 2015 18:57:58 +0000 (18:57 +0000)]
Fix typo

9 years agoRemove leftovers from r276551
bapt [Fri, 2 Jan 2015 18:54:55 +0000 (18:54 +0000)]
Remove leftovers from r276551

9 years agoFix the date of texinfo removal
bapt [Fri, 2 Jan 2015 18:45:48 +0000 (18:45 +0000)]
Fix the date of texinfo removal

9 years agoRemove GNU texinfo from base along with all info pages.
bapt [Fri, 2 Jan 2015 18:45:03 +0000 (18:45 +0000)]
Remove GNU texinfo from base along with all info pages.

To be able to info pages consider installing texinfo from ports print/texinfo or
via pkg: pkg install texinfo

Differential Revision: https://reviews.freebsd.org/D1409
Reviewed by: emaste, imp (previous version)
Relnotes: yes

9 years agoRemove Giant from linux_getcwd() due to VFS is MPSAFE now.
dchagin [Fri, 2 Jan 2015 18:36:08 +0000 (18:36 +0000)]
Remove Giant from linux_getcwd() due to VFS is MPSAFE now.

Discussed with: kib
MFC after: 1 week

9 years agoFix a missed comment from r276526.
scottl [Fri, 2 Jan 2015 15:46:54 +0000 (15:46 +0000)]
Fix a missed comment from r276526.

9 years agoUpdate ELF headers to include additional defines
emaste [Fri, 2 Jan 2015 15:36:29 +0000 (15:36 +0000)]
Update ELF headers to include additional defines

The elftoolchain project includes these additional defines for various
userland programs. Given that arch-specific defines are still interesting
in the context of userland programs reading or writing ELF metadata, they
should be included in top-level ELF headers.

Remove duplicate defines from ARM and MIPS elf headers.

Submitted by: will (initial version)
Reviewed by: imp, will
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D844

9 years agoAdd clang and llvm patches corresponding to r276516 and r276537.
dim [Fri, 2 Jan 2015 14:58:41 +0000 (14:58 +0000)]
Add clang and llvm patches corresponding to r276516 and r276537.

9 years agoPull in r222587 from upstream llvm trunk (by Jörg Sonnenberger):
dim [Fri, 2 Jan 2015 14:55:02 +0000 (14:55 +0000)]
Pull in r222587 from upstream llvm trunk (by Jörg Sonnenberger):

  Fix transformation of add with pc argument to adr for non-immediate
  arguments.

This fixes an "Unimplemented" error when assembling certain ARM add
instructions with pc-relative arguments.

Reported by: sbruno
PR: 196412, 196423

9 years agoUse mandoc to generate cat pages
bapt [Fri, 2 Jan 2015 14:05:30 +0000 (14:05 +0000)]
Use mandoc to generate cat pages

9 years agoUse mandoc -Tlint instead of groff for manlint target
bapt [Fri, 2 Jan 2015 13:54:03 +0000 (13:54 +0000)]
Use mandoc -Tlint instead of groff for manlint target

9 years agoThe "vt_suspend_flush_timer()" function is sometimes called locked
hselasky [Fri, 2 Jan 2015 13:35:10 +0000 (13:35 +0000)]
The "vt_suspend_flush_timer()" function is sometimes called locked
which prevents us from doing a "callout_drain()" call. The callout in
question has a lock associated with it and we are not freeing the
callout. That means we can use the "callout_stop()" function to
atomically stop the callback iff the "callout_stop()" function is
called locked. This patch applies proper locking to "callout_stop()"
and replaces a "callout_drain()" with a "callout_stop()".

MFC after:    1 week

9 years agoAdd driver for general-purpose I/O (GPIO).
br [Fri, 2 Jan 2015 13:15:36 +0000 (13:15 +0000)]
Add driver for general-purpose I/O (GPIO).

Sponsored by: DARPA, AFRL

9 years agoThe "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or
hselasky [Fri, 2 Jan 2015 13:10:33 +0000 (13:10 +0000)]
The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or
witness printouts in the console driver clients can cause this mutex
to recurse by calls to "printf()" from witness for example. In
particular this can happen if "debug.witness.skipspin=0" is set in the
boot environment.

MFC after: 1 week

9 years agoRemove duplicate pci_driver class declaration.
hselasky [Fri, 2 Jan 2015 08:57:36 +0000 (08:57 +0000)]
Remove duplicate pci_driver class declaration.

9 years agoFix warning about possible use of uninitialized variable.
hselasky [Fri, 2 Jan 2015 08:42:44 +0000 (08:42 +0000)]
Fix warning about possible use of uninitialized variable.

9 years agoDon't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins
ngie [Fri, 2 Jan 2015 05:40:02 +0000 (05:40 +0000)]
Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins
job

The h_raw application doesn't do proper bounds checking without the option
being supplied via the build, which means that it doesn't throw signals and
fail as expected

PR: 196430
X-MFC with: r276479

9 years agoGarbage collect the asr driver. Hardware for it has not been produced in
scottl [Fri, 2 Jan 2015 05:34:14 +0000 (05:34 +0000)]
Garbage collect the asr driver.  Hardware for it has not been produced in
roughly 10 years, and the driver has not enjoyed any significant maintenance
since long before that.  Despite well-meaning efforts from a number of
people, myself included, it never made the jump to 64-bit and was relegated
to the back-corners of i386.  Now its frailty is hampering forward progress
with Clang.  Any renewed engineering efforts are of course welcome and can
happen outside of the tree.  No MFC of this is planned.

9 years agoPut in a workaround for bug 196407 (arm modules cause crashes & panics).
ian [Fri, 2 Jan 2015 03:20:13 +0000 (03:20 +0000)]
Put in a workaround for bug 196407 (arm modules cause crashes & panics).

When we started compiling the kernel with -march=armv7 the compiler
started emitting new types of relocation info which are incompatible with
the shared-lib file format used by .ko modules.  This workaround prevents
the compiler from emitting the instruction sequences that require the
new relocs.  This amounts to using an undocumented internal compiler
flag, so this is just a temporary workaround while we look for a good fix.

PR: 196407

9 years agolibelf: Return an error instead of asserting on an invalid ar file
emaste [Fri, 2 Jan 2015 02:47:47 +0000 (02:47 +0000)]
libelf: Return an error instead of asserting on an invalid ar file

Upstream elftoolchain ticket 467
http://sourceforge.net/p/elftoolchain/tickets/467/

Reported by: Alexander Cherepanov
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoCallers of pmap_kextract() cannot distinguish between failure and
kib [Fri, 2 Jan 2015 01:05:08 +0000 (01:05 +0000)]
Callers of pmap_kextract() cannot distinguish between failure and
physical address zero.  Assume that the lowest page is always mapped
by direct map.

This restores access to the page at zero through /dev/mem after
r263475.

Reported and tested by: neel
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoActually remove GIANT_REQUIRED, declared but not done in r263475.
kib [Fri, 2 Jan 2015 01:00:38 +0000 (01:00 +0000)]
Actually remove GIANT_REQUIRED, declared but not done in r263475.
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoReset errno in :scalbnf_val and :scalbnl_val before running the tests so the
ngie [Fri, 2 Jan 2015 00:57:40 +0000 (00:57 +0000)]
Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
tested errno isn't stale

This was needed in order for the test to pass on amd64 with stable/10

MFC after: 3 days

9 years agoRemove -Wa,-march=armv7a from arm kernel configs, it makes clang 3.5 sad
ian [Thu, 1 Jan 2015 23:21:46 +0000 (23:21 +0000)]
Remove -Wa,-march=armv7a from arm kernel configs, it makes clang 3.5 sad
and apparently isn't needed now that we're using the integrated assembler.

9 years agoDefine a WFI macro that expands to the right form of wait-for-interrupt
ian [Thu, 1 Jan 2015 23:18:37 +0000 (23:18 +0000)]
Define a WFI macro that expands to the right form of wait-for-interrupt
depending on the architecture.

9 years agoRework the vpf support code so that it compiles with clang 3.4, 3.5, and gcc.
ian [Thu, 1 Jan 2015 23:15:52 +0000 (23:15 +0000)]
Rework the vpf support code so that it compiles with clang 3.4, 3.5, and gcc.
Michal Meloun did most of the hard work in figuring out what would work with
which compiler, I just reformated things a bit before committing.

9 years agoPull in r200010 from upstream libc++ trunk (by Marshall Clow):
dim [Thu, 1 Jan 2015 22:49:17 +0000 (22:49 +0000)]
Pull in r200010 from upstream libc++ trunk (by Marshall Clow):

  Rename some internal templates to avoid conflict with complier
  intrinsics. __is_constructible --> __libcpp_is_constructible,
  __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and
  __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No
  functionality change.

Pull in r206805 from upstream libc++ trunk (by Marshall Clow):

  Use compiler intrinsic __is_constructible if available

This should fix building parts of world with -std=c++11 enabled.

Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after: 1 week

9 years agoPull in r213790 from upstream clang trunk (by Richard Smith):
dim [Thu, 1 Jan 2015 22:44:02 +0000 (22:44 +0000)]
Pull in r213790 from upstream clang trunk (by Richard Smith):

  PR20228: don't retain a pointer to a vector element after the
  container has been resized.

This fixes a possible crash when compiling certain parts of libc++'s
type_traits header.

9 years agoAllow booting with both a real Open Firmware tree and a flattened version of
nwhitehorn [Thu, 1 Jan 2015 22:26:12 +0000 (22:26 +0000)]
Allow booting with both a real Open Firmware tree and a flattened version of
the Open Firmware, as provided by petitboot, for example. Note that this is
not quite complete, since RTAS instantiation still depends on callable
firmware.

MFC after: 2 weeks

9 years agoThe path entry for a device tree node and its name property are usually,
nwhitehorn [Thu, 1 Jan 2015 22:20:19 +0000 (22:20 +0000)]
The path entry for a device tree node and its name property are usually,
but not always, identical. In particular, the path entry may contain a
unit address that the name does not. If the FDT node does have an explicit
name property, treat that as an override of the FDT path rather than
ignoring it.

MFC after: 2 weeks

9 years agoFix Clang -Wpointer-sign warnings.
dchagin [Thu, 1 Jan 2015 20:53:38 +0000 (20:53 +0000)]
Fix Clang -Wpointer-sign warnings.

MFC after: 1 week

9 years agoFix Clang warning: passing 'unsigned int *' to parameter of type 'int *' converts...
dchagin [Thu, 1 Jan 2015 19:57:24 +0000 (19:57 +0000)]
Fix Clang warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign.

MFC after: 1 week

9 years agoRegen after r276508, r276509.
dchagin [Thu, 1 Jan 2015 18:43:31 +0000 (18:43 +0000)]
Regen after r276508, r276509.

9 years agoCorrect an argument status of wait4 syscall for Linuxulator.
dchagin [Thu, 1 Jan 2015 18:41:34 +0000 (18:41 +0000)]
Correct an argument status of wait4 syscall for Linuxulator.
Forgot about i386.

MFC after: 1 week

9 years agoCorrect an argument status of wait4 syscall for Linuxulator.
dchagin [Thu, 1 Jan 2015 18:37:03 +0000 (18:37 +0000)]
Correct an argument status of wait4 syscall for Linuxulator.

MFC after: 1 week

9 years agoRemove the clang -no-integrated-as workaround for smapi_bios.S, as clang
dim [Thu, 1 Jan 2015 16:56:15 +0000 (16:56 +0000)]
Remove the clang -no-integrated-as workaround for smapi_bios.S, as clang
3.5.0 now supports the assembly just fine.

9 years agoLLVM integrated assembler can assemble these files just fine.
rdivacky [Thu, 1 Jan 2015 10:07:57 +0000 (10:07 +0000)]
LLVM integrated assembler can assemble these files just fine.

9 years agocxgbe(4): remove buf_ring specific restriction on the txq size.
np [Thu, 1 Jan 2015 09:33:46 +0000 (09:33 +0000)]
cxgbe(4): remove buf_ring specific restriction on the txq size.

MFC after: 2 months

9 years agoPut the conditional back. For the default case it isn't really needed,
imp [Thu, 1 Jan 2015 08:30:32 +0000 (08:30 +0000)]
Put the conditional back. For the default case it isn't really needed,
but for the gcc case it still is on i386 and amd64's build of
sys/boot.

Submited by: dim@

9 years agoMove more of the warnings into kern.mk, as well as centralize that as
imp [Thu, 1 Jan 2015 08:18:08 +0000 (08:18 +0000)]
Move more of the warnings into kern.mk, as well as centralize that as
the place where the C dialect is selected. Have a fairly long list
of newly requires warning suppression for clang 3.5.0, also
centralized in kern.mk. Survive the fallout of the removal of
bsd.sys.mk from bsd.kmod.mk.

9 years agoFix markup for minthreads and maxthreads.
delphij [Thu, 1 Jan 2015 06:53:33 +0000 (06:53 +0000)]
Fix markup for minthreads and maxthreads.

PR: 196403
MFC after: 2 weeks

9 years agoEliminate bsd.sys.mk on purpose. Do not put it back.
imp [Thu, 1 Jan 2015 04:26:45 +0000 (04:26 +0000)]
Eliminate bsd.sys.mk on purpose. Do not put it back.

9 years agoUnbreak the build for some modules that depend on -std flags to be passed
ngie [Thu, 1 Jan 2015 04:10:56 +0000 (04:10 +0000)]
Unbreak the build for some modules that depend on -std flags to be passed
through via CFLAGS, as noted by Jenkins when building sparc64 by re-adding
bsd.sys.mk to bsd.kmod.mk:
https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/225/changes

Tested with:
    % cd /sys/modules/bce; make obj; make depend; make all

9 years agoAdd softc flag for when the indirect descriptor feature was negotiated
bryanv [Thu, 1 Jan 2015 02:06:00 +0000 (02:06 +0000)]
Add softc flag for when the indirect descriptor feature was negotiated

MFC after: 2 weeks

9 years agoUse the appropriate IPv4 or IPv6 TSO HW assist flag
bryanv [Thu, 1 Jan 2015 02:03:09 +0000 (02:03 +0000)]
Use the appropriate IPv4 or IPv6 TSO HW assist flag

MFC after: 2 weeks

9 years agoFix module builds on arm (and maybe others) by turning off a whole
imp [Thu, 1 Jan 2015 02:00:04 +0000 (02:00 +0000)]
Fix module builds on arm (and maybe others) by turning off a whole
raft of new warnings that appear to be on by default in clang 3.5.0.
Fix RPI-B build issues with new clang not liking the ability to pass
arbitrary flags to as, since some flags are more arbitrary (and thus
verboten) than others.

These warnings should be actually fixed in the code, but this is a
band-aide to get things (almost) building again.

9 years agocxgbe(4): major tx rework.
np [Wed, 31 Dec 2014 23:19:16 +0000 (23:19 +0000)]
cxgbe(4): major tx rework.

a) Front load as much work as possible in if_transmit, before any driver
lock or software queue has to get involved.

b) Replace buf_ring with a brand new mp_ring (multiproducer ring).  This
is specifically for the tx multiqueue model where one of the if_transmit
producer threads becomes the consumer and other producers carry on as
usual.  mp_ring is implemented as standalone code and it should be
possible to use it in any driver with tx multiqueue.  It also has:
- the ability to enqueue/dequeue multiple items.  This might become
  significant if packet batching is ever implemented.
- an abdication mechanism to allow a thread to give up writing tx
  descriptors and have another if_transmit thread take over.  A thread
  that's writing tx descriptors can end up doing so for an unbounded
  time period if a) there are other if_transmit threads continuously
  feeding the sofware queue, and b) the chip keeps up with whatever the
  thread is throwing at it.
- accurate statistics about interesting events even when the stats come
  at the expense of additional branches/conditional code.

The NIC txq lock is uncontested on the fast path at this point.  I've
left it there for synchronization with the control events (interface
up/down, modload/unload).

c) Add support for "type 1" coalescing work request in the normal NIC tx
path.  This work request is optimized for frames with a single item in
the DMA gather list.  These are very common when forwarding packets.
Note that netmap tx in cxgbe already uses these "type 1" work requests.

d) Do not request automatic cidx updates every 32 descriptors.  Instead,
request updates via bits in individual work requests (still every 32
descriptors approximately).  Also, request an automatic final update
when the queue idles after activity.  This means NIC tx reclaim is still
performed lazily but it will catch up quickly as soon as the queue
idles.  This seems to be the best middle ground and I'll probably do
something similar for netmap tx as well.

e) Implement a faster tx path for WRQs (used by TOE tx and control
queues, _not_ by the normal NIC tx).  Allow work requests to be written
directly to the hardware descriptor ring if room is available.  I will
convert t4_tom and iw_cxgbe modules to this faster style gradually.

MFC after: 2 months

9 years agoMigrate the RSS IPv6 hash code to use pointers to the v6 addresses
adrian [Wed, 31 Dec 2014 22:52:43 +0000 (22:52 +0000)]
Migrate the RSS IPv6 hash code to use pointers to the v6 addresses
rather than passing them in by value.

The eventual aim is to do incremental hash construction rather than
all of the memcpy()'ing into a contiguous buffer for the hash
function, which does show up as taking quite a bit of CPU during
profiling.

Tested:

* a variety of laptops/desktop setups I have, with v6 connectivity

Differential Revision: D1404
Reviewed by: bz, rpaulo

9 years agoThe variable used with install(1) for stripping should be STRIPBIN, not
ngie [Wed, 31 Dec 2014 22:49:02 +0000 (22:49 +0000)]
The variable used with install(1) for stripping should be STRIPBIN, not
STRIP_CMD

MFC after: 3 days
Reported by: lev

9 years agoFree the buffer returned by gpio_pin_list() after the use.
loos [Wed, 31 Dec 2014 21:58:03 +0000 (21:58 +0000)]
Free the buffer returned by gpio_pin_list() after the use.

Reported by: Coverity Scan
CID: 1257468

9 years agoTemporarily unplug cxgbe(4) from !amd64 builds.
np [Wed, 31 Dec 2014 20:34:12 +0000 (20:34 +0000)]
Temporarily unplug cxgbe(4) from !amd64 builds.

9 years agoUpgrade our copy of clang, llvm and lldb to 3.5.0 release.
dim [Wed, 31 Dec 2014 20:31:32 +0000 (20:31 +0000)]
Upgrade our copy of clang, llvm and lldb to 3.5.0 release.

Please note that this version now requires C++11 support to build; see
UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and
Antoine Brodin for their invaluable help with this import.

Approved by: portmgr (antoine)
MFC after: 1 month

9 years agoreadelf: Add stdint.h for C99 fixed size types
emaste [Wed, 31 Dec 2014 19:21:53 +0000 (19:21 +0000)]
readelf: Add stdint.h for C99 fixed size types

Upstream elftoolchain brings in stdint.h via an ELF header that we
do not use in FreeBSD.

Sponsored by: The FreeBSD Foundation

9 years agoMerge ^/head r274961 through r276475.
dim [Wed, 31 Dec 2014 18:16:50 +0000 (18:16 +0000)]
Merge ^/head r274961 through r276475.

9 years agoSome minor changes to UPDATING.
dim [Wed, 31 Dec 2014 18:11:09 +0000 (18:11 +0000)]
Some minor changes to UPDATING.

9 years agoEliminate a stale debug message. The per-CPU cache locks were replaced
alc [Wed, 31 Dec 2014 17:44:57 +0000 (17:44 +0000)]
Eliminate a stale debug message.  The per-CPU cache locks were replaced
by critical sections in r145686.

PR: 193254
Submitted by: luke.tw@gmail.com
MFC after: 3 days

9 years agoMerge ^/head r274961 through r276472.
dim [Wed, 31 Dec 2014 16:50:46 +0000 (16:50 +0000)]
Merge ^/head r274961 through r276472.

9 years agoFixes to exit status.
pfg [Wed, 31 Dec 2014 16:30:33 +0000 (16:30 +0000)]
Fixes to exit status.

Exit with EXIT_FAILURE for invalid arguments.
Fixes NetBSD-PR 43517.

Print version string to stdout instead of stderr;
it is user-requested and not an error.

Obtained from: NetBSD
MFC after: 5 days

9 years agoA couple small fixes to make clang 3.5 happy... Move END(sigcode) to the
ian [Wed, 31 Dec 2014 16:15:43 +0000 (16:15 +0000)]
A couple small fixes to make clang 3.5 happy... Move END(sigcode) to the
end of the actual instruction sequence for the function but before some
misc data in the text segment.  This eliminates a strange "size must be
constant" error from the integrated assembler.  Also, the build_pagetables
function was missing an END(), but really the problem is that it shouldn't
have an ASENTRY() because it's not a function that needs to be a global
symbol with unwind info and all, it's just a little private subroutine
used in very early kernel init.

9 years ago- Switching the mode of Ricoh R5CE823 to SD2.0 causes their PCI device ID
marius [Wed, 31 Dec 2014 16:06:26 +0000 (16:06 +0000)]
- Switching the mode of Ricoh R5CE823 to SD2.0 causes their PCI device ID
  to change to 0xe822, which may be persistent across reboots and, thus,
  confuse other OSes. Therefore, restore the original mode and frequency
  setting on detach and shutdown.
- Report Ricoh R5CE822 as such.
- According to Linux, Ricoh R5CE822 also need SDHCI_QUIRK_LOWER_FREQUENCY.
- Nuke an unused softc member.

MFC after: 3 days

9 years agoBump copyright year.
bz [Wed, 31 Dec 2014 10:00:43 +0000 (10:00 +0000)]
Bump copyright year.

Happy New Year 2015!

9 years agoCorrect zpool list displaying invalid EXPANDSZ for unavailable pool vdevs
smh [Wed, 31 Dec 2014 04:54:48 +0000 (04:54 +0000)]
Correct zpool list displaying invalid EXPANDSZ for unavailable pool vdevs

When pools are unavailable their vdevs are also unavailable which means
that vdev_max_asize remains at the default zero. This default was being
used to calculate vs_esize resulting in a negative number as vdev_asize >
vdev_max_asize, which caused zpool list -v to display 16.0E for EXPANDSZ
of these vdevs.

9 years agoUse the correct state name for unavailable pools in zpool list
smh [Wed, 31 Dec 2014 04:11:29 +0000 (04:11 +0000)]
Use the correct state name for unavailable pools in zpool list

This corrects inconsitencies between zpool list and zpool status which are
both described as displaying the pool <state> however zpool list would use
this hardcoded FAULTED instead of the correct UNAVAIL.

MFC after: 1 month

9 years agoChange the order of operations for the initial cache setup. Turning off
ian [Wed, 31 Dec 2014 02:38:23 +0000 (02:38 +0000)]
Change the order of operations for the initial cache setup.  Turning off
the cache before clean/invalidate ensured that no new lines can come into
the cache or migrate between levels during the operation, but may not be
safe on some chips.  Instead, if the cache was enabled on entry, do the
wbinv while it's still enabled, and then disable it and do a separate
invalidate pass.  After the intitial writeback we know there are no
dirty lines left and no new dirty lines can be created as long as we
carefully avoid touching memory before turning the cache off.  Add a
comment about that so no new code gets inserted between those points.

9 years agoFix a paste-o.
ian [Wed, 31 Dec 2014 02:33:12 +0000 (02:33 +0000)]
Fix a paste-o.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agolibelf: Rearrange size test to prevent integer overflow
emaste [Wed, 31 Dec 2014 01:48:23 +0000 (01:48 +0000)]
libelf: Rearrange size test to prevent integer overflow

Sponsored by: The FreeBSD Foundation

9 years agoThe physical memory allocator supports the use of distinct free lists for
alc [Wed, 31 Dec 2014 00:54:38 +0000 (00:54 +0000)]
The physical memory allocator supports the use of distinct free lists for
managing pages from different address ranges.  Generally speaking, this
feature is used to increase the likelihood that physical pages are
available that can meet special DMA requirements or can be accessed through
a limited-coverage direct mapping (e.g., MIPS).  However, prior to this
change, the configuration of the free lists was static, i.e., it was
determined at compile time.  Consequentally, free lists could be created
for address ranges that held no actual pages, for example, on 32-bit MIPS-
based systems with 512 MB or less of physical memory.  This change makes
the creation of the free lists dynamic, i.e., it is based on the available
physical memory at boot time.

On 64-bit x86-based systems with 64 GB or more of physical memory, create
free lists for managing pages with physical addresses below 4 GB.  This
change is to address reported problems with initializing devices that
require the allocation of physical pages below 4 GB on some systems with
128 GB or more of physical memory.

PR: 185727
Differential Revision: https://reviews.freebsd.org/D1274
Reviewed by: jhb, kib
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoInitialize all fields of 'struct vm_exception exception' before passing it to
neel [Tue, 30 Dec 2014 23:38:31 +0000 (23:38 +0000)]
Initialize all fields of 'struct vm_exception exception' before passing it to
vm_inject_exception(). This fixes the issue that 'exception.cpuid' is
uninitialized when calling 'vm_inject_exception()'.

However, in practice this change is a no-op because vm_inject_exception()
does not use 'exception.cpuid' for anything.

Reported by:    Coverity Scan
CID:            1261297
MFC after:      3 days

9 years agoFirst stab at UPDATING notes for clang 3.5.0.
dim [Tue, 30 Dec 2014 22:46:20 +0000 (22:46 +0000)]
First stab at UPDATING notes for clang 3.5.0.

9 years agoExpect access_test:access_inval to fail before __FreeBSD_version == 1100033
ngie [Tue, 30 Dec 2014 22:32:29 +0000 (22:32 +0000)]
Expect access_test:access_inval to fail before __FreeBSD_version == 1100033

This will allow me to MFC the test, as jilles@ requested that I don't MFC the
access(2) KBI change to 10-STABLE in r271655

9 years agoReplace bhyve's minimal RTC emulation with a fully featured one in vmm.ko.
neel [Tue, 30 Dec 2014 22:19:34 +0000 (22:19 +0000)]
Replace bhyve's minimal RTC emulation with a fully featured one in vmm.ko.

The new RTC emulation supports all interrupt modes: periodic, update ended
and alarm. It is also capable of maintaining the date/time and NVRAM contents
across virtual machine reset. Also, the date/time fields can now be modified
by the guest.

Since bhyve now emulates both the PIT and the RTC there is no need for
"Legacy Replacement Routing" in the HPET so get rid of it.

The RTC device state can be inspected via bhyvectl as follows:
bhyvectl --vm=vm --get-rtc-time
bhyvectl --vm=vm --set-rtc-time=<unix_time_secs>
bhyvectl --vm=vm --rtc-nvram-offset=<offset> --get-rtc-nvram
bhyvectl --vm=vm --rtc-nvram-offset=<offset> --set-rtc-nvram=<value>

Reviewed by: tychon
Discussed with: grehan
Differential Revision: https://reviews.freebsd.org/D1385
MFC after: 2 weeks

9 years agoCheck for multiplication integer overflow in CHECK_EHDR
emaste [Tue, 30 Dec 2014 22:04:24 +0000 (22:04 +0000)]
Check for multiplication integer overflow in CHECK_EHDR

The initial fix in r276374 is valid only for 64-bit objects. Revert it
and return an error in CHECK_EHDR if the multiplication would overflow.

The original buffer overflow issue was found with the security/afl
fuzzer and has upstream elftoolchain ticket 462. The 32-bit object issue
with r276374 found by antoine@ during an i386 exp-run.

Sponsored by: The FreeBSD Foundation

9 years agoRemove the svn:executable property from iscsi.4.
wblock [Tue, 30 Dec 2014 21:55:50 +0000 (21:55 +0000)]
Remove the svn:executable property from iscsi.4.

PR: 196380
Submitted by: Trond.Endrestol@ximalas.info
MFC after: 1 week

9 years agoConvert nullfs hash lock from a mutex to an rwlock.
mjg [Tue, 30 Dec 2014 21:41:35 +0000 (21:41 +0000)]
Convert nullfs hash lock from a mutex to an rwlock.

9 years agoConvert vfs hash lock from a mutex to an rwlock.
mjg [Tue, 30 Dec 2014 21:40:45 +0000 (21:40 +0000)]
Convert vfs hash lock from a mutex to an rwlock.

9 years agoMerge ^/head r274961 through r276418.
dim [Tue, 30 Dec 2014 20:23:03 +0000 (20:23 +0000)]
Merge ^/head r274961 through r276418.

9 years agoMove the explanation for examples before the example itself. Add
wblock [Tue, 30 Dec 2014 20:20:18 +0000 (20:20 +0000)]
Move the explanation for examples before the example itself.  Add
numerous QEMU examples and explanations supplied by sbruno, with thanks
to Ingo Schwarze for help with the mdoc markup.  Code, text, testing,
proofreading, cinematography, stunts, and the haunting theme song
supplied by sbruno.

Submitted by: sbruno
Reviewed by: sbruno
MFC after: 1 week

9 years agoImport libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
dim [Tue, 30 Dec 2014 20:01:06 +0000 (20:01 +0000)]
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
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D1390

9 years agoUse BINUTILS_BOOTSTRAP knob for binutils only
emaste [Tue, 30 Dec 2014 18:42:53 +0000 (18:42 +0000)]
Use BINUTILS_BOOTSTRAP knob for binutils only

Previously it also disabled building elftoolchain bootstrap tools such as
strip(1).

Differential Revision: https://reviews.freebsd.org/D1398
Reviewed by: imp
Sponsored by: The FreeBSD Foundation

9 years agoFix loader's ability to read the 10.1 release PowerPC ISOs. There appears to
nwhitehorn [Tue, 30 Dec 2014 16:55:53 +0000 (16:55 +0000)]
Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to
be some kind of problem with the version of makefs used for these disks.
There may be a better way to handle this problem, so I've set the MFC
timer for a fairly long time period.

MFC after: 2 weeks

9 years agoSet the page size in the virtio-mmio driver. Some backends, e.g QEMU, assume
andrew [Tue, 30 Dec 2014 12:47:44 +0000 (12:47 +0000)]
Set the page size in the virtio-mmio driver. Some backends, e.g QEMU, assume
a 1 byte page size until told otherwise.

Sponsored by: The FreeBSD Foundation

9 years agoAllow systems having a page size greater than 4K to use fewer
hselasky [Tue, 30 Dec 2014 09:20:29 +0000 (09:20 +0000)]
Allow systems having a page size greater than 4K to use fewer
scatter-gather XHCI TRB entries for its payload data. The XHCI
controller can handle at least 65536 bytes per scatter-gather list
entry.

MFC after: 1 week
Suggested by: Kohji Okuno <okuno.kohji@jp.panasonic.com>

9 years agovt_vga: fix an off-by-one error
royger [Tue, 30 Dec 2014 08:50:50 +0000 (08:50 +0000)]
vt_vga: fix an off-by-one error

This correctly sets the end of the memory region registered by vt_vga.

Reported by: marius

9 years agoPartially revert "vt: register the memory regions used by the vt drivers"
royger [Tue, 30 Dec 2014 08:50:07 +0000 (08:50 +0000)]
Partially revert "vt: register the memory regions used by the vt drivers"

Revert the EFI part of r276064 until I can test it properly on a real EFI
system. This was causing problems to people booting using UEFI and vt.

Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>

9 years agoAdd missed flushing of data which can happen when "xhci_configure_mask()"
hselasky [Tue, 30 Dec 2014 08:33:51 +0000 (08:33 +0000)]
Add missed flushing of data which can happen when "xhci_configure_mask()"
is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes
error feature is always enabled except for ISOCHRONOUS transfers.

MFC after: 1 week
Suggested by: marius@

9 years agoRemove "svn:mergeinfo" property that was dragged along when these files were
neel [Tue, 30 Dec 2014 07:08:30 +0000 (07:08 +0000)]
Remove "svn:mergeinfo" property that was dragged along when these files were
svn copied in r273375.

Suggested by: ngie, gjb

9 years agoUse the correct loader.conf(5) entry for deferring the
gjb [Tue, 30 Dec 2014 03:35:26 +0000 (03:35 +0000)]
Use the correct loader.conf(5) entry for deferring the
mountroot prompt.

Prodded by: ian
Sponsored by: The FreeBSD Foundation

9 years agoUpdate elftoolchain to upstream rev 3136
emaste [Tue, 30 Dec 2014 03:25:42 +0000 (03:25 +0000)]
Update elftoolchain to upstream rev 3136

This fixes two strip(1) issues found during ports exp-run and adds a
string hash implementation which significantly speeds up certain
operations on objects with large numbers of symbols.

This also improves libdwarf handling for stripped objects with
.eh_frame or .debug_frame (but not other debug) sections.

PR: 196107
Sponsored by: The FreeBSD Foundation

9 years agoAdd a new locore.S that #includes the right (v4 or v6) implementation.
ian [Tue, 30 Dec 2014 03:19:46 +0000 (03:19 +0000)]
Add a new locore.S that #includes the right (v4 or v6) implementation.
The kernel build machinery really wants the entry point to be in a file
named locore.S so doing this avoids a bunch of changes to the build system
for relatively little benefit.

9 years agoRename locore.S to locore-v4.S and add a new locore-v6.S for starting up
ian [Tue, 30 Dec 2014 03:17:53 +0000 (03:17 +0000)]
Rename locore.S to locore-v4.S and add a new locore-v6.S for starting up
armv6/7 systems.  We need to use some new armv6/7 features at startup
and splitting the implemenations to separate files will be more maintainable
than adding even more #ifdef sections to locore.S.

Because of the standardized interfaces to cache and MMU operations in armv7,
we can tolerate the kernel being entered with caches enabled.  This allows
running u-boot and loader(8) with caches enabled, and the performance
improvement can be dramatic (boot times can be cut from over a minute
to under 30 seconds).  The new implementation also has more robust cache
and mmu sequences for launching AP cores, and it paves the way for
upcoming changes to the pmap code which will use the TEX remap feature.

Changes in mp_machdep.c work with the new behavior in locore-v6 mp_entry,
and also reuse the original boot-time page tables to get transitioned
from physical to virtual addressing before installing the normal tables.

Submitted by Svatopluk Kraus and Michal Meloun with some changes by me.