freebsd.git
9 years agoUse "file -s", so that we can run vmrun.sh against special devices such
rodrigc [Thu, 28 Aug 2014 16:26:13 +0000 (16:26 +0000)]
Use "file -s", so that we can run vmrun.sh against special devices such
as /dev/md memory file systems

Reviewed by: neel

9 years agodrm/radeon: Fix a memory leak when radeonkms is unloaded
dumbbell [Thu, 28 Aug 2014 12:40:31 +0000 (12:40 +0000)]
drm/radeon: Fix a memory leak when radeonkms is unloaded

MFC after: 1 week

9 years agoUnlock the right lock.
ed [Thu, 28 Aug 2014 11:50:52 +0000 (11:50 +0000)]
Unlock the right lock.

The adist_remote_lock is not held in this place, whereas the
adist_recv_list_lock lock is and is picked up during the next iteration.

I found this by annotating our libpthread with Clang's -Wthread-safety
attributes. I will send out a patch for this in the nearby future,
because it's awesome.

MFC after: 2 weeks

9 years agoReturn real parent pid in kinfo (used by e.g. ps)
mjg [Thu, 28 Aug 2014 08:41:11 +0000 (08:41 +0000)]
Return real parent pid in kinfo (used by e.g. ps)

Add a separate field which exports tracer pid and add a new keyword
("tracer") for ps to display it.

This is a follow up to r270444.

Reviewed by: kib
MFC after: 1 week
Relnotes: yes

9 years agoInform the rate control code if a single frame AMPDU transmission succeeds
adrian [Thu, 28 Aug 2014 07:44:59 +0000 (07:44 +0000)]
Inform the rate control code if a single frame AMPDU transmission succeeds
but has some retries.

Without this, single frame transmission in AMPDU will always look like
it succeeded fine, and thus AMRR will think it's totally fine to just
keep upping the rate upwards.

Now, this is still not quite right!  For multi-frame aggregates the
completion happens in two parts - the TX done and the BA received.
The driver is currently double accounting those a little - there's no
way to say to the rate control code "I completed X frames, Y worked fine,
there were Z retries." And it's a bit odd with iwn, as the firmware
retransmits frames for us so we don't get to see how many retransmits
happened; only that it took longer than normal.  I may have to extend
the rate control API to properly track that.

So this may keep the rate lower than it should be, but that's better
than keeping it higher than it should be.

Tested:

* 5100, STA mode

9 years agoAdd description of "sysctl_remove_name()" function.
hselasky [Thu, 28 Aug 2014 04:35:38 +0000 (04:35 +0000)]
Add description of "sysctl_remove_name()" function.

9 years agoFix antenna configuration, microcode version checks and rate selection
adrian [Thu, 28 Aug 2014 03:18:27 +0000 (03:18 +0000)]
Fix antenna configuration, microcode version checks and rate selection
in preparation for the 5300 3x3 NIC.

During this particular adventure, I did indeed discover that a whole
swath of things made little to no sense.

Those included, and are fixed here:

* A lot of the antenna configuration bits assume the NIC has two receive
  chains.  That's blatantly untrue for NICs that don't.
* There was some disconnect between the antenna configuration when
  forming a PLCP rate DWORD (which includes the transmit antenna
  configuration), separate to the link quality antenna configuration.

  So now there's helper functions to return which antenna configurations
  to use and those are used wherever an antenna config is required.

* The 5300 does up to three stream TX/RX (so MCS0->23), however
  the link quality table has only 16 slots.  This means all of the
  rate entries are .. well, dual-stream rates.  If this is the case,
  the "last MIMO" parameter can't be 16 or it panics the firmware.
  Set it to 15.

* .. and since yes it has 16 slots, it only would try retransmitting
  from MCS8->MCS23, which can be quite .. terrible.  Hard-code the last
  two retry slots to be the lowest configured rate.

* I noticed some transmit configuration command stuff is different
  based on firmware API version, so I lifted that code from Linux.

* Add / augment some more logging to make it easier to capture this
  stuff.

Now, 3x3 is still terrible because the link quality configuration is
plainly not good enough.  I'll have to think about that.
However, the original goal of this - 3x3 operation on the Intel
5300 NIC - actually worked.

There are also rate control bugs in the way this driver handles
notifying the net80211 rate control code when AMPDU is enabled.
It always steps the rate up to the maximum rate possible - and
this eventually ends in much sadness.  I'll fix that later.

As a side note - 2GHz HT40 now works on all the NICs I have tested.

As a second side note - this exposed some bad 3x3 behaviour in
the ath(4) rate control code where it starts off at a 3-stream rate
and doesn't downgrade quickly enough.  This makes the initial
dhcp exchange take a long time.  I'll fix the ath(4) rate code
to start at a low fixed 1x1 MCS rate and step up if everything
works out.

Tested:

* Intel 2200
* Intel 2230
* Intel 5300
* Intel 5100
* Intel 6205
* Intel 100

TODO:

* Test the other NICs more thoroughly!

Thank you to Michael Kosarev <russiane39@gmail.com> for donating the
Intel 5300 NIC and pestering me about it since last year to try and
make it all work.

9 years agoAdd iwn-100 firmware.
adrian [Thu, 28 Aug 2014 00:05:02 +0000 (00:05 +0000)]
Add iwn-100 firmware.

The firmware is from the Linux firmware git repository; the intel
licence is the same as other firmware blobs.

Tested: iwn1: <Intel Centrino Wireless-N 100> mem 0xf4800000-0xf4801fff irq 19 at device 0.0 on pci5

9 years agoFix comments on updating tzdata releases.
pluknet [Wed, 27 Aug 2014 19:34:49 +0000 (19:34 +0000)]
Fix comments on updating tzdata releases.

9 years agoMFV of r270725, tzdata2014f
pluknet [Wed, 27 Aug 2014 19:26:35 +0000 (19:26 +0000)]
MFV of r270725, tzdata2014f

- Russia time zone changes.
- New zones: Asia/Chita and Asia/Srednekolymsk.
- Lots of changes wrt. time zone abbreviations and historical data.
- New zone tab data format.

9 years agoadd scripts for generating a diff from p4...
jmg [Wed, 27 Aug 2014 18:56:12 +0000 (18:56 +0000)]
add scripts for generating a diff from p4...

awkdiff is the script from scottl that he got from ken a long time
ago...  It no longer lives in his home dir, so give it a new home...
This does simple massaging of p4 output to create a useful diff...

The script p4diffbranch will create a diff that includes new and
deleted files unlike the normal diff2 -b command...  So will be useful
for extracting patches from p4...  It does take a changeset that will
be used to diff against...

9 years agoVendor import of tzdata2014f.
pluknet [Wed, 27 Aug 2014 18:49:41 +0000 (18:49 +0000)]
Vendor import of tzdata2014f.

- Russia time zone changes.
- New zones: Asia/Chita and Asia/Srednekolymsk.
- Lots of changes wrt. time zone abbreviations and historical data.
- New zone tab data format.

Obtained from: ftp://ftp.iana.org/tz/releases/

9 years agoCorrect the destroy example. The -n argument is not needed (and is not
jhb [Wed, 27 Aug 2014 17:44:59 +0000 (17:44 +0000)]
Correct the destroy example.  The -n argument is not needed (and is not
valid).

Reported by: mwlucas
Reviewed by: phk
MFC after: 1 week

9 years agovt(4): If the terminal shrinks, make sure the mouse is inside the new area
dumbbell [Wed, 27 Aug 2014 17:16:52 +0000 (17:16 +0000)]
vt(4): If the terminal shrinks, make sure the mouse is inside the new area

MFC after: 1 week

9 years agovt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb
dumbbell [Wed, 27 Aug 2014 15:10:28 +0000 (15:10 +0000)]
vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb

There were two issues:
    1. The area given to vt_is_cursor_in_area() was adding the drawable
       area offset, something already handled by this function.
    2. The cursor was shifted on the screen by the offset of this area
       and thus was misplaced or not erased. Furthermore, when reaching
       the bottom or right borders, the cursor was either totally
       removed or not erased correctly.

MFC after: 1 week

9 years ago- Update the OFED Linux Emulation layer as a preparation for a
hselasky [Wed, 27 Aug 2014 13:21:53 +0000 (13:21 +0000)]
- Update the OFED Linux Emulation layer as a preparation for a
hardware driver update from Mellanox Technologies.
- Remove empty files from the OFED Linux Emulation layer.
- Fix compile warnings related to printf() and the "%lld" and "%llx"
format specifiers.
- Add some missing 2-clause BSD copyrights.
- Add "Mellanox Technologies, Ltd." to list of copyright holders.
- Add some new compatibility files.
- Fix order of uninit in the mlx4ib module to avoid crash at unload
using the new module_exit_order() function.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agovt(4): Recompute the drawable area when the resolution changes
dumbbell [Wed, 27 Aug 2014 11:27:48 +0000 (11:27 +0000)]
vt(4): Recompute the drawable area when the resolution changes

This was only done when the font changed.

MFC after: 1 week

9 years agovt(4): Pause the vt_flush() timer when the screen is up-to-date
dumbbell [Wed, 27 Aug 2014 11:08:09 +0000 (11:08 +0000)]
vt(4): Pause the vt_flush() timer when the screen is up-to-date

The timer is restarted whenever a window buffer is marked as dirty or
the mouse cursor moves.

There's still room for improvement. For instance, we should not mark a
window buffer as dirty when this window isn't displayed.

Review: https://reviews.freebsd.org/D683
Reviewed by: ray@
Approved by: ray@
MFC after: 1 week

9 years agodrm: Don't "taskqueue" vt-switch if under DDB/panic situation
dumbbell [Wed, 27 Aug 2014 10:07:08 +0000 (10:07 +0000)]
drm: Don't "taskqueue" vt-switch if under DDB/panic situation

If DDB is active, we can't use a taskqueue thread to switch away from
the X window, because this thread can't run.

Reviewed by: ray@
Approved by: ray@
MFC after: 1 week

9 years agovt(4): Add cngrab() and cnungrab() callbacks
dumbbell [Wed, 27 Aug 2014 10:04:10 +0000 (10:04 +0000)]
vt(4): Add cngrab() and cnungrab() callbacks

They are used when a panic occurs or when entering a DDB session for
instance.

cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.

MFC after: 1 week

9 years agovt(4): Implement basic support for KDSETMODE ioctl
dumbbell [Wed, 27 Aug 2014 09:34:41 +0000 (09:34 +0000)]
vt(4): Implement basic support for KDSETMODE ioctl

With the current implementation, this allows an X11 server to tell
the console it switches a particular window in "graphics mode". This
information is used by the mouse handling code to ignore sysmouse events
in the window taken by the X server: only him should receive those
events.

Reported by: flo@, glebius@, kan@
Tested by: flo@
Reviewed by: kan@
MFC after: 1 week

9 years ago- Use $local_startup to load rc.conf.d/* scripts.
hrs [Wed, 27 Aug 2014 09:19:22 +0000 (09:19 +0000)]
- Use $local_startup to load rc.conf.d/* scripts.
- Document support of rc.conf.d/<dir>/* introduced in r270392.

Discussed with: bapt

9 years agoRegen.
kib [Wed, 27 Aug 2014 01:02:19 +0000 (01:02 +0000)]
Regen.

9 years agoFix handling of the third argument for fcntl(2). The native syscall
kib [Wed, 27 Aug 2014 01:02:02 +0000 (01:02 +0000)]
Fix handling of the third argument for fcntl(2).  The native syscall
uses long for arg, which needs translation.

Discussed with and tested by: mjg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoImplement the 0x2B SUB instruction, and the OR variant of 0x81.
grehan [Wed, 27 Aug 2014 00:53:56 +0000 (00:53 +0000)]
Implement the 0x2B SUB instruction, and the OR variant of 0x81.

Found with local APIC accesses from bitrig/amd64 bsd.rd, 07/15-snap.

Reviewed by: neel
MFC after: 3 days

9 years agoRemove stray newline.
kib [Wed, 27 Aug 2014 00:48:09 +0000 (00:48 +0000)]
Remove stray newline.

9 years agoDocument the new ${LOCALBASE}/etc/rc.conf.d in rc.conf(5)
bapt [Tue, 26 Aug 2014 22:54:54 +0000 (22:54 +0000)]
Document the new ${LOCALBASE}/etc/rc.conf.d in rc.conf(5)

MFC after: 1 week

9 years agoFix xref, pam(8) -> pam(3)
gavin [Tue, 26 Aug 2014 22:39:24 +0000 (22:39 +0000)]
Fix xref, pam(8) -> pam(3)

PR: 193045
Submitted by: rsimmons0 gmail com
MFC after: 3 days

9 years agoAllow to configure services from ${LOCALBASE}/etc/rc.conf.d
bapt [Tue, 26 Aug 2014 22:33:34 +0000 (22:33 +0000)]
Allow to configure services from ${LOCALBASE}/etc/rc.conf.d

Reviewed by: bdrewery
MFC after: 1 week
Relnotes: yes

9 years agoAllow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE env var...
bapt [Tue, 26 Aug 2014 22:20:02 +0000 (22:20 +0000)]
Allow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE env var if set)

Phabric: https://reviews.freebsd.org/D412
Reviewed by: bdrewery
MFC after: 2 weeks
Relnotes: yes

9 years agoClarify that the -c argument clears the list of tracepoints specified by
jhb [Tue, 26 Aug 2014 21:21:57 +0000 (21:21 +0000)]
Clarify that the -c argument clears the list of tracepoints specified by
-t (it does not clear all tracepoints).

Submitted by: jmg, Eric van Gyzen <eric@vangyzen.net>
MFC after: 1 week

9 years agoAnnounce SCTP support in the kern.features sysctl variables.
tuexen [Tue, 26 Aug 2014 21:15:34 +0000 (21:15 +0000)]
Announce SCTP support in the kern.features sysctl variables.

MFC after: 3 days

9 years agoAdd svnlite.1 to CLEANFILES.
gjb [Tue, 26 Aug 2014 20:40:12 +0000 (20:40 +0000)]
Add svnlite.1 to CLEANFILES.

MFC after: 3 days
X-MFC-To: stable/10 only
Sponsored by: The FreeBSD Foundation

9 years agoAdd host.1 to CLEANFILES.
gjb [Tue, 26 Aug 2014 19:36:47 +0000 (19:36 +0000)]
Add host.1 to CLEANFILES.

MFC after: 3 days
X-MFC-To: stable/10 only
Sponsored by: The FreeBSD Foundation

9 years agoAdd gnugrep.1 to CLEANFILES.
gjb [Tue, 26 Aug 2014 19:36:34 +0000 (19:36 +0000)]
Add gnugrep.1 to CLEANFILES.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agovt(4): When creating a window buffer, fill it entirely
dumbbell [Tue, 26 Aug 2014 17:48:05 +0000 (17:48 +0000)]
vt(4): When creating a window buffer, fill it entirely

... not just the visible part.

This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the
resolution goes up), the originally hidden, uninitialized area of the
buffer is displayed on the screen. This leads to a missing text cursor
when it's over an unitialized area.

This was also visible when selecting text: the uninitialized area was
not highlighted.

Internally, this area was zeroed: characters were all 0x00000000,
meaning the foreground and background color was black. Now, everything
is filled with a space with a gray foreground color, like the visible
area.

While here, remove the check for the mute flag and always use
TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
black background).

MFC after: 1 week

9 years agoBack in the days when the kernel was single threaded, testing
alc [Tue, 26 Aug 2014 16:40:20 +0000 (16:40 +0000)]
Back in the days when the kernel was single threaded, testing
"vm_paging_target() > 0" was a reasonable way of determining if the
inactive queue scan met its target.  However, now that other threads
can be allocating pages while the inactive queue scan is running, it's
an unreliable method.  The effect of it being unreliable is that we
can start swapping out processes when we didn't intend to.

This issue has existed since the kernel was multithreaded, but the
changes to the inactive queue target in 10.0-RELEASE have made its
effects visible.

This change introduces a more direct method for determining if the
inactive queue scan met its target that is not affected by the actions
of other threads.

Reported by: Steve Polyack
Tested by: pho, Steve Polyack (an earlier version)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Remove socket file operations declaration from sys/file.h.
glebius [Tue, 26 Aug 2014 14:44:08 +0000 (14:44 +0000)]
- Remove socket file operations declaration from sys/file.h.
- Make them static in sys_socket.c.
- Provide generic invfo_truncate() instead of soo_truncate().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoRemove leading '/' from hardlink name when removing them from the
ae [Tue, 26 Aug 2014 13:11:38 +0000 (13:11 +0000)]
Remove leading '/' from hardlink name when removing them from the
regular file name. This fixes the problem, when bsdtar can not create
hardlinks to extracted files.

Silence from: kientzle@
MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoBack-out the references to vt(4) from this man-page. It appears that the
se [Tue, 26 Aug 2014 11:13:07 +0000 (11:13 +0000)]
Back-out the references to vt(4) from this man-page. It appears that the
splash support in vt is implemented within the vt driver and does not
depend on splash(4).

Submitted by: marius@alchemy.franken.de

9 years agoMissed comma.
pluknet [Tue, 26 Aug 2014 11:04:51 +0000 (11:04 +0000)]
Missed comma.

9 years agoMore man pages that need to know about vt in addition to syscons.
se [Tue, 26 Aug 2014 10:55:08 +0000 (10:55 +0000)]
More man pages that need to know about vt in addition to syscons.

MFC after: 3 dayS

9 years agoUpdate man-pages to correctly refer to changed pathes and naming conventions
se [Tue, 26 Aug 2014 09:40:14 +0000 (09:40 +0000)]
Update man-pages to correctly refer to changed pathes and naming conventions
for systems with vt(4) consoles.

MFC after: 3 days

9 years agoRemove band.aid that made kbdcontrol lookup keymap files in the syscons
se [Tue, 26 Aug 2014 09:37:43 +0000 (09:37 +0000)]
Remove band.aid that made kbdcontrol lookup keymap files in the syscons
path even under vt, which is no longer useful, since the syscons keymap
files have been converted and committed for use by vt.

9 years agoIntroduce missing definition for LIBTERMCAPW
ngie [Tue, 26 Aug 2014 09:12:41 +0000 (09:12 +0000)]
Introduce missing definition for LIBTERMCAPW

Some Makefiles expect this value to exist

Approved by: rpaulo (mentor)
MFC after: 5 days
Phabric: D675 (as part of a larger diff)
PR: 192762

9 years agoConvert LIBCURSES to LIBNCURSES to fix "make checkdpadd"
ngie [Tue, 26 Aug 2014 09:10:28 +0000 (09:10 +0000)]
Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"

Also, add a missing LIBPANEL dependency for lldb

Approved by: rpaulo (mentor)
Suggested by: brooks
MFC after: 5 days
Phabric: D675 (as part of a larger diff)
PR: 192762

9 years agoFix "make checkdpadd" by "spoofing" DPADD
ngie [Tue, 26 Aug 2014 09:01:11 +0000 (09:01 +0000)]
Fix "make checkdpadd" by "spoofing" DPADD

Approved by: jmmv (mentor)
Phabric: D631
PR: 192769

9 years agoFix up races with f_seqcount handling.
mjg [Tue, 26 Aug 2014 08:17:22 +0000 (08:17 +0000)]
Fix up races with f_seqcount handling.

It was possible that the kernel would overwrite user-supplied hint.

Abuse vnode lock for this purpose.

In collaboration with: kib
MFC after: 1 week

9 years agoAdd references to vt(4) and the configuration files in /usr7share/vt where
se [Tue, 26 Aug 2014 08:13:30 +0000 (08:13 +0000)]
Add references to vt(4) and the configuration files in /usr7share/vt where
appropriate (i.e. where syscons was already mentioned and vt supports the
feature). Comments in defaults/rc.conf are updated to match the contents
of the modified man-page rc.conf(5).

Reviewed by: pluknet, emaste
MFC after: 3 days

9 years agoFix typo: s/mac_rev/mac_ver/
kevlo [Tue, 26 Aug 2014 02:20:37 +0000 (02:20 +0000)]
Fix typo: s/mac_rev/mac_ver/

Submitted by: Stefan Sperling <stsp at openbsd dot org>

9 years agovt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors
dumbbell [Mon, 25 Aug 2014 20:15:19 +0000 (20:15 +0000)]
vt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors

This replaces the method based on Write Mode 3, which required reads
from the video memory to load the latches.

MFC after: 1 week

9 years agovt(4): Intialize drawable area rectangle each time a font is loaded
dumbbell [Mon, 25 Aug 2014 19:52:13 +0000 (19:52 +0000)]
vt(4): Intialize drawable area rectangle each time a font is loaded

This also fixes a problem where early in boot, the area was zero,
leading to nothing displayed for a few seconds.

MFC after: 1 week

9 years agovt(4): Store a rectangle for the drawable area, not just the top-left corner
dumbbell [Mon, 25 Aug 2014 19:06:31 +0000 (19:06 +0000)]
vt(4): Store a rectangle for the drawable area, not just the top-left corner

This allows backends to verify they do not draw outside of this area.
This fixes a bug in vt_vga where the text was happily drawn over the
right and bottom margins, when using the Gallant font.

MFC after: 1 week

9 years agovt(4): The cursor coordinates are relative to the drawn area
dumbbell [Mon, 25 Aug 2014 17:08:38 +0000 (17:08 +0000)]
vt(4): The cursor coordinates are relative to the drawn area

... not the whole screen. Don't use font offsets in
vt_mark_mouse_position_as_dirty().

This fixes a bug where the mouse position wasn't marked as dirty when
approaching the borders of the drawn area.

MFC after: 1 week

9 years agoRather than using an hardcoded reclaim age, rely on an LRU-like approach
davide [Mon, 25 Aug 2014 17:06:18 +0000 (17:06 +0000)]
Rather than using an hardcoded reclaim age, rely on an LRU-like approach
for dirhash cache, setting a target percent to reclaim (exposed via
SYSCTL). This allows to always make some amount of progress keeping the maximum
reclaim age dynamic.

Tested by:      pho
Reviewed by: jhb

9 years agovt(4): Take font offset into account in vt_is_cursor_in_area()
dumbbell [Mon, 25 Aug 2014 16:56:33 +0000 (16:56 +0000)]
vt(4): Take font offset into account in vt_is_cursor_in_area()

This fixes a "General protection fault" in vt_vga, where
vt_is_cursor_in_area() erroneously reported that the cursor was over the
text. This led to negative integers stored in "unsigned int" and chaos.

MFC after: 1 week

9 years agodrm/i915: Disable the build of i915 on PC98
dumbbell [Mon, 25 Aug 2014 14:58:36 +0000 (14:58 +0000)]
drm/i915: Disable the build of i915 on PC98

This module is of no use on this platform and now, i915 depends on ACPI
anyway.

Suggested by: nyan@

9 years agodrm/i915: Add opt_acpi.h and acpi_if.h to the source files
dumbbell [Mon, 25 Aug 2014 14:55:56 +0000 (14:55 +0000)]
drm/i915: Add opt_acpi.h and acpi_if.h to the source files

While here, sort the list of generated source files.

9 years agoThe standard we compile libc++ with is called c++11 not c++0x.
rdivacky [Mon, 25 Aug 2014 08:40:36 +0000 (08:40 +0000)]
The standard we compile libc++ with is called c++11 not c++0x.

9 years agoSince the size of GPT entry may differ from the sizeof(struct gpt_ent),
ae [Mon, 25 Aug 2014 07:15:14 +0000 (07:15 +0000)]
Since the size of GPT entry may differ from the sizeof(struct gpt_ent),
use the size from GPT header to iterate entries.

Suggested by: marcel@
MFC after: 1 week

9 years agoUpdate these to make them actually compile!
adrian [Mon, 25 Aug 2014 06:14:57 +0000 (06:14 +0000)]
Update these to make them actually compile!

Tested:

* cross compilation to MIPS

9 years agoFix "make checkdpadd" for lib/libc when MK_SSP != no
ngie [Mon, 25 Aug 2014 06:10:03 +0000 (06:10 +0000)]
Fix "make checkdpadd" for lib/libc when MK_SSP != no

Add LIBSSP_NONSHARED to bsd.libnames.mk and append LIBSSP_NONSHARED to DPADD in
lib/libc when MK_SSP != no

Approved by: rpaulo (mentor)
MFC after: 3 days
Phabric: D675 (as part of a larger diff)
PR: 192728

9 years agoFix a typo to catch correct condition.
hiren [Mon, 25 Aug 2014 05:52:05 +0000 (05:52 +0000)]
Fix a typo to catch correct condition.

9 years agoAllow it to compile again.
adrian [Mon, 25 Aug 2014 05:26:48 +0000 (05:26 +0000)]
Allow it to compile again.

9 years agoi915 driver - enable opregion handle; program CADL.
adrian [Mon, 25 Aug 2014 05:03:10 +0000 (05:03 +0000)]
i915 driver - enable opregion handle; program CADL.

add opregion handling for drm2 - which exposes some ACPI video configuration
pieces that some Lenovo laptop models use to flesh out which video device
to speak to.  This enables the brightness control in ACPI to work these models.

The CADL bits are also important - it's used to figure out which ACPI
events to hook the brightness buttons into.  It doesn't yet seem to work
for me, but it does for the OP.

Tested:

* Lenovo X230 (mine)
* OP: ASUS UX51VZ

PR: 190186
Submitted by: Henry Hu <henry.hu.sh@gmail.com>
Reviewed by: dumbbell

9 years agoIf the VM was reset via "/sbin/reboot" or "shutdown -r",
rodrigc [Mon, 25 Aug 2014 01:36:56 +0000 (01:36 +0000)]
If the VM was reset via "/sbin/reboot" or "shutdown -r",
then it is no longer necessary to "bhyvectl --destroy" the VM when it reboots.
Move the "bhyvectl --destroy" outside of the while loop.

Reviewed by: neel

9 years agoAdd comment which describes the exit status codes returned from
rodrigc [Mon, 25 Aug 2014 01:04:07 +0000 (01:04 +0000)]
Add comment which describes the exit status codes returned from
/usr/sbin/bhyve.  These are in src/usr.sbin/bhyve/bhyverun.c.

Reviewed by: neel

9 years agoCatch up to gcc 3.3 -> 3.4 upgrade.
truckman [Sun, 24 Aug 2014 21:21:54 +0000 (21:21 +0000)]
Catch up to gcc 3.3 -> 3.4 upgrade.

MFC after: 3 days

9 years agoRestore the correct value when disabling probes. Otherwise the instrumented
markj [Sun, 24 Aug 2014 17:10:47 +0000 (17:10 +0000)]
Restore the correct value when disabling probes. Otherwise the instrumented
tracepoints would continue to generate traps, which would be ignored but
could consume noticeable amounts of CPU if, say, all functions in the kernel
were instrumented.

X-MFC-With: r270067

9 years agoFix bug that, assuming a/ is a root of NFS filesystem mounted on autofs,
trasz [Sun, 24 Aug 2014 17:03:52 +0000 (17:03 +0000)]
Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs,
prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok.

PR: 192948
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoFix a bug in r265255: only return NULL if the requested map wasn't found.
markj [Sun, 24 Aug 2014 17:02:27 +0000 (17:02 +0000)]
Fix a bug in r265255: only return NULL if the requested map wasn't found.

Submitted by: Luke Chang-Hsien Tsai <luke.tw@gmail.com>
MFC after: 1 week

9 years agoOptimize f_which() to be slightly faster still.
dteske [Sun, 24 Aug 2014 16:40:31 +0000 (16:40 +0000)]
Optimize f_which() to be slightly faster still.

9 years agoRevert the handling of all siginfo sa_flags except SA_SIGINFO to the
kib [Sun, 24 Aug 2014 16:37:50 +0000 (16:37 +0000)]
Revert the handling of all siginfo sa_flags except SA_SIGINFO to the
pre-r270321.  Namely, the flags are preserved for SIG_DFL and SIG_IGN
dispositions.

Requested and reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agovt_vga: Fix the display of the splash screen
dumbbell [Sun, 24 Aug 2014 14:39:33 +0000 (14:39 +0000)]
vt_vga: Fix the display of the splash screen

MFC after: 1 week

9 years agoWrap a long line.
gjb [Sun, 24 Aug 2014 12:51:34 +0000 (12:51 +0000)]
Wrap a long line.

MFC after: 3 days
X-MFC-with: r270417, r270418, r270455
Sponsored by: The FreeBSD Foundation

9 years agoPlug a memory leak in case of failed lookups in capability mode.
mjg [Sun, 24 Aug 2014 12:51:12 +0000 (12:51 +0000)]
Plug a memory leak in case of failed lookups in capability mode.

Put common cnp cleanup into one function and use it for this purpose.

MFC after: 1 week

9 years agoSet OSREL and UNAME_r in release/release.sh when building
gjb [Sun, 24 Aug 2014 12:50:50 +0000 (12:50 +0000)]
Set OSREL and UNAME_r in release/release.sh when building
ports to prevent ports build failures from killing the
release build.

MFC after: 3 days
X-MFC-with: r270417, r270418
Sponsored by: The FreeBSD Foundation

9 years agoFix handling of keys in executable maps. Previously it was broken for keys
trasz [Sun, 24 Aug 2014 12:32:26 +0000 (12:32 +0000)]
Fix handling of keys in executable maps.  Previously it was broken for keys
containing whitespace.

PR: 192947
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agovt(4): Fix order of arguments (x <-> y) when showing the splash screen
dumbbell [Sun, 24 Aug 2014 09:47:39 +0000 (09:47 +0000)]
vt(4): Fix order of arguments (x <-> y) when showing the splash screen

MFC after: 1 week

9 years agoUse refcount_init in sigacts_alloc.
mjg [Sun, 24 Aug 2014 09:24:37 +0000 (09:24 +0000)]
Use refcount_init in sigacts_alloc.

This change is a no-op, but fixes up an inconsistency introduced with
r268634.

MFC after: 3 days

9 years agovt(4): Remove vd_bitbltchr_t
dumbbell [Sun, 24 Aug 2014 09:22:03 +0000 (09:22 +0000)]
vt(4): Remove vd_bitbltchr_t

It's replaced by vd_bitblt_text_t, which gives more context to the
backend and allows it to perform more efficiently when redrawing a given
area.

MFC after: 1 week

9 years agoThe size of the GPT table can not be less than one sector.
ae [Sun, 24 Aug 2014 09:20:30 +0000 (09:20 +0000)]
The size of the GPT table can not be less than one sector.

Reported by: rodrigc@
MFC after: 1 week

9 years agoFix getppid for traced processes.
mjg [Sun, 24 Aug 2014 09:04:09 +0000 (09:04 +0000)]
Fix getppid for traced processes.

Traced processes always have the tracer set as the parent.
Utilize proc_realparent to obtain the right process when needed.

Reviewed by: kib
MFC after: 1 week

9 years agoProperly reparent traced processes when the tracer dies.
mjg [Sun, 24 Aug 2014 09:02:16 +0000 (09:02 +0000)]
Properly reparent traced processes when the tracer dies.

Previously they were uncoditionally reparented to init. In effect
it was possible that tracee was never returned to original parent.

Reviewed by: kib
MFC after: 1 week

9 years agoChange __inline style to be consistent with FreeBSD usage,
grehan [Sun, 24 Aug 2014 02:07:34 +0000 (02:07 +0000)]
Change __inline style to be consistent with FreeBSD usage,
and also fix gcc build (on STABLE, when MFCd).

PR: 192880
Reviewed by: neel
Reported by: ngie
MFC after: 1 day

9 years agoAdd "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
neel [Sun, 24 Aug 2014 01:10:06 +0000 (01:10 +0000)]
Add "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
tunables to modify the default cpu topology advertised by bhyve.

Also add a tunable "hw.vmm.topology.cpuid_leaf_b" to disable the CPUID
leaf 0xb. This is intended for testing guest behavior when it falls back
on using CPUID leaf 0x4 to deduce CPU topology.

The default behavior is to advertise each vcpu as a core in a separate soket.

9 years agoFix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that
neel [Sat, 23 Aug 2014 22:44:31 +0000 (22:44 +0000)]
Fix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that
the vcpu had no caches at all. This causes problems when executing applications
in the guest compiled with the Intel compiler.

Submitted by: Mark Hill (mark.hill@tidalscale.com)

9 years agoReturn the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot
neel [Sat, 23 Aug 2014 21:16:26 +0000 (21:16 +0000)]
Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot
find any unmasked pin with an interrupt asserted.

Reviewed by: tychon
CR: https://reviews.freebsd.org/D669
MFC after: 1 week

9 years agoGarbage collect libl dependency
ngie [Sat, 23 Aug 2014 20:45:00 +0000 (20:45 +0000)]
Garbage collect libl dependency

The application links and runs without libl

Approved by: rpaulo (mentor)
Phabric: D673
X-MFC with: r270117
Submitted by: trociny

9 years agoFix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency
ngie [Sat, 23 Aug 2014 20:42:37 +0000 (20:42 +0000)]
Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency

Approved by: rpaulo (mentor)
MFC after: 1 week

9 years agovt(4): Add vd_bitblt_bmp_t callback
dumbbell [Sat, 23 Aug 2014 20:35:33 +0000 (20:35 +0000)]
vt(4): Add vd_bitblt_bmp_t callback

The code was already there in all backends, we just expose it. This is
used to display the splash screen.

MFC after: 1 week

9 years agoShut down RX before TX - in theory, this should make the chip less likely
adrian [Sat, 23 Aug 2014 18:55:51 +0000 (18:55 +0000)]
Shut down RX before TX - in theory, this should make the chip less likely
to get upset.

The Qualcomm Atheros reference design code goes through significant
hacks to shut down RX before TX.  It doesn't even try do do it in the
driver - it actually makes the DMA stop routines in the HAL shut down
RX before shutting down TX.

So, to make this work for chips that aren't the AR9380 and later, do
it in the driver.  Shuffle the TX stop/drain HAL calls to be called
*after* the RX stop HAL call.

Tested:

* AR5413 (STA)
* AR5212 (STA)
* AR5416 (STA)
* AR9380 (STA)
* AR9331 (AP)
* AR9341 (AP)

TODO:

* test ar92xx series NIC and the AR5210/AR5211, in case there's something
  even odder about those.

9 years agoFor CPUs which do hardware cache line unaliasing, use direct map to
kib [Sat, 23 Aug 2014 18:11:54 +0000 (18:11 +0000)]
For CPUs which do hardware cache line unaliasing, use direct map to
access sfbufs.

Suggested and reviewed by: alc
Tested by: Michael Moll <kvedulv@kvedulv.de>
Sponsored by: The FreeBSD Foundation

9 years agoWhitespace/style changes merged from projects/ipfw.
melifaro [Sat, 23 Aug 2014 17:57:06 +0000 (17:57 +0000)]
Whitespace/style changes merged from projects/ipfw.

9 years agoMerge buffer-printing changes from from projects/ipfw as preparation
melifaro [Sat, 23 Aug 2014 17:37:18 +0000 (17:37 +0000)]
Merge buffer-printing changes from from projects/ipfw as preparation
for branch merge.

Requested by: luigi

9 years agoRestore pre-r239157 handling of sched_yield(), when thread time slice was
mav [Sat, 23 Aug 2014 17:31:56 +0000 (17:31 +0000)]
Restore pre-r239157 handling of sched_yield(), when thread time slice was
aborted, allowing other threads to run.  Without this change thread is just
rescheduled again, that was illustrated by provided test tool.

PR: 192926
Submitted by: eric@vangyzen.net
MFC after: 2 weeks

9 years agoAlso export UNAME_r to fix arm builds.
gjb [Sat, 23 Aug 2014 16:15:16 +0000 (16:15 +0000)]
Also export UNAME_r to fix arm builds.

MFC after: 3 days
X-MFC-with: r270417
Sponsored by: The FreeBSD Foundation

9 years agoFix arm build breakage when building stable/10 on
gjb [Sat, 23 Aug 2014 15:59:31 +0000 (15:59 +0000)]
Fix arm build breakage when building stable/10 on
head/.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoIn r260015, I renamed several identifiers to avoid -Wsystem-header
dim [Sat, 23 Aug 2014 15:54:22 +0000 (15:54 +0000)]
In r260015, I renamed several identifiers to avoid -Wsystem-header
warnings.  In r261283, I imported libc++ 3.4 release, but this contained
one identifier that had not been renamed yet, leading to a compilation
error when using -std=c++1y.  Fix the compilation error by correctly
renaming the identifier.

Reported by: rcarter@pinyon.org
PR: base/192139
MFC after: 3 days

9 years agoofwfb: Implement vd_bitblt_text_t
dumbbell [Sat, 23 Aug 2014 15:05:11 +0000 (15:05 +0000)]
ofwfb: Implement vd_bitblt_text_t

MFC after: 1 week