Commit Graph

182147 Commits

Author SHA1 Message Date
Rui Paulo
95506b814d The mbox driver is actually MP safe, so set the right flag in
bus_setup_intr().
2013-07-01 06:33:35 +00:00
Rui Paulo
623b72a733 Disable debugging. 2013-07-01 06:32:56 +00:00
Rui Paulo
b7a6be5c7c Use the new FDT_FILE rpi.dts. 2013-07-01 05:01:27 +00:00
Rui Paulo
236bc8374d Split bcm2835-rpi-b.dts into bcm2835.dtsi and rpi.dts. This DTS actually works
on all R-Pi models because VideoCore binary patches it during boot.

Reviewed by:	gonzo
2013-07-01 05:01:01 +00:00
Gleb Kurtsou
e5a5b5b64e Don't assume that UFS on-disk format of a directory is the same as
defined by <sys/dirent.h>

Always start parsing at DIRBLKSIZ aligned offset, skip first entries if
uio_offset is not DIRBLKSIZ aligned. Return EINVAL if buffer is too
small for single entry.

Preallocate buffer for cookies. Cookies will be replaced with d_off
field in struct dirent at later point.

Skip entries with zero inode number.

Stop mangling dirent in ufs_extattr_iterate_directory().

Reviewed by:	kib
Sponsored by:	Google Summer Of Code 2011
2013-07-01 04:06:40 +00:00
Pedro F. Giffuni
60f7df4c1b Change i_gen in UFS to an unsigned type.
Missed format specifier.

Reported by:	mdf
MFC after:	4 weeks
2013-07-01 03:31:19 +00:00
Mikolaj Golub
9e89077c65 Plug up the lock lock leakage when exporting to a short buffer.
Reported by:	Alexander Leidinger
Submitted by:	mjg
MFC after:	1 week
2013-07-01 03:27:14 +00:00
Pedro F. Giffuni
eee4072f13 Change i_gen in UFS to an unsigned type.
In UFS, i_gen is a random generated value and there is not way for
it to be negative. Actually, the value of i_gen is just used to
match bit patterns and it is of not consequence if the values are
signed or not.

Following other filesystems, set it to unsigned and use it as such,

Discussed by:	mckusick
Reviewed by:	mckusick (previous version)
MFC after:	4 weeks
2013-07-01 03:00:15 +00:00
Konstantin Belousov
70a7dd5d5b Fix issues with zeroing and fetching the counters, on x86 and ppc64.
Issues were noted by Bruce Evans and are present on all architectures.

On i386, a counter fetch should use atomic read of 64bit value,
otherwise carry from the increment on other CPU could be lost for the
given fetch, making error of 2^32.  If 64bit read (cmpxchg8b) is not
available on the machine, it cannot be SMP and it is enough to disable
preemption around read to avoid the split read.

On x86 the counter increment is not atomic on purpose, which makes it
possible for the store of the incremented result to override just
zeroed per-cpu slot.  The effect would be a counter going off by
arbitrary value after zeroing.  Perform the counter zeroing on the
same processor which does the increments, making the operations
mutually exclusive.  On i386, same as for the fetching, if the
cmpxchg8b is not available, machine is not SMP and we disable
preemption for zeroing.

PowerPC64 is treated the same as amd64.

For other architectures, the changes made to allow the compilation to
succeed, without fixing the issues with zeroing or fetching.  It
should be possible to handle them by using the 64bit loads and stores
atomic WRT preemption (assuming the architectures also converted from
using critical sections to proper asm).  If architecture does not
provide the facility, using global (spin) mutex would be non-optimal
but working solution.

Noted by:  bde
Sponsored by:	The FreeBSD Foundation
2013-07-01 02:48:27 +00:00
Rui Paulo
7476f6973c Add INET6. 2013-06-30 23:29:24 +00:00
Robert Millan
2592710c47 Enable kernel-specific code for FreeBSD also on other systems that use
the kernel of FreeBSD.

Reviewed by:	pjd
2013-06-30 23:14:55 +00:00
Kai Wang
3254dc0a2b When decoding SLEB128, make sure sign extension is performed for
64-bit integers.

MFC after:	3 days
2013-06-30 21:06:47 +00:00
Jilles Tjoelker
61c2a6184e libc: Access _sigintr more efficiently.
The variable _sigintr is not exported via the version script; therefore,
tell the compiler that no indirection (to allow interposition) is needed.
2013-06-30 20:51:15 +00:00
Mateusz Guzik
214e08782b killall: add -q flag to suppress error message when no processes are matched
Man-page text provided by wblock.

PR:		bin/30542
Submitted by:	Tony Finch <dot@dotat.at> (original version)
MFC after:	1 week
2013-06-30 20:27:31 +00:00
Aleksandr Rybalko
71c80b4ea0 Replace some spaces to tab. 2013-06-30 19:53:52 +00:00
Hiroki Sato
b8c357fdca Add "ether" and "link" to ifconfig_alias{es,N}. 2013-06-30 19:52:45 +00:00
Aleksandr Rybalko
8f1bc52dfb Decrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.
Submitted by:	Ruslan Bukin <br@bsdpad.com>
2013-06-30 19:52:41 +00:00
Olivier Houchard
247602e3ea In generic_bs_map(), use kmem_alloc_nofault() instead of kmem_alloc(), as we
only need virtual addresses.

Submitted by:	alc
2013-06-30 19:36:17 +00:00
Benjamin Kaduk
10038699fb Grammar tweaks for locking.9
Reviewed by:	jhb
Approved by:	hrs (mentor)
2013-06-30 19:33:07 +00:00
Mateusz Guzik
f15ba03632 acct: create a special plimit object and set it for exiting processes
instead of allocating new one each time

All limits are set to RLIM_INFINITY which sould be ok (even though we
care only about RLIMT_FSIZE in this case).

MFC after:	1 week
2013-06-30 19:08:06 +00:00
Jens Schweikhardt
1862d13b8a Correct some grammar. 2013-06-30 17:59:40 +00:00
Simon J. Gerraty
03630b541e Use && rather than ; when success of previous job matters. 2013-06-30 15:00:07 +00:00
Mateusz Guzik
4a3c4f41e9 acct: reduce code duplication by using acct_disable as cleanup for
failed kproc_create

MFC after:	1 week
2013-06-30 13:17:37 +00:00
Mateusz Guzik
8f99c21f94 truss: recognize O_DIRECTORY, O_EXEC, O_TTY_INIT and O_CLOEXEC
MFC after:	3 days
2013-06-30 13:14:46 +00:00
Ed Schouten
70f536371e Make atomic_fetch_add() and atomic_fetch_sub() work for pointers with GCC 4.2.
According to the standard, atomic_fetch_*() has to behave identical to
regular arithmetic. This means that for pointer types, we have to apply
the stride when doing addition/subtraction.

The GCC documentation seems to imply this is done for __sync_*() as
well. Unfortunately, both tests and Googling seems to reveal this is not
really the case. Fix this by performing the multiplication with the
stride manually.
2013-06-30 10:38:20 +00:00
Ed Schouten
cd8b04c906 Convert this piece of code to use C11 atomics.
As mentioned before, we should at least aim to have one piece of code in
both user space and kernel space that uses C11 atomics, to get some
coverage. This piece of code can be migrated trivially, so it's a good
candidate.
2013-06-30 08:59:33 +00:00
Ed Schouten
1488e633d1 Make various fixes to <stdatomic.h>.
- According to the standard, memory_order is a type. Use a typedef.

- atomic_*_fence() and atomic_flag_*() are described by the standard as
  functions. Use inline functions to implement them.

- Only expose the atomic_*_explicit() functions in kernel space. We
  should not use the short-hand functions, as they will always use
  memory_order_seq_cst.
2013-06-30 08:54:41 +00:00
Hiroki Sato
3fbceebb4a Fix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import.
Reviewed by:	dfr
2013-06-30 07:46:22 +00:00
Hiroki Sato
33cfdcc3ba Do not display a warning message in a jail without AF_INET6 support.
MFC after:	3 days
2013-06-30 07:37:31 +00:00
Rui Paulo
efb6af5c24 Fix a typo. 2013-06-30 06:05:32 +00:00
Rui Paulo
d718126e58 Fix the RSSI calculation. 2013-06-30 06:04:00 +00:00
Pyun YongHyeon
b584d2b3f4 Fix triggering false watchdog timeout as done in bce(4) when
controller is in PAUSE state.
2013-06-30 05:56:13 +00:00
Rui Paulo
bd3d8bed6c Fix the ni_txrate calculation. 2013-06-30 05:25:24 +00:00
Pyun YongHyeon
d925c58c98 Fix triggering false watchdog timeout when controller is in PAUSE
state.  Previously it used to check if controller has sent a
PAUSE frame to the remote peer.

Reported by:	David Imhoff via Brad Smith <brad@OpenBSD.org>
Submitted by:	davidch (initial version)
Reviewed by:	davidch, David Imhoff <dimhoff_devel@xs4all.nl>
2013-06-30 05:12:18 +00:00
Rui Paulo
fd57292555 Fix a reference count bug in urtwn_ra_init(). 2013-06-30 05:10:33 +00:00
Hiren Panchasara
0536a9b831 Adding myself to the calendar!
Approved by:	sbruno (mentor)
2013-06-30 01:20:59 +00:00
Hiren Panchasara
50c5badfaa Fixing incorrect id for Intel Centrino Wireless-N 130.
PR:             kern/180094
Submitted by:   Cedric <cg@cgross.info>
Approved by:    sbruno (mentor)
MFC after:      3 weeks
2013-06-30 01:05:24 +00:00
Pedro F. Giffuni
e2bc2ccec0 ext2fs: Use the complete random() range in i_gen.
i_gen is unsigned in ext2fs so we can handle the complete
32 bits.

MFC after:	1 week
2013-06-30 00:42:51 +00:00
Aleksandr Rybalko
94addbe133 Arndale Board (by Insignal) kernel config file.
More info on the Wiki page https://wiki.freebsd.org/FreeBSD/arm/ArndaleBoard

Submitted by:	Ruslan Bukin <br@bsdpad.com>
Reviewed by:	gonzo
2013-06-29 23:58:16 +00:00
Oleksandr Tymoshenko
396e0d581d - Fix IMAPx registers values calculation
- Initialize SMAPx registers too although they're unused in QEMU
- Do not pass IO/MEM resources to upper bus for activation, handle them locally.
    Previously ACTIVATE method of upper bus was no-op so nothing bad
    happened. But now FDT maps physaddr to vaddr and it causes
    troubles: fdtbus_activate_resource resource assumes that
    bustag/bushandle are already set which in this case is wrong.
2013-06-29 23:51:17 +00:00
Aleksandr Rybalko
5d490515c3 Teach UART to attach Exynos/s3/s5 class driver.
Submitted by:	Ruslan Bukin <br@bsdpad.com>
Reviewed by:	gonzo
2013-06-29 23:48:08 +00:00
Oleksandr Tymoshenko
cbda62170f Enable patth-through of IRQ30 and IRQ31 to PIC just as comment states 2013-06-29 23:40:44 +00:00
Steven Hartland
3666c4917b style(9) fixes
MFC after:	2 days
2013-06-29 23:39:38 +00:00
Aleksandr Rybalko
02d93bedab Import basic support for Samsung Exynos 5 support.
Submitted by:	Ruslan Bukin <br@bsdpad.com>
Reviewed by:	gonzo
2013-06-29 23:39:05 +00:00
Steven Hartland
baa0b41221 Remove invalid ASSERT which causes a panic on zfs renames when run with ASSERTS.
Removal was missed in merge of illumos 3464 (r248571)

MFC after:	2 days
2013-06-29 23:15:45 +00:00
Xin LI
8f8de1e127 - Modify swapon(8) so that it uses most of geli(8) defaults for swap,
which is presently: AES-XTS, no authentication.  Create provider
   with pagesize as sectorsize by default.
 - Rewrite parsing code for geli(8)-backed swap options, now options
   are required to be exact match, and unrecognized options will trigger
   a warning.
 - Don't initialize GELI device if it's already initialized.  This
   restores previous behavior.
 - Don't duplicate file descriptor when working with geli(8) and
   gbde(8) as there is no need to communicate with the utility other
   than exit status.
 - When calling swap_on_off_* routines, which_prog can only be SWAP_ON
   or SWAP_OFF.  Eliminate unneeded case branches by replacing switch
   with if's.
 - Plug a few memory leaks.

Reviewed by:	hrs (but bugs are mine)
MFC after:	1 week
X-MFC-with:	r252310, r252332, r252345
2013-06-29 22:04:04 +00:00
Dimitry Andric
914922decc Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by:	dt71@gmx.com
MFC after:	3 days
2013-06-29 20:17:14 +00:00
Ed Schouten
f758648022 Don't let hastd use C11 atomics.
Due to possible concerns about the stability of C11 atomics, use our
existing atomics API instead.

Requested by:	pjd
2013-06-29 20:13:39 +00:00
Adrian Chadd
2524554832 Don't log anything if npkts == 0.
This occurs at RX DMA start, even though the RX FIFO has plenty of
space. I'll go figure out why, but this shouldn't cause people to
be spammed by these messages.
2013-06-29 19:57:57 +00:00
Scott Long
e64112de60 Introduce accessors for the ccb status word. Convert one (of many more)
modules to use it, will convert the others once the appropriate shed
color is selected by consensus.

Obtained from:	Netflix
MFC after:	3 days
2013-06-29 17:48:59 +00:00