]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoPull in r248439 from upstream llvm trunk (by Sanjay Patel):
dim [Thu, 24 Sep 2015 21:20:00 +0000 (21:20 +0000)]
Pull in r248439 from upstream llvm trunk (by Sanjay Patel):

  set div/rem default values to 'expensive' in TargetTransformInfo's
  cost model

  ...because that's what the cost model was intended to do.

  As discussed in D12882, this fix has a temporary unintended
  consequence for SimplifyCFG: it causes us to not speculate an fdiv.
  However, two wrongs make PR24818 right, and two wrongs make PR24343
  act right even though it's really still wrong.

  I intend to correct SimplifyCFG and add to CodeGenPrepare to account
  for this cost model change and preserve the righteousness for the bug
  report cases.

  https://llvm.org/bugs/show_bug.cgi?id=24818
  https://llvm.org/bugs/show_bug.cgi?id=24343

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

This fixes the too-eager fdiv hoisting in pow(), which could lead to
unexpected floating point exceptions.

8 years agoPartially revert r288121, removing the workaround for arm < v6. Since
dim [Tue, 22 Sep 2015 20:48:12 +0000 (20:48 +0000)]
Partially revert r288121, removing the workaround for arm < v6.  Since
r288125, the required atomic library calls are available in compiler-rt.

The added stub for __libcpp_relaxed_store() can stay as a fallback; I
have also committed it upstream.

8 years agoAdd clang patch corresponding to r288127.
dim [Tue, 22 Sep 2015 20:42:14 +0000 (20:42 +0000)]
Add clang patch corresponding to r288127.

8 years agoPull in r244063 from upstream clang trunk (by James Y Knight):
dim [Tue, 22 Sep 2015 20:39:59 +0000 (20:39 +0000)]
Pull in r244063 from upstream clang trunk (by James Y Knight):

  Add missing atomic libcall support.

  Support for emitting libcalls for __atomic_fetch_nand and
  __atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some
  test cases.

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

This fixes "cannot compile this atomic library call yet" errors when
compiling code which calls the above builtins, on arm < v6.

8 years agoMerge ^/head r288100 through r288125.
dim [Tue, 22 Sep 2015 20:32:49 +0000 (20:32 +0000)]
Merge ^/head r288100 through r288125.

8 years agoWork around clang emitting libcalls to __atomic_add_fetch() and friends
dim [Tue, 22 Sep 2015 17:34:51 +0000 (17:34 +0000)]
Work around clang emitting libcalls to __atomic_add_fetch() and friends
in libc++, on __ARM_ARCH < 6.  Additionally, supply the missing stub
__libcpp_relaxed_store(), as proposed in http://reviews.llvm.org/D13051

NOTE: this needs to be fixed properly later on, by supplying library
functions implementing atomic operations for arm < v6.  We should
probably take those from sys/arm/arm/stdatomic.c, and stuff them into
either libgcc or compiler-rt.

8 years agoRevert merge of clang trunk r244063, which I did not intend to commit
dim [Tue, 22 Sep 2015 10:00:32 +0000 (10:00 +0000)]
Revert merge of clang trunk r244063, which I did not intend to commit
yet.  Reminder to self: never merge to an unclean tree.

8 years agoMerge ^/head r288035 through r288099.
dim [Tue, 22 Sep 2015 09:50:11 +0000 (09:50 +0000)]
Merge ^/head r288035 through r288099.

8 years agoIn binutils' arm-dis.c, avoid left-shifting a negative number.
dim [Tue, 22 Sep 2015 09:35:35 +0000 (09:35 +0000)]
In binutils' arm-dis.c, avoid left-shifting a negative number.

Submitted by: dan.mcgregor_usask.ca (Dan McGregor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D3376

8 years agoUse proper function prototype for readdir().
rodrigc [Tue, 22 Sep 2015 07:40:55 +0000 (07:40 +0000)]
Use proper function prototype for readdir().
Eliminates -Wstrict-prototypes warning

Submitted by: Joerg Sonnenberger <joerg@dragonflybsd.org>
Obtained from: DragonFlyBSD (commit 2a6aec8dab58c89961cabcfdb92e0d0ae256dea4)

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Tue, 22 Sep 2015 07:31:40 +0000 (07:31 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoRevert r287780 until more developers have their say.
hselasky [Tue, 22 Sep 2015 06:51:55 +0000 (06:51 +0000)]
Revert r287780 until more developers have their say.

Differential Revision: https://reviews.freebsd.org/D3521
Requested by: gnn

8 years agonet80211: include one copy of struct ieee80211_beacon_offsets into ieee80211vap
adrian [Tue, 22 Sep 2015 06:34:07 +0000 (06:34 +0000)]
net80211: include one copy of struct ieee80211_beacon_offsets into ieee80211vap

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3658

8 years agoSend a power command to the firmware to shut down the radio as well
adrian [Tue, 22 Sep 2015 05:48:51 +0000 (05:48 +0000)]
Send a power command to the firmware to shut down the radio as well
during rsu_stop().

8 years agobsd.lib.mk: Simplify CLEANFILES handling.
bdrewery [Tue, 22 Sep 2015 05:05:53 +0000 (05:05 +0000)]
bsd.lib.mk: Simplify CLEANFILES handling.

This limits CLEANFILES removal to just bsd.obj.mk now and removes the need
for NOPATH_FILES.

This reverts r96529 which was done due to the command line being too long
for libc.  Since then all architectures now use 256k for ARG_MAX (r170102).
Regardless of that, the libc CLEANFILES is only 72k now.  Others
may be larger but not likely to hit the limit.  If needed, we can improve
the bsd.obj.mk clean: target to split up the list via bmake features.

This also removes some workarounds that are no longer needed.
- a.out removal
- OBJS.tmp, which has not been needed since r117080.
- *.so, which has not been needed since a .so->.So rename in r42450.

This also fixes STATICOBJS and SHLIB_LINK not being in the .NOPATH list.

Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid adding duplicates into OBJS. bsd.lib.mk already handles adding
bdrewery [Tue, 22 Sep 2015 04:55:28 +0000 (04:55 +0000)]
Avoid adding duplicates into OBJS.  bsd.lib.mk already handles adding
entries to OBJS based on SRCS.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agovfs_mountroot_shuffle() never returns non-zero.
bdrewery [Tue, 22 Sep 2015 03:34:07 +0000 (03:34 +0000)]
vfs_mountroot_shuffle() never returns non-zero.

8 years agoUpdate jemalloc to 4.0.2.
jasone [Tue, 22 Sep 2015 03:02:18 +0000 (03:02 +0000)]
Update jemalloc to 4.0.2.

8 years agoBegin fleshing out basic power-on / power-off and A-MPDU TX support.
adrian [Tue, 22 Sep 2015 02:57:18 +0000 (02:57 +0000)]
Begin fleshing out basic power-on / power-off and A-MPDU TX support.

* Add a new method to control NIC poweron / network-sleep / power off;
* Add in A-MPDU TX negotiation support, but comment it out because it
  does break TX traffic;
* blank out the tx buffer before sending a firmware message, just in case;
* go into network-sleep once associated;

TODO:

* figure out why ampdu negotiation isn't working and breaking TX traffic,
  then enable it.

8 years agonet80211 & wireless drivers: remove duplicate defines (noop)
adrian [Tue, 22 Sep 2015 02:48:59 +0000 (02:48 +0000)]
net80211 & wireless drivers: remove duplicate defines (noop)

- IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh).
- N(a) -> nitems(a).
- Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include ieee80211_input.h instead).
- <drvname>_TXOP_TO_US(txop) -> IEEE80211_TXOP_TO_US(txop).
- Put IEEE80211_RV(v) into ieee80211_proto.h and remove local RV(v) definitions.

Submitted by:   Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision:  https://reviews.freebsd.org/D3705

8 years agonet80211 & wireless drivers: remove duplicate defines (noop)
adrian [Tue, 22 Sep 2015 02:44:59 +0000 (02:44 +0000)]
net80211 & wireless drivers: remove duplicate defines (noop)

* IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh).
* N(a) -> nitems(a).
* Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include ieee80211_input.h instead).
* <drvname>_TXOP_TO_US(txop) -> IEEE80211_TXOP_TO_US(txop).
* Put IEEE80211_RV(v) into ieee80211_proto.h and remove local RV(v) definitions.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3705

8 years agoRemove duplicate use of RV(), LE_* and other macros.
adrian [Tue, 22 Sep 2015 02:25:52 +0000 (02:25 +0000)]
Remove duplicate use of RV(), LE_* and other macros.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3705

8 years agoAdd external facing methods to control TX A-MPDU negotiaton.
adrian [Tue, 22 Sep 2015 02:25:29 +0000 (02:25 +0000)]
Add external facing methods to control TX A-MPDU negotiaton.
Some fullmac devices may rely on the stack starting it but not doing it.

Whilst here, remove a duplicate LE_* macro definition, thanks to
Andriy Voskoboinyk <s3erios@gmail.com>.

8 years agoDefine a rateval macro that drivers tend to hard-code.
adrian [Tue, 22 Sep 2015 02:24:13 +0000 (02:24 +0000)]
Define a rateval macro that drivers tend to hard-code.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3705

8 years agoelfdump: report MIPS-specific section type SHT_MIPS_ABIFLAGS
emaste [Tue, 22 Sep 2015 01:45:43 +0000 (01:45 +0000)]
elfdump: report MIPS-specific section type SHT_MIPS_ABIFLAGS

Sponsored by: The FreeBSD Foundation

8 years agongctl dot: Drop invalid trailing semi-colon
cem [Tue, 22 Sep 2015 01:31:01 +0000 (01:31 +0000)]
ngctl dot: Drop invalid trailing semi-colon

PR: 203257
Submitted by: Daniel O'Connor
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd MIPS ELF section type SHT_MIPS_ABIFLAGS definition
emaste [Tue, 22 Sep 2015 00:56:43 +0000 (00:56 +0000)]
Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition

Sponsored by: The FreeBSD Foundation

8 years agoThe R600 target got renamed to AMDGPU, but I missed deleting the old
dim [Mon, 21 Sep 2015 22:34:16 +0000 (22:34 +0000)]
The R600 target got renamed to AMDGPU, but I missed deleting the old
directory during the vendor import.  Delete it now.

8 years agoDrop a patch which is already included in 3.7.0.
dim [Mon, 21 Sep 2015 22:29:43 +0000 (22:29 +0000)]
Drop a patch which is already included in 3.7.0.

8 years agoFix installation of 32bit libraries after r288074.
bdrewery [Mon, 21 Sep 2015 21:44:02 +0000 (21:44 +0000)]
Fix installation of 32bit libraries after r288074.

FILES is not used when LIBRARIES_ONLY is set, which is used to build and
install the lib32 sysroot.  All of the csu files do quality as "libraries"
for this case so just undefine LIBRARIES_ONLY.

This is still better than the previous realinstall handling as it does
not hook into META_MODE properly.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII
bdrewery [Mon, 21 Sep 2015 18:52:52 +0000 (18:52 +0000)]
Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII
scripts that the linker can load rather than binary library objects.

Effectively no change.

Suggested by: hrs

8 years agoReplace realinstall: and META_MODE staging hacks with FILES mechanism.
bdrewery [Mon, 21 Sep 2015 18:39:13 +0000 (18:39 +0000)]
Replace realinstall: and META_MODE staging hacks with FILES mechanism.

This partially reverts r270170 for lib/csu/i386 while retaining the
change for using bsd.lib.mk.

These FILES groups could go into lib/csu/Makefile.inc but I've kept them
in the Makefiles for clarity.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd the __aeabi_memclr8 symbol, clang 3.7 uses this.
andrew [Mon, 21 Sep 2015 18:35:32 +0000 (18:35 +0000)]
Add the __aeabi_memclr8 symbol, clang 3.7 uses this.

MFC after: 1 week
Sponsored by: ABT Systems Lts

8 years agoMove kbd.c to main sys/conf/files list
emaste [Mon, 21 Sep 2015 17:31:11 +0000 (17:31 +0000)]
Move kbd.c to main sys/conf/files list

It is (optionally) used on all architectures.

Sponsored by: The FreeBSD Foundation

8 years agoRestore the upstream (and documented) behavior of searching for modules
des [Mon, 21 Sep 2015 17:26:35 +0000 (17:26 +0000)]
Restore the upstream (and documented) behavior of searching for modules
both in /usr/lib and /usr/local/lib, thus simplifying the use of modules
from ports, without breaking the compat32 case again.

PR: 191151
MFC after: 3 weeks

8 years agoMove DTrace tools to cross-tools stage
emaste [Mon, 21 Sep 2015 16:07:22 +0000 (16:07 +0000)]
Move DTrace tools to cross-tools stage

Bootstrap tools exist for backwards compatibility support. DTrace tools
tools are also needed for cross builds, so belong in cross-tools.

Reviewed by: imp (earlier), markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2144

8 years agoEnsure that maxproc does not exceed pid_max, at the time of boot.
kib [Mon, 21 Sep 2015 15:02:59 +0000 (15:02 +0000)]
Ensure that maxproc does not exceed pid_max, at the time of boot.
Changes to kern.pid_max mib after the boot can break this relation.

The maxfiles value was calculated by the MAXFILES formula based on
maxproc value, but this change decouples them, and MAXFILES now
references maxusers.  Without manual tuning, the maxfiles default
value remains as it was prior to this commit.  But for systems which
have tuned maxproc and rely on maxfiles to adjust, additional
reconfiguration is needed.

Reported by: rwatson
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoLog iSCSI session reinstatements.
mav [Mon, 21 Sep 2015 13:25:29 +0000 (13:25 +0000)]
Log iSCSI session reinstatements.

False session reinstatements can be result of misconfiguration, when
several initiators use the same initiator name and ISID.

8 years agoCompare mbuf pointer to NULL rather than to 0.
bz [Mon, 21 Sep 2015 12:53:26 +0000 (12:53 +0000)]
Compare mbuf pointer to NULL rather than to 0.
No functional change.

MFC after: 2 weeks

8 years agoIn the UDP over IPv6 implementation several cases are using the wrong protocol,
bz [Mon, 21 Sep 2015 12:32:36 +0000 (12:32 +0000)]
In the UDP over IPv6 implementation several cases are using the wrong protocol,
e.g., based on wrong "next header" assumptions (which does not have to point to
the upper layer protocol), or using hard-coded UDP instead of UDP or UDP-Lite
possibly switching protocols.  Fix those cases for UDP-Lite to work correctly.

PR: 202788
Submitted by: Tiwei Bie (btw mail.ustc.edu.cn) [parts]
Reviewed by: gnn, Tiwei Bie (btw mail.ustc.edu.cn),
kevlo (earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3686

8 years agoMFV r287817: 6220 memleak in l2arc on debug build
avg [Mon, 21 Sep 2015 12:23:01 +0000 (12:23 +0000)]
MFV r287817: 6220 memleak in l2arc on debug build

https://github.com/illumos/illumos-gate/commit/c546f36aa898d913ff77674fb5ff97f15b2e08b4
https://www.illumos.org/issues/6220
  5408 introduced a memleak in l2arc, namely the member b_thawed gets leaked when
  an arc_hdr is realloced from full to l2only.

Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Arne Jansen <sensille@gmx.net>

8 years agoUnify nd6 state switching by using newly-created nd6_llinfo_setstate()
melifaro [Mon, 21 Sep 2015 11:19:53 +0000 (11:19 +0000)]
Unify nd6 state switching by using newly-created nd6_llinfo_setstate()
  function. The change is mostly mechanical with the following exception:
Last piece of nd6_resolve_slow() was refactored: ND6_LLINFO_PERMANENT
  condition was removed as always-true, explicit ND6_LLINFO_NOSTATE ->
  ND6_LLINFO_INCOMPLETE state transition was removed as duplicate.

Reviewed by: ae
Sponsored by: Yandex LLC

8 years agoMake cltd ignore HA ports.
mav [Mon, 21 Sep 2015 10:27:30 +0000 (10:27 +0000)]
Make cltd ignore HA ports.

8 years agoAdd "stale" timer back to nd6_cache_lladdr().
melifaro [Mon, 21 Sep 2015 10:24:34 +0000 (10:24 +0000)]
Add "stale" timer back to nd6_cache_lladdr().
Setting timer was accidentally removed in r276844 due to misleading
  comment on its meaningless. Add it back to restore proper behaviour.

8 years agoBunch of improvements to ctlstat.
mav [Mon, 21 Sep 2015 09:37:49 +0000 (09:37 +0000)]
Bunch of improvements to ctlstat.

Add -p option to allow filtering by ports.
Make -l and -p options work in all modes as filters.
Improve output formatting to better fit columns.

8 years agoDelete /etc/autofs/special_noauto when MK_AUTOFS == no
ngie [Mon, 21 Sep 2015 03:39:13 +0000 (03:39 +0000)]
Delete /etc/autofs/special_noauto when MK_AUTOFS == no

MFC after: 1 week

8 years agoEnable if_dwc for Allwinner A20 based boards.
loos [Mon, 21 Sep 2015 03:17:41 +0000 (03:17 +0000)]
Enable if_dwc for Allwinner A20 based boards.

This enables the gigabit ethernet on cubieboard2 and banana pi.

A special thanks to Netgate who gently provided me with a banana pi almost
a year ago.

8 years agoYes, it supports 802.11n.
adrian [Mon, 21 Sep 2015 02:33:11 +0000 (02:33 +0000)]
Yes, it supports 802.11n.

8 years agoFlip on 11n by default; update TODO items.
adrian [Mon, 21 Sep 2015 02:32:11 +0000 (02:32 +0000)]
Flip on 11n by default; update TODO items.

8 years agoConvert if_rsu to use a deferred transmit task rather than using rsu_start()
adrian [Mon, 21 Sep 2015 02:30:22 +0000 (02:30 +0000)]
Convert if_rsu to use a deferred transmit task rather than using rsu_start()
to do it directly.

Ensure that we re-queue starting transmit upon TX completion.

This solves two issues:

* It stops tx stalls - before this, if the transmit path filled the
  mbuf queue then it'd never start another transmit.

* It enforces ordering - this is very required for 802.11n which
  requires frames to be transmitted in the order they're queued.
  Since everything remotely involved in USB has an unlock/thing/relock
  pattern with that mutex, the only way to guarantee TX ordering is
  to 100% defer it into a separate thread.

This now survives an iperf test and gets a reliable 30mbit/sec.

8 years agoDrain the mbuf queue upon rsu_stop().
adrian [Mon, 21 Sep 2015 02:12:01 +0000 (02:12 +0000)]
Drain the mbuf queue upon rsu_stop().

Correctly (I hope!) remove net80211 references before doing so.
Just doing a dumb mbufq drain isn't enough.

If enough traffic occurs and the mbuf queue fills up then transmit
stalls (which I'm not fixing in this commit!) but then the mbuf queue
stays full until the driver is removed.  There's also the net80211
node refcounting leak.

This just ensures that during rsu_stop and detach the mbuf queue
is purged (and references!) so the queue-full situation can be
recovered from.

8 years agoAdd the A20 glue code for if_dwc.
loos [Mon, 21 Sep 2015 01:51:37 +0000 (01:51 +0000)]
Add the A20 glue code for if_dwc.

This code initializes the GMAC clock and sets the pin mux to rgmii.

It also override the if_dwc defaults to set the alternate descriptor type
and MII clock used on A20.

Tested on cubieboard2 and banana pi.

8 years agoDisable HT40 in if_rsu for now. There's something missing in the HT40
adrian [Sun, 20 Sep 2015 22:52:40 +0000 (22:52 +0000)]
Disable HT40 in if_rsu for now.  There's something missing in the HT40
setup pieces and so (at least) transmit doesn't work.

It'll just fall back to being a straight HT20 device and negotiate
HT20 only.

Tested by: Idwer Vollering <vidwer@gmail.com>

8 years agoDon't install Intrin.h, as this is an intrinsics header for Windows.
dim [Sun, 20 Sep 2015 21:39:55 +0000 (21:39 +0000)]
Don't install Intrin.h, as this is an intrinsics header for Windows.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 21:21:17 +0000 (21:21 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 21:21:01 +0000 (21:21 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoEnsure that when a blockable open of fifo returns success, a valid
kib [Sun, 20 Sep 2015 21:18:33 +0000 (21:18 +0000)]
Ensure that when a blockable open of fifo returns success, a valid
file descriptor opened for complimentary access exists as well.

The implementation of the guarantee is done by counting the
generations of readers and writers opens.  We return success and not
EINTR or ERESTART error, when the sleep for complimentary opening is
interrupted, but the generation was changed during the sleep.

Longer explanation: assume there are two threads, A doing open("fifo",
O_RDONLY) and B doing open("fifo", O_WRONLY), and no other threads
either trying to open the fifo, nor there are any file descriptors
referencing the fifo.  Before the change, it was possible e.g. for for
thread A to return a valid file descriptor, while thread B returned
EINTR if a signal to B was delivered simultaneously with the wakeup
from A.  After the change, in this situation both A::open() and
B::open() succeed and the signal is made "as if" it was noticed
slightly later.  Note that the signal actual delivery is not changed,
it is done by ast on syscall return path, so signal handler is still
executed before first instruction after syscall.

See PR for the code demonstrating the issue.

PR: 203162
Reported by: Victor Stinner victor.stinner@gmail.com
Reviewed by: jilles
Tested by: bapt, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoOutput times as normal microseconds, rather then in bintime format.
mav [Sun, 20 Sep 2015 21:06:37 +0000 (21:06 +0000)]
Output times as normal microseconds, rather then in bintime format.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:55:00 +0000 (20:55 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:53:24 +0000 (20:53 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:52:13 +0000 (20:52 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:51:52 +0000 (20:51 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:50:56 +0000 (20:50 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:50:18 +0000 (20:50 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoFixup mergeinfo on sys/contrib/ipfilter/netinet/ip_fil_freebsd.c.
dim [Sun, 20 Sep 2015 20:47:19 +0000 (20:47 +0000)]
Fixup mergeinfo on sys/contrib/ipfilter/netinet/ip_fil_freebsd.c.

8 years agoMerge ^/head r287878 through r288034.
dim [Sun, 20 Sep 2015 20:34:17 +0000 (20:34 +0000)]
Merge ^/head r287878 through r288034.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:28:49 +0000 (20:28 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoRemove names from some prototypes
rodrigc [Sun, 20 Sep 2015 20:27:57 +0000 (20:27 +0000)]
Remove names from some prototypes

8 years agoRemove names from some prototypes
rodrigc [Sun, 20 Sep 2015 20:26:46 +0000 (20:26 +0000)]
Remove names from some prototypes

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:24:28 +0000 (20:24 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoUse ANSI C prototypes. Eliminates -Wold-style-definition warnings.
rodrigc [Sun, 20 Sep 2015 20:23:16 +0000 (20:23 +0000)]
Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

8 years agoRemove names from some prototypes
rodrigc [Sun, 20 Sep 2015 20:21:49 +0000 (20:21 +0000)]
Remove names from some prototypes

8 years agoRemove names from some prototypes
rodrigc [Sun, 20 Sep 2015 20:16:34 +0000 (20:16 +0000)]
Remove names from some prototypes

8 years agoRemove names from prototypes
rodrigc [Sun, 20 Sep 2015 20:15:44 +0000 (20:15 +0000)]
Remove names from prototypes

8 years agoCorrect a non-fatal error in vm_pageout_worker(). vm_pageout_worker()
alc [Sun, 20 Sep 2015 19:20:03 +0000 (19:20 +0000)]
Correct a non-fatal error in vm_pageout_worker().  vm_pageout_worker()
should not assume that vm_pages_needed will remain set while it sleeps.
Other threads can clear vm_pages_needed by performing a sufficient
number of vm_page_free() calls, e.g., process termination.  The effect
of this error was that vm_pageout_worker() would free and/or launder
pages when, in fact, there was no shortage of free pages.

Rewrite a nearby comment to describe all of the possible cases and not
just the most common case.  The problem being that the comment made
the most common case seem like the only case.

Reviewed by: kib
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix the build by adding the alternate descriptors and MII clock defines.
loos [Sun, 20 Sep 2015 14:28:06 +0000 (14:28 +0000)]
Fix the build by adding the alternate descriptors and MII clock defines.

This obviously should be in the last commit.

8 years agoAdd alternate descriptors support for if_dwc.
loos [Sun, 20 Sep 2015 14:13:29 +0000 (14:13 +0000)]
Add alternate descriptors support for if_dwc.

This also adds a newbus interface that allows a SoC to override the
following settings:

 - if_dwc specific SoC initialization;
 - if_dwc descriptor type;
 - if_dwc MII clock.

This seems to be an old version of the hardware descriptors but it is
still in use in a few SoCs (namely Allwinner A20 and Amlogic at least).

Tested on Cubieboard2 and Banana pi.

Tested for regressions on Altera Cyclone by br@ (old version).

Obtained from: NetBSD

8 years agoRemove unnecessary includes and, while here, sort them.
loos [Sun, 20 Sep 2015 13:15:09 +0000 (13:15 +0000)]
Remove unnecessary includes and, while here, sort them.

8 years agoMark with DMA flag I/Os waiting for iSCSI write data after R2T.
mav [Sun, 20 Sep 2015 11:39:19 +0000 (11:39 +0000)]
Mark with DMA flag I/Os waiting for iSCSI write data after R2T.

Reads and immediate writes are not blocking, so don't bother.

8 years agoRemove couple excess SGLIST I/O flags.
mav [Sun, 20 Sep 2015 10:40:30 +0000 (10:40 +0000)]
Remove couple excess SGLIST I/O flags.

Those flags duplicated respective (sg_entries > 0) values.

8 years agoAdd include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings.
rodrigc [Sun, 20 Sep 2015 04:59:01 +0000 (04:59 +0000)]
Add include for declaration of _set_tp().  Eliminates -Wmissing-prototypes warnings.

8 years agoAdd declarations to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 04:26:55 +0000 (04:26 +0000)]
Add declarations to eliminate -Wmissing-prototypes warnings

8 years agoUse ANSI C prototypes.
rodrigc [Sun, 20 Sep 2015 04:23:16 +0000 (04:23 +0000)]
Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

8 years agoAdd declaration to eliminate -Wmissing-prototypes warning
rodrigc [Sun, 20 Sep 2015 04:21:44 +0000 (04:21 +0000)]
Add declaration to eliminate -Wmissing-prototypes warning

8 years agoAdd declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.
rodrigc [Sun, 20 Sep 2015 04:20:31 +0000 (04:20 +0000)]
Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.

8 years agoAdd declarations to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 04:17:53 +0000 (04:17 +0000)]
Add declarations to eliminate -Wmissing-prototypes warnings

8 years agoDefine _NS_PRIVATE to make declarations visible.
rodrigc [Sun, 20 Sep 2015 04:17:03 +0000 (04:17 +0000)]
Define _NS_PRIVATE to make declarations visible.
This eliminates -Wmissing-prototypes warnings.

8 years agoAdd missing includes to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 04:15:37 +0000 (04:15 +0000)]
Add missing includes to eliminate -Wmissing-prototypes warnings

8 years agoAdding missing declarations to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 04:06:55 +0000 (04:06 +0000)]
Adding missing declarations to eliminate -Wmissing-prototypes warnings

8 years agoAdd missing include to eliminate -Wmissing-prototypes warning
rodrigc [Sun, 20 Sep 2015 04:06:04 +0000 (04:06 +0000)]
Add missing include to eliminate -Wmissing-prototypes warning

8 years agoAdd declaration to eliminate -Wmissing-prototypes warning
rodrigc [Sun, 20 Sep 2015 03:59:27 +0000 (03:59 +0000)]
Add declaration to eliminate -Wmissing-prototypes warning

8 years agoAdd declarations to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 03:58:27 +0000 (03:58 +0000)]
Add declarations to eliminate -Wmissing-prototypes warnings

8 years agoAdding missing include to eliminate -Wmissing-prototypes warning
rodrigc [Sun, 20 Sep 2015 03:56:57 +0000 (03:56 +0000)]
Adding missing include to eliminate -Wmissing-prototypes warning

8 years agoAdd declarations to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 03:55:03 +0000 (03:55 +0000)]
Add declarations to eliminate -Wmissing-prototypes warnings

8 years agoAdd declarations to eliminate -Wmissing-prototypes warnings.
rodrigc [Sun, 20 Sep 2015 03:53:08 +0000 (03:53 +0000)]
Add declarations to eliminate -Wmissing-prototypes warnings.

8 years agoAdd declaration to eliminate -Wmissing-prototypes warning.
rodrigc [Sun, 20 Sep 2015 03:51:15 +0000 (03:51 +0000)]
Add declaration to eliminate -Wmissing-prototypes warning.

8 years agoAdd missing include to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 03:49:08 +0000 (03:49 +0000)]
Add missing include to eliminate -Wmissing-prototypes warnings

8 years agoAdd missing includes to eliminate -Wmissing-prototypes warnings
rodrigc [Sun, 20 Sep 2015 03:45:57 +0000 (03:45 +0000)]
Add missing includes to eliminate -Wmissing-prototypes warnings

8 years agoUse tabs for indend.
kib [Sun, 20 Sep 2015 01:35:51 +0000 (01:35 +0000)]
Use tabs for indend.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoAdd support for weak symbols to the kernel linkers. It means that
kib [Sun, 20 Sep 2015 01:27:59 +0000 (01:27 +0000)]
Add support for weak symbols to the kernel linkers.  It means that
linkers no longer raise an error when undefined weak symbols are
found, but relocate as if the symbol value was 0.  Note that we do not
repeat the mistake of userspace dynamic linker of making the symbol
lookup prefer non-weak symbol definition over the weak one, if both
are available.  In fact, kernel linker uses the first definition
found, and ignores duplicates.

Signature of the elf_lookup() and elf_obj_lookup() functions changed
to split result/error code and the symbol address returned.
Otherwise, it is impossible to return zero address as the symbol
value, to MD relocation code.  This explains the mechanical changes in
elf_machdep.c sources.

The powerpc64 R_PPC_JMP_SLOT handler did not checked error from the
lookup() call, the patch leaves the code as is (untested).

Reported by: glebius
Sponsored by: The FreeBSD Foundation
MFC after: 1 week