]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoBump __FreeBSD_version to 1000046 after the addition of M_PROTO[9-12]
Andre Oppermann [Mon, 19 Aug 2013 16:47:06 +0000 (16:47 +0000)]
Bump __FreeBSD_version to 1000046 after the addition of M_PROTO[9-12]
and removal of M_NOFREE|M_FRAG|M_FIRSTFRAG|M_LASTFRAG mbuf flags.

10 years agoDo not use pv_kva on ARMv6/v7 and save some space on each vm_page. It's only
Rafal Jaworowski [Mon, 19 Aug 2013 16:16:49 +0000 (16:16 +0000)]
Do not use pv_kva on ARMv6/v7 and save some space on each vm_page.  It's only
relevant for older ARM variants (with virtual cache).

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: gber
Sponsored by: The FreeBSD Foundation, Semihalf

10 years agoSimplify and clean up pmap_clearbit()
Rafal Jaworowski [Mon, 19 Aug 2013 15:58:39 +0000 (15:58 +0000)]
Simplify and clean up pmap_clearbit()

There is no need for calling vm_page_dirty() when clearing "modified" flag as
it is already set for that page in pmap_fault_fixup() or pmap_enter() thanks
to "modified" bit emulation.

Also, there is no need for checking PTE "referenced" or "writeable" flags.  If
there is a request to clear a particular flag we should just do it.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: gber
Sponsored by: The FreeBSD Foundation, Semihalf

10 years agoAllow UART_POLL_FREQ to be set as a kernel option as well as via tunable
Ian Lepore [Mon, 19 Aug 2013 15:51:30 +0000 (15:51 +0000)]
Allow UART_POLL_FREQ to be set as a kernel option as well as via tunable
(the code was already set up for this, just needs to be in conf/options).

Also, if reporting that polling is being used, report the frequency too.

10 years agoFix ARMv6/v7 mapping's wired status.
Rafal Jaworowski [Mon, 19 Aug 2013 15:36:23 +0000 (15:36 +0000)]
Fix ARMv6/v7 mapping's wired status.

Last input argument in pmap_modify_pv() should be a mask of flags to be set.
In pmap_change_wiring() however, the straight wired status was used, which
does not represent valid flags (and is of type boolean).

This commit fixes the issue so that wired flag is passed to pmap_modify_pv()
properly.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: gber
Sponsored by: The FreeBSD Foundation, Semihalf

10 years agoClear all L2 PTE protection bits before their configuration.
Rafal Jaworowski [Mon, 19 Aug 2013 15:12:36 +0000 (15:12 +0000)]
Clear all L2 PTE protection bits before their configuration.

Revise L2_S_PROT_MASK to include all of the protection bits.  Notice that
clearing these bits does not always take away the corresponding permissions
(for example, permission is granted when the bit is cleared). The bits are
cleared but are to be set or left cleared accordingly in pmap_set_prot(),
pmap_enter_locked(), etc.

Clear L2_XN along with L2_S_PROT_MASK in pmap_set_prot() so that all
permissions related bits are cleared before actual configuration.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: gber
Sponsored by: The FreeBSD Foundation, Semihalf

10 years agoSimplify pv_entry removal or ARMv6/v7:
Rafal Jaworowski [Mon, 19 Aug 2013 14:56:17 +0000 (14:56 +0000)]
Simplify pv_entry removal or ARMv6/v7:

- PGA_WRITEABLE indicates that there *might be* a writable mapping for the
  particular page, so to avoid frequent sweeping of the pv_entries whenever
  pmap_nuke_pv(), pmap_modify_pv(), etc. is called, it is sufficient to
  clear that flag if there are no managed mappings for that page anymore
  (notice that only pmap_enter is authorized to set this flag).
- Avoid redundant checking for PVF_WIRED flag when this flag cannot be set
  anyway.
- Clear PGA_WRITEABLE only once for each vm_page instead of multiple,
  redundant clearing it in loop when there are no writeable mappings
  to that page anymore.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: gber
Sponsored by: The FreeBSD Foundation, Semihalf

10 years agoReorder the mbuf defines to make more sense and group related flags
Andre Oppermann [Mon, 19 Aug 2013 14:25:11 +0000 (14:25 +0000)]
Reorder the mbuf defines to make more sense and group related flags
together.

Add M_FLAG_PRINTF for use with printf(9) %b indentifier.

Use the generic mbuf flags print names in the net80211 code and adjust
the protocol specific bits for their new positions.

Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field
they use internally to store some additional information.

Discussed with: trociny, glebius

10 years agoMigrate the net80211 protocol specific use of M_FRAG, M_FIRSTFRAG and
Andre Oppermann [Mon, 19 Aug 2013 14:07:31 +0000 (14:07 +0000)]
Migrate the net80211 protocol specific use of M_FRAG, M_FIRSTFRAG and
M_LASTFRAG flags to protocol specific flags.

Remove the now unused M_FRAG, M_FIRSTFRAG and M_LASTFRAG mbuf flags.

Discussed with: trociny, glebius, adrian

10 years agoAdd entry for packages-9.2-release directory.
Glen Barber [Mon, 19 Aug 2013 14:04:35 +0000 (14:04 +0000)]
Add entry for packages-9.2-release directory.

Approved by: re (implicit)

10 years agoAdd four additional M_PROTOFLAGS[9-12] for protocol specific use.
Andre Oppermann [Mon, 19 Aug 2013 13:56:14 +0000 (13:56 +0000)]
Add four additional M_PROTOFLAGS[9-12] for protocol specific use.

Discussed with: trociny, glebius, adrian

10 years agoAdd m_clrprotoflags() to clear protocol specific mbuf flags at up and
Andre Oppermann [Mon, 19 Aug 2013 13:27:32 +0000 (13:27 +0000)]
Add m_clrprotoflags() to clear protocol specific mbuf flags at up and
downwards layer crossings.

Consistently use it within IP, IPv6 and ethernet protocols.

Discussed with: trociny, glebius

10 years agoAdd support for parameterised device tree sources to the device tree compiler.
David Chisnall [Mon, 19 Aug 2013 12:37:13 +0000 (12:37 +0000)]
Add support for parameterised device tree sources to the device tree compiler.

Reviewed by: brooks
Sponsored by: DARPA, AFRL

10 years agoMove the SCTP specific definition of M_NOTIFICATION onto a protocol
Andre Oppermann [Mon, 19 Aug 2013 12:30:18 +0000 (12:30 +0000)]
Move the SCTP specific definition of M_NOTIFICATION onto a protocol
specific mbuf flag from sys/mbuf.h to netinet/sctp_os_bsd.h.  It is
only relevant within SCTP.

Discussed with: tuexen

10 years agoRemove the unused M_NOFREE mbuf flag. It didn't have any in-tree users
Andre Oppermann [Mon, 19 Aug 2013 11:16:53 +0000 (11:16 +0000)]
Remove the unused M_NOFREE mbuf flag.  It didn't have any in-tree users
for a very long time, if ever.

Should such a functionality ever be needed again the appropriate and
much better way to do it is through a custom EXT_SOMETHING external mbuf
type together with a dedicated *ext_free function.

Discussed with: trociny, glebius

10 years agoMove the global M_SKIP_FIREWALL mbuf flags to a protocol layer specific
Andre Oppermann [Mon, 19 Aug 2013 11:08:36 +0000 (11:08 +0000)]
Move the global M_SKIP_FIREWALL mbuf flags to a protocol layer specific
flag instead.  The flag is only used within the IP and IPv6 layer 3
protocols.

Because some firewall packages treat IPv4 and IPv6 packets the same the
flag should have the same value for both.

Discussed with: trociny, glebius

10 years agoMove ip_reassemble()'s use of the global M_FRAG mbuf flag to a protocol layer
Andre Oppermann [Mon, 19 Aug 2013 10:34:10 +0000 (10:34 +0000)]
Move ip_reassemble()'s use of the global M_FRAG mbuf flag to a protocol layer
specific flag instead.  The flag is only relevant while the packet stays in
the IP reassembly queue.

Discussed with: trociny, glebius

10 years agoRemove unused M_FRAG, M_FIRSTFRAG and M_LASTFRAG tagging from ip_fragment().
Andre Oppermann [Mon, 19 Aug 2013 10:30:15 +0000 (10:30 +0000)]
Remove unused M_FRAG, M_FIRSTFRAG and M_LASTFRAG tagging from ip_fragment().
There wasn't any real driver (and hardware) support for it.  Modern hardware
does full fragmentation/segmentation offload instead.

10 years agoRemove unused and incomplete support for delayed fragment checksums
Andre Oppermann [Mon, 19 Aug 2013 10:20:20 +0000 (10:20 +0000)]
Remove unused and incomplete support for delayed fragment checksums
from bce(4), bxe(4), mge(4) and ti(4) drivers.

10 years agoEnable VFP on the Arndale Board.
Andrew Turner [Mon, 19 Aug 2013 08:28:35 +0000 (08:28 +0000)]
Enable VFP on the Arndale Board.

10 years agoStyle changes and typos fixed.
Rui Paulo [Mon, 19 Aug 2013 05:48:42 +0000 (05:48 +0000)]
Style changes and typos fixed.

10 years agoPass pidfile to bsnmpd if it's been changed (parts cut/pasted from
Peter Wemm [Mon, 19 Aug 2013 05:37:49 +0000 (05:37 +0000)]
Pass pidfile to bsnmpd if it's been changed (parts cut/pasted from
rc.d/rarpd and rc.d/wpa_supplicant)

10 years agoRevert r254508.
Peter Wemm [Mon, 19 Aug 2013 05:12:38 +0000 (05:12 +0000)]
Revert r254508.

10 years agoFix some ppc64 dtrace bugs, and enable systrace_freebsd32 for ppc64.
Justin Hibbits [Mon, 19 Aug 2013 05:10:46 +0000 (05:10 +0000)]
Fix some ppc64 dtrace bugs, and enable systrace_freebsd32 for ppc64.

10 years agoAdd the optional ability to run as a different user.
Peter Wemm [Mon, 19 Aug 2013 04:56:03 +0000 (04:56 +0000)]
Add the optional ability to run as a different user.

Obtained from: Antique freebsd.org cluster archive images

10 years agoAllow a hardware driver to pass clock frequencies into the sdhci driver.
Ian Lepore [Mon, 19 Aug 2013 01:29:13 +0000 (01:29 +0000)]
Allow a hardware driver to pass clock frequencies into the sdhci driver.

The sdhci spec says that if the base or timeout clock frequency in the
capabilities register is zero, the driver must obtain the frequency "from
another source."  This change defines that other source to be the low-level
hardware driver, which can pre-set the frequencies in slot.max_clk and
slot.timeout_clk before calling sdhci_init_slot().

This helps with a growing number of SoCs that have sdhci base clock
frequencies that either won't fit into the range allowed by the number of
bits available in the capabilities register, or the frequency is runtime-
configurable.

10 years agoDon't return ENOTSUPP here - the net80211 pluggable ioctl API will treat
Adrian Chadd [Sun, 18 Aug 2013 23:40:30 +0000 (23:40 +0000)]
Don't return ENOTSUPP here - the net80211 pluggable ioctl API will treat
this as the final item in the linker set and not try others.

This stopped the fast frames IOCTLs from being called.

10 years agoWhen code from r254064 in pmap_ts_referenced() drops pv lock and
Konstantin Belousov [Sun, 18 Aug 2013 21:36:22 +0000 (21:36 +0000)]
When code from r254064 in pmap_ts_referenced() drops pv lock and
blocks on a pmap lock, pmap_release() might proceed in parallel and
destroy the pmap mutex, since unlocked pv lock allows to remove pv
entry owned by the pmap.

For now, gate the pmap_release() on write-locked pvh_global_lock.
Since pmap_ts_release() does not unlock the global lock,
pmap_release() would not destroy pmap mutex until the
pmap_ts_referenced() finished.  We cannot enter pmap_ts_referenced()
and encounter a pv entry for the destroyed pmap if pmap_release()
passed the global lock gate, since pmap_remove_pages() would finish
earlier.

Reported by: jeff, pho
Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation

10 years agoReturn the correct status if ieee80211_ff_check() consumes the mbuf.
Adrian Chadd [Sun, 18 Aug 2013 20:40:13 +0000 (20:40 +0000)]
Return the correct status if ieee80211_ff_check() consumes the mbuf.

I broke this when converting the net80211 TX path to use if_transmit.

10 years agoImplement fdclosedir(3) function, which is equivalent to the closedir(3)
Pawel Jakub Dawidek [Sun, 18 Aug 2013 20:11:34 +0000 (20:11 +0000)]
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

10 years agoRemove redundant space.
Pawel Jakub Dawidek [Sun, 18 Aug 2013 20:06:35 +0000 (20:06 +0000)]
Remove redundant space.

10 years agoChange the return type of the fallback implementation of the
Tijl Coosemans [Sun, 18 Aug 2013 19:37:35 +0000 (19:37 +0000)]
Change the return type of the fallback implementation of the
atomic_compare_exchange_* macros in stdatomic.h to _Bool.

10 years agoAdd a new SDHCI_QUIRK_DONT_SHIFT_RESPONSE for hardware that pre-shifts
Ian Lepore [Sun, 18 Aug 2013 19:08:53 +0000 (19:08 +0000)]
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.

10 years agoIncrease the max KVA available for general consumption on the Exynos 5.
Olivier Houchard [Sun, 18 Aug 2013 18:08:12 +0000 (18:08 +0000)]
Increase the max KVA available for general consumption on the Exynos 5.

Submitted by: Ruslan Bukin <br@bsdpad.com>

10 years agoEnable VFP in the Versatile PB (QEMU) kernel. Tested on QEMU 1.6.0.
Andrew Turner [Sun, 18 Aug 2013 17:18:52 +0000 (17:18 +0000)]
Enable VFP in the Versatile PB (QEMU) kernel. Tested on QEMU 1.6.0.

10 years agoEnable VFP on the CubieBoard and CubieBoard 2.
Andrew Turner [Sun, 18 Aug 2013 16:16:36 +0000 (16:16 +0000)]
Enable VFP on the CubieBoard and CubieBoard 2.

10 years agoRegenerate after r254491.
Pawel Jakub Dawidek [Sun, 18 Aug 2013 13:38:39 +0000 (13:38 +0000)]
Regenerate after r254491.

10 years agoThe cap_rights_limit(2) system calls needs a wrapper for 32bit binaries
Pawel Jakub Dawidek [Sun, 18 Aug 2013 13:37:54 +0000 (13:37 +0000)]
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

10 years agoMove the PAIR32TO64() macro and the RETVAL_HI/RETVAL_LO defines to a
Pawel Jakub Dawidek [Sun, 18 Aug 2013 13:34:11 +0000 (13:34 +0000)]
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

10 years agoDisallow opening a POSIX message queue for execute.
Jilles Tjoelker [Sun, 18 Aug 2013 13:27:04 +0000 (13:27 +0000)]
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.

10 years agodup3(3): Replace copyright notice.
Jilles Tjoelker [Sun, 18 Aug 2013 13:25:18 +0000 (13:25 +0000)]
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

10 years agoEnable VFP support on EFIKA MX.
Andrew Turner [Sun, 18 Aug 2013 11:54:20 +0000 (11:54 +0000)]
Enable VFP support on EFIKA MX.

10 years agoCast argument of is*() ctype functions to unsigned char.
Pawel Jakub Dawidek [Sun, 18 Aug 2013 11:25:42 +0000 (11:25 +0000)]
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

10 years agoMake the "FD" column one character wider, so that "trace" can also align
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:44:37 +0000 (10:44 +0000)]
Make the "FD" column one character wider, so that "trace" can also align
properly.

10 years agoConsistently use 'af' as an argument name for address family.
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:38:59 +0000 (10:38 +0000)]
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.

10 years agoMake example more correct (errstr is a pointer, not boolean).
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:33:46 +0000 (10:33 +0000)]
Make example more correct (errstr is a pointer, not boolean).

10 years agoRegenerate after r254481.
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:31:30 +0000 (10:31 +0000)]
Regenerate after r254481.

10 years agoImplement 32bit versions of the cap_ioctls_limit(2) and cap_ioctls_get(2)
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:30:41 +0000 (10:30 +0000)]
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

10 years agoAdd process descriptors support to the GENERIC kernel. It is already being
Pawel Jakub Dawidek [Sun, 18 Aug 2013 10:21:29 +0000 (10:21 +0000)]
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

10 years agoBetter organize the filecaps structure, which reduces its size from 32 bytes
Pawel Jakub Dawidek [Sun, 18 Aug 2013 09:45:52 +0000 (09:45 +0000)]
Better organize the filecaps structure, which reduces its size from 32 bytes
to 24 bytes on 64bit archs.

10 years agoAdd in missing events for Sandy Bridge Xeon.
Adrian Chadd [Sun, 18 Aug 2013 06:08:52 +0000 (06:08 +0000)]
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.

10 years agoUse sysctl(ICMPV6CTL_ND6_DRLIST) instead of SIOCGDRLST_IN6 ioctl.
Hiroki Sato [Sat, 17 Aug 2013 22:13:26 +0000 (22:13 +0000)]
Use sysctl(ICMPV6CTL_ND6_DRLIST) instead of SIOCGDRLST_IN6 ioctl.

10 years agoUpdate the SDT(9) man page with the macros added in 254468. Also change the
Mark Johnston [Sat, 17 Aug 2013 22:06:30 +0000 (22:06 +0000)]
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

10 years agoAdd a "translated type" argument to SDT_PROBE_ARGTYPE() and add some macros
Mark Johnston [Sat, 17 Aug 2013 22:02:26 +0000 (22:02 +0000)]
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

10 years agoRemove a couple of unused macros.
Mark Johnston [Sat, 17 Aug 2013 21:53:37 +0000 (21:53 +0000)]
Remove a couple of unused macros.

MFC after: 3 days

10 years agoBump up the maximum addressable memory on amd64 systems from 1TB to 4TB.
Neel Natu [Sat, 17 Aug 2013 19:49:08 +0000 (19:49 +0000)]
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)

10 years agoCorrect implementation of atomic_flag_test_and_set
Ed Maste [Sat, 17 Aug 2013 19:34:41 +0000 (19:34 +0000)]
Correct implementation of atomic_flag_test_and_set

The function sets the flag and returns the previous value (7.17.8.1).

10 years agoEnable VFP support for BeagleBone.
Ian Lepore [Sat, 17 Aug 2013 19:29:51 +0000 (19:29 +0000)]
Enable VFP support for BeagleBone.

10 years agolibc: Access _logname_valid more efficiently.
Jilles Tjoelker [Sat, 17 Aug 2013 19:24:58 +0000 (19:24 +0000)]
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.

10 years ago- Remove struct ifinfo *iflist. It is no longer used.
Hiroki Sato [Sat, 17 Aug 2013 19:23:35 +0000 (19:23 +0000)]
- Remove struct ifinfo *iflist.  It is no longer used.
- Suppress warnings about increase of alignment requirement.

10 years agoRename device vfp to option VFP and retire the ARM_VFP_SUPPORT option. This
Andrew Turner [Sat, 17 Aug 2013 18:51:38 +0000 (18:51 +0000)]
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.

10 years ago- Use getnameinfo(3) instead of gethostbyaddr(3) or inet_ntop(3).
Hiroki Sato [Sat, 17 Aug 2013 17:23:42 +0000 (17:23 +0000)]
- 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.

10 years agoDo not use potentially stale thread in kthread_add()
Bryan Venteicher [Sat, 17 Aug 2013 17:02:43 +0000 (17:02 +0000)]
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

10 years agoRemove the armfpe config options. These files don't exist on FreeBSD.
Andrew Turner [Sat, 17 Aug 2013 15:21:17 +0000 (15:21 +0000)]
Remove the armfpe config options. These files don't exist on FreeBSD.

10 years agoRemove the ARMFPE option. It is unsupported, and appears to be broken as
Andrew Turner [Sat, 17 Aug 2013 15:09:14 +0000 (15:09 +0000)]
Remove the ARMFPE option. It is unsupported, and appears to be broken as
arm_fpe_core_changecontext is not a function.

10 years agoCorrect function name and return value.
Pawel Jakub Dawidek [Sat, 17 Aug 2013 14:55:31 +0000 (14:55 +0000)]
Correct function name and return value.

10 years agoRemove fpe_sp_state as we don't support fpe.
Andrew Turner [Sat, 17 Aug 2013 14:53:53 +0000 (14:53 +0000)]
Remove fpe_sp_state as we don't support fpe.

10 years agoRemove unused FPE code. This is not enabled anywhere as it is the only
Andrew Turner [Sat, 17 Aug 2013 14:52:19 +0000 (14:52 +0000)]
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.

10 years agoEnsure we set all fpu registers to zero by using the address and size of
Andrew Turner [Sat, 17 Aug 2013 14:42:40 +0000 (14:42 +0000)]
Ensure we set all fpu registers to zero by using the address and size of
the union over one of its members.

10 years agoSilence a warning that is incorrect on ARMv6 and later. In the smull, umull,
Andrew Turner [Sat, 17 Aug 2013 14:36:32 +0000 (14:36 +0000)]
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.

10 years agoRegenerate after r254447.
Pawel Jakub Dawidek [Sat, 17 Aug 2013 14:18:41 +0000 (14:18 +0000)]
Regenerate after r254447.

Sponsored by: The FreeBSD Foundation

10 years agoMake pdfork(2), pdkill(2) and pdgetpid(2) syscalls available for 32bit
Pawel Jakub Dawidek [Sat, 17 Aug 2013 14:17:13 +0000 (14:17 +0000)]
Make pdfork(2), pdkill(2) and pdgetpid(2) syscalls available for 32bit
binaries running under 64bit kernel.

Sponsored by: The FreeBSD Foundation

10 years agoIn r114945 the line 'nmp = TAILQ_NEXT(mp, mnt_list);' was duplicated.
Pawel Jakub Dawidek [Sat, 17 Aug 2013 14:13:45 +0000 (14:13 +0000)]
In r114945 the line 'nmp = TAILQ_NEXT(mp, mnt_list);' was duplicated.
Instead of just removing the duplicate, convert the loop to TAILQ_FOREACH().

10 years agoRemove redundant variable.
Pawel Jakub Dawidek [Sat, 17 Aug 2013 14:09:46 +0000 (14:09 +0000)]
Remove redundant variable.

10 years agoReturn 0 in nbi->expire when la_expire == 0. Conversion from time_uptime to
Hiroki Sato [Sat, 17 Aug 2013 07:14:45 +0000 (07:14 +0000)]
Return 0 in nbi->expire when la_expire == 0.  Conversion from time_uptime to
time_second should not be performed in this case.

10 years agoUnbreak rwhod(8):
Hiroki Sato [Sat, 17 Aug 2013 07:12:52 +0000 (07:12 +0000)]
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.

10 years agoRemove the arbitrary binding of the pagedaemon threads to the domains,
Konstantin Belousov [Sat, 17 Aug 2013 07:10:01 +0000 (07:10 +0000)]
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)

10 years agoFix some USB controller names according to pciconf output.
Hans Petter Selasky [Sat, 17 Aug 2013 06:29:45 +0000 (06:29 +0000)]
Fix some USB controller names according to pciconf output.

MFC after: 1 week
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

10 years agoDon't let user specified DESTDIR, break building our chosen make.
Simon J. Gerraty [Sat, 17 Aug 2013 04:41:35 +0000 (04:41 +0000)]
Don't let user specified DESTDIR, break building our chosen make.

10 years agoCorrect sentence syntax too.
Matt Jacob [Sat, 17 Aug 2013 01:17:51 +0000 (01:17 +0000)]
Correct sentence syntax too.

10 years agoLog the MAC address of the node in question rather than the pointer.
Adrian Chadd [Sat, 17 Aug 2013 01:14:28 +0000 (01:14 +0000)]
Log the MAC address of the node in question rather than the pointer.

10 years agoCorrect spelling.
David E. O'Brien [Sat, 17 Aug 2013 01:02:04 +0000 (01:02 +0000)]
Correct spelling.

10 years agoFix build.
Xin LI [Sat, 17 Aug 2013 00:25:11 +0000 (00:25 +0000)]
Fix build.

10 years agoConsistently init all mmc request, command, and data structures to zero
Ian Lepore [Sat, 17 Aug 2013 00:19:27 +0000 (00:19 +0000)]
Consistently init all mmc request, command, and data structures to zero
before using them.

10 years agoHandle command retries for commands originating at the mmc layer, and
Ian Lepore [Fri, 16 Aug 2013 23:05:34 +0000 (23:05 +0000)]
Handle command retries for commands originating at the mmc layer, and
ensure that all such commands have a non-zero retry count except for those
that are expected to fail (for example, because they are used to probe for
feature support).

While it is possible to pass a retry count down to the hardware driver in
the command request structure, no hardware driver currently implements any
retry logic.  The hardware doesn't know much about the context of a single
request, so it makes more sense to handle retries at a layer that does.

This adds retry loops to the mmc_wait_for_cmd() and mmc_wait_for_app_cmd()
functions.  These functions are the gateway from other code within mmc.c
to the hardware.  App commands are a sequence of two commands and a retry
has to rerun both of them in order, so it needs its own retry loop.

Retry looping is specifically NOT implemented in mmc_wait_for_request()
because it is the gateway for children on the bus, and they have to
implement their own retry logic depending on what makes sense for them.

10 years agoAdd new mmap(2) flags to permit applications to request specific virtual
John Baldwin [Fri, 16 Aug 2013 21:13:55 +0000 (21:13 +0000)]
Add new mmap(2) flags to permit applications to request specific virtual
address alignment of mappings.
- MAP_ALIGNED(n) requests a mapping aligned on a boundary of (1 << n).
  Requests for n >= number of bits in a pointer or less than the size of
  a page fail with EINVAL.  This matches the API provided by NetBSD.
- MAP_ALIGNED_SUPER is a special case of MAP_ALIGNED.  It can be used
  to optimize the chances of using large pages.  By default it will align
  the mapping on a large page boundary (the system is free to choose any
  large page size to align to that seems best for the mapping request).
  However, if the object being mapped is already using large pages, then
  it will align the virtual mapping to match the existing large pages in
  the object instead.
- Internally, VMFS_ALIGNED_SPACE is now renamed to VMFS_SUPER_SPACE, and
  VMFS_ALIGNED_SPACE(n) is repurposed for specifying a specific alignment.
  MAP_ALIGNED(n) maps to using VMFS_ALIGNED_SPACE(n), while
  MAP_ALIGNED_SUPER maps to VMFS_SUPER_SPACE.
- mmap() of a device object now uses VMFS_OPTIMAL_SPACE rather than
  explicitly using VMFS_SUPER_SPACE.  All device objects are forced to
  use a specific color on creation, so VMFS_OPTIMAL_SPACE is effectively
  equivalent.

Reviewed by: alc
MFC after: 1 month

10 years agoDuring card identification, run the bus at 400KHz, not the minimum
Ian Lepore [Fri, 16 Aug 2013 20:32:56 +0000 (20:32 +0000)]
During card identification, run the bus at 400KHz, not the minimum
speed the bus claims to be capable of.  The 400KHz speed is dictated
by the SD and MMC standards.

10 years agosh: Remove unnecessary reset functions.
Jilles Tjoelker [Fri, 16 Aug 2013 20:24:41 +0000 (20:24 +0000)]
sh: Remove unnecessary reset functions.

These are already handled by exception handlers.

10 years agoPrint the card relative address in hex, because that's what all the
Ian Lepore [Fri, 16 Aug 2013 20:22:57 +0000 (20:22 +0000)]
Print the card relative address in hex, because that's what all the
other debugging output does (when it appears in command arguments,
for example).

10 years agoAdd named constants for 8-bit bus support. The sdhci and mmc drivers
Ian Lepore [Fri, 16 Aug 2013 19:44:49 +0000 (19:44 +0000)]
Add named constants for 8-bit bus support.  The sdhci and mmc drivers
don't have support for this yet, but some low-level hardware is ready
for it when the higher layers catch up.

10 years agoWhen the timeout clock is based on the SD clock, the timeout counter
Ian Lepore [Fri, 16 Aug 2013 19:40:00 +0000 (19:40 +0000)]
When the timeout clock is based on the SD clock, the timeout counter
has to be recalculated every time the SD clock frequency changes.

Also, tidy up the counter calculation... it makes no sense to calculate
a value one larger than the limit, then whine that it's too large and
truncate it to the limit.  If the BROKEN_TIMEOUT quirk is set, don't
calculate the counter at all, just set it to the limit value.

10 years agoAdd .MAKE.ALWAYS_PASS_JOB_QUEUE knob (default yes)
Simon J. Gerraty [Fri, 16 Aug 2013 18:47:18 +0000 (18:47 +0000)]
Add .MAKE.ALWAYS_PASS_JOB_QUEUE knob (default yes)
for backwards compatability.

10 years agoWhen we need to build using the in-tree make,
Simon J. Gerraty [Fri, 16 Aug 2013 16:26:23 +0000 (16:26 +0000)]
When we need to build using the in-tree make,
switch at the earliest opportunity.
In the case of fmake vs bmake, this helps ensure correct load handling.

Reviewed by: obrien

10 years agoAdd unmapped I/O and larger I/O support to the sa(4) driver.
Kenneth D. Merry [Fri, 16 Aug 2013 16:14:32 +0000 (16:14 +0000)]
Add unmapped I/O and larger I/O support to the sa(4) driver.

We now pay attention to the maxio field in the XPT_PATH_INQ CCB,
and if it is set, propagate it up to physio via the si_iosize_max
field in the cdev structure.

We also now pay attention to the PIM_UNMAPPED capability bit in the
XPT_PATH_INQ CCB, and set the new SI_UNMAPPED cdev flag when the
underlying SIM supports unmapped I/O.

scsi_sa.c: Add unmapped I/O support and propagate the SIM's
maximum I/O size up.

Adjust scsi_tape_read_write() in the same way that
scsi_read_write() was changed to support unmapped
I/O.  We overload the readop parameter with bits
that tell us whether it's an unmapped I/O, and we
need to set the CAM_DATA_BIO CCB flag.  This change
should be backwards compatible in source and
binary forms.

MFC after: 1 week
Sponsored by: Spectra Logic

10 years agoRestore the previous sendfile(2) behaviour on the block devices.
Konstantin Belousov [Fri, 16 Aug 2013 14:22:20 +0000 (14:22 +0000)]
Restore the previous sendfile(2) behaviour on the block devices.
Provide valid .fo_sendfile method for several missed struct fileops.

Reviewed by: glebius
Sponsored by: The FreeBSD Foundation

10 years agopselect(2): Add xref to sigsuspend(2).
Jilles Tjoelker [Fri, 16 Aug 2013 14:06:29 +0000 (14:06 +0000)]
pselect(2): Add xref to sigsuspend(2).

10 years agosh: Recognize "--" as end of options in bg/fg/jobid builtins.
Jilles Tjoelker [Fri, 16 Aug 2013 13:56:43 +0000 (13:56 +0000)]
sh: Recognize "--" as end of options in bg/fg/jobid builtins.

10 years agosh: Add test for the non-standard jobid builtin.
Jilles Tjoelker [Fri, 16 Aug 2013 13:48:11 +0000 (13:48 +0000)]
sh: Add test for the non-standard jobid builtin.

10 years agoAdd tests for dup3().
Jilles Tjoelker [Fri, 16 Aug 2013 13:16:55 +0000 (13:16 +0000)]
Add tests for dup3().

10 years agoAdd man page dup3(3).
Jilles Tjoelker [Fri, 16 Aug 2013 13:16:27 +0000 (13:16 +0000)]
Add man page dup3(3).