Commit Graph

222098 Commits

Author SHA1 Message Date
Patrick Kelsey
67d955aab4 Corrected misspelled versions of rendezvous.
The MFC will include a compat definition of smp_no_rendevous_barrier()
that calls smp_no_rendezvous_barrier().

Reviewed by:	gnn, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D10313
2017-04-09 02:00:03 +00:00
Ed Maste
ffe63c8bf0 Introduce LLD_BOOTSTRAP to control lld as bootstrap linker
Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the
Clang bootstrap knobs.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10249
2017-04-09 01:35:19 +00:00
Jilles Tjoelker
5850a75952 sh: Add test for unaliasing an alias that is currently in use.
This already works correctly.
2017-04-08 21:57:59 +00:00
Ed Maste
1b766820b0 Unconditionally include arm64 in make universe / tinderbox
As of r316629 FreeBSD/arm64 uses the in-tree LLD linker by default, and
does not require an external an aarch64-binutils port or package.

Sponsored by:	The FreeBSD Foundation
2017-04-08 16:14:30 +00:00
Tai-hwa Liang
7ece126ed8 Trying to be more compatible with Linux if.h definitions:
- renaming l_ifreq::ifru_metric to l_ifreq::ifru_ivalue;
	- adding a definition for ifr_ifindex which points to l_ifreq::ifru_ivalue.

A quick search indicates that Linux already got the above changes since 2.1.14.

Reviewed by:	kib, marcel, dchagin
MFC after:	1 week
2017-04-08 14:41:39 +00:00
Andriy Gapon
35d92e6cec use msr 0xc001100c to discover multi-node AMD processors
This is applicable only to the older processors that do not have the AMD
Topology extension.
Opteron 6100-series "Magny-Cours" processors had multiple nodes within a
package and didn't have the Topology extension.  Without this change
FreeBSD would assume that those processors have a single L3 cache shared
by all cores while, in fact, each node has its own L3 cache.

Many thanks to Freddie Cash <fjwcash@gmail.com> for providing valuable
hardware information.

MFC after:	2 weeks
2017-04-08 14:16:42 +00:00
Bruce Evans
eeab8fcc4b Quick fix for removal of the mouse cursor in vga direct graphics modes
(that is, in all supported 8, 15, 16 and 24-color modes).  Moving the
mouse cursor while holding down a button (giving cut marking) left a
trail of garbage from misremoved mouse cursors (usually colored
rectangles and not cursor shapes).  Cases with a button not held down
worked better and may even have worked.

No renderer support for removing (software) mouse cursors is needed
(and many renderers don't have any), since sc_remove_mouse_image()
marks for update the region containing the image and usually much
more.  The mouse cursor can be (partially) over as many as 4 character
cells, and removing it in only the 1-4 cells occupied by it would be
best for efficiency and for avoiding flicker.  However,
sc_remove_mouse_image() can only mark a single linear region and
usually marks a full row of cells and 1 more to be sure to cover the
4 cells.  It always does this, so using the special rendering method
just wastes even more time and gives even more flicker.  The special
methods will be removed soon.

The general method always works.  vga_pxlmouse_direct() appeared to
defer to it by returning immediately if !on.  However,
vga_pxlmouse_direct() actually did foot-shooting using a disguised
saveunder method.  Normal order near a mouse move is:
  (1) remove the mouse cursor in the renderer (optional)
  (2) remove the mouse cursor again and refresh the screen over the
      mouse cursor and much more from the vtb.  When the mouse has
      actually moved and a button is down, many attributes in this
      region are changed to be up to date with the new cut marking
  (3) draw the keyboard cursor again if it was clobbered by the update
  (4) draw the mouse cursor image in its new position.
The bug was to remove the mouse cursor again in step (4), before the
drawing it again in (4), using a saveunder that was valid in step (1)
at best.  The quick fix is to use the saveunder in step (1) and not
in step (4).  Using it in step (4) also used it before it was
initialized, initially and after  mode and screen switches.
2017-04-08 10:00:39 +00:00
Baptiste Daroussin
a077708d35 add a stub --speed-large-files for compatibility with GNU diff
There is no intention to implement it, but lots of scripts/tools using
diff(1) passes GNU diff option
2017-04-08 08:46:02 +00:00
Baptiste Daroussin
bcc76a2e83 Remove a useless loop over the long options before passing through some
options to diff(1)
2017-04-08 08:42:25 +00:00
Baptiste Daroussin
85bb63bd29 When passingthrough from sdiff to diff the -H/--speed-large-files
options rename it to the long version as GNU diff only support the long
version of the option not the short version
2017-04-08 08:41:05 +00:00
Bruce Evans
e53fbbe661 Fix removal of the keyboard cursor image in text mode, especially
in the vga renderer.  Removal used stale attributes and didn't try to
merge with the current attribute for cut marking, so special rendering
of cut marking was lost in many cases.  The gfb renderer is too broken
to support special rendering of cut marking at all, so this change is
supposed to be just a style fix for it.  Remove all traces of the
saveunder method which was used to implement this bug.

Fix drawing of the cursor image in text mode, only in the vga
renderer.  This used a stale attribute from the frame buffer instead
of from the saveunder, but did merge with the current attribute for
cut marking so it caused less obvious bugs (subtle misrendering for
the character under the cursor).

The saveunder method may be good in simpler drivers, but in syscons
the 'under' is already saved in a better way in the vtb.  Just redraw
it from there, with visible complications for cut marking and
invisible complications for mouse cursors.  Almost all drawing
requests are passed a flag 'flip' which currently means to flip to
reverse video for characters in the cut marking region, but should
mean that the the characters are in the cut marking regions so should
be rendered specially, preferably using something better than reverse
video.  The gfb renderer always ignores this flag.  The vga renderer
ignored it for removal of the text cursor -- the saveunder gave the
stale rendering at the time the cursor was drawn.  Mouse cursors need
even more complicated methods.  They are handled by drawing them last
and removing them first.  Removing them usually redraws many other
characters with the correct cut marking (but transiently loses the
keyboard cursor, which is redrawn soon).  This tended to hide the
saveunder bug for forward motions of the keyboard cursor.  But slow
backward motions of the keyboard cursor always lost the cut marking,
and fast backwards motions lost in for about 4 in every 5 characters,
depending on races with the scrn_update() timeout handler.  This is
because the forward motions are usually into the region redrawn for
the mouse cursor, while backwards motions rarely are.

Text cursor drawing in the vga renderer used also used a
possibly-stale copy of the character and its attribute.  The vga
render has the "optimization" of sometimes reading characters from the
screen instead of from the vtb (this was not so good even in 1990 when
main memory was only a few times faster than video RAM).  Due to care
in update orders, the character is never stale, but its attribute
might be (just the cut marking part, again due to care in order).

gfb doesn't have the scp->scr pointer used for the "optimization", and
vga only uses this pointer for text mode.  So most cases have to
refresh from the vtb, and we can be sure that the ordering of vtb
updates and drawing is as required for this to work.
2017-04-08 08:24:25 +00:00
Xin LI
7250d89e54 Enable 16-bit longest_match for x86.
This gives a ~2% improvement in compression tests.

MFC after:	2 weeks
2017-04-08 06:39:13 +00:00
Patrick Kelsey
75580d5881 Fixed typo in comment found while reading commit email for fix of
other typo in same comment.

ned -> need

MFC after:	3 days
2017-04-08 04:50:50 +00:00
Patrick Kelsey
59f35a8290 Fixed typo in comment.
patckets -> packets

MFC after:	3 days
2017-04-08 04:45:52 +00:00
Patrick Kelsey
7628fd798a Fixed typo.
CSUM_COALESED -> CSUM_COALESCED

MFC after:	3 days
2017-04-08 04:41:46 +00:00
Patrick Kelsey
68ce5a03a2 Fix typo in comment.
logest -> longest

MFC after:	3 days
2017-04-08 04:37:01 +00:00
Patrick Kelsey
fe81785237 Fix typo.
hist -> hint

MFC after:	3 days
2017-04-08 04:34:18 +00:00
Ed Maste
1bf5e133cb do not require binutils port when using lld as ld
r279908 added logic to Makefile.inc1 to automatically set
CROSS_BINUTILS_PREFIX for architectures not supported by the in-tree
binutils: arm64 when first introduced, and later riscv64 as well.

LLVM's LLD linker is now included in the base system, and is enabled by
default for arm64 and capable of linking world and kernel. Thus, avoid
automatically setting CROSS_BINUTILS_PREFIX and requiring the binutils
port if WITH_LLD_IS_LD is true.

Reviewed by:	kan
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10310
2017-04-07 23:37:22 +00:00
Alexander Kabaev
ec5c547311 Silence GCC warning by initializing the local variable.
GCC 6.3 is unable to trace all code paths that lead to
this variable being left uninitialized and correlate that
to function return values.
2017-04-07 22:58:34 +00:00
Alexander Kabaev
e64aaeac2a Use int to receive the return value of getopt function.
getopt returns int and not char, so assigning the value to
char is not ideal, especially on platforms with unsigned
chars.
2017-04-07 22:58:31 +00:00
Alexander Kabaev
8b609ea571 Define 'lr' as x30 on aarch64
GNU toolchain does not recognize LR as standard register alias,
but clang does. Use of #define will work on both. Place the
definition into central machine/asm.h instead of patching every
affected file, as requested by plaftorm maintainers.

Reviews by: andrew, emaste, imp
Differential Revision:	https://reviews.freebsd.org/D10307
2017-04-07 22:58:28 +00:00
Alexander Kabaev
19f7eeed61 Do not use -msoft-float with intention of disabling FP on aarch64
GNU GCC does does recognise it as a valid option and we already
use -mgeneral-regs-only that has the desired effect.

Reviewed by: emaste
Differential Revision:	https://reviews.freebsd.org/D10306
2017-04-07 22:58:25 +00:00
Alexander Kabaev
07b49497db Do not use b.cs instruction to jump to cerror.
The conditional jump can only be performed to targets up to 1MB in
either direction and does not work too well when linker places cerror
further that that from the caller. In that case linker will complain
about relocation overflows.

Reviewed by: emaste, andrew
Differential Revision:  https://reviews.freebsd.org/D10305
2017-04-07 22:58:20 +00:00
Sevan Janiyan
fc5bae39c0 Revert previous change to sys/conf/options & associated notes so builds can
resume while I investigate what I had missed.
2017-04-07 21:06:50 +00:00
John Baldwin
ea22493a46 Explicitly set the desired MIPS ABI in toolchain flags.
Specifically, set '-mabi=XX' in AFLAGS, CFLAGS, and LDFLAGS.  This permits
building MIPS worlds and binaries with a toolchain whose default output
does not match the desired TARGET_ARCH.

_LDFLAGS (which is used with LD instead of with CC) required an update as
LD does not accept the -mabi flags (so they must be stripped from LDFLAGS
when generating _LDFLAGS).  For bare uses of LD (rather than linking via
CC), the desired ABI must be set by setting an explicit linker emulation
as done in r316514 for kernels and kernel modules.

Reviewed by:	imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10085
2017-04-07 20:02:01 +00:00
John Baldwin
5429af5f5b Don't set the MIPS endianness flags in both ACFLAGS and CFLAGS.
This should no longer be necessary after r316620 as all places that
use ACFLAGS should already be using CFLAGS.

Reviewed by:	imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10085
2017-04-07 19:56:12 +00:00
John Baldwin
5944f899a2 Rework r234502 to include a modified CFLAGS along with ACFLAGS.
On most architectures crt objects are compiled in a multiple-step process
so that sed can be run on the generated assembly.  As the final step,
the C compiler generates an object file from the modified assembly output.
Currently this last step uses $CC with only $ACFLAGS.  However, for other
uses in the tree, $ACFLAGS is meant to include assembly-specific compiler
flags that are in addition to $CFLAGS (see default .S.o rules
bsd.suffixes.mk).  In particular, external toolchains may require
additional flags to select a non-default target which will be present
in CFLAGS but not ACFLAGS.  To support this while still mitigating the
issue with CFLAGS described in r234502, include a modified CFLAGS that
excludes "-g" when assembling the modified assembly files.

Note that normally an assembler ($AS) is used to assemble .s flags to
object files (see bsd.suffixes.mk).  However, llvm-based toolchains do
not currently have a stand-alone assembler.

Reviewed by:	imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10085
2017-04-07 19:53:14 +00:00
Brooks Davis
2558567984 Remove support for long gone oldnfs.
The code was calling nmount with an fstype of everything in the program
name after the last '_'. This was there to support mount_nfs being
linked to mount_oldnfs. Support for the link was removed in 2015 with
r281691.

Reviewed by:	rmacklem
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D10301
2017-04-07 18:31:31 +00:00
Glen Barber
44ca01977c - Increase the image size for RPI2 and IMX6-based boards from 1G
to 1.5G.
- Use the 'conv=sync' dd(1) option to fix writing the u-boot.imx
  file to the md(4) device for IMX6-based boards.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-04-07 16:55:13 +00:00
Sean Bruno
64c9d60dad bnxt(4): add support for WOL Magic.
Submitted by:	venkatkumar.duvvuru@broadcom.com
Differential Revision:	https://reviews.freebsd.org/D10124
2017-04-07 16:15:50 +00:00
Sevan Janiyan
ea566940e1 Remove the last vestiges of FDC_DEBUG & FD_DEBUG
FDC_DEBUG is not referenced in any c or header files but traces of it
still remain in other files.

PR:		105608
Reported by:	Eugene Grosbein <ports AT grosbein DOT net>
Reviewed by:	imp
Approved by:	bcr (mentor)
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D10303
2017-04-07 16:14:25 +00:00
Benno Rice
8fbb1a2916 In r298230 the value of HEAP_MIN was changed from 3MB to 64MB. Correct a
comment that was still referencing the 3MB value.

Sponsored by:	Dell EMC Isilon
Discussed with:	jhb
2017-04-07 15:41:49 +00:00
Alan Somers
6e24000a72 sbin/mount: strcpy -> strlcpy
Reported by:	Coverity
CID:		1011173, 1011174
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-04-07 15:39:41 +00:00
Alan Somers
2b8aaacea9 usr.bin/netstat: strcpy -> strlcpy
Reported by:	Coverity
CID:		1006741, 1006744
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-04-07 15:15:10 +00:00
Hans Petter Selasky
22cbd6ef2e Create the LinuxKPI current task structure on the fly if it doesn't
exist when the current macro is used.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-04-07 14:43:28 +00:00
Andrew Turner
16e77e0036 Add -fPIC to the standalone build flags on arm64. This is needed as
loader.efi is position independend, however we were not building it as
such causing a build failure when building with lld.

Sponsored by:	DARPA, AFRL
2017-04-07 14:30:51 +00:00
Andrew Turner
e7fca4bb42 Fix linking with lld by marking OPENSSL_armcap_P as hidden.
Linking with lld fails as it contains a relative address, however the data
this address is for may be relocated from the shared object to the main
executable.

Fix this by adding the hidden attribute. This stops moving this value to
the main executable. It seems this is implicit upstream as it uses a
version script.

Approved by:	jkim
Sponsored by:	DARPA, AFRL
2017-04-07 12:41:57 +00:00
Hans Petter Selasky
99e690772a The __stringify() macro in the LinuxKPI should expand any macros
before stringifying.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-04-07 12:27:49 +00:00
Enji Cooper
8c90d33ca8 META_MODE: add additional reachover relative paths to DIRDEPS_BUILD
These additional entries are being added, after their addition to the
source tree.

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-07 07:46:21 +00:00
Enji Cooper
79a9c323e0 pmc_read(3): fix manlint error
Remove spurious trailing comma from last .Nm entry in NAME section.

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-07 06:06:55 +00:00
Enji Cooper
15cfc11d85 pmc.atomsilvermont(3): fix manlint warnings
Start new sentences on new lines.

Sentences affected by the change are wrapped at <80 columns. Other
potentially offending lines have been left alone to reduce churn.

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-07 06:00:19 +00:00
Enji Cooper
7a40330b95 pmc(3): add additional references for libpmc functions in the SEE ALSO section
These functions are already referenced throughout the manpage -- this makes their
presence more apparent.

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-07 05:46:45 +00:00
Dmitry Chagin
c695024348 Prevent ushort values overflow when convert new Linux 64-bit ipc
struct to the old Linux ipc struct.

Reported by:	PVS-Studio
XMFC with:	r314866

MFC after:	3 days
2017-04-07 05:37:08 +00:00
Conrad Meyer
69cfbe8851 kern_descrip: Move kinfo_ofile size assert under COMPAT_FREEBSD7
The size and structure are not used outside of FreeBSD 7 compatibility ABIs.

Sponsored by:	Dell EMC Isilon
2017-04-07 05:00:09 +00:00
Ed Maste
37ca9f42fd makefs: Sync with NetBSD (fix unused variable warnings)
NetBSD revs:
cd9660.c		1.45
cd9660/cd9660_write.c	1.17

Obtained from:	NetBSD
2017-04-07 02:31:55 +00:00
Sean Bruno
60596476cf Move pause frame counter out of struct if_ctx and into struct if_softc_ctx_t
so that we can use it in iflib to detect pause frames.

The igb(4) driver definitely used to use this in its old timer function and
I see no reason to restrict it to that driver only.

Sponsored by:	Limelight Networks
2017-04-07 00:33:03 +00:00
Brooks Davis
a3b7d0fb60 Regen after r316594. 2017-04-06 23:40:51 +00:00
Brooks Davis
982519d10f Change the size argument of __getcwd() to size_t.
This matches the getcwd() definition.

This is technically an ABI change, but that would only effect 64-bit
big-endian platforms that pass arguments on the stack. We have none of
those.

Reviewed by:	jhb
Obtained from:	CheriABI
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D9428
2017-04-06 23:40:13 +00:00
Brooks Davis
08069ae688 Point out that -F probably does not do what the user expects.
Users attempting to create images from mtree METALOG files created by
installworld often use -F when they should be passing the METALOG file
in place of a directory. This is often produces difficult to debug
error reports.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D10038
2017-04-06 23:35:10 +00:00
Renato Botelho
a2ac74c148 Introduce libxo support to arp(8)
Reviewed by:	wblock, gnn, allanjude, phil
Approved by:	allanjude
MFC after:	1 week
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D9563
2017-04-06 22:50:28 +00:00