]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
10 years agoxen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xencontrol is the first driver, every new device (which driver unset)
will use xencontrol.

10 years agoxen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:08 +0000 (01:41 +0000)]
xen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xenstore is the first driver, every new device (which driver unset) will
use xenstore.

10 years agoxen/console: clean up identify callback
Julien Grall [Tue, 14 Jan 2014 01:41:16 +0000 (01:41 +0000)]
xen/console: clean up identify callback

10 years agoxen/console: Fix build when DDB is enabled
Julien Grall [Tue, 14 Jan 2014 01:41:16 +0000 (01:41 +0000)]
xen/console: Fix build when DDB is enabled

db_active doesn't exist anymore. The code needs to use kdb_active/gdb_active.

For now only use kdb_active and add the corresponding guards.

10 years agoxen/blkback: Fix string format when XBB_DEBUG is enabled
Julien Grall [Sat, 7 Jun 2014 21:50:31 +0000 (22:50 +0100)]
xen/blkback: Fix string format when XBB_DEBUG is enabled

host_addr is typed uint64_t, therefore we should use PRIx64 to print correctly
the value on every architecture.

10 years agoxen/timer: Make xen timer optional
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/timer: Make xen timer optional

The timer is not used on ARM.

10 years agoxen/hypercall: Allow HYPERVISOR_console_write to take a const string
Julien Grall [Tue, 14 Jan 2014 01:41:18 +0000 (01:41 +0000)]
xen/hypercall: Allow HYPERVISOR_console_write to take a const string

The hypercall console write won't modify the string. It's safe to put a const
here.

10 years agoxen: Remove duplicate features.h header in i386 arch
Julien Grall [Tue, 14 Jan 2014 01:41:13 +0000 (01:41 +0000)]
xen: Remove duplicate features.h header in i386 arch

10 years agoxen: xen_start_info don't need to be export in common code
Julien Grall [Sun, 1 Jun 2014 18:15:40 +0000 (19:15 +0100)]
xen: xen_start_info don't need to be export in common code

HYPERVISOR_start_info has been introduce to be used in code common. The
variable xen_start_info is only used within amd64 and i386 architecture and
is redundant with the former variable.

10 years agoxen: Define xen_intr_handle_upcall in common headers
Julien Grall [Tue, 14 Jan 2014 01:41:18 +0000 (01:41 +0000)]
xen: Define xen_intr_handle_upcall in common headers

The function xen_intr_handle_upcall is used on every architecture supported
by Xen. It's pointless to define on every platform...

10 years agoxen/netfront: Add 2 bytes padding in the rx mbuf
Julien Grall [Wed, 4 Jun 2014 21:13:20 +0000 (22:13 +0100)]
xen/netfront: Add 2 bytes padding in the rx mbuf

The ethernet header size is not word aligned. Therefore the IP packet and so
on won't be align. On some architecture (such as ARM) unaligned access may
be slower and/or defined. Therefore we might reveice an alignement fault.
To void this case, we need to pull-up the data of ETHER_ALIGN bytes.

I'm not sure how this patch will impact x86, we need to do some benchmarking
without and with it.

I'mi also not sure m_copyup is the right function to any. Can any expert to the
network stack can tell me if there is a better solution?

10 years agoxen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier
Julien Grall [Sun, 1 Jun 2014 23:17:58 +0000 (00:17 +0100)]
xen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier

For WRITE_BARRIER and FLUSH_DISKCACHE operation, we don't request any cache
operation. This will result to a panic in _bus_dmamap_sync on ARM because the
operation (op = 0) is not supported.

x86 platform doesn't seem to care about this. I bet this is working fine
because only we only grant memory to the backend. Hence Xen is requiring this
memory to be cacheable. I'm wondering if we could drop the call to
bus_dmasync_map because the cache maintenance slow down the process for no
apparent reason?

For now, WRITE_BARRIER and FLUSH_DISKCACHE are an extension of the WRITE
command so require BUS_DMASYNC_PREWRITE for the cache maintenance operation.

10 years agoHACK: allow proper poweroff when running as Dom0
Roger Pau Monne [Tue, 23 Sep 2014 17:02:33 +0000 (19:02 +0200)]
HACK: allow proper poweroff when running as Dom0

10 years agoxenpv: use memory above the MMIO region
Roger Pau Monne [Tue, 23 Sep 2014 16:56:48 +0000 (18:56 +0200)]
xenpv: use memory above the MMIO region

Using memory below 4GB might cause problems with MMIO regions from physical
devices. In order to prevent that, always use memory from above the MMIO
hole for devices that hang off the xenpv bus.

Sponsored by: Citrix Systems R&D

10 years agoxen/intr: balance dinamic interrupts across available vCPUs
Roger Pau Monne [Tue, 21 Oct 2014 15:00:57 +0000 (17:00 +0200)]
xen/intr: balance dinamic interrupts across available vCPUs

By default Xen binds all event channels to vCPU#0, and FreeBSD only shuffles
the interrupt sources once, at the end of the boot process. Since new event
channels might be created after this point (because new devices or backends
are added), try to automatically shuffle them at creation time.

This does not affect VIRQ or IPI event channels, that are already bound to a
specific vCPU as requested by the caller.

Sponsored by: Citrix Systems R&D

10 years agoMerge r280761 from HEAD: Remove ALPHA leftover
emaste [Fri, 27 Mar 2015 14:40:58 +0000 (14:40 +0000)]
Merge r280761 from HEAD: Remove ALPHA leftover

10 years agoMerge r281221 and r281223 from HEAD
emaste [Tue, 7 Apr 2015 19:28:53 +0000 (19:28 +0000)]
Merge r281221 and r281223 from HEAD

compiler-rt: add floatditf and floatunditf
compiler-rt: Implement multc3 - quad-precision complex multiplication

Makefile reverted to version in HEAD.

10 years agoSupport pmap_page_exists_quick
Andrew Turner [Tue, 24 Mar 2015 17:19:57 +0000 (17:19 +0000)]
Support pmap_page_exists_quick

As we don't support superpages we only need the first loop.

10 years agoRevert aarch64 xlint targparam.h to version from HEAD
Ed Maste [Tue, 24 Mar 2015 20:14:45 +0000 (16:14 -0400)]
Revert aarch64 xlint targparam.h to version from HEAD

10 years agoUpdate the copyright on this, it's been rewritten
Andrew Turner [Mon, 23 Mar 2015 11:58:07 +0000 (11:58 +0000)]
Update the copyright on this, it's been rewritten

10 years agoRenumber license clauses to avoid missing 3
Ed Maste [Fri, 13 Mar 2015 02:42:48 +0000 (22:42 -0400)]
Renumber license clauses to avoid missing 3

10 years agoDisable EARLY_PRINTF, it's no longer needed
Andrew Turner [Tue, 24 Mar 2015 13:35:15 +0000 (13:35 +0000)]
Disable EARLY_PRINTF, it's no longer needed

10 years agoDisable the MMU when we enter the kernel.
Andrew Turner [Mon, 23 Mar 2015 15:11:56 +0000 (15:11 +0000)]
Disable the MMU when we enter the kernel.

It may have been left enabled by the firmware.

10 years agoCatch up with the new openssl config options
Andrew Turner [Tue, 24 Mar 2015 13:23:24 +0000 (13:23 +0000)]
Catch up with the new openssl config options

10 years agoMerge branch 'upstream_head' into arm64-merge
Andrew Turner [Tue, 24 Mar 2015 11:56:42 +0000 (11:56 +0000)]
Merge branch 'upstream_head' into arm64-merge

10 years agoMove etc.arm64 to etc.aarch64
Andrew Turner [Mon, 23 Mar 2015 15:46:12 +0000 (15:46 +0000)]
Move etc.arm64 to etc.aarch64

10 years agoRe-sort architecture .ifs
Ed Maste [Wed, 18 Mar 2015 13:38:01 +0000 (09:38 -0400)]
Re-sort architecture .ifs

10 years agoMove amd64 targparam.h to aarch64
Ed Maste [Mon, 23 Mar 2015 18:40:23 +0000 (14:40 -0400)]
Move amd64 targparam.h to aarch64

This has already been committed to HEAD as aarch64/targparam.h. Move our
copy in advance of the next merge.

10 years agoRename additional arm64 userland directories to aarch64
Ed Maste [Mon, 23 Mar 2015 18:39:06 +0000 (14:39 -0400)]
Rename additional arm64 userland directories to aarch64

10 years agosfxge: cleanup: fix index variable type to match upper boundary type
arybchik [Tue, 24 Mar 2015 11:33:34 +0000 (11:33 +0000)]
sfxge: cleanup: fix index variable type to match upper boundary type

Sponsored by:   Solarflare Communications, Inc.

10 years agosfxge: cleanup: add a blank line before each #if to improve readability
arybchik [Tue, 24 Mar 2015 11:25:19 +0000 (11:25 +0000)]
sfxge: cleanup: add a blank line before each #if to improve readability

Sponsored by:   Solarflare Communications, Inc.

10 years agosfxge: cleanup: remove trailing whitespaces
arybchik [Tue, 24 Mar 2015 11:22:12 +0000 (11:22 +0000)]
sfxge: cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.

10 years agoMake ix_crcstrip a public symbol for the moment; it probably is not
bz [Tue, 24 Mar 2015 09:46:47 +0000 (09:46 +0000)]
Make ix_crcstrip a public symbol for the moment;  it probably is not
the right solution but I will leave it to experts to untangle this
problem to properly stop the build failures.

At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is
good as ixgbe_netmap.h defines a couple of (file) static variables--thus
local to if_ix.c.
static int ix_crcstrip however now also got checked from ix_txrx.c
(as an extern) and should not be visible there.  In fact we do see
powerpc and powerpc64 build failures because of this.  It is unclear
to me why on other (clang built?) architectures this does not lead
to a reference of an undefined symbol and similar build breakage.

10 years agoUse the feedback value from the synchronization endpoint as fallback
hselasky [Tue, 24 Mar 2015 09:21:53 +0000 (09:21 +0000)]
Use the feedback value from the synchronization endpoint as fallback
when there is no recording channel.

MFC after: 3 days
PR:  198444

10 years agoMFV of 280411,tzdata{2015b}
edwin [Tue, 24 Mar 2015 05:52:28 +0000 (05:52 +0000)]
MFV of 280411,tzdata{2015b}

Release 2015b - 2015-03-19 23:28:11 -0700

  Changes affecting future time stamps

    Mongolia will start observing DST again this year, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
    (Thanks to Ganbold Tsagaankhuu.)

    Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps

    The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)

10 years agoDisable coredump_devctl because it could lead to leaking paths to
rpaulo [Tue, 24 Mar 2015 02:17:17 +0000 (02:17 +0000)]
Disable coredump_devctl because it could lead to leaking paths to
jails.

10 years agofiledesc: microoptimize fget_unlocked by getting rid of fd < 0 branch
mjg [Tue, 24 Mar 2015 00:10:11 +0000 (00:10 +0000)]
filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch

Casting fd to an unsigned type simplifies fd range coparison to mere checking
if the result is bigger than the table.

10 years agoWhen an ICMP message is received and the MTU shrinks, only
tuexen [Mon, 23 Mar 2015 23:34:21 +0000 (23:34 +0000)]
When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.

MFC after: 3 days

10 years agocxgbe(4): Do not call sbuf_trim on an sbuf with a drain function.
np [Mon, 23 Mar 2015 23:06:32 +0000 (23:06 +0000)]
cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function.

MFC after: 1 week

10 years agoDo not save/restore the TLS pointer on context switch for armv6. The
ian [Mon, 23 Mar 2015 22:42:42 +0000 (22:42 +0000)]
Do not save/restore the TLS pointer on context switch for armv6.  The
pointer cannot be changed directly by userland code on armv6 (it can be on
armv4), so there's no need to save/restore.

Submitted by: Michal Meloun

10 years agoAdd llvm patch corresponding to r280400.
dim [Mon, 23 Mar 2015 21:15:07 +0000 (21:15 +0000)]
Add llvm patch corresponding to r280400.

10 years agoPull in r230348 from upstream llvm trunk (by Tim Northover):
dim [Mon, 23 Mar 2015 21:13:29 +0000 (21:13 +0000)]
Pull in r230348 from upstream llvm trunk (by Tim Northover):

  ARM: treat [N x i32] and [N x i64] as AAPCS composite types

  The logic is almost there already, with our special homogeneous
  aggregate handling. Tweaking it like this allows front-ends to emit
  AAPCS compliant code without ever having to count registers or add
  discarded padding arguments.

  Only arrays of i32 and i64 are needed to model AAPCS rules, but I
  decided to apply the logic to all integer arrays for more consistency.

This fixes a possible "Unexpected member type for HA" error when
compiling lib/msun/bsdsrc/b_tgamma.c for armv6.

Reported by: Jakub Palider <jpa@semihalf.com>

10 years agoReduce priority of ATA/SATA drivers.
mav [Mon, 23 Mar 2015 19:47:52 +0000 (19:47 +0000)]
Reduce priority of ATA/SATA drivers.

Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY;  more functional ahci(4), siis(4),
mvs(4) -> BUS_PROBE_DEFAULT;  BUS_PROBE_VENDOR leave for vendor drivers.

MFC after: 2 weeks

10 years agoBe consistent with M_ZERO when allocating ccbs.
benno [Mon, 23 Mar 2015 18:45:37 +0000 (18:45 +0000)]
Be consistent with M_ZERO when allocating ccbs.

There are four places, all in cam_xpt.c, where ccbs are malloc'ed. Two of
these use M_ZERO, two don't. The two that don't meant that allocated ccbs
had trash in them making it hard to debug errors where they showed up. Due
to this, use M_ZERO all the time when allocating ccbs.

Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC/Isilon Storage Division
Reviewed by: scottl, imp
Differential: https://reviews.freebsd.org/D2120

10 years agoxlint: update.
pfg [Mon, 23 Mar 2015 18:45:29 +0000 (18:45 +0000)]
xlint: update.

Bring some important updates from NetBSD up to about 2008/04/25.
The main feature is initial support for C99.

This is a very basic update to make it easier to merge new
compiler attirbutes but more updates are likely to follow.

Obtained from: NetBSD
MFC after: 2 weeks

10 years agoRename arm64 directories to aarch64
Andrew Turner [Mon, 23 Mar 2015 17:23:53 +0000 (17:23 +0000)]
Rename arm64 directories to aarch64

For when we reference them by TARGET_CPUARCH.

10 years agocp,mv: Use futimens() instead of utimensat() if possible.
jilles [Mon, 23 Mar 2015 17:35:05 +0000 (17:35 +0000)]
cp,mv: Use futimens() instead of utimensat() if possible.

10 years agoAdd missing variables password/bootlock_password.
dteske [Mon, 23 Mar 2015 17:31:22 +0000 (17:31 +0000)]
Add missing variables password/bootlock_password.
NB: Using NULL for default values in-case someone
or something uncomments it and reboots. See
check-password.4th(8) for additional details.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

10 years agoIncrease max input for password/bootlock_password from 16 to 255.
dteske [Mon, 23 Mar 2015 16:43:46 +0000 (16:43 +0000)]
Increase max input for password/bootlock_password from 16 to 255.
When taking user input, don't show asterisks as the user types
but instead spin a twiddle. Implement Ctrl-U to clear user input.
If the buffer is empty, either because the user has yet to type
anything, presses Ctrl-U at any time, or presses backspace enough
to end in an empty buffer, the twiddle is erased to provide feed-
back to the user.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

10 years agoPrevent password/bootlock_password features of loader.conf(5) from
dteske [Mon, 23 Mar 2015 16:31:27 +0000 (16:31 +0000)]
Prevent password/bootlock_password features of loader.conf(5) from
locking out everyone in the case of setting a password longer than
the maximum (currently 16 characters). Now the required password is
truncated to the maximum input that can be read from the user.

PR: kern/198760
MFC after: 3 days
MFH: stable/10 stable/9

10 years agoFix sgetkey indentation to be consistent with the rest of the file.
dteske [Mon, 23 Mar 2015 16:22:56 +0000 (16:22 +0000)]
Fix sgetkey indentation to be consistent with the rest of the file.
Remove some blank lines, adjust some comments and update copyright.

MFC after: 3 days
X-MFC-to: stable/10 stable/9

10 years agoRenumber clauses to avoid missing 3
emaste [Mon, 23 Mar 2015 16:04:04 +0000 (16:04 +0000)]
Renumber clauses to avoid missing 3

10 years agosfxge: remove unnecessary and wrong prediction
arybchik [Mon, 23 Mar 2015 15:53:26 +0000 (15:53 +0000)]
sfxge: remove unnecessary and wrong prediction

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2085

10 years agosfxge: do not check MCDI status word
arybchik [Mon, 23 Mar 2015 15:52:57 +0000 (15:52 +0000)]
sfxge: do not check MCDI status word

This is a temporary workaround until we determine a reliable sequence
of operations for detecting MC reboots.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2084

10 years agosfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64
arybchik [Mon, 23 Mar 2015 15:52:05 +0000 (15:52 +0000)]
sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64

bus_space_*_8() are not always macros, so it is not correct to use
#ifndef.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2083

10 years agosfxge: add statistics for each Tx queue
arybchik [Mon, 23 Mar 2015 15:49:11 +0000 (15:49 +0000)]
sfxge: add statistics for each Tx queue

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2082

10 years agosfxge: remove obsolete Tx non-multi queue support
arybchik [Mon, 23 Mar 2015 15:47:37 +0000 (15:47 +0000)]
sfxge: remove obsolete Tx non-multi queue support

Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier
versions support.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2081

10 years agosfxge: add barriers to BAR write macros
arybchik [Mon, 23 Mar 2015 15:45:39 +0000 (15:45 +0000)]
sfxge: add barriers to BAR write macros

In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
 1. Before the first write to guarantee that previous writes to the region
    have been done
 2. Before the last write to guarantee that write to the last dword/qword is
    done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2077

10 years agosfxge: assert either kernel or internal copy of interface flags
arybchik [Mon, 23 Mar 2015 15:44:17 +0000 (15:44 +0000)]
sfxge: assert either kernel or internal copy of interface flags

ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2075

10 years agoRemove a useless assignment.
tuexen [Mon, 23 Mar 2015 15:12:02 +0000 (15:12 +0000)]
Remove a useless assignment.

MFC after: 1 week

10 years agoRemove an unneeded header
Andrew Turner [Mon, 23 Mar 2015 12:44:02 +0000 (12:44 +0000)]
Remove an unneeded header

10 years agoAdd the start of the arm64 machine headers. This is the subset needed to
andrew [Mon, 23 Mar 2015 11:54:56 +0000 (11:54 +0000)]
Add the start of the arm64 machine headers. This is the subset needed to
start getting userland libraries building.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

10 years agoBump mask to be 64 bits - this fixes seeing MCS rates > 19.
adrian [Mon, 23 Mar 2015 03:43:59 +0000 (03:43 +0000)]
Bump mask to be 64 bits - this fixes seeing MCS rates > 19.

Tested:

* AR9380, STA mode, associated to a 3x3 AP (also FreeBSD)

10 years agoDocument "none" for VersionAddendum.
bdrewery [Mon, 23 Mar 2015 02:45:12 +0000 (02:45 +0000)]
Document "none" for VersionAddendum.

PR: 193127
MFC after: 2 weeks

10 years agoSmall style(9) cleanup.
pfg [Sun, 22 Mar 2015 23:42:21 +0000 (23:42 +0000)]
Small style(9) cleanup.

Fix yet more issues, but certainly not all.

Pointed out by: bde

10 years agoBuild expr with -fwrapv, since it relies on signed integer wrapping
dim [Sun, 22 Mar 2015 22:40:32 +0000 (22:40 +0000)]
Build expr with -fwrapv, since it relies on signed integer wrapping
having defined behavior.

Reported by: rodrigc
MFC after: 3 days

10 years agoThe sysctls that return process argv and envv return binary data, so clear
ian [Sun, 22 Mar 2015 21:18:44 +0000 (21:18 +0000)]
The sysctls that return process argv and envv return binary data, so clear
the SBUF_INCLUDENUL flag.

Pointed out by:     tijl@

10 years agoFix typo in jail(8) man page
allanjude [Sun, 22 Mar 2015 20:38:28 +0000 (20:38 +0000)]
Fix typo in jail(8) man page

PR: 198790
Differential Revision: https://reviews.freebsd.org/D2111
Submitted by: Jimmy Olgeni
Approved by: wblock (mentor)
Sponsored by: ScaleEngine Inc.

10 years agoStop calling x86_efi_copyin and x86_efi_getdev directly. This is to help
andrew [Sun, 22 Mar 2015 18:17:55 +0000 (18:17 +0000)]
Stop calling x86_efi_copyin and x86_efi_getdev directly. This is to help
port loader.efi to both 32 and 64-bit ARM where we can use this file with
minimal changes.

Differential Revision: https://reviews.freebsd.org/D2031
Reviewed by: imp

10 years agoAdd FREEBSD-Xlist files for llvm, clang and lldb.
dim [Sun, 22 Mar 2015 17:56:49 +0000 (17:56 +0000)]
Add FREEBSD-Xlist files for llvm, clang and lldb.

These are generated, and not "optimized" in any way, since I am not
entirely sure of the syntax or format of this type of file.  Feel free
to suggest ways of shortening these lists.

The general idea is the same for all three files, though:
* Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc)
* Delete tests, tools and utilities we don't want or use (including
  samples)
* Remove various bits of upstream metadata files that we don't want or
  use (.arcconfig, .gitignore, etc)

10 years agoInitialise the pps / packet tracking timestamp so 11n aggregation works again.
adrian [Sun, 22 Mar 2015 17:54:00 +0000 (17:54 +0000)]
Initialise the pps / packet tracking timestamp so 11n aggregation works again.

There's a bug in the ticks handling where when initialised at '0', once
the ticks counter wrapped the comparison math would never trigger.
The pps calculation would never happen, and thus aggregation was never
enabled.

It manifests itself as "oh you only get 11n transmit aggregation for the
first 10 minutes of uptime."

I'm sure there are other ticks related issues lurking in net80211.

Tested:

* ath / iwn, both with 'wlandebug +11n' and a little bit of iperf to
  kick off the transmit A-MPDU negotiation once the pps gets high enough.

10 years agoConvert savecore to libxo. The 'verbose' paths still use printf since they're
scottl [Sun, 22 Mar 2015 17:29:14 +0000 (17:29 +0000)]
Convert savecore to libxo.  The 'verbose' paths still use printf since they're
meant for interactivity on the command line and contain a lot of redundant
information.

Obtained from: Netflix, Inc.

10 years agoRemove MAXBSIZE use from drivers where it has nothing to do.
mav [Sun, 22 Mar 2015 16:10:28 +0000 (16:10 +0000)]
Remove MAXBSIZE use from drivers where it has nothing to do.

In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.

MFC after: 1 month

10 years agoSmall style(9) cleanup.
pfg [Sun, 22 Mar 2015 15:37:05 +0000 (15:37 +0000)]
Small style(9) cleanup.

#define should always be followed by a tab not space.

10 years agoFix for out of order device destruction notifications when using the
hselasky [Sun, 22 Mar 2015 13:11:56 +0000 (13:11 +0000)]
Fix for out of order device destruction notifications when using the
delist_dev() function. In addition to this change:
- add a proper description of this function
- add a proper witness assert inside this function
- switch a nearby line to use the "cdp" pointer instead of cdev2priv()

MFC after: 3 days

10 years agomsdosfs: mark unused compat-mount fields
kib [Sun, 22 Mar 2015 09:09:26 +0000 (09:09 +0000)]
msdosfs: mark unused compat-mount fields

The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
"old" vs "new" msdosfs mount arguments, has not been used since
2005; it should just go away now.

Likewise, the local-to-Unicode table that changed at the same
time is unused.

Leave the space reserved in the old style mount arguments, though,
since we still support the old mount call (via the cmount entry
point).

Submitted by: Chris Torek <chris.torek@gmail.com>
MFC after: 2 weeks

10 years agoAdd initial D-Link DIR-655 (A1) support.
adrian [Sun, 22 Mar 2015 02:15:09 +0000 (02:15 +0000)]
Add initial D-Link DIR-655 (A1) support.

This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no
5GHz (11n or 11ac) chip is available.

It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N
gigabit switch - so it's quite a beefy router device.

Tested:

* Well, a unit, naturally

Obtained from: Completely messing up an amazon.com order and getting this instead, and asking "hey, wonder if I could.."

10 years agoDescribe the behavior when both -f and a message are given. Pointed out by
wblock [Sun, 22 Mar 2015 01:25:57 +0000 (01:25 +0000)]
Describe the behavior when both -f and a message are given.  Pointed out by
Raphael Abreu <raphael.lorenzeto@gmail.com> on freebsd-doc.

MFC after: 1 week

10 years agore-enable building modules for the AR933x
adrian [Sat, 21 Mar 2015 23:39:34 +0000 (23:39 +0000)]
re-enable building modules for the AR933x

* add ipfw
* delete ath / ath_ahb for now, until I can have Warner beat me
  with the clue stick about putting in conditional build things into
  the ath Makefile so the module builds can just have the HAL bits
  that are relevant for a particular target.

10 years agoQuieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset
adrian [Sat, 21 Mar 2015 23:12:46 +0000 (23:12 +0000)]
Quieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset
path.

* For now there's no exposed control over classic / LNA antenna diversity,
  so just stub them out.  Adding this will take quite a bit of time.

* Add a function to fetch the CTS timeout.

PR: kern/198558

10 years agoPull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):
dim [Sat, 21 Mar 2015 21:49:25 +0000 (21:49 +0000)]
Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):

  Always include stddef.h to make sure size_t exists.

  From Alexander Esilevich.

Requested by: andrew

10 years agoproc: use MTX_NEW flag in proc_init
mjg [Sat, 21 Mar 2015 20:25:34 +0000 (20:25 +0000)]
proc: use MTX_NEW flag in proc_init

This allows us to get rid of bzero which was added specifically to make
mtx_init on p_mtx reliable.

This also fixes a potential problem where mtx_init on other mutexes
could trip over on unitialized memory and fire an assertion.

Reviewed by: kib

10 years agocred: add proc_set_cred_init helper
mjg [Sat, 21 Mar 2015 20:24:54 +0000 (20:24 +0000)]
cred: add proc_set_cred_init helper

proc_set_cred_init can be used to set first credentials of a new
process.

Update proc_set_cred assertions so that it only expects already used
processes.

This fixes panics where p_ucred of a new process happens to be non-NULL.

Reviewed by: kib

10 years agofork: assign refed credentials earlier
mjg [Sat, 21 Mar 2015 20:24:03 +0000 (20:24 +0000)]
fork: assign refed credentials earlier

Prior to this change the kernel would take p1's credentials and assign
them tempororarily to p2. But p1 could change credentials at that time
and in effect give us a use-after-free.

No objections from: kib

10 years agoCorrectly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL
dim [Sat, 21 Mar 2015 19:13:13 +0000 (19:13 +0000)]
Correctly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL
(this has to be passed as a combination of two flags).  Should fix the
case where the clang version is before 3.5.0.

Submitted by: Pedro Arthur <bygrandao@gmail.com>
X-MFC-With: r279018, r279378

10 years agoIntroduce vm_object_color() and use it in mmap(2) to set the color of
alc [Sat, 21 Mar 2015 17:56:55 +0000 (17:56 +0000)]
Introduce vm_object_color() and use it in mmap(2) to set the color of
named objects to zero before the virtual address is selected.  Previously,
the color setting was delayed until after the virtual address was
selected.  In rtld, this delay effectively prevented the mapping of a
shared library's code section using superpages.  Now, for example, we see
the first 1 MB of libc's code on armv6 mapped by a superpage after we've
gotten through the initial cold misses that bring the first 1 MB of code
into memory.  (With the page clustering that we perform on read faults,
this happens quickly.)

Differential Revision: https://reviews.freebsd.org/D2013
Reviewed by: jhb, kib
Tested by: Svatopluk Kraus (armv6)
MFC after: 6 weeks

10 years agoMake TARGET_ARCH=powerpc64 work without TARGET=powerpc.
imp [Sat, 21 Mar 2015 16:54:01 +0000 (16:54 +0000)]
Make TARGET_ARCH=powerpc64 work without TARGET=powerpc.

10 years agoerror is only used if MAC is defined, so make its declaration conditional
cognet [Sat, 21 Mar 2015 16:16:17 +0000 (16:16 +0000)]
error is only used if MAC is defined, so make its declaration conditional
as well.

10 years agoWhen waiting on PTE allocation, another thread could free the l2_dtable while
cognet [Sat, 21 Mar 2015 15:32:59 +0000 (15:32 +0000)]
When waiting on PTE allocation, another thread could free the l2_dtable while
we're not looking at it.
Fix this by increasing l2->l2_occupancy before we try to alloc (and decrease
it if the allocation failed, or if another thread did a similar allocation).

Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
MFC after: 1 week

10 years agoSomewhat modernize the SysV shm code:
kib [Sat, 21 Mar 2015 15:01:19 +0000 (15:01 +0000)]
Somewhat modernize the SysV shm code:
- Use real locking, replace Giant with global sx protecting the
  subsystem.  Since the subsystem' lock is no longer dropped during
  the sleepsk, remove not needed SHMSEG_WANTED segment flag, and
  revert r278963.
- To do proper code simplification possible after the change of the
  lock, restructure several functions into _locked body and
  originally-named wrapper which calls into _locked variant.  This
  allows to eliminate the 'goto done2' spread over the code.
- Merge shm_find_segment_by_shmid() and shm_find_segment_by_shmidx().
- Consistently change all function prototypes to ANSI C.

Reviewed by: mjg (who has earlier version of the similar patch to
 introduce real locking)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoThe synchronisation value returned by the so-called feedback endpoint
hselasky [Sat, 21 Mar 2015 09:45:45 +0000 (09:45 +0000)]
The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.

While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.

Make some variables 32-bit to avoid problems with multithreading.

MFC after: 3 days
PR:  198444

10 years agoMake the autofs LDAP script cope with server returning entries with
trasz [Sat, 21 Mar 2015 09:42:37 +0000 (09:42 +0000)]
Make the autofs LDAP script cope with server returning entries with
ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation),
instead of before.

PR: 198557
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

10 years agoFix the LED configuration so the switch PHY LEDs work fine.
adrian [Sat, 21 Mar 2015 06:44:41 +0000 (06:44 +0000)]
Fix the LED configuration so the switch PHY LEDs work fine.

Tested:

* TP-Link TL-WDR3600; yes, by testing all five ethernet ports.

Obtained from: Linux OpenWRT

10 years agoMigrate these configs to use the geom map search function.
adrian [Sat, 21 Mar 2015 06:18:25 +0000 (06:18 +0000)]
Migrate these configs to use the geom map search function.

Now that the search function reliably works, this allows for
smaller images.

10 years agoAdd support for the TP-Link TL-WDR4300 and TL-WDR3600.
adrian [Sat, 21 Mar 2015 06:16:23 +0000 (06:16 +0000)]
Add support for the TP-Link TL-WDR4300 and TL-WDR3600.

These are actually almost the same units; except one is 3x3 5GHz, and
one is 2x2 5GHz.

Tested:

* TP-Link TL-WDR3600

TODO:

* The ath0/ath1 MAC addresses are ye garbage (00:02:03:04:05:06); fixing
  that will take a little more time.  It works fine with the ath0/ath1
  MAC addresses set manually.

* Go through and yank the AR9344 on-board switch config (arswitch1);
  it's not required here for this AP.

10 years agoRe-enable the modules for now; I'm using them in some other test builds.
adrian [Sat, 21 Mar 2015 06:13:30 +0000 (06:13 +0000)]
Re-enable the modules for now; I'm using them in some other test builds.

10 years agoNow that the switch PHY fully works, don't limit arge0 to only being up
adrian [Sat, 21 Mar 2015 06:12:46 +0000 (06:12 +0000)]
Now that the switch PHY fully works, don't limit arge0 to only being up
if the WAN port is up.

This way I can use it for arbitrary ports/vlans.

10 years agoAdd GPIO function mux configuration for AR934x SoCs.
adrian [Sat, 21 Mar 2015 06:08:35 +0000 (06:08 +0000)]
Add GPIO function mux configuration for AR934x SoCs.

The AR934x (and maybe others in this family) have a more complicated
GPIO mux.  The AR71xx just has a single function register for a handful
of "GPIO or X" options, however the AR934x allows for one of roughly
100 behaviours for each GPIO pin.

So, this adds a quick hints based mechanism to configure the output
functions, which is required for some of the more interesting board
configurations.  Specifically, some use external LNAs to improve
RX, and without the MUX/output configured right, the 2GHz RX side
will be plain terrible.

It doesn't yet configure the "input" side yet; I'll add that if
it's required.

Tested:

* TP-Link TL-WDR3600, testing 2GHz STA/AP modes, checking some
  basic RX sensitivity things (ie, "can I see the AP on the other
  side of the apartment that intentionally has poor signal reception
  from where I am right now.")

Whilst here, fix a silly bug in the maxpin routine; I was missing
a break.

10 years agoadd QCA955x PCIe configuration registers.
adrian [Sat, 21 Mar 2015 06:00:46 +0000 (06:00 +0000)]
add QCA955x PCIe configuration registers.

These are /not/ absolute addresses, as the QCA955x SoC has 2 PCIe RC's
(and 1 PCIe EP.)

10 years agoNote that the AR724x PCIe registers are actually from the PCI_CTRL
adrian [Sat, 21 Mar 2015 05:59:45 +0000 (05:59 +0000)]
Note that the AR724x PCIe registers are actually from the PCI_CTRL
register range.