Commit Graph

201742 Commits

Author SHA1 Message Date
Mark Murray
7233d3094d ANSIfy the only function that uses K&R definition in this file. 2015-06-28 09:44:58 +00:00
Matthew Seaman
4311777e58 Steve KArgl's commit bit taken in at his own request
With hat:     core-secretary
Approved by:	core
2015-06-28 09:03:26 +00:00
Konstantin Belousov
7626d062c3 Remove unneeded data dependency, currently imposed by
atomic_load_acq(9), on it source, for x86.

Right now, atomic_load_acq() on x86 is sequentially consistent with
other atomics, code ensures this by doing store/load barrier by
performing locked nop on the source.  Provide separate primitive
__storeload_barrier(), which is implemented as the locked nop done on
a cpu-private variable, and put __storeload_barrier() before load, to
keep seq_cst semantic but avoid introducing false dependency on the
no-modification of the source for its later use.

Note that seq_cst property of x86 atomic_load_acq() is not documented
and not carried by atomics implementations on other architectures,
although some kernel code relies on the behaviour.  This commit does
not intend to change this.

Reviewed by:	alc
Discussed with:	bde
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-06-28 05:04:08 +00:00
Baptiste Daroussin
af38028d11 Make all shared library a relative symlink
This makes sysroot usable for cross building, it also removes the need for
_SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no time
to test it)

Differential Revision:	https://reviews.freebsd.org/D2920
Submitted by:	imp, adrian
Tested by:	adrian
2015-06-27 23:28:56 +00:00
Glen Barber
8c4b4cc3ba Instead of hard-coding the PROVIDERS for upload, add the
VAGRANT_PROVIDERS variable.  Right now, it defaults to only
vmware_desktop, virtualbox support is to follow at some point.

While here, fix the hashicorp URL: s/vagrant/atlas/, which
was result of a sed(1) replace (and my fault).

Sponsored by:	The FreeBSD Foundation
2015-06-27 23:03:28 +00:00
Glen Barber
02158ab011 Remove _ACCOUNT and add _USERNAME, _NAME, _VERSION for the
VAGRANT_${VAR} variables extracted from VAGRANT_UPLOAD_CONF.

Set ATLAS_${VAR} to VAGRANT_${VAR} if VAGRANT_UPLOAD_CONF
is set.  There is intent to intentionally have separate
variants of configuration entries, but the defaults do not
yet have any reason to be different.

Sponsored by:	The FreeBSD Foundation
2015-06-27 22:59:29 +00:00
Glen Barber
bf97d722f3 Add default VAGRANT_IMG variable.
Sponsored by:	The FreeBSD Foundation
2015-06-27 22:54:16 +00:00
Brad Davis
41f7db3a4f Add initial support for building Vagrant images for VMWare. Next steps will be adding Virtualbox support and uploading to Hashicorp Atlas for others to consume.
Approved by:	re (gjb)
2015-06-27 20:39:13 +00:00
Neel Natu
f429b905b8 Fix issues detected by 'mandoc -Tlint bhyveload.8'
Pointed out by:		wblock
Differential Revision:	https://reviews.freebsd.org/D2762
2015-06-27 18:24:23 +00:00
Patrick Kelsey
821f1f1c9d Use correct flag in iovctl_start().
Differential Revision: https://reviews.freebsd.org/D2921
Reviewed by: rstone
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.
2015-06-27 18:01:50 +00:00
Pedro F. Giffuni
49a740381e Change detection for the gnu_inline attribute.
According to the GCC documentation:
"This attribute is available in GCC 4.1.3 and later. It is available
if either of the preprocessor macros __GNUC_GNU_INLINE__ or
__GNUC_STDC_INLINE__ are defined."

We don't keep the gcc granularity up to the minor number so it's
better to use the documented way. Current clang defines both
macros.

Reference:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
2015-06-27 15:13:14 +00:00
Bjoern A. Zeeb
de3587025a Fix compilation without INET6 and without INET and INET6 after
offload support was introduced in r284746.

While here also fix the ioctl() handler for IPv4 added in r279819,
which was never compiled in given opt_inet.h was not included.
2015-06-27 12:37:09 +00:00
Konstantin Belousov
b2c3df842b Handle errors from background write of the cylinder group blocks.
First, on the write error, bufdone() call from ffs_backgroundwrite()
panics because pbrelvp() cleared bp->b_bufobj, while brelse() would
try to re-dirty the copy of the cg buffer.  Handle this by setting
B_INVAL for the case of BIO_ERROR.

Second, we must re-dirty the real buffer containing the cylinder group
block data when background write failed.  Real cg buffer was already
marked clean in ffs_bufwrite(). After the BV_BKGRDINPROG flag is
cleared on the real cg buffer in ffs_backgroundwrite(), buffer scan
may reuse the buffer at any moment. The result is lost write, and if
the write error was only transient, we get corrupted bitmaps.

We cannot re-dirty the original cg buffer in the
ffs_backgroundwritedone(), since the context is not sleepable,
preventing us from sleeping for origbp' lock.  Add BV_BKGDERR flag
(protected by the buffer object lock), which is converted into delayed
write by brelse(), bqrelse() and buffer scan.

In collaboration with:	Conrad Meyer <cse.cem@gmail.com>
Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation (kib),
	  EMC/Isilon storage division (Conrad)
MFC after:	2 weeks
2015-06-27 09:44:14 +00:00
Yoshihiro Takahashi
5d62c861b5 MFi386: r278165
Silence a coverity warning about ignoring a return value.
2015-06-27 09:01:49 +00:00
Yoshihiro Takahashi
7d0de310ff MFi386: r284878
Reduce warnings:

   - Add prototype for boot2 main()
   - Don't make assignment within if statement, split it into two.
2015-06-27 08:49:41 +00:00
Glen Barber
225e861d92 Fix a vi-invoked typo.
Submitted by:	jkim (privately)
Sponsored by:	The FreeBSD Foundation
2015-06-27 05:18:08 +00:00
Marcel Moolenaar
8adccff34f Add the ntfs alias and support it with the MBR and GPT schemes
as DOSPTYP_NTFS and GPT_ENT_TYPE_MS_BASIC_DATA (resp).
2015-06-27 03:28:04 +00:00
Glen Barber
eb64cd58f5 Add initial support for automatically uploading GCE virtual
machine images to the Google Compute Engine platform.

By default, gcutil/gsutil requires an Oauth2 login generated
from a URL that must be opened in a browser, a verification
code copied back to the terminal from which it was invoked,
etc., etc., making it near impossible for automation.

I've hacked together an evil solution to work around this,
so unless GCE_LOGIN_SKIP is set to a non-empty value, this
Makefile will not do anything useful.

As a result of this commit, remove the gce-package.sh script
that was never, nor will ever be, used.

MFC after:	3 days
X-MFC-Note:	(hopefully)
Sponsored by:	The FreeBSD Foundation
2015-06-27 01:29:59 +00:00
Baptiste Daroussin
9ebcef9a74 short circuit install -l rs
When requesting install(1) to only make relative symlinks, by pass all the
done to actually compute the relative symlink if the path given in argument is
already a relative path
2015-06-26 23:55:02 +00:00
Xin LI
4b1222a215 Reduce warnings:
- Add prototype for boot2 main()
 - Don't make assignment within if statement, split it into two.

No functional or binary change -- verified with sha256(1).

MFC after:	2 weeks
2015-06-26 18:03:19 +00:00
Tycho Nightingale
ea587cd825 verify_gla() needs to account for non-zero segment base addresses.
Reviewed by:	neel
2015-06-26 18:00:29 +00:00
Alexander Motin
0bb4b98984 Plug minor memory leak at r284765.
Reported by:	Coverity
CID:		1308401
MFC after:	3 days
2015-06-26 16:14:00 +00:00
Glen Barber
787c8cb62d Clarify the note about Thumb-2 kernel support.
Submitted by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-06-26 13:33:46 +00:00
Kashyap D Desai
2f2163ab40 Counter part of mfi driver commit in mrsas
Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can
gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists.
This can happen if mfi(4) and mrsas(4) are both attached to cards and
providing Linux emulation support.  Let the first one win.  An equivalent
change has been done in mfi(4).  Extra credit would be to pass the
Linux emulation call to the other driver when appropriate.  This will
probably be a rare case and the user can manually change where the symlink
points to.

MFC after:  3 days
2015-06-26 12:00:51 +00:00
Kashyap D Desai
5b2490f890 Kernel panic may be observed by user, if MR controller is under Chip reset (OCR)
and there are some pending IOs at the time of OCR. This is mainly because of
recursive mutext in OCR and IO completion function call. Generic IO completion (from ISR) needs
sim_lock to be held before it calls completion to CAM (xpt_done), but in case of OCR path mrsas_ocr thread
itself take sim_lock, so this condition is now handled in this patch.

MFC after:  3 days
2015-06-26 11:58:42 +00:00
Andrew Turner
de50bcd56f pc_curpmap is only in the armv6 pcpu data. 2015-06-26 09:02:40 +00:00
Roger Pau Monné
7e748038cd amd64: set the correct LMA values
The current linker script generates program headers with VMA == LMA:

Entry point 0xffffffff802e7000
There are 6 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0xffffffff80200040 0xffffffff80200040
                 0x0000000000000150 0x0000000000000150  R E    8
  INTERP         0x0000000000000190 0xffffffff80200190 0xffffffff80200190
                 0x000000000000000d 0x000000000000000d  R      1
      [Requesting program interpreter: /red/herring]
  LOAD           0x0000000000000000 0xffffffff80200000 0xffffffff80200000
                 0x00000000010559b0 0x00000000010559b0  R E    200000
  LOAD           0x0000000001056000 0xffffffff81456000 0xffffffff81456000
                 0x0000000000132638 0x000000000052ecf8  RW     200000
  DYNAMIC        0x0000000001056000 0xffffffff81456000 0xffffffff81456000
                 0x00000000000000d0 0x00000000000000d0  RW     8
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RWE    8

This is fine for the FreeBSD loader, because it completely ignores p_paddr
and instead uses p_vaddr with a hardcoded offset. Other loaders however
acknowledge p_paddr (like the Xen ELF loader), in which case they will try
to load the kernel at the wrong place. Fix this by adding an AT keyword to
the first section specifying the physical address, other sections will
follow suit, so it ends up looking like:

Entry point 0xffffffff802e7000
There are 6 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0xffffffff80200040 0x0000000000200040
                 0x0000000000000150 0x0000000000000150  R E    8
  INTERP         0x0000000000000190 0xffffffff80200190 0x0000000000200190
                 0x000000000000000d 0x000000000000000d  R      1
      [Requesting program interpreter: /red/herring]
  LOAD           0x0000000000000000 0xffffffff80200000 0x0000000000200000
                 0x00000000010559b0 0x00000000010559b0  R E    200000
  LOAD           0x0000000001056000 0xffffffff81456000 0x0000000001456000
                 0x0000000000132638 0x000000000052ecf8  RW     200000
  DYNAMIC        0x0000000001056000 0xffffffff81456000 0x0000000001456000
                 0x00000000000000d0 0x00000000000000d0  RW     8
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RWE    8

Tested on bare metal using the native FreeBSD loader and grub2 from TRUEOS.

Sponsored by: Citrix Systems R&D
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D2783
2015-06-26 07:12:17 +00:00
Konstantin Belousov
1abfd35537 Split the DMAR unit domains and contexts. Domains carry address space
and related data structures.  Contexts attach requests initiators to
domains.  There is still 1:1 correspondence between contexts and
domains on the running system, since only busdma currently allocates
them, using dmar_get_ctx_for_dev().

Large part of the change is formal rename of the ctx to domain, but
patch also reworks the context allocation and free to allow for
independent domain creation.

The helper dmar_move_ctx_to_domain() is introduced for future use, to
reassign request initiator from one domain to another.  The hard issue
which is not yet resolved with the context move is proper handling (or
reserving) RMRR entries in the destination domain as required by ACPI
DMAR table for moved context.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2015-06-26 07:01:29 +00:00
Adrian Chadd
5bbb2169d2 Un-static cpuset_which() - it's useful in other contexts, such as some
CPU set operations in my upcoming NUMA work.

Tested/compiled:

* i386 (run)
* amd64 (run)
* mips (run)
* mips64 (run)
* armv6 (built)

Sponsored by:	Norse Corp, Inc.
2015-06-26 04:14:05 +00:00
Adrian Chadd
f902ea0761 Rename seq_* to mseq_*, to avoid clashes with seq.h (namely, seq_read.) 2015-06-26 04:12:06 +00:00
Cy Schubert
b1cf398e01 Add support for additional architectures in ntp.
Differential Revision:	D2720
Reviewed by:	jmg, reoberto, andrew, ian, imp
2015-06-26 03:29:23 +00:00
Bjoern A. Zeeb
9656119da4 Another attempt to make this compile on more architectures after r284777. 2015-06-25 23:16:01 +00:00
Glen Barber
ac89815f46 Revert r284860. I was looking at the wrong files.
Sigh.

Sponsored by:	The FreeBSD Foundation
2015-06-25 20:46:11 +00:00
John-Mark Gurney
afc6dc3669 If INVARIANTS is specified, add ctor/dtor to junk memory if they are
unspecified...

Submitted by:	Suresh Gumpula at Netapp
Differential Revision:	https://reviews.freebsd.org/D2725
2015-06-25 20:44:46 +00:00
Glen Barber
de5ab6b0ab Fix an incorrect revision number.
Sponsored by:	The FreeBSD Foundation
2015-06-25 20:40:51 +00:00
Tijl Coosemans
6f071e02b8 Enable the use of __builtin_va_* for ICC.
PR:		198822
Submitted by:	Sergey Melnikov <sergey.melnikov@intel.com>
MFC after:	5 days
2015-06-25 19:39:07 +00:00
Glen Barber
695cc321dd Document r284237, file(1) updated to 5.23.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:59 +00:00
Glen Barber
4a1cddceea Document r283092, ACPICA updated to 20150515.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:57 +00:00
Glen Barber
dac680af91 Document r284329, OpenSSL update to 1.0.1o.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:55 +00:00
Glen Barber
23789c2c01 Document r258431, boot-time memory test on amd64 platforms is now
disabled by default.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:53 +00:00
Glen Barber
1610583cd3 Document r279955, autofs(5) '-noauto' map addition.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:50 +00:00
Glen Barber
d2b19afb40 Document r275681, autofs(5) '-media' map addition.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:48 +00:00
Glen Barber
5bdf94263a Update the svn revision marker.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:46 +00:00
Glen Barber
9103fff5c6 Document r284746, TSO and checksum offloading support in hv_netvsc(4).
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:44 +00:00
Glen Barber
76e2f33e15 Add missing '-' in Hyper-V.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:42 +00:00
Glen Barber
137fdb968f Document r284702, uart(4) update to support AMT on newer systems.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:40 +00:00
Glen Barber
8db57f8f88 Document r284589, fstyp(8) now recognizes ZFS and GELI filesystems.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:38 +00:00
Glen Barber
8f2fa16335 Move the crypt(3) entries from userland-programs to
userland-libraries.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:36 +00:00
Glen Barber
a597a84726 Document r284483, Blowfish crypt(3) now supports $2y$ format.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:34 +00:00
Glen Barber
0fe3d4920c Document r284297, lockstat(1) improvements.
Add ClusterHQ to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:44:31 +00:00