Commit Graph

183222 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
50079a51bb Implement fdclosedir(3) function, which is equivalent to the closedir(3)
function, but returns directory file descriptor instead of closing it.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
2013-08-18 20:11:34 +00:00
Pawel Jakub Dawidek
a8717658d3 Remove redundant space. 2013-08-18 20:06:35 +00:00
Tijl Coosemans
ce158c1c41 Change the return type of the fallback implementation of the
atomic_compare_exchange_* macros in stdatomic.h to _Bool.
2013-08-18 19:37:35 +00:00
Ian Lepore
677ee4943a Add a new SDHCI_QUIRK_DONT_SHIFT_RESPONSE for hardware that pre-shifts
the response bits the way we do in software.  While the hardware is just
doing the sensible thing rather than leaving it to the software, it's in
violation of the spec by doing so.  Grrrr.
2013-08-18 19:08:53 +00:00
Olivier Houchard
7f144242fc Increase the max KVA available for general consumption on the Exynos 5.
Submitted by:	Ruslan Bukin <br@bsdpad.com>
2013-08-18 18:08:12 +00:00
Andrew Turner
465f478c8b Enable VFP in the Versatile PB (QEMU) kernel. Tested on QEMU 1.6.0. 2013-08-18 17:18:52 +00:00
Andrew Turner
a61bd6da09 Enable VFP on the CubieBoard and CubieBoard 2. 2013-08-18 16:16:36 +00:00
Pawel Jakub Dawidek
f69e5b30c9 Regenerate after r254491. 2013-08-18 13:38:39 +00:00
Pawel Jakub Dawidek
32536142f6 The cap_rights_limit(2) system calls needs a wrapper for 32bit binaries
running under 64bit kernels as the 'rights' argument has to be split
into two registers or the half of the rights will disappear.

Reported by:	jilles
Sponsored by:	The FreeBSD Foundation
2013-08-18 13:37:54 +00:00
Pawel Jakub Dawidek
d6f6b87647 Move the PAIR32TO64() macro and the RETVAL_HI/RETVAL_LO defines to a
header file for use by other .c files.

Sponsored by:	The FreeBSD Foundation
2013-08-18 13:34:11 +00:00
Jilles Tjoelker
6fbdb9f4f1 Disallow opening a POSIX message queue for execute.
O_EXEC was formerly ignored, so equivalent to O_RDONLY.

Reject O_EXEC with [EINVAL] like the invalid mode 3.
2013-08-18 13:27:04 +00:00
Jilles Tjoelker
7b22b8da2f dup3(3): Replace copyright notice.
Although I copied dup(2) to create dup3(3), I removed almost all the
non-boilerplate, so dup3(3) is copyright me.

Reported by:	bjk
2013-08-18 13:25:18 +00:00
Andrew Turner
56b8c3f674 Enable VFP support on EFIKA MX. 2013-08-18 11:54:20 +00:00
Pawel Jakub Dawidek
d92167993d Cast argument of is*() ctype functions to unsigned char.
Without the cast there is ambiguity between 0xFF and -1 (EOF).

Suggested by:	jilles
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
2013-08-18 11:25:42 +00:00
Pawel Jakub Dawidek
f5ffdfc18b Make the "FD" column one character wider, so that "trace" can also align
properly.
2013-08-18 10:44:37 +00:00
Pawel Jakub Dawidek
0237ec97ff Consistently use 'af' as an argument name for address family.
Now both gethostbyname2(3) and gethostbyaddr(3) use the same argument name.
The same argument name is also used in implementations of those functions.
2013-08-18 10:38:59 +00:00
Pawel Jakub Dawidek
c65779d460 Make example more correct (errstr is a pointer, not boolean). 2013-08-18 10:33:46 +00:00
Pawel Jakub Dawidek
e11dc435ba Regenerate after r254481. 2013-08-18 10:31:30 +00:00
Pawel Jakub Dawidek
0dac22d8ea Implement 32bit versions of the cap_ioctls_limit(2) and cap_ioctls_get(2)
system calls as unsigned longs have different size on i386 and amd64.

Reported by:	jilles
Sponsored by:	The FreeBSD Foundation
2013-08-18 10:30:41 +00:00
Pawel Jakub Dawidek
417ffc66fa Add process descriptors support to the GENERIC kernel. It is already being
used by the tools in base systems and with sandboxing more and more tools
the usage should only increase.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
MFC after:	1 month
2013-08-18 10:21:29 +00:00
Pawel Jakub Dawidek
cb96d03ac5 Better organize the filecaps structure, which reduces its size from 32 bytes
to 24 bytes on 64bit archs.
2013-08-18 09:45:52 +00:00
Adrian Chadd
f7cd52247d Add in missing events for Sandy Bridge Xeon.
* Add in MEM_LOAD_UOPS_LLC_HIT_RETIRED for both sandy bridge and sandy
  bridge Xeon.  Right now it only is enabled for Sandy Bridge.
* D2/0F is actually a combination rather than a separate counter, so
  just flip that on for the CPU types that support it.

There's an errata for using this on SB Xeon hardware - I've documented
it in kern/181346.

Tested:

* Sandy Bridge
* Sandy Bridge Xeon

Sponsored by:	Netflix, Inc.
2013-08-18 06:08:52 +00:00
Hiroki Sato
afe41db1ab Use sysctl(ICMPV6CTL_ND6_DRLIST) instead of SIOCGDRLST_IN6 ioctl. 2013-08-17 22:13:26 +00:00
Mark Johnston
c6cb04a463 Update the SDT(9) man page with the macros added in 254468. Also change the
existing examples to not pass an mbuf as a probe argument. There's no
obvious reason to have it there, and it doesn't really jibe with the example
added in this revision.

MFC after:	1 week
2013-08-17 22:06:30 +00:00
Mark Johnston
7bc992c037 Add a "translated type" argument to SDT_PROBE_ARGTYPE() and add some macros
which allow one to define SDT probes that specify translated types. The idea
is to make it easy to write SDT probe definitions that can work across
multiple operating systems. In particular, this makes it possible to port
illumos SDT probes to FreeBSD without changing their argument types, so long
as the appropriate translators are defined. Then DTrace scripts written for
Solaris/illumos will work on FreeBSD without any changes.

MFC after:	1 week
2013-08-17 22:02:26 +00:00
Mark Johnston
1570438586 Remove a couple of unused macros.
MFC after:	3 days
2013-08-17 21:53:37 +00:00
Neel Natu
0ef2ab3ab8 Bump up the maximum addressable memory on amd64 systems from 1TB to 4TB.
Bump up the KVA size proportionally from 512GB to 2TB.

The number of page table pages used by the direct map is now calculated at
run time based on 'Maxmem'. This means the small memory systems will not
see any additional tax in terms of page table pages for the direct map.

However all amd64 systems, regardless of the memory size, will use 3 more
pages to accomodate the bump in the KVA size.

More details available here:
http://lists.freebsd.org/pipermail/freebsd-hackers/2013-June/043015.html
http://lists.freebsd.org/pipermail/freebsd-current/2013-July/043143.html

Tested with the following configurations:
- Sandybridge server with 64GB of memory.
- bhyve VM with 64MB of memory.
- bhyve VM with a 8GB of memory with the memory segment above 4GB cuddling
  right up against the 4TB maximum memory limit.

Discussed on:	hackers@, current@
Submitted by:	Chris Torek (torek@torek.net)
2013-08-17 19:49:08 +00:00
Ed Maste
e03808759b Correct implementation of atomic_flag_test_and_set
The function sets the flag and returns the previous value (7.17.8.1).
2013-08-17 19:34:41 +00:00
Ian Lepore
2a21affc5e Enable VFP support for BeagleBone. 2013-08-17 19:29:51 +00:00
Jilles Tjoelker
0f3a4d8051 libc: Access _logname_valid more efficiently.
The variable _logname_valid is not exported via the version script;
therefore, change C and i386/amd64 assembler code to remove indirection
(which allowed interposition). This makes the code slightly smaller and
faster.

Also, remove #define PIC_GOT from i386/amd64 in !PIC mode. Without PIC,
there is no place containing the address of each variable, so there is no
possible definition for PIC_GOT.
2013-08-17 19:24:58 +00:00
Hiroki Sato
a678ca234f - Remove struct ifinfo *iflist. It is no longer used.
- Suppress warnings about increase of alignment requirement.
2013-08-17 19:23:35 +00:00
Andrew Turner
c5de72378c Rename device vfp to option VFP and retire the ARM_VFP_SUPPORT option. This
simplifies enabling as previously both options were required to be enabled,
now we only need a single option.

While here enable VFP on the PandaBoard.
2013-08-17 18:51:38 +00:00
Hiroki Sato
84dde578a9 - Use getnameinfo(3) instead of gethostbyaddr(3) or inet_ntop(3).
- Fill sin6_scope_id from in6p.sin6_addr.s6_addr[2].  struct inpcb has
  struct in6_addr for the endpoint addresses, so sin6_scope_id must be filled.
2013-08-17 17:23:42 +00:00
Bryan Venteicher
e5bbc81be8 Do not use potentially stale thread in kthread_add()
When an existing process is provided, the thread selected to use
to initialize the new thread could have exited and be reaped.
Acquire the proc lock earlier to ensure the thread remains valid.

Reviewed by:	jhb, julian (previous version)
MFC after:	3 days
2013-08-17 17:02:43 +00:00
Andrew Turner
f844a115ec Remove the armfpe config options. These files don't exist on FreeBSD. 2013-08-17 15:21:17 +00:00
Andrew Turner
becc01ef96 Remove the ARMFPE option. It is unsupported, and appears to be broken as
arm_fpe_core_changecontext is not a function.
2013-08-17 15:09:14 +00:00
Pawel Jakub Dawidek
fe0670cfb3 Correct function name and return value. 2013-08-17 14:55:31 +00:00
Andrew Turner
65b412607b Remove fpe_sp_state as we don't support fpe. 2013-08-17 14:53:53 +00:00
Andrew Turner
c6af85cce2 Remove unused FPE code. This is not enabled anywhere as it is the only
file I can find containing FAST_FPE. It appears this would not work as
want_resched is not defined anywhere.
2013-08-17 14:52:19 +00:00
Andrew Turner
b013dea54e Ensure we set all fpu registers to zero by using the address and size of
the union over one of its members.
2013-08-17 14:42:40 +00:00
Andrew Turner
fbc66a3be6 Silence a warning that is incorrect on ARMv6 and later. In the smull, umull,
smlal, and umlal the output registers are allowed to be the same as either
input registers, where in ARMv4 and ARMv5 they could only be the same as the
last input register.
2013-08-17 14:36:32 +00:00
Pawel Jakub Dawidek
9a57f6e88c Regenerate after r254447.
Sponsored by:	The FreeBSD Foundation
2013-08-17 14:18:41 +00:00
Pawel Jakub Dawidek
b49f2e4b48 Make pdfork(2), pdkill(2) and pdgetpid(2) syscalls available for 32bit
binaries running under 64bit kernel.

Sponsored by:	The FreeBSD Foundation
2013-08-17 14:17:13 +00:00
Pawel Jakub Dawidek
4593c0ad6b In r114945 the line 'nmp = TAILQ_NEXT(mp, mnt_list);' was duplicated.
Instead of just removing the duplicate, convert the loop to TAILQ_FOREACH().
2013-08-17 14:13:45 +00:00
Pawel Jakub Dawidek
2c40899ecc Remove redundant variable. 2013-08-17 14:09:46 +00:00
Hiroki Sato
5a04191532 Return 0 in nbi->expire when la_expire == 0. Conversion from time_uptime to
time_second should not be performed in this case.
2013-08-17 07:14:45 +00:00
Hiroki Sato
10966d45e9 Unbreak rwhod(8):
- It did not work with GENERIC kernel after r250603 because
  options PROCDESC was required for pdfork(2).  It now just uses fork(2)
  instead when this syscall is not available.

- Fix verify().  This function was broken in r250602 because the outermost
  "()" was removed from the condition !(isalnum() || ispunct()).
  It prevented hostnames including "-", for example.
2013-08-17 07:12:52 +00:00
Konstantin Belousov
949c918635 Remove the arbitrary binding of the pagedaemon threads to the domains,
update the comment accordingly and make it more precise.

Requested and reviewed by:	jeff (previous version)
2013-08-17 07:10:01 +00:00
Hans Petter Selasky
3147331e16 Fix some USB controller names according to pciconf output.
MFC after:	1 week
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-08-17 06:29:45 +00:00
Simon J. Gerraty
1c0270efe5 Don't let user specified DESTDIR, break building our chosen make. 2013-08-17 04:41:35 +00:00