Commit Graph

189667 Commits

Author SHA1 Message Date
Warner Losh
5d420b97e6 All the NO_foo options processed in src.opts.mk are really bsd.opts.mk
options, so move their processing there. This fixes issues with
Makefiles that define NO_MAN=t and only inlcude bsd.*.mk files. A few
ports fell into this category, and they should be fixed by this change.
Also, for now, disable the warning about NO_foo being deprecated. More
work is needed than anticipated before we can do that, so kill the
noise for now.
2014-05-07 18:14:56 +00:00
Mark Johnston
7a61fc5a8e - Export the function added in r265456 rather than the non-existent
_rtld_debug_postinit(). [1]
- Use __compiler_membar() instead of inline asm in _r_debug_state() and
  _r_debug_postinit(). [2]

Pointy hat to:	markj [1]
Reported by:	attilio [2]
Discussed with:	kib
X-MFC-With:	r265456
2014-05-07 17:21:22 +00:00
Doug Ambrisko
665484d8f0 Add mrsas(4) driver from LSI official support of newer MegaRAID SAS
cards.  LSI has been maintaining this driver outside of the FreeBSD
tree.  It overlaps support of ThunderBolt and Invader cards that mfi(4)
supports.  By default mfi(4) will attach to cards.  If the tunable:
	hw.mfi.mrsas_enable=1
is set then mfi(4) will not probe and attach to these newer cards and
allow mrsas(4) to attach.  So by default this driver will not effect
a FreeBSD system unless mfi(4) is removed from the kernel or the
tunable is enabled.

mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices
show up as /dev/daX.  mfiutil(8) does not work with mrsas.  The FreeBSD
version of MegaCli and StorCli from LSI do work with mrsas.  It appears
that StorCli only works with mrsas.  MegaCli appears to work with mfi(4)
and mrsas(4).

It would be good to add mfiutil(4) support to mrsas, emulations modes,
kernel logging, device aliases to ease the transition between mfi(4)
and mrsas(4).

Style issues should be resolved by LSI when they get committers approved.
The plan is get this driver in FreeBSD 9.3 to improve HW support.

Thanks to LSI for developing, testing and working with FreeBSD to
make this driver co-exist in FreeBSD.  This improves the overall
support of MegaRAID SAS.

Submitted by:	Kashyap Desai <Kashyap.Desai@lsi.com>
Reviewed by:	scottl
MFC after:	3 days
Sponsored by:	LSI
2014-05-07 16:16:49 +00:00
Aleksandr Rybalko
4efec7a83d Fix possible divide by zero.
Spotted by:	many

Sponsored by:	The FreeBSD Foundation
2014-05-07 13:53:38 +00:00
Glen Barber
3c0b107a16 Add svn revision number to sendmail entry and wrap
line.
Fix capitalization of Sendmail.

Sponsored by:	The FreeBSD Foundation
2014-05-07 12:45:33 +00:00
Glen Barber
bef467af31 Sort entries by svn revision as oldest-newest to match
entry order in other branches.

Sponsored by:	The FreeBSD Foundation
2014-05-07 12:45:31 +00:00
Glen Barber
33b6b9f670 Move r265348 to 'net-if' section.
Sponsored by:	The FreeBSD Foundation
2014-05-07 12:45:30 +00:00
Glen Barber
1d1ddbb763 Document r265348, Atheros AR1111 support.
Sponsored by:	The FreeBSD Foundation
2014-05-07 12:45:28 +00:00
Glen Barber
e1dab7bb0b Document r265236, addition of mpr(4).
Sponsored by:	The FreeBSD Foundation
2014-05-07 12:45:26 +00:00
Andrey V. Elsukov
579259ea0d It is safe to allow shrinking, when aligned size is bigger than current.
Tested by:	jmg
MFC after:	1 week
2014-05-07 11:18:27 +00:00
Marius Strobl
c6f0fab531 - Sprinkle const and static as appropriate.
- Fix whitespace bugs.
- Remove pointless returns in void functions.
- Nuke pointless switch cases mirroring the default.

MFC after:	3 days
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-07 09:15:46 +00:00
Peter Holm
e103f5b1c0 msync(2) must return ENOMEM and not EINVAL when the address is outside the
allowed range or when one or more pages are not mapped. This according to
The Open Group Base Specifications Issue 7.

Discussed with:	 attilio, Bruce Evans
Reviewed by:	 alc, Garrett Cooper
Reported by:	 ATF
MFC after:	 2 weeks
Sponsored by:	EMC / Isilon storage division
2014-05-07 08:38:02 +00:00
Adrian Chadd
add58488d2 There's no need to be this paranoid - ni is deferenced before this
point.

Coverity ID:	 CID 1211937
2014-05-07 07:57:50 +00:00
Kenneth D. Merry
63941e9834 Hold the SIM lock when calling xpt_create_path() and xpt_action() in
mprsas_SSU_to_SATA_devices().

This fixes an assertion on shutdown with INVARIANTS enabled with SATA
drives present on an IR firmware controller.

Reviewed by:	Steve McConnell <stephen.mcconnell@avagotech.com>.
MFC after:	3 days
2014-05-07 05:14:48 +00:00
Kenneth D. Merry
09e25c0e8a Remove some debugging code.
Submitted by:	Steve McConnell <stephen.mcconnell@avagotech.com>
MFC after:	3 days
2014-05-07 05:11:16 +00:00
Ed Maste
f9688ceecf Merge -fstandalone-debug from Clang r198655:
Implement a new -fstandalone-debug option. rdar://problem/15685848
  It controls everything that -flimit-debug-info used to, plus the
  vtable type optimization. The old -fno-limit-debug-info option is now an
  alias to -fstandalone-debug and vice versa.

  Standalone is the default on Darwin until dtrace is updated to work with
  non-standalone debug info (rdar://problem/15758808).

  Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
  because NoStandaloneDebugInfo sounded even more confusing.
2014-05-07 00:51:24 +00:00
Adrian Chadd
08595c4c81 Bump the default C-state to Cmax, rather than the kernel default
of C1.

This may not stay through 11.0-RELEASE, but at least having it
on by default in -HEAD will expose (more) issues with broken hardware.

Note: I have no plans or desire to MFC this to stable/10.
2014-05-06 23:28:37 +00:00
Kenneth D. Merry
c0ba1535a4 Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.
This is more consistent with the existing mps(4) behavior.

Reviewed by:	Steve McConnell <stephen.mcconnell@avagotech.com>
MFC after:	3 days
2014-05-06 22:13:38 +00:00
Alan Somers
d1d66eac15 dd(1) uses gettimeofday(2) to compute the throughput statistics. However,
gettimeofday returns the system clock, which may jump forward or back,
especially if NTP is in use.  If the time jumps backwards, then dd will see
negative elapsed time, round it up to 1usec, and print an absurdly fast
transfer rate.

The solution is to use clock_gettime(2) with CLOCK_MONOTONIC_PRECISE as the
clock_id.  That clock advances steadily, regardless of changes to the system
clock.

Reviewed by:	delphij
MFC after:	3 days
Sponsored by:	Spectra Logic
2014-05-06 22:06:39 +00:00
Marcel Moolenaar
789a10b106 Add mkimg_write() which combines lseek(2) and write(2) and uses
sector granularity for both offset and length. Have all schemes
use mkimg_write() instead of mkimg_seek() followed by write(2).

Now that schemes don't use lseek(2) nor write(2) directly, it's
easier to support output formats other than raw disks.
2014-05-06 21:54:05 +00:00
Marcel Moolenaar
4d51df7409 Add missing svn:keywords property. 2014-05-06 21:51:16 +00:00
Xin LI
c4bf0d04c2 Don't reply monlist request when it's not enabled.
No objection from:	roberto (but all bugs are mine)
MFC after:	2 weeks
2014-05-06 21:34:01 +00:00
Xin LI
28ab4bb8f7 Sort .ALLSRC before concatenating files together. This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by:	sjg
MFC after:	3 days
2014-05-06 21:30:58 +00:00
Scott Long
7d155880ee Due to reasons unknown at this time, the system can be forced to write
a journal block even when there are no journal entries to be written.
Until the root cause is found, handle this case by ensuring that a
valid journal segment is always written.

Second, the data buffer used for writing journal entries was never
being scrubbed of old data.  Fix this.

Submitted by:	Takehara Mikihito
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-05-06 20:40:16 +00:00
Marcel Moolenaar
c562fda42a In apm_write(), both fd and imgsz are referenced, so don't mark the
arguments as unused.
2014-05-06 20:34:21 +00:00
Xin LI
b8cdcb8ad8 Import George Wilson's change for Illumos #4730:
4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
	Reviewed by: Alex Reece <alex.reece@delphix.com>
	Reviewed by: Matthew Ahrens <mahrens@delphix.com>
	Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>

	Original author: George Wilson

MFC after:	3 days
2014-05-06 19:03:04 +00:00
Mark Johnston
a8509eb20e Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt
the victim process before its entry point is called, at which point probes
and DOF data are registered with the kernel. The r_debug_state hook cannot
be used for this purpose, as it is called before the program's init routines
are invoked and in particular before DOF data is registered (via drti.o).

Reviewed by:	kib
MFC after:	2 weeks
2014-05-06 18:07:58 +00:00
Michael Tuexen
4aa74d8b65 Remove unused code. This is triggered by the bugreport of Sylvestre Ledru
which deal with useless code in the user land stack:
https://bugzilla.mozilla.org/show_bug.cgi?id=1003929

MFC after: 3 days
2014-05-06 16:51:07 +00:00
Marius Strobl
7beff0890a - Allow foot shooting with the resetconfig command via the -f option.
- Fix typos preventing -f to actually work with the create command.
- Initialize flags to zero rather than using stack garbage when handling
  the grow command.

MFC after:	3 days
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-06 16:29:02 +00:00
Warner Losh
dd581d4b74 No need to install man pages for bootstrapping new make. Some
environments (that I can't reproduce locally, but that others have
reported) seem to get tripped up by this man page install. There's
really no need to do it, so turn off the man pages using the most
portable method. We can't just directly set MK_MAN=no here because
we're bootstrapping in the host environment and such a setting was
forbidden until very recently. NO_MAN= can produce a warning, but for
now the warning is benign.
2014-05-06 15:44:46 +00:00
Warner Losh
fa7bd4a732 Time to prune entries for RELENG_7 and stable/8. They are still in
svn, for the historically minded.
2014-05-06 15:44:41 +00:00
Warner Losh
55b76981d8 Add helpful note about possible workarounds for (as yet) unknown
breakage. Also fix typo.
2014-05-06 15:44:34 +00:00
Warner Losh
f0e845794d Fix the upgrade path for fmake by allowing the include of src.opts.mk
to fail and falling back on the conservative testing of variables
already in place. This should stop the tide of tinderbox mail.
2014-05-06 14:33:18 +00:00
Ian Lepore
95da66135d Enable PL310 power-saving modes and tune the cache ram latencies for imx6. 2014-05-06 14:26:24 +00:00
Ian Lepore
334b9c79c3 Add a public routine to set the L2 cache ram latencies. This can be
called by platform init routines to fine-tune cache performance.
2014-05-06 14:19:54 +00:00
Ian Lepore
7b41388248 Add defines for the bits in the PL310 debug control register.
This should have been part of r265444.
2014-05-06 14:08:42 +00:00
Ian Lepore
b450e1090d Call platform_pl310_init() before enabling the controller, and handle the
case where the controller is already enabled.

Some of the pl310 configuration registers cannot be changed while the
controller is active, so if there is any platform-specific init to be done
it must happen before enabling the controller.

The controller should not be enabled upon entry to the kernel, but u-boot
has recently developed the bad habit of leaving caches enabled when
launching the kernel, and since we have no control over that source code
we have to do our best to cope with it.  The PL310 manual doesn't document
a safe sequence for disabling the controller, but the sequence used here
(force write-through mode and disable linefill allocations, then clean and
invalidate the current contents before disabling the hardware) appears to
be sound both by analysis and empirical testing.

These changes were developed and tested in collaboration with
Svatopluk Kraus <onwahe@gmail.com>.

Reviewed by:	cognet@
2014-05-06 14:03:35 +00:00
Stefan Eßer
cb3d295629 Revert r265436, since it is not the correct fix. 2014-05-06 14:01:48 +00:00
Aleksandr Rybalko
bf8ed13db7 Implement KDMKTONE ioctl.
Submitted by:	Matthew D.Fuller <fullermd@over-yonder.net> (original version)
MFC:		7 days
PR:		kern/189170

Sponsored by:	The FreeBSD Foundation
2014-05-06 13:52:13 +00:00
Ian Lepore
9925f09b81 Break out the code that figures out the L2 cache geometry to its own
routine, so that it can be called from multiple places in upcoming changes.
2014-05-06 13:46:36 +00:00
Ian Lepore
a787d4c699 Move the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor
style(9) nits.  Use DEVMETHOD_END.
2014-05-06 13:38:34 +00:00
Stefan Eßer
05071052ab Fix include statement to accept src.opts.mk from a source directory
instead of from /usr/share/mk.

I'm not sure that this will let buildworld complete on a system with
no installed src.opts.mk (make buildworld is still running), but the
tinderbox builds are all failing earlyon without this patch.
2014-05-06 12:31:17 +00:00
Stefan Eßer
330fc53b66 Fix buildkernel breakage, which was fall-out from the move of options to
src.opts.mk.
2014-05-06 11:12:56 +00:00
Robert Watson
089f02b006 Spell raccdt in a more conventional way in a comment.
MFC after:	3 days
2014-05-06 10:53:51 +00:00
Hans Petter Selasky
42fabcc35c Reduce the number of interrupts in USB host mode for the DWC OTG
controller driver by piggybacking the SOF interrupt when issuing new
and checking old transfers. Number of interrupts was reduced by 30%
when doing Isochronous transfers.

Use correct GINTMSK_XXX macros when accessing the DWC OTG interrupt
mask register.

Add code to adjust the frame interval register which influences the
SOF rate.

MFC after:	2 weeks
2014-05-06 09:12:32 +00:00
Kenneth D. Merry
07aa4de131 Fix a problem with async notifications in the mpr(4) driver.
This problem only occurs on versions of FreeBSD prior to the recent CAM
locking changes.  (i.e. stable/9 and older versions of stable/10)  This
change should be a no-op for head and stable/10.

If a path isn't specified, xpt_register_async() will create a fully
wildcarded path and acquire a lock (the XPT lock in older versions,
and via xpt_path_lock() in newer versions) to call xpt_action() for the
XPT_SASYNC_CB CCB.  It will then drop the lock and if the requested event
includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up
to date with any device arrivals or path registrations.

The issue is that before the locking changes, each SIM lock would get
acquired in turn during the EDT tree traversal process.  If a path is
specified for xpt_register_async(), it won't acquire and drop its own lock,
but instead expects the caller to hold its own SIM lock.  That works for
the first part of xpt_register_async(), but causes a recursive lock
acquisition once the EDT traversal happens and it comes to the SIM in
question.  And it isn't possible to call xpt_action() without holding a SIM
lock.

The locking changes fix this by using the XPT topology lock for EDT
traversal, so it is no longer an issue to hold the SIM lock while calling
xpt_register_async().

The solution for FreeBSD versions before the locking changes is to request
notification of all device arrivals (so we pass a NULL path into
xpt_register_async()) and then filter out the arrivals that are not ours.

MFC After:	3 days
Sponsored by:	Spectra Logic Corporation
2014-05-06 06:18:43 +00:00
Warner Losh
d03127447d Remove support for WITHOUT_BMAKE. bmake is now the only make that can
build world, so it is the only make we build or install. fmake is
still in the tree, but disconnected, and upgrades from older systems
that still have bmake has not been removed, but its state has not been
tested (it should work given how minimal the work to upgrade to bmake
is).
2014-05-06 04:22:37 +00:00
Warner Losh
a46954e28e Document src.opts.mk changes and the decoupling of /etc/src.conf from
anything but the source tree.
2014-05-06 04:22:29 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Warner Losh
5e84b765f4 Move the /usr/src specific options to src.opts.mk. Move inclusion of
/etc/src.conf to this file as well. Now, it will only affect builds of
/usr/src and not others that use the bsd.*.mk files. Specifically
don't install src.opts.mk so we can catch when it 'leaks' into
bsd.*.mk again and have there be errors when this happens. Future
commits will move to including src.opts.mk instead of bsd.own.mk when
all that's needed is one of the MK_FOO options from src.opts.mk.
Future options should be placed here, unless they directly affect a
bsd.*.mk file, in which case they should be placed in bsd.opts.mk.
2014-05-06 04:21:48 +00:00