]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

9 years agoIf target name starts with "naa.", set it as WWNN for CTL port.
mav [Wed, 4 Mar 2015 14:12:38 +0000 (14:12 +0000)]
If target name starts with "naa.", set it as WWNN for CTL port.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

9 years agoFix handling of queued text and logout requests.
mav [Wed, 4 Mar 2015 12:12:46 +0000 (12:12 +0000)]
Fix handling of queued text and logout requests.

While it may have little sense, text and logout requests can be queued.
If they are, they consume cmdsn, so we should increment our conn_cmdsn.

MFC after: 1 week

9 years agoFix deadlock in IPv6 PCB code.
ae [Wed, 4 Mar 2015 11:20:01 +0000 (11:20 +0000)]
Fix deadlock in IPv6 PCB code.

When several threads are trying to send datagram to the same destination,
but fragmentation is disabled and datagram size exceeds link MTU,
ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all
sockets wanted to know MTU to this destination. And since all threads
hold PCB lock while sending, taking the lock for each PCB in the
in6_pcbnotify() leads to deadlock.

RFC 3542 p.11.3 suggests notify all application wanted to receive
IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message.
But it doesn't require this, when we don't receive ICMPv6 message.

Change ip6_notify_pmtu() function to be able use it directly from
ip6_output() to notify only one socket, and to notify all sockets
when ICMPv6 packet too big message received.

PR: 197059
Differential Revision: https://reviews.freebsd.org/D1949
Reviewed by: no objection from #network
Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoDefine PTR_ALIGN() macro which will be needed coming Mellanox driver
hselasky [Wed, 4 Mar 2015 09:58:39 +0000 (09:58 +0000)]
Define PTR_ALIGN() macro which will be needed coming Mellanox driver
releases.

Sponsored by: Mellanox Technologies
MFC after: 3 days

9 years agoUpdates for the Mellanox ethernet driver
hselasky [Wed, 4 Mar 2015 09:30:03 +0000 (09:30 +0000)]
Updates for the Mellanox ethernet driver

> List of fixes:
  * use correct format for GID printouts
  * double array indexing
  * spelling in printouts
  * void pointer arithmetic
  * allow more receive rings
  * correct maximum number of transmit rings
  * use "const" instead of "static" for constants
  * check for invalid VLAN tags
  * check for lack of IRQ resources
> Added more hardware specific defines
> Added more verbose printouts of firmware status codes

Sponsored by: Mellanox Technologies
MFC after: 3 days

9 years agoAllow USB modules to be built in parallel.
hselasky [Wed, 4 Mar 2015 09:17:03 +0000 (09:17 +0000)]
Allow USB modules to be built in parallel.

9 years agoAdd myself (whu) to committers-src.dot.
whu [Wed, 4 Mar 2015 09:05:20 +0000 (09:05 +0000)]
Add myself (whu) to committers-src.dot.

Approved by: royger (mentor)

9 years agoAdd ethernet MAC DDR flush hookups for QCA955x.
adrian [Wed, 4 Mar 2015 03:52:50 +0000 (03:52 +0000)]
Add ethernet MAC DDR flush hookups for QCA955x.

Tested:

* AP135

9 years agoAdd DDR flush registers for QCA955x.
adrian [Wed, 4 Mar 2015 03:51:54 +0000 (03:51 +0000)]
Add DDR flush registers for QCA955x.

9 years agoFix both arge0 and arge1 to work correctly on the AP135.
adrian [Wed, 4 Mar 2015 03:48:11 +0000 (03:48 +0000)]
Fix both arge0 and arge1 to work correctly on the AP135.

* Force the arge0 interface to not use a PHY for speed negotiation
  for now.  It'd be nice to do it, but right now the RGMII interface
  to the switch needs to stay at 1000/full in order to match what
  the switch side of the port is programmed as.

  So until that's all sorted out, disconnect arge0 from the PHY
  and leave it at fixed at 1000/full.

  I noticed this when I tried using a busted ethernet cable that
  forced the PHY to negotiate 100/full.  The switch was fine and
  it negotiated to 100/full, but then arge0 saw the link update
  and set the speed to 100/full when the switch side of that
  hook up was set to 1000/full.  Tsk.

* When using argemdio, the mdio device resets and initialises
  the MAC, /not/ the arge_attach (or, as I discovered, arge_init.)
  So arge1 wasn't being fully initialised and thus no traffic
  would ever flow.

  So until I tidy up that mess, just create an argemdio bus for
  arge1.  It's totally fine; it won't do anything or find anything
  attached to it.

Tested:

* AP135 reference board - both arge0 and arge1 now work.

9 years agoFix typo in dropped-packets attribute (missing s).
marcel [Wed, 4 Mar 2015 02:56:32 +0000 (02:56 +0000)]
Fix typo in dropped-packets attribute (missing s).

Pointed-out by: allanjude (excellent catch!)

9 years agoUpdate ThunderX SATA quirk
emaste [Wed, 4 Mar 2015 02:17:36 +0000 (02:17 +0000)]
Update ThunderX SATA quirk

  Add quirk to ThunderX AHCI forcing only 1 MSI-X interrupt.
  Shorten Thunder quirk description to avoid printing 'SATA' twice.

Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation

9 years agoAdd a new safetly belt to freebsd-update to prevent a user doing a minor update ...
allanjude [Tue, 3 Mar 2015 23:20:18 +0000 (23:20 +0000)]
Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y)
Safetly belt can be disabled with the -F flag

Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise.

PR: 196760
Differential Revision: https://reviews.freebsd.org/D1550
Reviewed by: cperciva, delphij
Approved by: bcr (mentor), rodrigc (src)
MFC after: 1 month
Relnotes: yes
Sponsored by: ScaleEngine Inc.

9 years agoAdd density code for DAT-72, and notes on DAT-160.
ken [Tue, 3 Mar 2015 22:49:07 +0000 (22:49 +0000)]
Add density code for DAT-72, and notes on DAT-160.

As it turns out, the density code for DAT-160 (0x48) is the same
as for SDLT220.  Since the SDLT values are already in the table,
we will leave them in place.

Thanks to Harald Schmalzbauer for confirming the DAT-72 density code.

lib/libmt/mtlib.c:
Add DAT-72 density code, and commented out DAT-160 density
code.  Explain why DAT-160 is commented out.  Add notes
explaining where the bpi values for these formats came from.

usr.bin/mt/mt.1:
Add DAT-72 density code, and add a note explaining that
the SDLTTapeI(110) density code (0x48) is the same as
DAT-160.

Sponsored by: Spectra Logic
MFC after: 3 weeks

9 years agosh: Fix more compiler warnings related to variable declarations.
jilles [Tue, 3 Mar 2015 21:21:43 +0000 (21:21 +0000)]
sh: Fix more compiler warnings related to variable declarations.

9 years agoUpdate .Dd, sync usage() for -F. Missed in previous change.
pluknet [Tue, 3 Mar 2015 20:23:59 +0000 (20:23 +0000)]
Update .Dd, sync usage() for -F.  Missed in previous change.

9 years agoAdd and document an option to cause syslogd to run in the
rpaulo [Tue, 3 Mar 2015 20:07:59 +0000 (20:07 +0000)]
Add and document an option to cause syslogd to run in the
foreground.

This allows a separate process to monitor when and how
syslogd exits. That process can then restart syslogd if needed.

Differential Revision: https://reviews.freebsd.org/D1985
Submitted by: Ravi Pokala
Reviewed by: allanjude (man page)

9 years agoSort and remove unnecessary headers.
loos [Tue, 3 Mar 2015 17:20:19 +0000 (17:20 +0000)]
Sort and remove unnecessary headers.

9 years agoCreate nd6_ns_output_fib() function with extra argument fibnum. Use it
ae [Tue, 3 Mar 2015 10:50:03 +0000 (10:50 +0000)]
Create nd6_ns_output_fib() function with extra argument fibnum. Use it
to initialize mbuf's fibnum. Uninitialized fibnum value can lead to
panic in the routing code. Currently we use only RT_DEFAULT_FIB value
for initialization.

Differential Revision: https://reviews.freebsd.org/D1998
Reviewed by: hrs (previous version)
Sponsored by: Yandex LLC

9 years agoAdd quirk for USB 3.0 controllers which don't support 64-bit DMA.
hselasky [Tue, 3 Mar 2015 10:21:54 +0000 (10:21 +0000)]
Add quirk for USB 3.0 controllers which don't support 64-bit DMA.

MFC after: 3 days
Submitted by: Gary Jennejohn <gljennjohn@gmail.com>

9 years agoFix the pl011 driver to work when the uart will write in zero cycles. This
andrew [Tue, 3 Mar 2015 09:48:19 +0000 (09:48 +0000)]
Fix the pl011 driver to work when the uart will write in zero cycles. This
is the case, depending on the options, in some of the ARM hardware
simulators. In these cases we don't get an interrupt so will need to
schedule the task to write more data to the uart.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoLower warnings to please gcc 4.2
bapt [Tue, 3 Mar 2015 07:51:36 +0000 (07:51 +0000)]
Lower warnings to please gcc 4.2

9 years agoNonce has to be non-NULL for DAD even if net.inet6.ip6.dad_enhanced=0.
hrs [Tue, 3 Mar 2015 04:28:19 +0000 (04:28 +0000)]
Nonce has to be non-NULL for DAD even if net.inet6.ip6.dad_enhanced=0.

9 years agoCheck the return value of config_intrhook_establish().
kevlo [Tue, 3 Mar 2015 02:08:17 +0000 (02:08 +0000)]
Check the return value of config_intrhook_establish().

9 years agoMake periphdriver_register() take XPT lock when modifying the periph_drivers
trasz [Mon, 2 Mar 2015 22:48:11 +0000 (22:48 +0000)]
Make periphdriver_register() take XPT lock when modifying the periph_drivers
array.

This fixes a panic that sometimes occured when kldloading ctl.ko.

Reviewed by: mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoMove duplicate code to a new public function.
loos [Mon, 2 Mar 2015 22:28:47 +0000 (22:28 +0000)]
Move duplicate code to a new public function.

This new function can be used by other drivers to reserve the use of GPIO
pins.

Anyway, the use of ofw_gpiobus_parse_gpios() is preferred when possible.

Requested by: Michal Meloun

9 years agoRemove gperf(7) if gperf is not installed
bapt [Mon, 2 Mar 2015 22:13:33 +0000 (22:13 +0000)]
Remove gperf(7) if gperf is not installed

9 years agoAdd a "module" to build the dtb files for all supported imx6 systems.
ian [Mon, 2 Mar 2015 22:12:56 +0000 (22:12 +0000)]
Add a "module" to build the dtb files for all supported imx6 systems.

9 years agoUpdate libucl to git version 8d3b186
bapt [Mon, 2 Mar 2015 21:41:09 +0000 (21:41 +0000)]
Update libucl to git version 8d3b186

9 years agoReally update to 8d3b186
bapt [Mon, 2 Mar 2015 21:36:45 +0000 (21:36 +0000)]
Really update to 8d3b186

9 years agoUpdate libucl to git version 8d3b186
bapt [Mon, 2 Mar 2015 21:35:31 +0000 (21:35 +0000)]
Update libucl to git version 8d3b186

9 years agoAdd quirk to disable 64-bit XHCI DMA after r276717.
hselasky [Mon, 2 Mar 2015 20:42:06 +0000 (20:42 +0000)]
Add quirk to disable 64-bit XHCI DMA after r276717.

Requested by: Gary Jennejohn <gljennjohn@gmail.com>
MFC after: 3 days

9 years agoRevert r279338. The casts are apparently bogus, despite the fact that
ian [Mon, 2 Mar 2015 20:40:25 +0000 (20:40 +0000)]
Revert r279338.  The casts are apparently bogus, despite the fact that
they've been working in i386 (where this change came from).

9 years agoUpdate Exynos5 XHCI attach code after r276717.
hselasky [Mon, 2 Mar 2015 20:38:17 +0000 (20:38 +0000)]
Update Exynos5 XHCI attach code after r276717.

MFC after: 3 days

9 years agoFix warnings/errors when building vmm.ko with gcc:
neel [Mon, 2 Mar 2015 20:13:49 +0000 (20:13 +0000)]
Fix warnings/errors when building vmm.ko with gcc:

- fix warning about comparison of 'uint8_t v_tpr >= 0' always being true.

- fix error triggered by an empty clobber list in the inline assembly for
  "clgi" and "stgi"

- fix error when compiling "vmload %rax", "vmrun %rax" and "vmsave %rax". The
  gcc assembler does not like the explicit operand "%rax" while the clang
  assembler requires specifying the operand "%rax". Fix this by encoding the
  instructions using the ".byte" directive.

Reported by: julian
MFC after: 1 week

9 years agogive others fair warning that _SPARE2 isn't just cxgb, but used by large
jmg [Mon, 2 Mar 2015 20:05:16 +0000 (20:05 +0000)]
give others fair warning that _SPARE2 isn't just cxgb, but used by large
number of other subsystems, so you probably don't want _SPARE2..

ktr needs an overhaul to really only compile in the ones you want,
we've long passed the 31 bits it provides..

Sponsored by: transip.nl

9 years agoFix group membership of cloned interfaces when one is moved by
hrs [Mon, 2 Mar 2015 20:00:03 +0000 (20:00 +0000)]
Fix group membership of cloned interfaces when one is moved by
if_vmove().

In if_vmove(), if_detach_internal() and if_attach_internal() were
called in series to detach and reattach the interface.  When
detaching, if_delgroup() was called and the interface leaves all of
the group membership.  And then upon attachment, if_addgroup(ifp,
IFG_ALL) was called and it joined only "all" group again.

This had a problem. Normally, a cloned interface automatically joins
a group whose name is ifc_name of the cloner in addition to "all"
upon creation.  However, if_vmove() removed the membership and did
not restore upon attachment.

Differential Revision: https://reviews.freebsd.org/D1859

9 years agoFix white spaces.
jkim [Mon, 2 Mar 2015 19:14:58 +0000 (19:14 +0000)]
Fix white spaces.

9 years agoMake fuse(4) respect FOPEN_DIRECT_IO. This is required for correct
trasz [Mon, 2 Mar 2015 19:04:27 +0000 (19:04 +0000)]
Make fuse(4) respect FOPEN_DIRECT_IO.  This is required for correct
operation of GlusterFS.

PR: 192701
Submitted by: harsha at harshavardhana.net
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoProperly evaluate XZ_CMD from the chroot.
gjb [Mon, 2 Mar 2015 18:10:58 +0000 (18:10 +0000)]
Properly evaluate XZ_CMD from the chroot.

Sponsored by: The FreeBSD Foundation

9 years agoChange the sa(4) driver to check for long position support on
ken [Mon, 2 Mar 2015 18:09:49 +0000 (18:09 +0000)]
Change the sa(4) driver to check for long position support on
SCSI-2 devices.

Some older tape devices claim to be SCSI-2, but actually do support
long position information.  (Long position information includes
the current file mark.)  For example, the COMPAQ SuperDLT1.

So we now only disable the check on SCSI-1 and older devices.

sys/cam/scsi/scsi_sa.c:
In saregister(), only disable fetching long position
information on SCSI-1 and older drives.  Update the
comment to explain why.

Confirmed by: dvl
Sponsored by: Spectra Logic
MFC after: 3 weeks

9 years agoo Add more room for EFI boot blocks
br [Mon, 2 Mar 2015 18:08:39 +0000 (18:08 +0000)]
o Add more room for EFI boot blocks
o Specify the filename as argument

Differential Revision: https://reviews.freebsd.org/D1999
Reviewed by: emaste@

9 years agoUse xz(1) to compress FreeBSD/arm images.
gjb [Mon, 2 Mar 2015 18:04:57 +0000 (18:04 +0000)]
Use xz(1) to compress FreeBSD/arm images.

Sponsored by: The FreeBSD Foundation

9 years agoImplement Enhanced DAD algorithm for IPv6 described in
hrs [Mon, 2 Mar 2015 17:30:26 +0000 (17:30 +0000)]
Implement Enhanced DAD algorithm for IPv6 described in
draft-ietf-6man-enhanced-dad-13.

This basically adds a random nonce option (RFC 3971) to NS messages
for DAD probe to detect a looped back packet.  This looped back packet
prevented DAD on some pseudo-interfaces which aggregates multiple L2 links
such as lagg(4).

The length of the nonce is set to 6 bytes.  This algorithm can be disabled by
setting net.inet6.ip6.dad_enhanced sysctl to 0 in a per-vnet basis.

Reported by: hiren
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D1835

9 years agoRemove pregenerated text version of the texinfo documentation
bapt [Mon, 2 Mar 2015 17:25:03 +0000 (17:25 +0000)]
Remove pregenerated text version of the texinfo documentation

9 years agoInstall manpage version of texinfo documentation for binutils
bapt [Mon, 2 Mar 2015 17:24:04 +0000 (17:24 +0000)]
Install manpage version of texinfo documentation for binutils

9 years agoGenerate manpage out of the texinfo files using texi2mdoc
bapt [Mon, 2 Mar 2015 17:20:34 +0000 (17:20 +0000)]
Generate manpage out of the texinfo files using texi2mdoc

9 years agoUpdate mandoc to cvs snaphot from 20150302
bapt [Mon, 2 Mar 2015 16:58:57 +0000 (16:58 +0000)]
Update mandoc to cvs snaphot from 20150302

Use the new unsupp warning level to detect the unsupported manpages in man(1)

9 years agoRemove WIP code
bapt [Mon, 2 Mar 2015 16:48:00 +0000 (16:48 +0000)]
Remove WIP code

9 years agoImport CVS snapshot of mandoc as of 20150302
bapt [Mon, 2 Mar 2015 16:45:41 +0000 (16:45 +0000)]
Import CVS snapshot of mandoc as of 20150302

9 years agoInstall old texinfo pages in the form of mdoc(7) pages
bapt [Mon, 2 Mar 2015 11:49:01 +0000 (11:49 +0000)]
Install old texinfo pages in the form of mdoc(7) pages

9 years agoConvert texinfo to mdoc(7) using texi2mdoc
bapt [Mon, 2 Mar 2015 11:48:00 +0000 (11:48 +0000)]
Convert texinfo to mdoc(7) using texi2mdoc

9 years agoAdd support for the AP135 2.0 reference platform.
adrian [Mon, 2 Mar 2015 02:27:25 +0000 (02:27 +0000)]
Add support for the AP135 2.0 reference platform.

This is a QCA9558 SoC (2ghz 3x3) with an atheros 11ac PCIe 5GHz 3x3
NIC and an AR8327 gigabit ethernet switch.

TODO:

* The AR8327 gigabit switch support bugfixes are forthcoming.
* 11ac support and 11ac NIC support

9 years agoBring over the initial QCA955x SoC support framework.
adrian [Mon, 2 Mar 2015 02:24:46 +0000 (02:24 +0000)]
Bring over the initial QCA955x SoC support framework.

This is enough to bring up the basic SoC support.

What works thus far:

* The mips74k core, pll setup, and UART (or else well, stuff would
  be really difficult..)
* both USB 2.0 EHCI controllers
* on-board 2GHz 3x3 wifi (the other variant has 2GHz/5GHz wifi on-chip);
* arge0 - not yet sure why arge1 isn't firing off interrupts and thus
  handling traffic, but I will soon figure it out and fix it here.

Tested:

* AP135 reference design, QCA9558 SoC, pretending to be an 11n
  2GHz AP.

TODO:

* There's an interrupt mux hooking up devices to IP2 and IP3 - but it's
  not a read-and-clear or write-to-clear register.  So, trying to use it
  naively like I have been ends up with massive interrupt storms.
  For now the things that share those interrupts can just take them as
  shared interrupts and try to play nice.

* There's two PCIe root complexes /and/ one of them can actually be
  a PCIe device endpoint.  Yes, you heard right.  I have to teach the
  AR724x PCIe bridge code to handle multiple instances with multiple
  memory/irq regions, and then there'll be RC support, but EP support
  isn't on my TODO list.

* I'm not sure why arge1 isn't up and running.  I'll go figure that
  out soon and fix it here.

Thankyou to Qualcomm Atheros for providing me with hardware and
an abundance of documentation about these things.

9 years agoLay some groundwork for having this stuff hang off of AHB rather than
adrian [Mon, 2 Mar 2015 02:14:44 +0000 (02:14 +0000)]
Lay some groundwork for having this stuff hang off of AHB rather than
the CPU nexus.

* Add ahb as a possible bus attachment
* Lay a comment down to remind me or whoever else ends up trying
  to debug why the EEPROM isn't mapped in as to what's going on.

9 years ago[QCA955x] make the USB EHCI interrupts shareable.
adrian [Mon, 2 Mar 2015 02:08:43 +0000 (02:08 +0000)]
[QCA955x] make the USB EHCI interrupts shareable.

There's two EHCI controllers in the QCA955x SoCs - they have different
interrupts available via various demux registers, but they both tie to
IP3.

So for now, allow them to be sharable so they can hang off of IP3.

9 years agoAdd initial QCA955x support to if_arge.c.
adrian [Mon, 2 Mar 2015 01:53:47 +0000 (01:53 +0000)]
Add initial QCA955x support to if_arge.c.

Tested:

* AP135 development board, QCA9558 SoC.

9 years agoAdd a MII mode for SGMII.
adrian [Mon, 2 Mar 2015 01:23:59 +0000 (01:23 +0000)]
Add a MII mode for SGMII.

This appears on the AR934x and later chips, although it's not
something that's programmed via the arge0/arge1 register space.
It's just cosmetic.

9 years agosh: Fix more compiler warnings.
jilles [Sun, 1 Mar 2015 22:32:23 +0000 (22:32 +0000)]
sh: Fix more compiler warnings.

9 years agoMissed local diff.
nwhitehorn [Sun, 1 Mar 2015 21:47:38 +0000 (21:47 +0000)]
Missed local diff.

9 years agosh: Fix compiler warnings related to duplicate or missing declarations.
jilles [Sun, 1 Mar 2015 21:46:55 +0000 (21:46 +0000)]
sh: Fix compiler warnings related to duplicate or missing declarations.

9 years agonandfs_meta_bread() calls bread() which can set bp to NULL in some
imp [Sun, 1 Mar 2015 21:41:37 +0000 (21:41 +0000)]
nandfs_meta_bread() calls bread() which can set bp to NULL in some
error cases. Calling brelse() with a NULL pointer is not allowed,
so only call brelse() when the bp is non-NULL.

Reported by: Maxime Villard (reported as uninitialized variable)

9 years agoDon't leak 'used' in a few error cases.
imp [Sun, 1 Mar 2015 21:41:35 +0000 (21:41 +0000)]
Don't leak 'used' in a few error cases.

Reported by: Maxime Villard

9 years agoUnlock the main lock before returning rather than after to eliminate
imp [Sun, 1 Mar 2015 21:41:33 +0000 (21:41 +0000)]
Unlock the main lock before returning rather than after to eliminate
dead code that shouldn't have been dead.

Reported by: Maxime Villard

9 years agoInitialize NX stack capabilities and direct map status in pmap like on AIM.
nwhitehorn [Sun, 1 Mar 2015 21:23:23 +0000 (21:23 +0000)]
Initialize NX stack capabilities and direct map status in pmap like on AIM.

9 years agoMerge r278429 from ppc64:
nwhitehorn [Sun, 1 Mar 2015 21:20:18 +0000 (21:20 +0000)]
Merge r278429 from ppc64:

Fix an extremely subtle concurrency bug triggered by running on 32-thread
POWER8 systems. During thread switch, there was a very small window when
the stack pointer was set to the stack pointer of the outgoing thread, but
after the lock on that thread had already been released.

If, during that window, the outgoing thread were rescheduled on another CPU
and begin execution and an exception were taken on the original CPU, the
trap handler and the outgoing thread would simultaneously execute on the same
stack, causing memory corruption. Fix this by making sure to release the
old thread only after cpu_switch() is done with its stack.

MFC after: 2 weeks

9 years agoRecord the dependency to x86bios in vga_pci
dumbbell [Sun, 1 Mar 2015 20:54:29 +0000 (20:54 +0000)]
Record the dependency to x86bios in vga_pci

This fixes the build of XEN and XBOX kernels on i386, which was broken
in r279487.

While here, do not build vga_pci_repost() on PC98.

Reported by: bz@

9 years agoGive compilers a stronger hint to inline the functions
kargl [Sun, 1 Mar 2015 20:32:47 +0000 (20:32 +0000)]
Give compilers a stronger hint to inline the functions
pzero[f], qzero[f], pone[f], and qone[f].  While here
fix the function declarations in accordance with style(9).