Commit Graph

251258 Commits

Author SHA1 Message Date
eadler
4e4f3a8d0c top(1): pull configuration directly into header files
This sets configuration variables directly in the various header files,
avoiding the need to have special logic in our Makefile to build the
header.
2018-05-20 23:37:30 +00:00
eadler
540c3db568 top(1): set max username length based on system constant
This changes previous behavior of calculating it at startup based on
the current max username length.

This is done because:
- it is in theory possible for the max length to change at run-time
  (e.g., a new user is added after top starts running)
- on machines with many users this delays startup significantly

PR:		20799
PR:		89762
Reported by:	ob@e-Gitt.NET
Reported by:	wkwu@Kavalan.csie.NCTU.edu.tw
Reported on:	2000-08-23 and 2005-11-30
2018-05-20 23:19:09 +00:00
antoine
4529176e69 Revert last change to file/magic/Magdir/elf, it misidentifies most shared
libraries installed from ports as pie executables instead of shared libraries,
and consequently breaks ports.
2018-05-20 22:07:44 +00:00
sevan
f935dfc400 Use St macro for specifying C standards.
Reported by:	rgrimes@
2018-05-20 21:56:08 +00:00
mmacy
1789285c11 AF_UNIX gc unused label
...sigh
2018-05-20 21:37:34 +00:00
mmacy
b0c65d1080 AF_UNIX: Don't unlock unp/unp2 if they're not locked
Reported by:	mjg
2018-05-20 21:20:26 +00:00
mmacy
117b59274f make sure vnet is set when freeing
Reported by:	pho
2018-05-20 20:48:26 +00:00
mmacy
0ff2c24861 pmc: detach free_gtask on unload
Reported by:	pho
2018-05-20 20:34:15 +00:00
sevan
8fc6dcfaf4 Fix a typo and remove an unneeded Tn macro as highlighted by mandoc -Tlint.
Submitted by:		Mateusz Piotrowski
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15204
2018-05-20 20:28:17 +00:00
mmacy
47771c5690 in(s)_moptions: free before tearing down inpcb 2018-05-20 20:08:21 +00:00
mmacy
5f1cf9cd72 pmc: avoid potential race on shutdown
Clear shutdown flag first, conservatively allow 5ms for all hardclock consumers to
see flag before drainining
2018-05-20 19:35:24 +00:00
nwhitehorn
851b9e4b05 Fix build with PSERIES but not POWERNV defined. 2018-05-20 18:26:09 +00:00
eadler
43958c70c1 bsd-family-tree: announce DragonFly 5.2.1
See
http://lists.dragonflybsd.org/pipermail/commits/2018-May/672214.html
2018-05-20 18:18:56 +00:00
eadler
110b1a5330 top(1): unconditionally assume we are on FreeBSD (more unifdef)
Now that we're our own upstream, remove useless ifdefs.
2018-05-20 18:11:58 +00:00
eadler
01c70bcb4c Retry revert
I had a local modification before my revert. Try reverting one more time.
2018-05-20 18:03:40 +00:00
eadler
0dbbba9b1a revert r333928
I had missed a file when testing this, and it does not build. Will try again.
2018-05-20 18:02:40 +00:00
eadler
00072c9561 top(1): Make lack of "percent" information explicit
When count is 1, no delta information can be produced. Make this
explicit.

PR:		195717
Submitted by:	fernape
2018-05-20 17:59:59 +00:00
eadler
832caf6bc2 top(1): remove 'xs' and 'xh' source files
Now that we're our own upstream these files buy us nothing.
2018-05-20 17:58:22 +00:00
jilles
ee6bb75b10 sh: Allow unquoted newlines in word in ${param+word} etc.
POSIX requires accepting unquoted newlines in word in parameter expansions
like ${param+word}, ${param#word}, although the Bourne shell did not support
it, it is not commonly used and might make it harder to find a missing
closing brace.

It was also strange that something like

foo="${bar#
}"

was rejected.

Reported by:	Martijn Dekker via Robert Elz
2018-05-20 17:25:52 +00:00
dumbbell
fa23ca22d3 teken, vt(4): Parse the "Cursor style" escape sequence
The escape sequence (e.g. `^[[2 q`) was unsupported before and the
letter `q` was displayed as a typed character. The sequence is used by
Neovim for instance.

Now, it is properly parsed. However, it is ignored, so it won't change
the cursor style.

Because the escape sequence contains a space character, the
`gensequences` script had to be modified to support that. In the
`sequences` file, a space is represented as the string `SP`.
2018-05-20 14:21:20 +00:00
mmacy
29271e5a0a nfsclient: warnings cleanups 2018-05-20 06:14:12 +00:00
cy
fe71509080 Style fixup:
A non-functional commit to make adjustment to an aesthetically
unpleasing long line.
2018-05-20 05:59:42 +00:00
cy
c31fc52262 Fix build post r333919.
This commit results in an aesthetically unpleasing long line
which will be fixed next commit.
2018-05-20 05:59:35 +00:00
mmacy
8e113981f9 AF_UNIX: fix LOR introduced by the locking rewrite 2018-05-20 05:50:53 +00:00
mmacy
7014a06a90 Add additional preinitialized cap_rights 2018-05-20 05:13:12 +00:00
eadler
ff5cee9324 MFV: file 5.33
Merge the latest file(1) in.

Relevent Changelog:
- extend the support for ${x?:} expansions for magic descriptions
- add support for ${x?:} in mime types to handle pie binaries.
- add support for negative offsets (offsets from the end of file)
- close the file on error when writing magic

Relnotes:	yes
2018-05-20 05:06:42 +00:00
eadler
1c37767822 Vendor import of file 5.33 2018-05-20 04:56:46 +00:00
mjg
1729d1b82a vfs: simplify vop_stdlock/unlock
The interlock pointer is non-NULL by definition and the compiler see through
that and eliminates the NULL checks. Just remove them from the code as they
play no role.

No difference in generated assembly.
2018-05-20 04:45:05 +00:00
mmacy
7110d4d796 inpcb: defer destruction of inpcb until after a grace period has elapsed
in_pcbfree will remove the incpb from the list and release the rtentry
while the vnet is set, but the actual destruction will be deferred
until any threads in a (not yet used) epoch section, no longer potentially
have references.
2018-05-20 04:38:04 +00:00
mmacy
d518618594 AF_UNIX: make unpcb lock name line up with what's in witness 2018-05-20 04:32:48 +00:00
mmacy
b37dccc294 epoch.h: hide proc.h->priority.h from user 2018-05-20 04:15:12 +00:00
jhibbits
4a4c273c7a Add support for the XIVE XICS emulation mode for POWER9 systems
Summary:
POWER9 systems use a new interrupt controller, XIVE, managed through OPAL
firmware calls.  The OPAL firmware includes support for emulating the previous
generation XICS presentation layer in addition to a new "XIVE Exploitation"
mode.  As a stopgap until we have XIVE exploitation mode, enable XICS emulation
mode so that we at least have an interrupt controller.

Since the CPPR is local to the current CPU, it cannot be updated for APs when
initializing on the BSP.  This adds a new function, directly called by the
powernv platform code, to initialize the CPPR on AP bringup.

Reviewed by:	nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15492
2018-05-20 03:23:17 +00:00
mmacy
fe7765802e inpcb: consolidate possible deletion in pcblist functions in to epoch
deferred context.
2018-05-20 02:27:58 +00:00
mmacy
99ec59840b in_pcb: add helper for deferring inpcb rele calls from list functions 2018-05-20 02:17:30 +00:00
eadler
8b5d41008d top(1): Quiesce several warnings
This is all warnings at level six (6) that are not
char-subscripts, incompatible-pointer-types,
sign-compare, switch, int-conversion,
missing-variable-declarations, cast-qual, cast-align

Some warnings that are fixed by this commit are:
shadow, strict-prototypes, missing-prototypes, pointer-arith,
unused-parameter, unused-const-variable, and several others
2018-05-20 02:14:27 +00:00
eadler
aac06c5109 top(1): remove use of 'register' keyword
This keyword is meaningless is obscures future diffs that help clear up
warnings in top.
2018-05-20 01:32:27 +00:00
eadler
9a46ed03f2 top(1): be constant in a structure
This silences some warnings that are still hidden since the remainder of
top(1) does not build with higher WARNS yet.
2018-05-20 01:30:19 +00:00
mmacy
516228d5b4 epoch.h: move kernel only bits under _KERNEL 2018-05-20 01:00:56 +00:00
mmacy
ce91e745ec ip(6)_freemoptions: defer imo destruction to epoch callback task
Avoid the ugly unlock / lock of the inpcbinfo where we need to
figure out what kind of lock we hold by simply deferring the
operation to another context. (Also a small dependency for
converting the pcbinfo read lock to epoch)
2018-05-20 00:22:28 +00:00
markj
c893b00af3 Use the canonical check for reservation support. 2018-05-19 23:49:13 +00:00
eadler
1a493866e2 top(1): unconditionally assume we are running on FreeBSD
This allows us to remove a special header and more specifically just the
system headers we want.
2018-05-19 23:19:24 +00:00
eadler
de45bc2bd4 top(1): unconditionally provide 'FreeBSD' as a version 2018-05-19 23:04:42 +00:00
eadler
a11edc0bf3 top(1): assume that we're building on FreeBSD
This allows us to avoid the ifdefs that we set unconditionally.
2018-05-19 22:59:58 +00:00
eadler
360b1a07c6 top(1): bump WARNS to 1
Nothing else builds without errors yet, but 1 is better than 0
2018-05-19 22:45:43 +00:00
eadler
2ddbba1d82 top(1): Migrate top to usr.bin
We've been maintaining top(1) for a long time, and the upstream
hasn't existed/been used in similarly as long. Make it clear that we own
top(1)

Tested with 'make universe'. Everything passed except MIPS which failed
for unrelated reasons. Install also tested for amd64.

Reviewed by:		sbruno
No objections:		imp, mmacy
Differential Revision:	https://reviews.freebsd.org/D15387
2018-05-19 22:40:23 +00:00
nwhitehorn
1c2924af1f Avoid writing to the frame buffer in early boot on PowerPC if the CPU's
MMU is disabled.

This expands some earlier logic and avoids a number of potential problems:
1. The CPU may not be able to access the framebuffer in real mode (real
   mode does not necessarily encompass all available memory, especially
   under a hypervisor).
2. Real mode accesses generally assume cacheability, so it might not
   even have worked.
3. The difference in cacheability between real mode and later (and
   potentially earlier) points in the boot with the MMU on may cause
   ERAT parity problems, resulting in a machine check.

This fixes real-mode (usefdt=1) early boot on the G5 iMac, which was
previously broken as a result of issue #3. Late boot will require some
other fixups.
2018-05-19 22:04:54 +00:00
kib
f49d5cb80d Style.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-05-19 21:36:55 +00:00
cy
578899823c Conform to Berne Convention.
Prompted by:	Recent discussion
MFC after:	3 days
2018-05-19 21:26:07 +00:00
eadler
3c9d88ce65 mtest: build with WARNS=3 2018-05-19 20:57:22 +00:00
eadler
b1495183c8 my copyright: some minor adjustments
- remove "all rights reserved" from my copyright on my extensive
  contributions
- belatedly add my name to tuning.7 which I was a large contributor to
  several years ago

This commit can also serve as implicit permission for any formatting or
non-substantive changes that FreeBSD wishes to make in the future.
2018-05-19 20:35:15 +00:00