Commit Graph

210879 Commits

Author SHA1 Message Date
Eitan Adler
bf092a3d6f Rename units.lib -> definitions.units
- this matches GNU units 2.12
add ISO country codes from units 2.12
2016-04-19 05:18:12 +00:00
Eitan Adler
3851177de0 Rename units.lib -> definitions.units
- this matches GNU units 2.12
add ISO country codes from units 2.12
2016-04-19 05:17:59 +00:00
Adrian Chadd
49d1897d12 Add VHT power envelope parsing to ifconfig. 2016-04-19 05:17:43 +00:00
Eitan Adler
8ae87993ed Remove pathnames.h
- it only holds a single constant
- it doesn't exist in the GNU variant
2016-04-19 05:04:39 +00:00
Marcelo Araujo
564500def9 Use nitems() from sys/param.h.
MFC after:	2 weeks.
2016-04-19 04:57:57 +00:00
Marcelo Araujo
8ee0576c6b Use nitems() from sys/param.h.
MFC after:	2 weeks.
2016-04-19 04:52:51 +00:00
Marcelo Araujo
dc53e146ce Use nitems() from sys/param.h.
MFC after:	2 weeks.
2016-04-19 04:52:13 +00:00
Marcelo Araujo
2f21908de4 Remove redundant parenthesis.
Submitted by:	pfg
MFC after:	2 weeks.
2016-04-19 04:46:13 +00:00
Marcelo Araujo
cf83e90307 Use nitems() from sys/param.h.
MFC after:	2 weeks.
2016-04-19 04:42:34 +00:00
Marcelo Araujo
aa07ba2aad Use nitems() from sys/param.h.
MFC after:	2 weeks.
2016-04-19 04:37:17 +00:00
Marcelo Araujo
0bfc2a1246 Use nitems() instead of sizeof(name) / sizeof(*name).
MFC after:	2 weeks.
2016-04-19 04:28:25 +00:00
Allan Jude
4d41f47272 Add a new installation type to bsdinstall/zfsboot: BIOS+UEFI
Installs both pmbr+gptzfsboot as well as boot1.efifat in separate partitions
The resulting system can be booted with either UEFI or BIOS/CSM.
Preference is controlled by the user's firmware boot settings.

This is now the default for zfsboot installs

PR:		208629
Submitted by:	Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> (original version)
2016-04-19 03:25:36 +00:00
Allan Jude
7509c09b1b Unbreak the build if you enable WITH_NAND
Followup to r298230

Submitted by:	Nikolai Lifanov <lifanov@mail.lifanov.com> (original version)
Sponsored by:	ScaleEngine Inc.
2016-04-19 02:06:02 +00:00
Marcelo Araujo
c81a92db98 Use NULL instead of 0 for pointers.
realloc will return NULL in case it cannot allocate memory.

MFC after:	2 weeks.
2016-04-19 02:05:32 +00:00
Marcelo Araujo
e63ce3de7f malloc will return NULL if it cannot allocate memory.
MFC after:	2 weeks.
2016-04-19 02:00:48 +00:00
Marcelo Araujo
deaa3563c8 getfsent(3) will return NULL on EOF or error.
MFC after:	2 weeks.
2016-04-19 01:59:26 +00:00
Marcelo Araujo
028d447b59 Use NULL instead of 0 for pointers.
malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-19 01:57:56 +00:00
Justin Hibbits
f60708c9f7 Fix SMP booting for PowerPC Book-E
Summary:
PowerPC Book-E SMP is currently broken for unknown reasons.  Pull in
Semihalf changes made c2012 for e500mc/e5500, which enables booting SMP.

This eliminates the shared software TLB1 table, replacing it with
tlb1_read_entry() function.

This does not yet support ePAPR SMP booting, and doesn't handle resetting CPUs
already released (ePAPR boot releases APs to a spin loop waiting on a specific
address).  This will be addressed in the near future by using the MPIC to reset
the AP into our own alternate boot address.

This does include a change to the dpaa/dtsec(4) driver, to mark the portals as
CPU-private.

Test Plan:
Tested on Amiga X5000/20 (P5020).  Boots, prints the following
messages:

 Adding CPU 0, pir=0, awake=1
 Waking up CPU 1 (dev=1)
 Adding CPU 1, pir=20, awake=1
 SMP: AP CPU #1 launched

top(1) shows CPU1 active.

Obtained from:	Semihalf
Relnotes:	Yes
Differential Revision: https://reviews.freebsd.org/D5945
2016-04-19 01:48:18 +00:00
Marcelo Araujo
14adaa14cb Use NULL instead of 0 for pointers.
dbopen(3) will returns a NULL on error.

MFC after:	2 weeks.
2016-04-19 01:25:35 +00:00
Marcelo Araujo
0b410d9c57 Use NULL instead of 0.
malloc will return NULL in case it cannot allocate memory.

MFC after:	2 weeks.
2016-04-19 01:01:22 +00:00
Marcelo Araujo
8e58be03e7 Use NULL for pointers instead of 0.
MFC after:	2 weeks.
2016-04-19 00:59:15 +00:00
Marcelo Araujo
ec23a76360 Use NULL instead of 0 for pointers.
kvm_open(3) will return NULL when it cannot access kernel virtual memory.

MFC after:	2 weeks.
2016-04-19 00:40:43 +00:00
Marcelo Araujo
172c3b0b5f Use NULL for pointers instead of 0.
MFC after:	2 weeks.
2016-04-19 00:38:07 +00:00
Sean Bruno
a0adbb3df1 hptmv(4) Fix potential buffer overflow in hpt_set_info.
While here, adjust some whitespace and yeild some useful debug info.

This is untested on this hardware, testing requests to -scsi went
unanswered.

PR:	206585
Submitted by:	cturt@hardenedbsd.org
MFC after:	2 weeks
2016-04-18 23:26:11 +00:00
Allan Jude
87ed2b7f5a A new implementation of the loader block cache
The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy.
Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks.
Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device.
The cache also implements limited read-ahead to increase performance.
To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.

Booting from a virtual CD over IPMI:
0ms latency, before: 27 second, after: 7 seconds
60ms latency, before: over 12 minutes, after: under 5 minutes.

Submitted by:	Toomas Soome <tsoome@me.com>
Reviewed by:	delphij (previous version), emaste (previous version)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4713
2016-04-18 23:09:22 +00:00
Simon J. Gerraty
30e2910007 Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec
Use $MACHINE if target does not specify.

Reviewed by:	bdrewery
2016-04-18 22:00:26 +00:00
Bryan Drewery
f31828ed9c META_MODE: Don't hide the .depend rm -f command.
Otherwise the build command changes every build.  META_MODE will
only remove it if something changes to warrant rebuilding
the file.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 21:11:55 +00:00
Bryan Drewery
e1dfa6572d Update meta2deps to fix crash when using -X with M2D_EXCLUDES. 2016-04-18 21:05:19 +00:00
Andriy Voskoboinyk
2cf5e9365d libc: do not include <sys/types.h> where <sys/param.h> was already included
According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
2016-04-18 21:05:15 +00:00
Simon J. Gerraty
51c71d3e03 Update dirdeps.mk et al
dirdeps.mk: move logic to handle -f dirdeps.mk to inside check
for first read of dirdeps.mk

Also fix handling of WITHOUT_DIRDEPS_BELOW

gendirdeps.mk: pass M2D_EXCLUDES to meta2deps

meta.autodep.mk: if we build with nofilemon, leave a cookie to
prevent updating dependencies until cleaned.

Reviewed by:	bdrewery
2016-04-18 20:56:21 +00:00
Sean Bruno
ae6bd5b7be Correct possible underflow conditions when checking for available space
in the tx h/w ring buffer.

Reviewed by:	gnn jeb.j.cramer@intel.com
MFC after:	1 week
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D5918
2016-04-18 20:33:44 +00:00
Michael Tuexen
b1deed45e6 Address issues found by the XCode code analyzer. 2016-04-18 20:16:41 +00:00
Glen Barber
fcede88bbd Add MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
created to avoid creating ${.OBJDIR}.

The duplicate REVISION/BRANCH/VERSION evaluation will be addressed
separately.

Sponsored by:	The FreeBSD Foundation
2016-04-18 19:27:51 +00:00
Bryan Drewery
f62610d7bb Follow-up r298220: Don't pass down META_MODE which will still enable it.
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:39:43 +00:00
Bryan Drewery
d7698c0722 META_MODE: Disable during installworld and similar.
META_MODE may create cookies during staging of files to WORLDTMP that would
also prevent installation of the files to the final DESTDIR, since the cookie
already exists.  This is not yet the case but will be soon.  Prevent other
similar issues by disabling META_MODE for any top-level install targets.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:14:05 +00:00
Bryan Drewery
29fbb8071f Cause an error during 'make install' if trying to compile with CC.
This is limited to src-tree builds, meaning not extended to ports or other
out-of-tree builds.

This will help ensure that read-only OBJDIRS will be respected at install-time
by causing a more consistent failure for those who don't use a read-only
OBJDIR.  It also will cause Jenkins to yell.  This is a better solution than
trying to see CC=false as has been attempted and discussed before.

Of course this is only relevant for files generated by CC.

Disable this for META_MODE since it will detect the CFLAGS/command
change and force a rebuild.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:14:02 +00:00
Bryan Drewery
09fb6bff29 Follow-up r297842: Rework header generation to fix always rebuilding.
This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to:	bdrewery
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:13:58 +00:00
Bryan Drewery
b964b94376 META_MODE: Clean .meta files with 'make cleandepend'.
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:12:12 +00:00
Pedro F. Giffuni
c4c510be1e Reuse our roundup2() macro instead of reinventing the wheel.
Obtained from:	DragonflyBSD
2016-04-18 17:30:33 +00:00
Pedro F. Giffuni
6b2d5217d7 Re-use our roundup2() macro instead of reinventing the wheel.
Obtained from:	DragonflyBSD
2016-04-18 16:25:37 +00:00
Pedro F. Giffuni
9929cc5dd0 libipsec: use NULL instead of zero for pointers. 2016-04-18 15:08:31 +00:00
Pedro F. Giffuni
46266845a4 rbootd: use NULL instead of zero for pointers. 2016-04-18 15:05:48 +00:00
Alan Somers
f94033f407 Add the ability to read a SAS device's Target Port NAA designator
sys/cam/scsi/scsi_all.h
sys/cam/scsi/scsi_all.c
	Add the scsi_devid_is_port_naa helper function

Reviewed by:	ken
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D5975
2016-04-18 15:01:59 +00:00
Pedro F. Giffuni
6e4fcca0f8 ftpd: replace malloc + memset 0 with calloc.
It is faster and usually safer.
Use NULL instead of zero for the pointer.
2016-04-18 15:01:49 +00:00
Pedro F. Giffuni
d5808ebf65 libstand: use NULL instead of zero for pointers. 2016-04-18 14:45:56 +00:00
Marcelo Araujo
7a4b1114b1 Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 14:44:01 +00:00
Pedro F. Giffuni
5eadfbfcd0 libbluetooth: use NULL instead of zero for pointers. 2016-04-18 14:41:30 +00:00
Pedro F. Giffuni
50a7cc95da rexec(3): use NULL instead of zero for pointers. 2016-04-18 14:37:26 +00:00
Marcelo Araujo
ff129d6f87 User NULL instead of 0 for pointers.
gethostbyname(3) will return NULL in case of an error.

MFC after:	2 weeks.
2016-04-18 14:12:42 +00:00
Marcelo Araujo
edf6b683e8 Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 14:08:35 +00:00