]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd per-port vlan support for the AR8327.
adrian [Sun, 8 Mar 2015 21:59:03 +0000 (21:59 +0000)]
Add per-port vlan support for the AR8327.

All the per-port support is really doing is applying a port visibility
mask to each of the switchports.  Everything still look like a single
portgroup (vlan id 1), but the per-port visibility mask is modified.

Whilst I'm here, also add some initial dot1q support - the pvid stuff
is doing the right thing, but it's not useful without the rest of
the VLAN table programming.

It's enough for me to be able to use the LAN/WAN port distinction
on the AP135, where there isn't (for now!) a dedicated PHY for the
"WAN" port.

Tested:

* AP135, QCA9558 SoC + AR8327 switch

9 years agoSummary: Remove the need for `mpid which is Illumos/Solaris specific.
gnn [Sun, 8 Mar 2015 21:51:37 +0000 (21:51 +0000)]
Summary: Remove the need for `mpid which is Illumos/Solaris specific.

9 years agoFix contraction and unnecessary commas in function arguments.
loos [Sun, 8 Mar 2015 21:17:56 +0000 (21:17 +0000)]
Fix contraction and unnecessary commas in function arguments.

Found with mandoc and igor.

9 years agoPut the new sentence on a new line.
loos [Sun, 8 Mar 2015 21:11:08 +0000 (21:11 +0000)]
Put the new sentence on a new line.

Found with igor.

9 years agobge(4): Small memory leak
pfg [Sun, 8 Mar 2015 19:55:46 +0000 (19:55 +0000)]
bge(4): Small memory leak

CID: 1229985
Reviewed by: marcel
Differential Review: https://reviews.freebsd.org/D2024

9 years agoOuch, I've misread the original text.
marck [Sun, 8 Mar 2015 19:50:30 +0000 (19:50 +0000)]
Ouch, I've misread the original text.

Still reword phrase a bit, hopefully in a bit less misleading form than before.

MFC after: 1 week
X-MFC-With: r279783
Pointy Hat to: marck

9 years agoSave and restore non-volatile floating-point registers during longjmp().
nwhitehorn [Sun, 8 Mar 2015 19:37:08 +0000 (19:37 +0000)]
Save and restore non-volatile floating-point registers during longjmp().
This should also save and restore non-volatile Altivec registers, but that
needs to wait on solving two problems:
1. Adding the nonvolatile vector registers means we need 5 more than _JBLEN
   entries in jmp_buf on 32-bit targets (64-bit is OK).
2. Need to figure out how to determine if saving/restoring vector regs
   is supported on the current CPU from userland.

MFC after: 1 month

9 years agoCorrect wordings a bit.
marck [Sun, 8 Mar 2015 17:34:06 +0000 (17:34 +0000)]
Correct wordings a bit.

MFC after: 1 week

9 years agoProvide $FreeBSD$ in the standard way. This fixes the build with clang 3.6.
nwhitehorn [Sun, 8 Mar 2015 16:50:45 +0000 (16:50 +0000)]
Provide $FreeBSD$ in the standard way. This fixes the build with clang 3.6.

9 years agoCall config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr
andrew [Sun, 8 Mar 2015 14:15:57 +0000 (14:15 +0000)]
Call config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr
hooks. With this we can get through the boot even if these functions fail.

Sponsored by: ABT Systems Ltd

9 years agoenv: Fix crash when -S string is not empty but no operand follows.
jilles [Sun, 8 Mar 2015 14:12:43 +0000 (14:12 +0000)]
env: Fix crash when -S string is not empty but no operand follows.

split_spaces() set argc in main() incorrectly, which caused trouble for
getopt().

Examples:
  env -S '\c'
  env -S -i

PR: 197769
MFC after: 1 week

9 years agoAdd support for enabling the USB on the Raspberry Pi boards when it hasn't
andrew [Sun, 8 Mar 2015 13:52:07 +0000 (13:52 +0000)]
Add support for enabling the USB on the Raspberry Pi boards when it hasn't
been done by U-Boot. This allows the USB to work when we load the kernel
directly.

No dma sync is performed after these operations as the data we read/write
is not used by the cpu after the calls to the maimbox driver.

Differential Revision: https://reviews.freebsd.org/D1940
Reviewed by: imp, Michal Meloun (meloun AT miracle.cz)
MFC after: 1 Week
Sponsored by: ABT Systems Ltd

9 years agoFinish r194601. Add a cred parameter to the VOP_VPTOCNP(9) manpage.
dchagin [Sun, 8 Mar 2015 10:52:10 +0000 (10:52 +0000)]
Finish r194601. Add a cred parameter to the VOP_VPTOCNP(9) manpage.
While here fix igor warning about new line.

Reviewed by: kib

MFC after: 1 Week

9 years agoBuild the videomode kernel module by default.
hselasky [Sun, 8 Mar 2015 08:44:04 +0000 (08:44 +0000)]
Build the videomode kernel module by default.

9 years agoSwitch polarity of PPS events.
hselasky [Sun, 8 Mar 2015 08:34:49 +0000 (08:34 +0000)]
Switch polarity of PPS events.

PR: 196897
Submitted by: ian @
MFC after: 1 week

9 years agoSummary: Update the ports to read from the packet rather than the
gnn [Sun, 8 Mar 2015 04:33:53 +0000 (04:33 +0000)]
Summary: Update the ports to read from the packet rather than the
socket structure

9 years agoudp track shows UDP data as it arrives and leaves the system
gnn [Sun, 8 Mar 2015 04:29:41 +0000 (04:29 +0000)]
udp track shows UDP data as it arrives and leaves the system

9 years agoFix up support for the AR8327.
adrian [Sun, 8 Mar 2015 03:53:36 +0000 (03:53 +0000)]
Fix up support for the AR8327.

* Even though I got the registers around "right", it seems
  I'm not tickling the MDIO access correctly for the internal PHY
  bus.  Some of the switches are fine poking at the external PHY
  registers; others aren't.  So, enable direct PHY bus access
  for the AR8327, and leave the existing code in place for the
  others.

* Go and shuffle the register access around.  Whilst here,
  restore the 2ms delay if changing page.

* Comment out some of the stub printf()s; there's some upcoming
  work to add port VLAN support.

Tested:

* AP135 development board
* Carambola2 - AR9331 SoC

9 years agoFix spurious interrupts on arm am335x (beaglebone), by doing the EOI in
ian [Sun, 8 Mar 2015 03:34:06 +0000 (03:34 +0000)]
Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in
both the post-filter and post-thread callbacks.

Also eliminate a completely unecessary write to INTC_ISR_CLEAR register,
which clears a software-generated interrupt that can only happen with a
write to INTC_ISR_SET (which nothing does).

9 years agoSummary: Remove the pid printing which does not currently work.
gnn [Sun, 8 Mar 2015 02:47:38 +0000 (02:47 +0000)]
Summary: Remove the pid printing which does not currently work.

9 years agoFix function name in the panic message.
kib [Sun, 8 Mar 2015 02:13:46 +0000 (02:13 +0000)]
Fix function name in the panic message.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUndo some issues from the previous big patch - there's no padding on RX,
adrian [Sun, 8 Mar 2015 01:47:10 +0000 (01:47 +0000)]
Undo some issues from the previous big patch - there's no padding on RX,
so remove DATAPAD and re-do the padding in the TX path manually.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse the correct mac addresses when initialising things.
adrian [Sun, 8 Mar 2015 01:44:57 +0000 (01:44 +0000)]
Use the correct mac addresses when initialising things.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3rios@gmail.com>

9 years agoAdd a new ioctl to allow the setting of GPIO pin names.
loos [Sun, 8 Mar 2015 00:47:50 +0000 (00:47 +0000)]
Add a new ioctl to allow the setting of GPIO pin names.

When a gpiobus child is added, use its name to identify the mapped pin
names.

Make the respective changes to libgpio.

Add a new '-n' flag to gpioctl(8) to set the pin name.

Differential Revision: https://reviews.freebsd.org/D2002
Reviewed by: rpaulo
Requested by: many

9 years agoFix lib/libnv tests compilation with -std=c++11, by adding appropriate
dim [Sun, 8 Mar 2015 00:30:52 +0000 (00:30 +0000)]
Fix lib/libnv tests compilation with -std=c++11, by adding appropriate
casts for NULL to invocations of the ATF_REQUIER_EQ() macro.

Reviewed by: rstone, jmmv
Differential Revision: https://reviews.freebsd.org/D2027

9 years agoFix another -Wunused-local-typedef warning in libc++, in include/__tree.
dim [Sat, 7 Mar 2015 22:55:31 +0000 (22:55 +0000)]
Fix another -Wunused-local-typedef warning in libc++, in include/__tree.

MFC after: 3 days

9 years agoPull in r228344 from upstream libc++ trunk (by Eric Fiselier):
dim [Sat, 7 Mar 2015 22:53:15 +0000 (22:53 +0000)]
Pull in r228344 from upstream libc++ trunk (by Eric Fiselier):

  Get tests running with warnings. Fix warnings in headers and tests

This fixes a number of -Wunused-local-typedef warnings in libc++ headers.

MFC after: 3 days

9 years agoUse correct mode variable for PPS support.
hselasky [Sat, 7 Mar 2015 22:46:35 +0000 (22:46 +0000)]
Use correct mode variable for PPS support.

PR: 196897
Submitted by: ian @
MFC after: 1 week

9 years agoSet the property to executable.
gnn [Sat, 7 Mar 2015 21:31:37 +0000 (21:31 +0000)]
Set the property to executable.

9 years agoAdd execute bits to tcpstate script.
gnn [Sat, 7 Mar 2015 21:28:37 +0000 (21:28 +0000)]
Add execute bits to tcpstate script.

9 years agoAllow the UDL screen refresh rate to be runtime configurable through a
hselasky [Sat, 7 Mar 2015 20:49:32 +0000 (20:49 +0000)]
Allow the UDL screen refresh rate to be runtime configurable through a
sysctl. Increase the default frame rate to 25 FPS. Add a comment about
memory constraints.

9 years agoAdd support for USB display link adapters to the FB and VT drivers.
hselasky [Sat, 7 Mar 2015 20:45:15 +0000 (20:45 +0000)]
Add support for USB display link adapters to the FB and VT drivers.
The vtophys() function is used to get the physical page address for
the virtually allocated frame buffers when a physically continuous
memory area is not available. This change also allows removing the
masking of the FB_FLAG_NOMMAP flag in the PS3 syscons driver.

The FB and VT drivers were tested using X.org/xf86-video-scfb and
syscons.

9 years agoMake assembly slightly more idiomatic (and able to be handled by clang's
nwhitehorn [Sat, 7 Mar 2015 20:27:00 +0000 (20:27 +0000)]
Make assembly slightly more idiomatic (and able to be handled by clang's
integrated assembler).

9 years agoMake 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent
nwhitehorn [Sat, 7 Mar 2015 20:14:46 +0000 (20:14 +0000)]
Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent
executables. The goal here, not yet accomplished, is to let the e500 kernel
run under QEMU by setting KERNBASE to something that fits in low memory and
then having the kernel relocate itself at runtime.

9 years agoTCP connection tracker that uses aggregations to show where connections
gnn [Sat, 7 Mar 2015 19:29:53 +0000 (19:29 +0000)]
TCP connection tracker that uses aggregations to show where connections
originate from.

9 years agoAdd a more complex TCP tracking script, which shows connections and
gnn [Sat, 7 Mar 2015 19:16:09 +0000 (19:16 +0000)]
Add a more complex TCP tracking script, which shows connections and
accepts as well as state transitions.

9 years agoAdd error reporting (but not actual handling yet, apart from
trasz [Sat, 7 Mar 2015 19:14:01 +0000 (19:14 +0000)]
Add error reporting (but not actual handling yet, apart from
reporting them) for EFI calls to boot1.efi.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRemove extra '&'. sin6 is already a pointer.
ae [Sat, 7 Mar 2015 18:44:52 +0000 (18:44 +0000)]
Remove extra '&'. sin6 is already a pointer.

PR: 195011
MFC after: 1 week

9 years agolla_lookup() can directly call llentry_free() for static entries
ae [Sat, 7 Mar 2015 18:33:08 +0000 (18:33 +0000)]
lla_lookup() can directly call llentry_free() for static entries
and the last one requires to hold afdata's wlock.

PR: 197096
MFC after: 1 week

9 years agoAdd PPS support to USB serial drivers.
hselasky [Sat, 7 Mar 2015 18:25:58 +0000 (18:25 +0000)]
Add PPS support to USB serial drivers.
Bump kernel version to reflect structure change.

PR: 196897
MFC after: 1 week

9 years agoAdd mutex support to the pps_ioctl() API in the kernel.
hselasky [Sat, 7 Mar 2015 18:23:32 +0000 (18:23 +0000)]
Add mutex support to the pps_ioctl() API in the kernel.
Bump kernel version to reflect structure change.

PR: 196897
MFC after: 1 week

9 years agoAdd a TCP state tracking script based on FreeBSD TCP SDTs
gnn [Sat, 7 Mar 2015 18:17:15 +0000 (18:17 +0000)]
Add a TCP state tracking script based on FreeBSD TCP SDTs

9 years agoAdd DA_Q_NO_RC16 quirk for USB mass storage device.
hselasky [Sat, 7 Mar 2015 17:18:06 +0000 (17:18 +0000)]
Add DA_Q_NO_RC16 quirk for USB mass storage device.

PR: 194062
MFC after: 1 week

9 years agoAdd more USB IDs.
hselasky [Sat, 7 Mar 2015 17:11:07 +0000 (17:11 +0000)]
Add more USB IDs.

PR: 197753
MFC after: 1 week

9 years agoMove the uart_class definitions and fdt compat data into the individual
ian [Sat, 7 Mar 2015 15:24:15 +0000 (15:24 +0000)]
Move the uart_class definitions and fdt compat data into the individual
uart implementations, and export them using the new linker-set mechanism.

Differential Revision: https://reviews.freebsd.org/D1993
Submitted by: Michal Meloun

9 years agoDefine new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full
ian [Sat, 7 Mar 2015 15:18:57 +0000 (15:18 +0000)]
Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full
(class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART
class only.

This paves the way for declaring uart_class data and ofw/fdt compat data
with a uart implementation, rather than needing a big global table of
compat data and weak-symbol declarations of every existing implementation.

Differential Revision: https://reviews.freebsd.org/D1992
Submitted by: Michal Meloun

9 years agoenv: Fix testsuite for additional variables set by sh.
jilles [Sat, 7 Mar 2015 13:54:44 +0000 (13:54 +0000)]
env: Fix testsuite for additional variables set by sh.

MFC after: 1 week

9 years agoAdd support for walltimestamp to DTrace on ARM.
gnn [Sat, 7 Mar 2015 04:38:25 +0000 (04:38 +0000)]
Add support for walltimestamp to DTrace on ARM.

9 years agoCorrect a typo in vm_object_backing_scan() that originated in r254141.
alc [Sat, 7 Mar 2015 04:18:40 +0000 (04:18 +0000)]
Correct a typo in vm_object_backing_scan() that originated in r254141.
Specifically, change a lock acquire into a lock release.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoforgot to bump date, and replace contraction (igor)...
jmg [Sat, 7 Mar 2015 03:48:32 +0000 (03:48 +0000)]
forgot to bump date, and replace contraction (igor)...

9 years agoBump .Dd to current date (which I should have done as part of initial
loos [Sat, 7 Mar 2015 01:42:04 +0000 (01:42 +0000)]
Bump .Dd to current date (which I should have done as part of initial
commit).

Connect ds3231.4 to the build.

9 years agomake things a bit more clear.. we worked together on language..
jmg [Fri, 6 Mar 2015 23:17:18 +0000 (23:17 +0000)]
make things a bit more clear..  we worked together on language..

Submitted by: Justin Cormack

9 years agocompat_passwd(): yet another uninitialized access to stayopen.
pfg [Fri, 6 Mar 2015 22:22:57 +0000 (22:22 +0000)]
compat_passwd(): yet another uninitialized access to stayopen.

CID: 1018731

9 years agoMFV of 279704,tzdata{2015a}
edwin [Fri, 6 Mar 2015 21:45:35 +0000 (21:45 +0000)]
MFV of 279704,tzdata{2015a}

Release 2015a - 2015-01-29

Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    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: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

9 years agoFix a typo.
jhb [Fri, 6 Mar 2015 20:53:56 +0000 (20:53 +0000)]
Fix a typo.

9 years agoUpdate a comment that had drifted out of date with the last changes.
ian [Fri, 6 Mar 2015 20:52:05 +0000 (20:52 +0000)]
Update a comment that had drifted out of date with the last changes.

9 years agocxgbe(4): experimental rx packet sink for netmap queues. This is not
np [Fri, 6 Mar 2015 20:41:28 +0000 (20:41 +0000)]
cxgbe(4): experimental rx packet sink for netmap queues.  This is not
intended for general use.

MFC after: 1 month

9 years agocxgbe(4): knobs to experiment with the interrupt coalescing timer for
np [Fri, 6 Mar 2015 20:39:19 +0000 (20:39 +0000)]
cxgbe(4): knobs to experiment with the interrupt coalescing timer for
netmap rx queues, and the "batchiness" of rx updates sent to the chip.

These knobs will probably become per-rxq in the near future and will be
documented only after their final form is decided.

MFC after: 1 month

9 years agoOnly schedule interrupts on a single hyperthread of a modern Intel CPU core
jhb [Fri, 6 Mar 2015 20:34:28 +0000 (20:34 +0000)]
Only schedule interrupts on a single hyperthread of a modern Intel CPU core
by default.  Previously we used a single hyperthread on Pentium4-era
cores but used both hyperthreads on more recent CPUs.

MFC after: 2 weeks

9 years agoUpdate the ELFOSABI_* constants.
ed [Fri, 6 Mar 2015 16:43:54 +0000 (16:43 +0000)]
Update the ELFOSABI_* constants.

Two new operating systems have been added in the meantime.
ELFOSABI_FENIXOS that uses value 16 (published in the latest draft) and
ELFOSABI_CLOUDABI that uses value 17 (to be published in the next draft).

9 years agoFix style.
br [Fri, 6 Mar 2015 16:23:30 +0000 (16:23 +0000)]
Fix style.

9 years agoThis setting of stop_at_shutdown should have been removed with r279253
slm [Fri, 6 Mar 2015 16:17:08 +0000 (16:17 +0000)]
This setting of stop_at_shutdown should have been removed with r279253

Approved by: ken
MFC after: 1 week

9 years agoSet a dependancy on fbt module for ARM.
br [Fri, 6 Mar 2015 16:08:03 +0000 (16:08 +0000)]
Set a dependancy on fbt module for ARM.

9 years agocxgbe(4): provide the correct size of freelists associated with netmap
np [Fri, 6 Mar 2015 16:05:20 +0000 (16:05 +0000)]
cxgbe(4):  provide the correct size of freelists associated with netmap
rx queues to the chip.  This will fix many problems with native netmap
rx on ncxl/ncxgbe interfaces.

MFC after: 1 week

9 years ago- In vnode_pager_generic_getpages() use different free counters for
glebius [Fri, 6 Mar 2015 14:15:30 +0000 (14:15 +0000)]
- In vnode_pager_generic_getpages() use different free counters for
  synchronous and asynchronous requests.  The latter can saturate the
  I/O and we do not want them to affect regular paging.
- Allocate the pbuf at the very beginning of the function, so that
  if we are low on certain kind of pbufs don't even proceed to BMAP,
  but sleep.

Reviewed by: kib
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agotcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().
ae [Fri, 6 Mar 2015 05:50:39 +0000 (05:50 +0000)]
tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().
Check cmdarg isn't NULL before dereference, this check was in the
ip6_notify_pmtu() before r279588.

Reported by: Florian Smeets
MFC after: 1 week

9 years agoWhen ICW1 is issued the edge sense circuit is reset which means that
tychon [Fri, 6 Mar 2015 02:05:45 +0000 (02:05 +0000)]
When ICW1 is issued the edge sense circuit is reset which means that
following an initialization a low-to-high transistion is necesary to
generate an interrupt.

Reviewed by: neel

9 years agoAdd sysctls to control PS-PL level shifters and FCLK settings.
gonzo [Thu, 5 Mar 2015 21:41:58 +0000 (21:41 +0000)]
Add sysctls to control PS-PL level shifters and FCLK settings.

PL (programmable logic) uses FCLK0..FCLK3 as a clock sources.
Normally they're configured by first stage boot loader (FSBL)
and normal user never has to touch them. These sysctls may come
useful for hardware developers

hw.fpga.fclk.N.source: clock source (IO, DDR, ARM)
hw.fpga.fclk.N.freq: requested frequency in Hz
hw.fpga.fclk.N.actual_freq: actual frequency in Hz (R/O)

hw.fgpa.level_shifters: 0/1 to enable/disable PS-PL level shifters,
    normally they're enabled either by FSBL or after programming
    FPGA through devcfg(4)

9 years ago- Implement loopback probing state in enhanced DAD algorithm.
hrs [Thu, 5 Mar 2015 21:27:49 +0000 (21:27 +0000)]
- Implement loopback probing state in enhanced DAD algorithm.

- Add no_dad and ignoreloop per-IF knob.  no_dad disables DAD completely,
  and ignoreloop is to prevent infinite loop in loopback probing state when
  loopback is permanently expected.

9 years agoAdd variable initialization missed by me and clang.
mav [Thu, 5 Mar 2015 20:29:18 +0000 (20:29 +0000)]
Add variable initialization missed by me and clang.

Reported by: grehan
MFC after: 2 weeks

9 years agoFix error translation broken in r279658.
mav [Thu, 5 Mar 2015 20:24:34 +0000 (20:24 +0000)]
Fix error translation broken in r279658.

Reported by: grehan
MFC after: 2 weeks

9 years agorlogin(1): initialize term variable.
pfg [Thu, 5 Mar 2015 19:51:37 +0000 (19:51 +0000)]
rlogin(1): initialize term variable.

CID: 1011522
Obtained from: NetBSD (CVS 1.18, partial)

9 years agodtrace_cas32 and dtrace_casptr should retrn the data loaded from target
andrew [Thu, 5 Mar 2015 18:03:42 +0000 (18:03 +0000)]
dtrace_cas32 and dtrace_casptr should retrn the data loaded from target
not the new value.

Sponsored by: ABT Systems Ltd

9 years agoAdd the MD parts of dtrace needed to use fbt on ARM. For this we need to
andrew [Thu, 5 Mar 2015 17:55:31 +0000 (17:55 +0000)]
Add the MD parts of dtrace needed to use fbt on ARM. For this we need to
emulate the instructions used in function entry and exit.

For function entry ARM will use a push instruction to push up to 16
registers to the stack. While we don't expect all 16 to be used we need to
handle any combination the compiler may generate, even if it doesn't make
sense (e.g. pushing the program counter).

On function return we will either have a pop or branch instruction. The
former is similar to the push instruction, but with care to make sure we
update the stack pointer and program counter correctly in the cases they
are either in the list of registers or not. For branch we need to take the
24-bit offset, sign-extend it, and add that number of 4-byte words to the
program counter. Care needs to be taken as, due to historical reasons, the
address the branch is relative to is not the current instruction, but 8
bytes later.

This allows us to use the following probes on ARM boards:
  dtrace -n 'fbt::malloc:entry { stack() }'
and
  dtrace -n 'fbt::free:return { stack() }'

Differential Revision: https://reviews.freebsd.org/D2007
Reviewed by: gnn, rpaulo
Sponsored by: ABT Systems Ltd

9 years agoqsort(3): small style(9) cleanups.
pfg [Thu, 5 Mar 2015 17:17:11 +0000 (17:17 +0000)]
qsort(3): small style(9) cleanups.

Basically spaces vs. tabs.
No functional change.

9 years agoFix build after unifying DAR/DEAR storage in trap frame.
nwhitehorn [Thu, 5 Mar 2015 17:02:22 +0000 (17:02 +0000)]
Fix build after unifying DAR/DEAR storage in trap frame.

9 years agoqsort(3): enhance to handle 32-bit aligned data on 64-bit systems
pfg [Thu, 5 Mar 2015 17:00:39 +0000 (17:00 +0000)]
qsort(3): enhance to handle 32-bit aligned data on 64-bit systems

Implement a small enhancement to the original qsort implementation:
If the data is 32 bit aligned we can side-step the long type
version and use int instead.

The change brings a modest but significant improvement in
32 bit workloads.

Relnotes: yes

PR: 135718
Taken from: ache

9 years agoImplement cache flush for ahci-hd and for virtio-blk over device.
mav [Thu, 5 Mar 2015 15:29:18 +0000 (15:29 +0000)]
Implement cache flush for ahci-hd and for virtio-blk over device.

MFC after: 2 weeks

9 years agoAdd check for absent stripe size to r279652.
mav [Thu, 5 Mar 2015 13:52:30 +0000 (13:52 +0000)]
Add check for absent stripe size to r279652.

MFC after: 2 weeks

9 years agoReport logical/physical sector sizes for virtual SATA disk.
mav [Thu, 5 Mar 2015 12:21:12 +0000 (12:21 +0000)]
Report logical/physical sector sizes for virtual SATA disk.

MFC after: 2 weeks

9 years agoAdd support for TOPOLOGY feature of virtio block device.
mav [Thu, 5 Mar 2015 10:40:45 +0000 (10:40 +0000)]
Add support for TOPOLOGY feature of virtio block device.

Passing through physical block size/offset from underlying storage allows
guest to manage proper data and I/O alignment to improve performance.

MFC after: 2 weeks

9 years agoSize of opt_io_size field is 32 bit.
mav [Thu, 5 Mar 2015 10:29:46 +0000 (10:29 +0000)]
Size of opt_io_size field is 32 bit.

MFC after: 2 weeks

9 years agoReenable VIRTIO_BLK_F_TOPOLOGY feature.
mav [Thu, 5 Mar 2015 09:51:59 +0000 (09:51 +0000)]
Reenable VIRTIO_BLK_F_TOPOLOGY feature.

MFC after: 2 weeks

9 years agoDon't all DTrace's FBT on ARM to instrument undefinedinstruction(), as
rwatson [Thu, 5 Mar 2015 07:40:41 +0000 (07:40 +0000)]
Don't all DTrace's FBT on ARM to instrument undefinedinstruction(), as
this would lead to DTrace reentrance.

Sponsored by: DARPA, AFRL

9 years agosysrc(8): Add `key-=remove' and improve `key+=append' syntax
dteske [Thu, 5 Mar 2015 05:54:34 +0000 (05:54 +0000)]
sysrc(8): Add `key-=remove' and improve `key+=append' syntax

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

9 years agoMove IVOR setup from assembler to C, decreasing required assumptions about
nwhitehorn [Thu, 5 Mar 2015 05:53:08 +0000 (05:53 +0000)]
Move IVOR setup from assembler to C, decreasing required assumptions about
address formats for trap handlers.

9 years agoUse the child device name here is lame because at the point that this
loos [Thu, 5 Mar 2015 03:11:47 +0000 (03:11 +0000)]
Use the child device name here is lame because at the point that this
happens, the child device is not yet specified.

9 years agoChange ofw_gpiobus_destroy_devinfo() to unmap the GPIO pins and then
loos [Thu, 5 Mar 2015 02:54:30 +0000 (02:54 +0000)]
Change ofw_gpiobus_destroy_devinfo() to unmap the GPIO pins and then
rework the code a little bit to use this function consistently to cleanup
all the changes made as part of the probe phase.

This fixes an issue where a FDT child node without a matching driver could
leave the GPIO pins mapped and prevent the further use of them.

9 years agoAdd a bus_probe_nomatch() method for gpiobus/ofw_gpiobus.
loos [Thu, 5 Mar 2015 01:49:58 +0000 (01:49 +0000)]
Add a bus_probe_nomatch() method for gpiobus/ofw_gpiobus.

This prints a warning when your system have a hinted child or a FDT child
node for which you don't have a matching driver:

gpiobus0: <unknown device> at pin(s) 24 irq 24

9 years agor* commands are not precious anymore
bapt [Wed, 4 Mar 2015 22:01:44 +0000 (22:01 +0000)]
r* commands are not precious anymore

9 years agoThe AIM DAR (data access fault address register) and Book-E DEAR registers
nwhitehorn [Wed, 4 Mar 2015 21:06:57 +0000 (21:06 +0000)]
The AIM DAR (data access fault address register) and Book-E DEAR registers
have the same meaning and occupy the same memory address in the trapframe
courtesy of union. Avoid some pointless #ifdef by spelling them both 'DAR'
in the trapframe.

9 years agodrm: Allow parallel builds of drivers and firmwares
dumbbell [Wed, 4 Mar 2015 20:47:43 +0000 (20:47 +0000)]
drm: Allow parallel builds of drivers and firmwares

Submitted by: hps@
MFC after: 2 weeks

9 years agodrm: Import Linux commit b7ea85a4fed37835eec78a7be3039c8dc22b8178
dumbbell [Wed, 4 Mar 2015 20:43:46 +0000 (20:43 +0000)]
drm: Import Linux commit b7ea85a4fed37835eec78a7be3039c8dc22b8178

Author: Huacai Chen <chenhc@lemote.com>
Date:   Tue May 21 06:23:43 2013 +0000

    drm: fix a use-after-free when GPU acceleration disabled

    When GPU acceleration is disabled, drm_vblank_cleanup() will free the
    vblank-related data, such as vblank_refcount, vblank_inmodeset, etc.
    But we found that drm_vblank_post_modeset() may be called after the
    cleanup, which use vblank_refcount and vblank_inmodeset. And this will
    cause a kernel panic.

    Fix this by return immediately if dev->num_crtcs is zero. This is the
    same thing that drm_vblank_pre_modeset() does.

    Call trace of a drm_vblank_post_modeset() after drm_vblank_cleanup():
    [   62.628906] [<ffffffff804868d0>] drm_vblank_post_modeset+0x34/0xb4
    [   62.628906] [<ffffffff804c7008>] atombios_crtc_dpms+0xb4/0x174
    [   62.628906] [<ffffffff804c70e0>] atombios_crtc_commit+0x18/0x38
    [   62.628906] [<ffffffff8047f038>] drm_crtc_helper_set_mode+0x304/0x3cc
    [   62.628906] [<ffffffff8047f92c>] drm_crtc_helper_set_config+0x6d8/0x988
    [   62.628906] [<ffffffff8047dd40>] drm_fb_helper_set_par+0x94/0x104
    [   62.628906] [<ffffffff80439d14>] fbcon_init+0x424/0x57c
    [   62.628906] [<ffffffff8046a638>] visual_init+0xb8/0x118
    [   62.628906] [<ffffffff8046b9f8>] take_over_console+0x238/0x384
    [   62.628906] [<ffffffff80436df8>] fbcon_takeover+0x7c/0xdc
    [   62.628906] [<ffffffff8024fa20>] notifier_call_chain+0x44/0x94
    [   62.628906] [<ffffffff8024fcbc>] __blocking_notifier_call_chain+0x48/0x68
    [   62.628906] [<ffffffff8042d990>] register_framebuffer+0x228/0x260
    [   62.628906] [<ffffffff8047e010>] drm_fb_helper_single_fb_probe+0x260/0x314
    [   62.628906] [<ffffffff8047e2c4>] drm_fb_helper_initial_config+0x200/0x234
    [   62.628906] [<ffffffff804e5560>] radeon_fbdev_init+0xd4/0xf4
    [   62.628906] [<ffffffff804e0e08>] radeon_modeset_init+0x9bc/0xa18
    [   62.628906] [<ffffffff804bfc14>] radeon_driver_load_kms+0xdc/0x12c
    [   62.628906] [<ffffffff8048b548>] drm_get_pci_dev+0x148/0x238
    [   62.628906] [<ffffffff80423564>] local_pci_probe+0x5c/0xd0
    [   62.628906] [<ffffffff80241ac4>] work_for_cpu_fn+0x1c/0x30
    [   62.628906] [<ffffffff802427c8>] process_one_work+0x274/0x3bc
    [   62.628906] [<ffffffff80242934>] process_scheduled_works+0x24/0x44
    [   62.628906] [<ffffffff8024515c>] worker_thread+0x31c/0x3f4
    [   62.628906] [<ffffffff802497a8>] kthread+0x88/0x90
    [   62.628906] [<ffffffff80206794>] kernel_thread_helper+0x10/0x18

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Reported by: J.R. Oldroyd <fbsd@opal.com>
MFC after: 2 weeks

9 years agoWhen compiling boot2 with gcc on i386 and pc98, only use the custom flag
dim [Wed, 4 Mar 2015 20:33:15 +0000 (20:33 +0000)]
When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc.  This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough.  (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)

Reported by: rodrigc
MFC after: 3 days

9 years agoRework calendar(1) parser
bapt [Wed, 4 Mar 2015 20:04:23 +0000 (20:04 +0000)]
Rework calendar(1) parser

Support includes surrounded by '"' or '<' '>'
Print warnings about bad syntax
Correctly navigate through include directories to find calendar files
Correctly support multiple includes

Tested by: gjb
MFC after: 1 week

9 years agoGarbage collect old function prototypes.
nwhitehorn [Wed, 4 Mar 2015 17:04:22 +0000 (17:04 +0000)]
Garbage collect old function prototypes.

9 years agoMove Book-E/AIM dependent bits for setting user PMAP during thread switch
nwhitehorn [Wed, 4 Mar 2015 16:45:31 +0000 (16:45 +0000)]
Move Book-E/AIM dependent bits for setting user PMAP during thread switch
out of cpu_switch() and into pmap_activate() where they belong. This also
removes all the #ifdef from cpu_switch().

9 years agoRemove imx6s-wandboard.dts, there is no such file. Also imx6q-wandboard
ian [Wed, 4 Mar 2015 16:19:34 +0000 (16:19 +0000)]
Remove imx6s-wandboard.dts, there is no such file.  Also imx6q-wandboard
to follow imx6dl-wandboard (so that the entries are sorted by board name
first, then by soc type).

9 years agoOptimize SIOCGIFMEDIA handling removing malloc(9) and double
glebius [Wed, 4 Mar 2015 15:00:20 +0000 (15:00 +0000)]
Optimize SIOCGIFMEDIA handling removing malloc(9) and double
traversal of the list.

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agoAdd example configuration for FibreChannel ports.
mav [Wed, 4 Mar 2015 14:30:09 +0000 (14:30 +0000)]
Add example configuration for FibreChannel ports.

MFC after: 1 week