Commit Graph

167718 Commits

Author SHA1 Message Date
Jaakko Heinonen
d325001438 Change checkpath() to not exit on error. This is a prerequisite for
fixing the mount(8) "failok" option.

PR:		163668
Reviewed by:	Garrett Cooper, delphij (previous version)
2012-01-16 19:34:21 +00:00
David Chisnall
03c142e762 Use the signal fence builtin in stdatomic.h when using the clang atomic
builtins, rather than the __asm hack.  Somehow I missed the existence of this
builtin originally and only noticed that it was there when I went to implement
it...

Note: Trunk clang now has support for (most of) the C[++]11 atomics stuff.
Please test!

Approved by:	brooks (mentor)
2012-01-16 18:19:53 +00:00
Ivan Voras
d83064751a Add a bit of verbosity to the comment. 2012-01-16 15:47:42 +00:00
Kevin Lo
575cabed9e Fix a style bug
Spotted by:	avg
2012-01-16 14:54:48 +00:00
Gleb Smirnoff
15d2f18763 Make panic strings in m_gettype(), m_getzone(), m_cljset()
consistent.
2012-01-16 13:23:19 +00:00
Gleb Smirnoff
fe4ead276d Add missing static. 2012-01-16 12:33:55 +00:00
Gleb Smirnoff
abe5a2ce52 Remove some disabled NOTYET code. Probability of enabling it is low,
if anyone wants, he/she can take it from svn.
2012-01-16 12:31:33 +00:00
Jean-Sébastien Pédron
01a43bcf7b sh: Fix execution of multiple statements in a trap when evalskip is set
Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
    o  "-e" is set for this shell
    o  a trap is set on EXIT
    o  a function returns 1 and causes the script to abort

Reviewed by:	jilles
MFC after:	2 weeks
2012-01-16 11:07:46 +00:00
Jean-Sébastien Pédron
cb1c8e8ced sh: Test EXIT trap with multiple statements in it
Reviewed by:	jilles
MFC after:	2 weeks
2012-01-16 10:59:44 +00:00
Gleb Smirnoff
b4240b64aa m_getzone() should return only cluster zones. 2012-01-16 10:58:14 +00:00
Hans Petter Selasky
96d87d2b69 Export ttyname instead of ttyunit via the sysctl interface.
Submitted by:	Mykhaylo Yehorov
PR:		usb/164090
MFC after:	1 week
2012-01-16 10:42:43 +00:00
Kevin Lo
57eb5548c9 Add nfs export support to tmpfs(5)
Reviewed by:	kib
2012-01-16 10:25:22 +00:00
Gleb Smirnoff
56cf9dc1f6 Drop support for SIOCSIFADDR, SIOCSIFNETMASK, SIOCSIFBRDADDR, SIOCSIFDSTADDR
ioctl commands.

PR:		163524
Reviewed by:	net
2012-01-16 09:53:24 +00:00
Hans Petter Selasky
3a4a1a7f8a Export information about USB serial port unit and port numbers
directly via the sysctl interface.

Submitted by:	Mykhaylo Yehorov
PR:		usb/164090
MFC after:	1 week
2012-01-16 08:13:25 +00:00
David Xu
d22d46ce27 Insert read memory barriers. 2012-01-16 06:15:14 +00:00
Xin LI
b834944105 Match surrounding style.
Noticed by:	avg
2012-01-16 06:00:44 +00:00
David Schultz
89c570d28d Remove a confused comment and fix some minor bugs. 2012-01-16 05:23:27 +00:00
David Schultz
9c955049b4 Fix the definition of FLT_EVAL_METHOD and some minor bugs. 2012-01-16 05:23:13 +00:00
Adrian Chadd
a2d4a78a47 Stop overloading opt_global.h. 2012-01-16 05:07:32 +00:00
David Xu
29a06690ca Eliminate branch and insert an explicit reader memory barrier to ensure
that waiter bit is set before reading semaphore count.
2012-01-16 04:39:10 +00:00
David Schultz
8ff9d52cd0 Computations on NaNs are supposed to return one of the input NaNs unchanged.
Fix a few places in the sparc64 floating-point emulator where this wasn't
being handled properly.

Submitted by:	bde
2012-01-16 04:09:45 +00:00
David Schultz
7bde21b1f9 Add an implementation of fenv.h intended for platforms that lack an FPU and
use softfloat.

Thanks to Ian Lepore for testing and debugging this patch.  The fenv
regression tests pass (at least for Ian's arm chip) with this change.
2012-01-16 04:09:17 +00:00
David Schultz
86d131a04a Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support for
dynamic rounding modes, but FPUless chips that use softfloat can support it
because everything is emulated anyway.  (We presently have incomplete
support for hardware FPUs.)

Submitted by:	Ian Lepore
2012-01-16 04:08:29 +00:00
David Schultz
980ece8077 Remove functions from softfloat's Symbol.map that don't need to be exported.
Also use the proper number of underscores for internal names.  (Changing
the names should be fine, since apparently the symbols are currently
unused.)
2012-01-16 04:06:56 +00:00
David Schultz
b1d046441d Convert softfloat to use the standard exception flag and rounding macros
in fenv.h instead of the non-standard and incomplete ones in ieeefp.h.

Thanks to Ian Lepore for testing this patch.
2012-01-16 04:05:53 +00:00
David Schultz
c6c72ab9af Correct some bugs that resulted from arm/_fpmath.h being blindly copied
from the x86 version, which has a completely different long double
format.

Submitted by:	Maks Verver
2012-01-16 04:04:35 +00:00
Colin Percival
e69346d668 s/amd64/i386/ in comment. 2012-01-16 02:42:41 +00:00
Colin Percival
1934cbcc1a Copy XENHVM config file from amd64, now that i386+XENHVM works. 2012-01-16 02:42:16 +00:00
Colin Percival
206d503b92 Make XENHVM work on i386. The __ffs() function counts bits starting from
zero, unlike ffs(3), which starts counting from 1.
2012-01-16 02:38:45 +00:00
Alexander Motin
20332cc2b2 Add check to avoid assertion panic on duplicate stop.
Reported by:	Yuri Pankov <yuri.pankov@gmail.com>
MFC after:	2 months
2012-01-16 00:26:52 +00:00
Alan Cox
0b05cac3d2 When tmpfs_write() resets an extended file to its original size after an
error, we want tmpfs_reg_resize() to ignore I/O errors and unconditionally
update the file's size.

Reviewed by:	kib
MFC after:	3 weeks
2012-01-16 00:26:49 +00:00
Tim Kientzle
79ca35f323 BeagleBone uses an FTDI chip with
an altered Product ID.
2012-01-15 23:00:33 +00:00
Jilles Tjoelker
93fcb2511b sh: Fix some bugs with exit status from case containing ;&.
Also, rework evalcase() to not evaluate any tree. Instead, return the
NCLISTFALLTHRU node and handle it in evaltree().

Fixed bugs:

* If a ;& list with non-zero exit status is followed by an empty ;; or final
  list, the exit status of the case command should be equal to the exit
  status of the ;& list, not 0.

* An empty ;& case should not reset $?.
2012-01-15 21:39:38 +00:00
Andriy Gapon
996775de4b dadump: don't leak the periph lock on i/o error
Reported by:	az
MFC after:	1 week
2012-01-15 20:43:39 +00:00
Andriy Gapon
ea3282935d xlocale.h: consistently use __va_list
Plain 'va_list' in this header seems to cause troubles with non-base GCC
which creates and uses "tortured" versions of some sysem header files
including stdio.h (installed in a private 'include-fixed' directory).

Reviewed by:	theraven
X-MFC with:	r227753
2012-01-15 20:37:39 +00:00
Eitan Adler
4e529b6d78 Make man page wording more clear:
PR:		docs/164078
Submitted by:	Taras <ds@ukrhub.net>
Approved by:	bcr
MFC after:	3 days
2012-01-15 20:14:52 +00:00
Jilles Tjoelker
92371efca2 sh: Fix two bugs with case and exit status:
* If no pattern is matched, POSIX says the exit status shall be 0 (even if
  there are command substitutions).
* If a pattern is matched and there are no command substitutions, the first
  command should see the $? from before the case command, not always 0.
2012-01-15 20:04:05 +00:00
Adrian Chadd
4aecc339cf Fix the situation where net80211 is built with IEEE80211_SUPPORT_TDMA but a module
is used.

Although the module _builds_, it fails to load because of a missing symbol from
ieee80211_tdma.c.

Specifics:

* Always build ieee80211_tdma.c in the module;
* only compile in the code if IEEE80211_SUPPORT_TDMA is defined.
2012-01-15 19:45:23 +00:00
Adrian Chadd
46efd63a5b Build some more things (random, bridge/gif/gre, gpio, USB) as modules as well
so some embedded platform builds can use these instead of a fully monolithic
kernel.
2012-01-15 19:43:56 +00:00
Adrian Chadd
20926a13f1 Begin breaking out the AR71xx specific functional drivers into modules.
The USB code as it stands includes the bus glue along _with_ the controller
code. So the ohci/ehci modules actually build the USB controller code and
the PCI bus glue.

It'd be nice to ship separate modules for the PCI glue and the USB
controller (so for example if there were a USB controller hanging off
the internal SoC bus as well as an external PCI device) it could be done.

This is primarily done to save a few bytes here and there on embedded
systems with limited flash space for kernels - a very limited (sub-1MB)
space may be available for the kernel and may only support gzip encoding.
The rootfs can be LZMA compressed.
2012-01-15 19:42:55 +00:00
Adrian Chadd
3cf391a131 Allow building the GPIO bus and associated bits as modules.
This is primarily done to save a few bytes here and there on embedded
systems with limited flash space for kernels - a very limited (sub-1MB)
space may be available for the kernel and may only support gzip encoding.
The rootfs can be LZMA compressed.
2012-01-15 19:40:59 +00:00
Adrian Chadd
e33eb65865 Add the new option introduced in the previous commit. 2012-01-15 19:30:32 +00:00
Adrian Chadd
7fb4a4be07 Some of the atheros based embedded devices use one or more PCI NICs
on-board, glued to the AR71xx CPU.  These may forgo separate WMAC EEPROMs
(which store configuration and calibration data) and instead store
it in the main board SPI flash.

Normally the NIC reads the EEPROM attached to it to setup various PCI
configuration registers.  If this isn't done, the device will probe as
something different (eg 0x168c:abcd, or 0x168c:ff??.)  Other setup registers
are also written to which may control important functions.

This introduces a new compile option, AR71XX_ATH_EEPROM, which enables the
use of this particular code.  The ART offset in the SPI flash can be
specified as a hint against the relevant slot/device number, for example:

hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000
hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000

TODO:

* Think of a better name;
* Make the PCIe version of this fixup code also use this option;
* Maybe also check slot 19;
* This has to happen _before_ the SPI flash is set from memory-mapped
  to SPI-IO - so document that somewhere.
2012-01-15 19:29:33 +00:00
Adrian Chadd
a86e181b4c Break out the "memory" EEPROM data read method from being AR9130 specific
to being more generic.

Other embedded SoCs also throw the configuration/PCI register
info into flash.

For now I'm just hard-coding the AR9280 option (for on-board AR9220's on
AP94 and commercial designs (eg D-Link DIR-825.))

TODO:

* Figure out how to support it for all 11n SoC NICs by doing it in
  ar5416InitState();
* Don't hard-code the EEPROM size - add another field which is set
  by the relevant chip initialisation code.
* 'owl_eep_start_loc' may need to be overridden in some cases to 0x0.
  I need to do some further digging.
2012-01-15 19:22:34 +00:00
Mikolaj Golub
952a0c3eed In kvm_argv(), the case when the supplied buffer was too short to hold the
requested value was handled incorrectly, and the function retuned NULL
instead of the truncated result.

Fix this and also remove unnecessary check for buf != NULL, which alway
retuns true.

MFC after:	3 days
2012-01-15 18:51:07 +00:00
Mikolaj Golub
fe7f89b71a Abrogate nchr argument in proc_getargv() and proc_getenvv(): we always want
to read strings completely to know the actual size.

As a side effect it fixes the issue with kern.proc.args and kern.proc.env
sysctls, which didn't return the size of available data when calling
sysctl(3) with the NULL argument for oldp.

Note, in get_ps_strings(), which does actual work for proc_getargv() and
proc_getenvv(), we still have a safety limit on the size of data read in
case of a corrupted procces stack.

Suggested by:	kib
MFC after:	3 days
2012-01-15 18:47:24 +00:00
Nathan Whitehorn
f7952747f6 Pick a constant high IRQ value for the PS3 IPI, which lets PS3 devices be
usefully loaded and unloaded as modules.

Submitted by:	geoffrey dot levand at mail dot ru
MFC after:	2 weeks
2012-01-15 18:26:43 +00:00
Martin Matuska
9cbe30e1d5 Fix missing in r230129:
kern_jail.c: initialize fullpath_disabled to zero
vfs_cache.c: add missing dot in comment

Reported by:	kib
MFC after:	1 month
2012-01-15 18:08:15 +00:00
Eitan Adler
63491e82be Remove duplicate line from usage
PR:		bin/164139
Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
Approved by:	nwhitehorn
MFC after:	3 days
2012-01-15 17:01:28 +00:00
Nathan Whitehorn
d4a7df2e65 Fix some unreliability problems related to MSR bits inherited from kboot by
setting an absolute MSR when during on the MMU. This prevents delay(), in
particular, from intermittently malfunctioning.
2012-01-15 16:58:44 +00:00