]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoFix bootstrapping of libopenbsd on build hosts where KERN_PROC_NFDS
rodrigc [Sat, 14 Nov 2015 23:43:59 +0000 (23:43 +0000)]
Fix bootstrapping of libopenbsd on build hosts where KERN_PROC_NFDS
it not defined.

8 years agoAdd imsg to libopenbsd.
rodrigc [Sat, 14 Nov 2015 23:13:15 +0000 (23:13 +0000)]
Add imsg to libopenbsd.

This will help with importing OpenBSD programs such as ypldap
into the base system.

8 years agoImplemtn getdtablecount() to count open file descriptors for current process.
rodrigc [Sat, 14 Nov 2015 23:07:38 +0000 (23:07 +0000)]
Implemtn getdtablecount() to count open file descriptors for current process.

Use underlying sysctl implemented by mjg in r290473.

PR:                    194985
Reviewed by:           bapt, mjg
Differential Revision: https://reviews.freebsd.org/D4084

8 years agoReplace magic numbers for CCGRx registers with more descriptive names
gonzo [Sat, 14 Nov 2015 22:46:50 +0000 (22:46 +0000)]
Replace magic numbers for CCGRx registers with more descriptive names

8 years agoSomewhat improve HDMI event API
gonzo [Sat, 14 Nov 2015 21:01:35 +0000 (21:01 +0000)]
Somewhat improve HDMI event API

- Pass device_t for HDMI framer as an argument for event hook
- Use #define for event values, instead of opaque (and unused) 0

8 years agoFix/improve CRN tracking.
mav [Sat, 14 Nov 2015 19:47:17 +0000 (19:47 +0000)]
Fix/improve CRN tracking.

8 years agoPass provided af instead of AF_UNSPEC to setwa_f callback.
melifaro [Sat, 14 Nov 2015 18:16:17 +0000 (18:16 +0000)]
Pass provided af instead of AF_UNSPEC to setwa_f callback.

8 years agoAdd missing error checks.
trasz [Sat, 14 Nov 2015 16:18:22 +0000 (16:18 +0000)]
Add missing error checks.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoCosmetics; no functional changes.
trasz [Sat, 14 Nov 2015 16:15:38 +0000 (16:15 +0000)]
Cosmetics; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove unneeded includes.
trasz [Sat, 14 Nov 2015 16:12:56 +0000 (16:12 +0000)]
Remove unneeded includes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't try to avoid calling free(3) with NULL argument.
trasz [Sat, 14 Nov 2015 16:06:01 +0000 (16:06 +0000)]
Don't try to avoid calling free(3) with NULL argument.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd NULL check to make Coverity happy.
mav [Sat, 14 Nov 2015 14:56:01 +0000 (14:56 +0000)]
Add NULL check to make Coverity happy.

8 years agoMove iflladdr_event eventhandler invocation to if_setlladdr.
melifaro [Sat, 14 Nov 2015 13:34:03 +0000 (13:34 +0000)]
Move iflladdr_event eventhandler invocation to if_setlladdr.

Suggested by: glebius

8 years agoFix URL for powerpc cpu options. Remove reference to ia64 options as
imp [Sat, 14 Nov 2015 06:18:50 +0000 (06:18 +0000)]
Fix URL for powerpc cpu options. Remove reference to ia64 options as
no longer relevant.

8 years agoRegen src.conf.5
sjg [Sat, 14 Nov 2015 04:50:28 +0000 (04:50 +0000)]
Regen src.conf.5

8 years agoRename META_MODE option to DIRDEPS_BUILD
sjg [Sat, 14 Nov 2015 03:24:48 +0000 (03:24 +0000)]
Rename META_MODE option to DIRDEPS_BUILD

This allows META_FILES option to be renamed META_MODE.
Also add META_COOKIE_TOUCH for use in targets that can benefit
from a cookie when in meta mode.

Differential Revision: https://reviews.freebsd.org/D4153
Reviewed by: bdrewery

8 years agohdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm
gonzo [Sat, 14 Nov 2015 03:22:59 +0000 (03:22 +0000)]
hdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm

8 years agoMove all HDMI-related stuff to hdmi_if.m, hdmi.h is not required
gonzo [Sat, 14 Nov 2015 03:05:42 +0000 (03:05 +0000)]
Move all HDMI-related stuff to hdmi_if.m, hdmi.h is not required

8 years agoOptimizations to the way hwpmc gathers user callchains
jtl [Sat, 14 Nov 2015 01:45:55 +0000 (01:45 +0000)]
Optimizations to the way hwpmc gathers user callchains

Changes to the code to gather user stacks:
* Delay setting pmc_cpumask until we actually have the stack.
* When recording user stack traces, only walk the portion of the ring
  that should have samples for us.

Sponsored by: Juniper Networks
Approved by: gnn (mentor)
MFC after: 1 month

8 years agoAvoid setting schg in the objtree for lib32 build.
bdrewery [Sat, 14 Nov 2015 01:45:37 +0000 (01:45 +0000)]
Avoid setting schg in the objtree for lib32 build.

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

8 years agoFix hwpmc "stalled" behavior
jtl [Sat, 14 Nov 2015 01:40:12 +0000 (01:40 +0000)]
Fix hwpmc "stalled" behavior

Currently, there is a single pm_stalled flag that tracks whether a
performance monitor was "stalled" due to insufficent ring buffer
space for samples. However, because the same performance monitor
can run on multiple processes or threads at the same time, a single
pm_stalled flag that impacts them all seems insufficient.

In particular, you can hit corner cases where the code fails to stop
performance monitors during a context switch out, because it thinks
the performance monitor is already stopped. However, in reality,
it may be that only the monitor running on a different CPU was stalled.

This patch attempts to fix that behavior by tracking on a per-CPU basis
whether a PM desires to run and whether it is "stalled". This lets the
code make better decisions about when to stop PMs and when to try to
restart them. Ideally, we should avoid the case where the code fails
to stop a PM during a context switch out.

Sponsored by: Juniper Networks
Reviewed by: jhb
Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D4124

8 years agoif_ntb: Clear the right QP in the free bitmap
cem [Sat, 14 Nov 2015 01:23:13 +0000 (01:23 +0000)]
if_ntb: Clear the right QP in the free bitmap

Now it can ping back and forth.

Sponsored by: EMC / Isilon Storage Division

8 years ago- Add driver for System-Reset-Controler i.MX6 module
gonzo [Fri, 13 Nov 2015 23:47:41 +0000 (23:47 +0000)]
- Add driver for System-Reset-Controler i.MX6 module
- Add API function to reset IPU1

8 years agoRevert r290403
smh [Fri, 13 Nov 2015 23:14:39 +0000 (23:14 +0000)]
Revert r290403

CARP rework invalidated this change.

8 years agoThis fixes several places where callout_stops return is examined. The
rrs [Fri, 13 Nov 2015 22:51:35 +0000 (22:51 +0000)]
This fixes several places where callout_stops return is examined. The
new return codes of -1 were mistakenly being considered "true". Callout_stop
now returns -1 to indicate the callout had either already completed or
was not running and 0 to indicate it could not be stopped.  Also update
the manual page to make it more consistent no non-zero in the callout_stop
or callout_reset descriptions.

MFC after: 1 Month with associated callout change.

8 years agoMETA MODE: Don't double stage SYMLINKS for shared libraries.
bdrewery [Fri, 13 Nov 2015 22:27:24 +0000 (22:27 +0000)]
META MODE: Don't double stage SYMLINKS for shared libraries.

This also fixes truncating the path that the links were installed to, which
was most likely going to be the same directory the library was in anyhow.

Let bsd.sys.mk handle SYMLINKS via stage_symlinks.  stage_libs continues to
handle the SHLIB_LINK though since it is not a SYMLINKS.

This fixes a race, seen easily in lib/libthr, where libpthread_p.a is created
by both stage_libs and stage_symlinks resulting in 'ln: File exists'.

Sponsored by: EMC / Isilon Storage Division
Discussed with: sjg

8 years agoReview on pf is recommended. Add kp@ to the list.
glebius [Fri, 13 Nov 2015 21:49:48 +0000 (21:49 +0000)]
Review on pf is recommended. Add kp@ to the list.

8 years agoRevert r290740.
bdrewery [Fri, 13 Nov 2015 20:25:30 +0000 (20:25 +0000)]
Revert r290740.

Discussing with sjg@, we agree the better fix is to be done in meta.stage.mk.

This also broke staging of SYMLINKS for non-shared libraries, such as for
lib/libcompiler_rt, which results in all Makefile.depend removing it.

Sponsored by: EMC / Isilon Storage Division

8 years agobsd.doc.mk: Similar to r289391, make installing to a missing directory an error.
bdrewery [Fri, 13 Nov 2015 17:27:23 +0000 (17:27 +0000)]
bsd.doc.mk: Similar to r289391, make installing to a missing directory an error.

This avoids the problems fixed in r290772.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoFix a few files that where being incorrectly installed as one file. This was caused...
brd [Fri, 13 Nov 2015 17:25:20 +0000 (17:25 +0000)]
Fix a few files that where being incorrectly installed as one file.  This was caused by the nvi upgrade fallout in r281994.  So add the missing directories back to the mtree and add distrib-cleanup target to retroactively remove the files that should have been directories.

Reviewed by: bdrewery
Approved by: bdrewery

8 years agoAdd support for the Zybo and similar boards to ZEDBOARD kernel.
imp [Fri, 13 Nov 2015 15:36:40 +0000 (15:36 +0000)]
Add support for the Zybo and similar boards to ZEDBOARD kernel.
Zybo needs its own DTB and has a different PHY, so add it to
the base kernel. Details on building bootable SD images at
http://www.thomasskibo.com/zedbsd/

Submitted By: Thomas Skibo

8 years agoAdd assert and note about the size of "unsigned long" inside the
hselasky [Fri, 13 Nov 2015 09:00:39 +0000 (09:00 +0000)]
Add assert and note about the size of "unsigned long" inside the
LinuxKPI for the future.

Sponsored by: Mellanox Technologies

8 years agoAllow admins to specify a regex which is applied (in the negative) to the
des [Fri, 13 Nov 2015 06:20:27 +0000 (06:20 +0000)]
Allow admins to specify a regex which is applied (in the negative) to the
output from df, similar to what security/200.chkmounts does.  This can be
useful to avoid listing automounted ZFS snapshots, for instance.

MFC after: 1 week

8 years agoThere is no more point in indexing /var/db/freebsd-update than there is in
des [Fri, 13 Nov 2015 06:16:12 +0000 (06:16 +0000)]
There is no more point in indexing /var/db/freebsd-update than there is in
indexing /var/db/portsnap, which was already in PRUNEPATHS.

MFC after: 1 week

8 years agoMETA MODE: Don't double stage SYMLINKS for libraries.
bdrewery [Fri, 13 Nov 2015 01:47:56 +0000 (01:47 +0000)]
META MODE: Don't double stage SYMLINKS for libraries.

meta.stage.mk is handling ${SYMLINKS:T} for stage_libs already.  The logic in
bsd.sys.mk to handle ${SYMLINKS} was brought in r247817 when it was moved out
of bsd.prog.mk and bsd.lib.mk into bsd.sys.mk.  The logic previously was
limited to bsd.prog.mk.

This fixes a race, seen easily in lib/libthr, where libpthread_p.a is created
by both stage_libs and stage_symlinks resulting in 'ln: File exists'.

Sponsored by: EMC / Isilon Storage Division

8 years ago1) Remove my overcomplicated error fallback and just return error
ache [Thu, 12 Nov 2015 22:24:39 +0000 (22:24 +0000)]
1) Remove my overcomplicated error fallback and just return error
immediatelly as old code does, now for append modes too.
Real use case for such fallback is impossible (unless specially crafted).

2) Remove now unneded include I forgot to remove in prev. commits.

MFC after:      1 week

8 years agoExport various helper variables describing the layout and size of
jhb [Thu, 12 Nov 2015 22:00:59 +0000 (22:00 +0000)]
Export various helper variables describing the layout and size of
certain kernel structures for use by debuggers. This mostly aids
in examining cores from a kernel without debug symbols as a debugger
can infer these values if debug symbols are available.

One set of variables describes the layout of 'struct linker_file' to
walk the list of loaded kernel modules.

A second set of variables describes the layout of 'struct proc' and
'struct thread' to walk the list of processes in the kernel and the
threads in each process.

The 'pcb_size' variable is used to index into the stoppcbs[] array.

The 'vm_maxuser_address' is used to distinguish kernel virtual addresses
from user addresses. This doesn't have to be perfect, and
'vm_maxuser_address' is a cheap and simple way to differentiate kernel
pointers from simple values like TIDs and PIDs.

While here, annotate the fields in struct pcb used by kgdb on amd64
and i386 to note that their ABI should be preserved.  Annotations for
other platforms will be added in the future.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3773

8 years agoEnable cloks for all USDHC interfaces, previous value was USDHC 1-3 + USBOH3
gonzo [Thu, 12 Nov 2015 21:37:58 +0000 (21:37 +0000)]
Enable cloks for all USDHC interfaces, previous value was USDHC 1-3 + USBOH3

8 years agoConsistently capitalize "TI" as an abbreviation for Texas Instruments.
gavin [Thu, 12 Nov 2015 20:14:25 +0000 (20:14 +0000)]
Consistently capitalize "TI" as an abbreviation for Texas Instruments.

8 years agoNTB: MFV 8b782fab: unify translation addresses
cem [Thu, 12 Nov 2015 19:07:03 +0000 (19:07 +0000)]
NTB: MFV 8b782fab: unify translation addresses

There is no need for the upstream and downstream addresses to be
different for the NTB configs.  Go to using a single set of address. It
is still possible to configure them differently using module parameter
override however (CEM: tunable).

Authored by: Dave Jiang <dave.jiang@intel.com>
Reviewed by: Allen Hubbe <Allen.Hubbe@emc.com>
Reviewed by: Jon Mason <jdmason@kudzu.us>
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agokern_testfrwk.9: Clean up manual page style
cem [Thu, 12 Nov 2015 18:42:06 +0000 (18:42 +0000)]
kern_testfrwk.9:  Clean up manual page style

Igor has many less complaints now.  I think the two remaining are bogus, but I
am also not sure why Igor is producing them.

The page still needs more work.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd note about usr.sbin/pkg -- Please discuss behavior/flag changes with pkg team.
bdrewery [Thu, 12 Nov 2015 18:10:34 +0000 (18:10 +0000)]
Add note about usr.sbin/pkg -- Please discuss behavior/flag changes with pkg team.

8 years agoMove the root to s3a given this kernel will be used with a nanobsd
imp [Thu, 12 Nov 2015 17:46:57 +0000 (17:46 +0000)]
Move the root to s3a given this kernel will be used with a nanobsd
build that defaults there.

8 years agoNO_CPU_OPTFLAGS doesn't exist, so don't document it.
imp [Thu, 12 Nov 2015 17:23:31 +0000 (17:23 +0000)]
NO_CPU_OPTFLAGS doesn't exist, so don't document it.

8 years agospelling is important.
sbruno [Thu, 12 Nov 2015 17:15:04 +0000 (17:15 +0000)]
spelling is important.

Submitted by: vangyzen@FreeBSD.org

8 years agoMETA MODE: Don't set schg flags in the stagedir for distrib-dirs.
bdrewery [Thu, 12 Nov 2015 17:13:12 +0000 (17:13 +0000)]
META MODE: Don't set schg flags in the stagedir for distrib-dirs.

This recently started setting /var/empty to schg after r290628.

Sponsored by: EMC / Isilon Storage Division

8 years agoRespect NO_FSCHG for extracting mtrees.
bdrewery [Thu, 12 Nov 2015 17:11:03 +0000 (17:11 +0000)]
Respect NO_FSCHG for extracting mtrees.

PR: 194189
X-MFC-With: r290628
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoIntel has requested that changes to these driver get a phabricator review
sbruno [Thu, 12 Nov 2015 16:08:49 +0000 (16:08 +0000)]
Intel has requested that changes to these driver get a phabricator review
before commits to keep conflicts down to a minimum.

8 years agoSome basic documentation (a man page) on kern_testfrwk
rrs [Thu, 12 Nov 2015 11:42:01 +0000 (11:42 +0000)]
Some basic documentation (a man page) on kern_testfrwk

8 years agoBump version number since callout_stop() macro now has new NULL arg.
rrs [Thu, 12 Nov 2015 10:48:31 +0000 (10:48 +0000)]
Bump version number since callout_stop() macro now has new NULL arg.
Thanks Hans for spotting this!

8 years agoStyle 9 changes.
rrs [Thu, 12 Nov 2015 10:31:14 +0000 (10:31 +0000)]
Style 9 changes.
MFC after: 1 Month

8 years agoFix integer to pointer of different size conversion warnings when
hselasky [Thu, 12 Nov 2015 10:12:20 +0000 (10:12 +0000)]
Fix integer to pointer of different size conversion warnings when
using GCC for 32-bit platforms. The integer size in this case is
hardcoded 64-bit while the pointer size is 32-bit.

Sponsored by: Mellanox Technologies
MFC after: 2 weeks

8 years agoFix print formatting compile warnings for Sparc64 and PowerPC platforms.
hselasky [Thu, 12 Nov 2015 09:56:25 +0000 (09:56 +0000)]
Fix print formatting compile warnings for Sparc64 and PowerPC platforms.

Sponsored by: Mellanox Technologies
MFC after: 2 weeks

8 years agoCompile fix for 32-bit platforms:
hselasky [Thu, 12 Nov 2015 09:52:37 +0000 (09:52 +0000)]
Compile fix for 32-bit platforms:
- The Linux timers data field is "unsigned long".

Sponsored by: Mellanox Technologies
MFC after: 2 weeks

8 years agoFix ixl debug sysctls panic
smh [Thu, 12 Nov 2015 09:45:35 +0000 (09:45 +0000)]
Fix ixl debug sysctls panic

Remove the use of sbuf_data on drained sbufs from the debug sysctls:
* ixl_sysctl_hw_res_alloc
* ixl_sysctl_switch_config

This prevents a kernel panic when accessing these values under a kernel
compiled with INVARIANTS.

Sponsored by: Multiplay

8 years agoFix UP build.
kib [Thu, 12 Nov 2015 09:20:10 +0000 (09:20 +0000)]
Fix UP build.

8 years agoBuild fixes:
hselasky [Thu, 12 Nov 2015 09:18:22 +0000 (09:18 +0000)]
Build fixes:
- Add some missing I/O functions for non-i386 and amd64 platforms.
- Stub ioremap() to NULL using a macro to ensure non-existing memory
  attributes are not referred when they do not exist.
- Add more header files to linux/list.h to resolve driver compilation
  issues on Sparc64 and PowerPC platforms.

Sponsored by: Mellanox Technologies

8 years agoMake the slice names for root configurable. For embedded platforms, we
imp [Thu, 12 Nov 2015 05:53:32 +0000 (05:53 +0000)]
Make the slice names for root configurable. For embedded platforms, we
need s1 to be a FAT partition, s2 to be the config partition and s3
and s4 to be the ping-pong upgrade partitions.

NANO_SLICE_ROOT defaults to s1
NANO_SLICE_ALTROOT defaults to s2
NANO_SLICE_CFG defaults to s3
NANO_SLICE_DATA defaults to s4

All can be overridden in the config file. Some basic sanity checking
is in place, but is no substitute for being careful.

8 years agoAdd riotboard DTB to dtb/imx6
gonzo [Thu, 12 Nov 2015 03:37:28 +0000 (03:37 +0000)]
Add riotboard DTB to dtb/imx6

8 years agoMFV of 290695,tzdata2015g
edwin [Thu, 12 Nov 2015 03:25:04 +0000 (03:25 +0000)]
MFV of 290695,tzdata2015g

Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.

8 years agoAdd support for "rc.conf.d" file(s).
dteske [Thu, 12 Nov 2015 00:30:33 +0000 (00:30 +0000)]
Add support for "rc.conf.d" file(s).

Differential Revision: https://reviews.freebsd.org/D3551
Reviewed by: allanjude
MFC after: 1 week
X-MFC-to: stable/10
X-MFC-with: 290337
Relnotes: yes

8 years agoRevisit this old board with 64MB of RAM. Comment out usb entirely,
imp [Thu, 12 Nov 2015 00:26:47 +0000 (00:26 +0000)]
Revisit this old board with 64MB of RAM. Comment out usb entirely,
since it isn't used for my application. Add back the md device since
it's needed for NanoBSD support. Add in many of the small memory
footprint options from the access points.

With these changes we go from having ~8MB to having ~20MB free,
though free + inactive only goes from ~35MB to ~42MB. We can
also boot a nanobsd image mostly (I had to hand tweak what was
built to represent the final goal).

Move the FDT stuff to the top. We're almost ready to pull the trigger
to moving over to FDT, but something in the MCI driver is freaking out
when we do and that needs fixing first.

8 years agoMove META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, which
bdrewery [Wed, 11 Nov 2015 23:52:08 +0000 (23:52 +0000)]
Move META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, which
centralizes the handling of CC and HOST_CC.

This fixes a bug with WITH_CCACHE_BUILD when using MACHINE=host since
CC is overridden in local.init.mk via src.opts.mk long before bsd.compiler.mk
is included.

Originally the ccache implementation was placed in local.init.mk but moved
to bsd.compiler.mk as it seemed more proper and avoided other ordering
issues.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd the MLINK for async_drain Thanks Edward for the pointer.
rrs [Wed, 11 Nov 2015 23:10:09 +0000 (23:10 +0000)]
Add the MLINK for async_drain Thanks Edward for the pointer.

MFC after: 1 month

8 years agoFix resource leaks in error cases.
trasz [Wed, 11 Nov 2015 23:00:57 +0000 (23:00 +0000)]
Fix resource leaks in error cases.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoif_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups
cem [Wed, 11 Nov 2015 18:56:21 +0000 (18:56 +0000)]
if_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups

Order of operations issue with the QP Num and MW count, which would
result in the receive buffer pointer being invalid if there are more
than 1 MW.  Corrected with parenthesis to enforce the proper order of
operations.

Reported by: John I. Kading <John.Kading@gd-ms.com>
Reported by: Conrad Meyer <cem@FreeBSD.org>
Authored by: Jon Mason <jdmason@kudzu.us>
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Add more HW registers to device sysctl tree
cem [Wed, 11 Nov 2015 18:56:11 +0000 (18:56 +0000)]
NTB: Add more HW registers to device sysctl tree

Sponsored by: EMC / Isilon Storage Division

8 years agontb: volatile some members set by interrupt routines
cem [Wed, 11 Nov 2015 18:56:02 +0000 (18:56 +0000)]
ntb: volatile some members set by interrupt routines

Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw: Similarly, add a debug-leveled macro for ntb_hw
cem [Wed, 11 Nov 2015 18:55:53 +0000 (18:55 +0000)]
ntb_hw: Similarly, add a debug-leveled macro for ntb_hw

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Add module-specific log level
cem [Wed, 11 Nov 2015 18:55:44 +0000 (18:55 +0000)]
if_ntb: Add module-specific log level

Rather than relying on the quite accurately named 'bootverbose'.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Transport link cleanup needs to be on a taskqueue
cem [Wed, 11 Nov 2015 18:55:34 +0000 (18:55 +0000)]
if_ntb: Transport link cleanup needs to be on a taskqueue

Because it can sleep drainking link work callout(s).  Linux (dual
BSD/GPL driver) does something very similar.

At the same time, switch the NTB CTX lock to a non-spin mutex, because
the taskqueue_swi lock can't be taken after a spin mutex.

Suggested by: Witness
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Diff reduce with Linux
cem [Wed, 11 Nov 2015 18:55:25 +0000 (18:55 +0000)]
NTB: Diff reduce with Linux

No functional change.

Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw: Correctly detect DSD/USD
cem [Wed, 11 Nov 2015 18:55:16 +0000 (18:55 +0000)]
ntb_hw: Correctly detect DSD/USD

Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw: In INTx fallback, correct db shift from 15 to 16
cem [Wed, 11 Nov 2015 18:55:07 +0000 (18:55 +0000)]
ntb_hw: In INTx fallback, correct db shift from 15 to 16

Sponsored by: EMC / Isilon Storage Division

8 years agontb: Use caddr_t to simplify pointer arithmetic
cem [Wed, 11 Nov 2015 18:54:58 +0000 (18:54 +0000)]
ntb: Use caddr_t to simplify pointer arithmetic

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Skip db_valid validation writing DB link bit
cem [Wed, 11 Nov 2015 18:54:49 +0000 (18:54 +0000)]
NTB: Skip db_valid validation writing DB link bit

In ntb_poll_link, we are intentionally writing the link bit, which is
absent from db_valid_mask.  Don't panic on a kassert when we do so.

The Linux version of this (dual BSD/GPL) driver has the db_valid_mask
assertions in callers of db_iowrite() rather than db_iowrite() itself;
it skips the assertions in the equivalent of ntb_poll_link().  Rather
than duplicating the assertions in every caller, add a db_iowrite_raw()
that doesn't check and use it from ntb_poll_link().

Suggested by: kassert_panic
Sponsored by: EMC / Isilon Storage Division

8 years agoUse explicit filename when creating locale symlinks to avoid creating a
bdrewery [Wed, 11 Nov 2015 18:45:48 +0000 (18:45 +0000)]
Use explicit filename when creating locale symlinks to avoid creating a
directory symlink when the target directory does not exist.  This will
cause an error instead of a broken setup.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove redundant declaration for sysctl kern.
bdrewery [Wed, 11 Nov 2015 16:24:52 +0000 (16:24 +0000)]
Remove redundant declaration for sysctl kern.

This is trying to fix the GCC build.

MFC after: 1 month
X-MFC-With: r290663

8 years agoUse a proper prototype.
bdrewery [Wed, 11 Nov 2015 16:23:07 +0000 (16:23 +0000)]
Use a proper prototype.

This was a failure in the GCC build.

MFC after: 1 month
X-MFC-With: r290663

8 years agoRemove dead code.
des [Wed, 11 Nov 2015 13:47:23 +0000 (13:47 +0000)]
Remove dead code.

8 years agoOne more $Mdocdate$
des [Wed, 11 Nov 2015 13:27:58 +0000 (13:27 +0000)]
One more $Mdocdate$

8 years agoRemove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$").
des [Wed, 11 Nov 2015 13:26:47 +0000 (13:26 +0000)]
Remove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$").

8 years agoNow that we have mandoc, we can leave $Mdocdate$ tags as-is. Unfortunately,
des [Wed, 11 Nov 2015 13:23:07 +0000 (13:23 +0000)]
Now that we have mandoc, we can leave $Mdocdate$ tags as-is.  Unfortunately,
there is (currently) no way to make Subversion generate correct $Mdocdate$
tags, but perhas we can teach mandoc to read Subversion's %d format.

8 years agoModify target port groups logic in CTL.
mav [Wed, 11 Nov 2015 13:18:38 +0000 (13:18 +0000)]
Modify target port groups logic in CTL.

 - Introduce "ha_shared" port option, which being set to "on" moves the
port into separate port group, shared between HA nodes.  This allows to
better handle cases when iSCSI portals are bound to CARP address that can
dynamically move between nodes.  Some initiators (at least VMware) don't
detect that after iSCSI reconnect they've attached to different SCSI port
from different port group, that totally breakes ALUA status parsing.
In theory, I believe, it should be enough to have different iSCSI portal
group tags on different nodes to make initiators detect this condition,
but it seems like VMware ignores those values, and even full LUN retaste
forced by UA does not help.
 - Make CTL report up to three port groups: 1 -- non-HA mode or ports
with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2.
 - Report Transitioning state for all port groups when HA interlink is
connected, but neither of nodes is primary for the LUN.

MFC after: 2 weeks

8 years agoRefactor bcm2835_cpufreq to use bcm2835_mbox_property API
gonzo [Wed, 11 Nov 2015 00:45:41 +0000 (00:45 +0000)]
Refactor bcm2835_cpufreq to use bcm2835_mbox_property API

8 years ago- Set have_message in interrupt to handle "response before READ" case
gonzo [Wed, 11 Nov 2015 00:41:02 +0000 (00:41 +0000)]
- Set have_message in interrupt to handle "response before READ" case
- Serialize access to property channel when using bcm2835_mbox_property

8 years agoBuild all of sys/modules with SUBDIR_PARALLEL.
bdrewery [Tue, 10 Nov 2015 17:15:36 +0000 (17:15 +0000)]
Build all of sys/modules with SUBDIR_PARALLEL.

Sponsored by: EMC / Isilon Storage Division
MFC after: 3 weeks

8 years agoAdd new async_drain to the callout system. This is so-far not used but
rrs [Tue, 10 Nov 2015 14:49:32 +0000 (14:49 +0000)]
Add new async_drain to the callout system. This is so-far not used but
should be used by TCP for sure in its cleanup of the IN-PCB (will be coming shortly).

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D4076

8 years agoAdd a kernel test framework. The callout_test is a demonstration and will only
rrs [Tue, 10 Nov 2015 14:14:41 +0000 (14:14 +0000)]
Add a kernel test framework. The callout_test is a demonstration and will only
work with the upcoming async-drain functionality. Tests can be added
to the tests directory and then the framework can be used to launch
those tests.

MFC after: 1 month
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D1755

8 years agoFix a bug in the CPU % limiting code
jpaetzel [Tue, 10 Nov 2015 14:14:32 +0000 (14:14 +0000)]
Fix a bug in the CPU % limiting code

If you attempt to set a pcpu limit that is higher than
110% using rctl (for instance, you want a jail to be
able to use 2 cores on your system so you set pcpu to
200%) the thing you are trying to limit becomes unthrottled.

PR: 189870
Submitted by: dustinwenz@ebureau.com
Reviewed by: trasz
MFC after: 1 week

8 years agoARM: Refactor interrupt_enable/disable/restore.
mmel [Tue, 10 Nov 2015 13:47:28 +0000 (13:47 +0000)]
ARM: Refactor interrupt_enable/disable/restore.
Allow manipulation with PSR_A bit on ARMv6+.
Remove declaration of unused functions.

This effectively enables asynchronous aborts on early bootstrap stage,
which previously was not enabled due to an error in enable_interrupts().

PR: 201434
Reported by: Gregory Soutade <soutade at gmail.com>
Approved by: kib (mentor)

8 years agoMove the MK_BLUETOOTH block down below the architecture specific sections by the
ngie [Tue, 10 Nov 2015 13:32:05 +0000 (13:32 +0000)]
Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

MFC after: 3 days
X-MFC with: r290659
PR: 193260
Sponsored by: EMC / Isilon Storage Divisions

8 years ago- Move ng_bluetooth.4 under MK_BLUETOOTH != no
ngie [Tue, 10 Nov 2015 13:28:41 +0000 (13:28 +0000)]
- Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

MFC after: 3 days
PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division

8 years agoFix cp15 PAR definition and function. While here, add cp15 ATS1CPW
skra [Tue, 10 Nov 2015 13:20:21 +0000 (13:20 +0000)]
Fix cp15 PAR definition and function. While here, add cp15 ATS1CPW
function which checks an address for privileged (PL1) write access.
The function is inlined so it does not bring any cost, but makes
function set for checking privileged access complete.

Approved by: kib (mentor)

8 years agoFix pmap_fault(). It turned out that alignment abort may have higher
skra [Tue, 10 Nov 2015 13:15:34 +0000 (13:15 +0000)]
Fix pmap_fault(). It turned out that alignment abort may have higher
priority than both translation and permission ones.

Approved by: kib (mentor)

8 years agourtwn(4): add IBSS mode support
avos [Tue, 10 Nov 2015 12:52:26 +0000 (12:52 +0000)]
urtwn(4): add IBSS mode support

Tested with RTL8188EU, IBSS and STA modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4038

8 years agoAdd mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
hselasky [Tue, 10 Nov 2015 12:20:22 +0000 (12:20 +0000)]
Add mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
from Mellanox Technologies. The current driver supports ethernet
speeds up to and including 100 GBit/s. Infiniband support will be
done later.

The code added is not compiled by default, which will be done by a
separate commit.

Sponsored by: Mellanox Technologies
MFC after: 2 weeks

8 years agoImplement atomic_testandset_{32,int,long,64} for ARMv6. Only
kib [Tue, 10 Nov 2015 12:15:13 +0000 (12:15 +0000)]
Implement atomic_testandset_{32,int,long,64} for ARMv6.  Only
little-endian configuration for 64-bit variant is supported.

Reviewed by: mmel
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4113

8 years agoARM: Remove trailing whitespace from sys/arm/include
mmel [Tue, 10 Nov 2015 12:02:41 +0000 (12:02 +0000)]
ARM: Remove trailing whitespace from sys/arm/include
No functional changes.

Approved by:    kib (mentor)

8 years agoARM: Improve robustness of locore_v6.S and fix errors.
mmel [Tue, 10 Nov 2015 11:45:41 +0000 (11:45 +0000)]
ARM: Improve robustness of locore_v6.S and fix errors.
- boot page table is not allocated in data section, so must be
  cleared before use
- map only one section (1 MB) for SOCDEV mapping (*)
- DSB must be used for ensuring of finishing TLB operations
- Invalidate BTB when appropriate

PR: 198360
Reported by: Daisuke Aoyama <aoyama at peach.ne.jp> (*)
Approved by: kib (mentor)