Commit Graph

184717 Commits

Author SHA1 Message Date
Jason Evans
2b06b2013c Update jemalloc to version 3.4.1. 2013-10-21 05:10:46 +00:00
Mark Johnston
7e75d58610 When fetching function arguments out of a frame on amd64, explicitly select
the register based on the argument index rather than relying on the fields
in struct reg to be in the right order. This assumption is incorrect on
FreeBSD and generally led to bogus argument values for the sixth argument
of PID and USDT probes; the first five are passed directly to dtrace_probe()
via the fasttrap trap handler and so were correctly handled.

MFC after:	2 weeks
2013-10-21 04:15:55 +00:00
Nathan Whitehorn
72c775da6c Fix 80-column line wrapping in a comment. 2013-10-21 00:58:35 +00:00
Kirk McKusick
58941b9f15 Restructuring of the soft updates code to set it up so that the
single kernel-wide soft update lock can be replaced with a
per-filesystem soft-updates lock. This per-filesystem lock will
allow each filesystem to have its own soft-updates flushing thread
rather than being limited to a single soft-updates flushing thread
for the entire kernel.

Move soft update variables out of the ufsmount structure and into
their own mount_softdeps structure referenced by ufsmount field
um_softdep.  Eventually the per-filesystem lock will be in this
structure. For now there is simply a pointer to the kernel-wide
soft updates lock.

Change all instances of ACQUIRE_LOCK and FREE_LOCK to pass the lock
pointer in the mount_softdeps structure instead of a pointer to the
kernel-wide soft-updates lock.

Replace the five hash tables used by soft updates with per-filesystem
copies of these tables allocated in the mount_softdeps structure.

Several functions that flush dependencies when too many are allocated
in the kernel used to operate across all filesystems. They are now
parameterized to flush dependencies from a specified filesystem.
For now, we stick with the round-robin flushing strategy when the
kernel as a whole has too many dependencies allocated.

While there are many lines of changes, there should be no functional
change in the operation of soft updates.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
2013-10-21 00:28:02 +00:00
Nathan Whitehorn
6064b6ac48 Allow the OFW interrupt mapping code to work with PCI devices not enumerated
by Open Firmware, as in the case of FDT.
2013-10-21 00:04:26 +00:00
Ian Lepore
6dd028d8f8 Calculate the baud rate divisor rather than using a hard-coded value.
Submitted by:	Steven Lawrance <stl@koffein.net>
2013-10-20 23:40:16 +00:00
Nathan Whitehorn
58ac6f25fa Avoid sign overflow if there are more than 2 GB of RAM. 2013-10-20 23:02:16 +00:00
Justin T. Gibbs
bef54b1b5f The Xen userland event channel driver isn't complete. Disabled it
from the kernel build until it is ready.

sys/conf/files:
	Remove the entry for xen/evtchn/evtchn_dev.c so it is not included
	in any kernel builds.

Noticed by:	smh
2013-10-20 22:50:57 +00:00
Kirk McKusick
cc76ac5a6c Fourth of several cleanups to soft dependency implementation.
Add KASSERTS that soft dependency functions only get called
for filesystems running with soft dependencies. Calling these
functions when soft updates are not compiled into the system
become panic's.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
2013-10-20 22:21:01 +00:00
Ian Lepore
7a2ed7a8f4 Add configuration for the Freescale i.MX53 Quick Start Board. 2013-10-20 21:21:07 +00:00
Kirk McKusick
519e3c3b9f Third of several cleanups to soft dependency implementation.
Ensure that softdep_unmount() and softdep_setup_sbupdate()
only get called for filesystems running with soft dependencies.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
2013-10-20 21:11:40 +00:00
Ian Lepore
dc82313758 Add a driver for the Freescale Fast Ethernet Controller found on various
Freescale SoCs including the i.MX series.  This also works for the newer
SoCs with the ENET gigabit controller, but doesn't use any of the new
hardware features other than enabling gigabit speed.
2013-10-20 21:07:38 +00:00
Jilles Tjoelker
0b89df4a57 syslog: Use SOCK_CLOEXEC instead of separate fcntl() call. 2013-10-20 21:04:44 +00:00
Ian Lepore
62e8bfb82a Switch to using the standard uart console driver instead of the special
driver for early boot debugging.
2013-10-20 21:03:15 +00:00
Kirk McKusick
90a306d8af Second of several cleanups to soft dependency implementation.
Delete two unused functions in ffs_sofdep.c.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
2013-10-20 20:52:07 +00:00
Jilles Tjoelker
02804449a2 popen(): Try to prevent inappropriate fd passing even if 'e' is not used.
Even though not all race conditions can be fixed if the 'e' option is not
used, still fix some race conditions using pipe2():

* Prevent both ends of the pipe from leaking to a concurrent popen().

* Prevent the child process's end of the pipe from leaking to any concurrent
  fork and exec.

This change also simplifies the code.
2013-10-20 20:50:17 +00:00
Kirk McKusick
8850120f48 First of several cleanups to soft dependency implementation.
Convert three functions exported from ffs_softdep.c to static
functions as they are not used outside of ffs_softdep.c.

No functional change.

Tested by:    Peter Holm and Scott Long
Sponsored by: Netflix
2013-10-20 20:41:38 +00:00
Jilles Tjoelker
ea6247173f pathchk: Ensure bytes >= 128 are considered non-portable characters.
This was not broken on architectures such as ARM where char is unsigned.

Also, remove the first non-portable character from the output. POSIX does
not require this, and printing the first byte may yield an invalid byte
sequence with UTF-8.

PR:		bin/165988
Reported by:	Nicolas Rachinsky
2013-10-20 20:10:31 +00:00
Nathan Whitehorn
e4cf0633b8 Since the PS3 port was committed, the AIM nexus device works perfectly fine
on all PowerPC platforms, whether or not they have Open Firmware. Remove
some more duplication and have there be only one nexus driver.
2013-10-20 18:40:55 +00:00
Nathan Whitehorn
457639351b Some nexus devices add wildcard children. Since fdtbus_probe returned
BUS_PROBE_DEFAULT, it would attach to them all, producing both many
fdtbus instances and preventing other devices from attaching. Instead
return BUS_PROBE_NOWILDCARD, which exists for exactly this purpose.
2013-10-20 18:38:19 +00:00
Nathan Whitehorn
228f09b3ef Replace the two almost-exactly-identical AIM and Book-E clock.c
implementations with a single one after the application of a very small
amount of #ifdef.
2013-10-20 16:37:03 +00:00
Nathan Whitehorn
1cfdc97153 Unify the AIM and Book-E vm_machdep.c implementations, which previously
differed only with respect to the AIM version not following style(9) and
some additional features for 64-bit systems and machines with direct maps
in the AIM implementation that are no-ops on Book-E (at least for now).
2013-10-20 16:14:03 +00:00
Andrew Turner
9bff0a1d6a Merge from projects/arm_eabi_vfp r255380:
Fix the VCVT instruction. It must round towards zero when converting from
a floating-point to an integer value. This was not the case causing issues
when printing certain values.

There is a VCVTR instruction that will round depending on the current
rounding mode. We don't yet support this instruction, or setting the
rounding mode.
2013-10-20 15:13:32 +00:00
Nathan Whitehorn
6c20c40f32 Add multicast filter control. 2013-10-20 14:01:09 +00:00
Antoine Brodin
ced2ec338c Add more obsolete files 2013-10-20 13:41:42 +00:00
Gavin Atkinson
ee0d8611db Add 26 new device IDs to uslcom(4). This brings us in sync with Linux
v3.12 rc5.

MFC after:	3 days
2013-10-20 11:19:37 +00:00
Nathan Whitehorn
af4c3211f8 Clean up some debug code that snuck in. Add a block comment on future work. 2013-10-20 01:40:59 +00:00
Nathan Whitehorn
757e5b2917 Add initial driver for POWER hypervisor interpartition ethernet. This is
sufficient to pass traffic but needs some more work before merging to
STABLE.
2013-10-20 01:31:09 +00:00
Nathan Whitehorn
0ef685586f Allow hypervisor calls with more than 7 arguments. 2013-10-20 01:28:39 +00:00
Colin Percival
004fc69c12 Bump __FreeBSD_version to 1100001 for addition of support for "first boot"
rc.d scripts, so that ports can make use of this.
2013-10-19 21:55:42 +00:00
Colin Percival
cabad26453 Add support for "first boot" rc.d scripts. [1]
These scripts, containing
# KEYWORD: firstboot
will only be run if a sentinel file (default: /firstboot, configurable
via the rc.conf ${firstboot_sentinel} variable) exists; this sentinel
file will be deleted at the end of the boot process.

Scripts can request that the system reboot after the first boot by
creating the file ${firstboot_sentinel}-reboot.

This functionality is expected to be useful for embedded systems and
virtual machine images, where it may be desirable to
(a) download and install updates which became available between when
the image was created and when it was "turned on";
(b) download and install packages which may be newer than those
which were available when the image was created;
(c) install packages which run binaries during their install process,
bypassing the problem of cross-architecture installs;
(d) resize filesystems to match the disk onto which a VM image was
installed;
(e) perform initialization tasks relevant to cloud systems (e.g.,
Amazon's Elastic Compute Cloud);
and likely to perform many other one-time initialization functions.

Document this new functionality in rc.conf(5) and rc(8). [2]

Reviewed by:	freebsd-current, freebsd-rc [1]
Reviewed by:	Warren Block [2]
MFC after:	3 days
2013-10-19 21:37:06 +00:00
Ian Lepore
ac640932f4 Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing. 2013-10-19 21:33:06 +00:00
John-Mark Gurney
ff14d523bb Enable the automatic creation of a certificate (if one does not exists)
and enable the usage by sendmail if sendmail is enabled.  Include and
document knobs to disable this feature and also set the Common Name of
the certificate created.

As the certificate is signed w/ a discarded key, it only helps prevent
Eve, but not Malory from knowing the contents of the emails.

This means that new installs (and people that use the updated freebsd.mc
file) will automaticly have STARTTLS enabled allowing incoming email to
be encrypted in most cases.

Reviewed by:	gshapiro
MFC after:	3 days
Security:	Yes, please.
2013-10-19 18:51:06 +00:00
Kevin Lo
9768475eb0 - Add parentheses to all internet addresses
- All the casts to uint32_t should be to in_addr_t

Suggested by:	bde
Reviewed by:	bde
2013-10-19 18:13:32 +00:00
Jean-Sébastien Pédron
ea92d5372d drm/radeon: radeonkms depends on firmware(9)
Submitted by:	tijl@
2013-10-19 17:11:58 +00:00
Gavin Atkinson
65008e03e7 Improve bootstrapping message
MFC after:	3 days
2013-10-19 15:36:21 +00:00
Dag-Erling Smørgrav
487a635bdc Last few remnants of BIND (hopefully...)
MFC after:	3 days
2013-10-19 10:00:51 +00:00
Dag-Erling Smørgrav
6c1336a96c Do not error out when adding an interface to a group to which it
already belongs or removing it from a group to which it does not
belong.  This makes it possible to include group memberships in
ifconfig_foo0 in rc.conf without fear of breaking "service netif
restart foo0".

MFC after:	3 days
2013-10-19 09:59:11 +00:00
Dag-Erling Smørgrav
0016a84955 Allow ~ in file names so libtool droppings in contrib don't break updates.
It has happened twice now, and is likely to happen again.

Errata notice candidate.
2013-10-19 09:40:29 +00:00
Edward Tomasz Napierala
fb0e57b1a2 Fix build with gcc by spelling unused format string as "unused" instead of NULL.
MFC after:	29 days
2013-10-19 08:20:00 +00:00
Rui Paulo
7bb2d4b324 Plug kyua into the 'test' target.
If kyua exists in KYUA_PREFIX, the test target is automatically
defined to use it for the execution of test programs.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:52:06 +00:00
Rui Paulo
30cc088dc0 Plug atf-run into the 'test' target.
If atf-run exists in ATF_PREFIX and if ALLOW_DEPRECATED_ATF_TOOLS has
been set to yes, the test target is automatically defined to use it
for the execution of test programs.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:51:34 +00:00
Rui Paulo
25b6a535fa Add the automatic generation of Kyuafile files.
These files are generated from bsd.test.mk because kyua is able to run
test programs implemented using different libraries/frameworks.  In
order to make this possible, this change also extends the various
*.test.mk file to explicitly indicate the interface of every test
program.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:50:56 +00:00
Rui Paulo
26ea29af54 Add the automatic generation of Atffile files.
These are only used by the deprecated atf-run and atf-report tools.
Generating them is easy and provides a mechanism for people to
experiment with these tools if they wish.

But, because these tools and files are deprecated, doing this only
happens if the user has explicitly set ALLOW_DEPRECATED_ATF_TOOLS
to yes.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:50:17 +00:00
Rui Paulo
d4a14c8563 Clearly split the logic to build ATF and plain tests apart.
This change introduces a new plain.test.mk file that provides the build
infrastructure to build test programs that don't use any framework.
Most of the code previously in bsd.test.mk moves to plain.test.mk and
atf.test.mk is extended with the missing pieces.

In doing so, this change pushes all test program building logic to the
various *.test.mk files instead of trying to reuse some tiny bits.
In fact, this attempt to reuse some definitions makes the code harder
to read and harder to extend.

The clear benefit of this is that the interface of bsd.test.mk is now
clearly delimited.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:48:49 +00:00
Randall Stewart
03466868c3 Corrects the Kirkwood dreamplug to use
the right register for power managment. It
was incorrectly using the clock register
which also caused the status to be the
opposite of what it is supposed to be.
1 - its disabled
0 - its enabled

Per kirkwood spec FSS_88F6180_9x_6281_OpenSource.pdf
2013-10-19 06:47:02 +00:00
Olivier Houchard
f8c98b1227 There's no need to guard pmap_extract(), it won't be called until well after
the VM has been properly initialized.

Spotted out by:	alc
2013-10-18 22:47:10 +00:00
Brooks Davis
1a440eb2c0 MFP4: 1136252
Add an option ATSE_CFI_HACK to allow memory mapped CFI devices to have
their address range allocated sharable so that atse(4) can find it's
Ethernet address in the expected location.

We intend to remove this hack once the BERI platform has a loader.
2013-10-18 20:52:42 +00:00
Brooks Davis
f570e9e145 MFP4: 221483, 221567, 221568, 221670, 221677, 221678, 221800, 221801,
221804, 221805, 222004, 222006, 222055, 222820, 1135077, 1135118, 1136259

Add atse(4), a driver for the Altera Triple Speed Ethernet MegaCore.

The current driver support gigabit Ethernet speeds only and works with
the MegaCore only in the internal FIFO configuration in the soon to be
open sourced BERI CPU configuration.

Submitted by:	bz
MFC after:	3 days
Sponsored by:	DARPA/AFRL
2013-10-18 20:44:19 +00:00
Hans Petter Selasky
2c452d7400 Improve XHCI stability. When a command timeout happens, the command
should be aborted else the command queue can stop. Refer to section
"4.6.1.2" of the XHCI specification.

MFC after:	1 week
2013-10-18 17:38:57 +00:00