Commit Graph

195697 Commits

Author SHA1 Message Date
Roger Pau Monné
acb332a8a1 vt: register the memory regions used by the vt drivers
Current VT drivers don't register the memory regions they use with the
nexus. This patch makes vt_vga and vt_efifb register the memory regions they
use.

This is needed (at least) for Xen support, since the FreeBSD kernel will try
to use the holes in the memory map to map memory from other domains and
setup it's grant table.

Sponsored by:		Citrix Systems R&D
Reported by:		sbruno
Tested by:		emaste
Reviewed by:		ray
PR:			195537
Differential Revision:	https://reviews.freebsd.org/D1291
2014-12-22 16:46:07 +00:00
Steven Hartland
39c478eac4 Standardise on illumos for #ifdef's in zvol.c
Also correct as per style(9) on the use of #ifdef comments.

This is a no-op change as pre-cursor to a full cleanup and merge with
upstream zvol changes.

Sponsored by:	Multiplay
2014-12-22 16:38:29 +00:00
Ed Maste
b3f2680928 Add AArch64 machine time and relocations for readelf
Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1333
2014-12-22 16:34:59 +00:00
Ed Maste
9ef62fdb87 Set up default shstrtab entries at shstrtab initialization
Instead of waiting until the addition of the first non-default entry.
This fixes a segfault when strip(1) is asked to remove every section from
an object file.

Upstream elftoolchain ticket 463

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1341
2014-12-22 16:31:09 +00:00
Luiz Otavio O Souza
a59806b252 Remove some leftovers from OMAP3 support. 2014-12-22 16:29:15 +00:00
Luiz Otavio O Souza
f9de33d497 Simplify the use of locks where possible, remove the locking when it is not
required.

Simplify the code a little bit.

Reviewed by:	andrew (previous version)
2014-12-22 16:12:55 +00:00
Gleb Smirnoff
53b680caa2 In sbappend*() family of functions clear M_PROTO flags of incoming
mbufs. sbappendstream() already does this in m_demote().

PR:		196174
Sponsored by:	Nginx, Inc.
2014-12-22 15:39:24 +00:00
Gleb Smirnoff
e3ed82bcf7 Add flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and
allows the function to fail.

Reviewed by:	kib, alc
Sponsored by:	Nginx, Inc.
2014-12-22 09:02:21 +00:00
Gleb Smirnoff
6ee80f259c Do not clear flag that vm_page_alloc() doesn't support.
Submitted by:	kib
2014-12-22 09:00:47 +00:00
Gleb Smirnoff
89fc8bdbb6 Document flags of vm_page allocation functions.
Reviewed by:	alc
2014-12-22 08:59:44 +00:00
Enji Cooper
851cc4c0c3 Update the text for building texinfo with build-tools to reflect the fact
that make install is being called as well

MFC after: 1 week
X-MFC with: r276052
2014-12-22 04:54:57 +00:00
Enji Cooper
492c2b1f49 Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

  makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi  -o regex.info
  makeinfo: not found
  *** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error

Tested on a head VM without makeinfo installed and by building with MK_INFO=yes

MFC after: 1 week
2014-12-22 04:52:24 +00:00
Ian Lepore
a0041e6d2f Replace the clock divisor terms with values that also result in a 1 MHz
clock, but actually work on real hardware, unlike the original set of
values I chose.

PR:		195009
Submitted by:	Scott Ellis <jumpnowtek@gmail.com>
2014-12-22 00:50:01 +00:00
Ian Lepore
88b80af731 Add -march=armv7a to the kernel compile for all ARM systems which are v7a.
Submitted by:	Michal Meloun <meloun@miracle.cz>
2014-12-21 23:48:32 +00:00
Enji Cooper
92e8bbfdfd Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
stable/10

It was added when __FreeBSD_version was ~1100027
2014-12-21 23:47:30 +00:00
Ian Lepore
040610408e Allow -march=armv7a on the gcc command line, for compatibility with clang.
This will result in __ARM_ARCH_7A__ being defined during the compile.

When compiling with gcc, it will still only generate armv6 opcodes itself,
but should pass the arch to gas so that inline asm can use v7 opcodes.
2014-12-21 23:45:13 +00:00
Jilles Tjoelker
85052e7b56 sh: Move some code from onint() to onsig(), making onint() noreturn.
As a result, the INTON macro which is used many times generates fewer
bytes of code.
2014-12-21 23:09:59 +00:00
Jilles Tjoelker
f649ab8b15 sh: Remove EXP_REDIR.
EXP_REDIR was supposed to generate pathnames in redirection if exactly one
file matches, as permitted but not required by POSIX in interactive mode. It
is unlikely this will be implemented.

No functional change is intended.

MFC after:	1 week
2014-12-21 22:18:30 +00:00
Andrew Turner
c18b81e54b Fix the unwinder to get past functions with no stack but may cause an
exception. In this case no registers will be updated but the link register
will be copied to the program counter to be used to find the calling
function. In this case the program counter may be updated and we should
continue with the trace.
2014-12-21 21:38:12 +00:00
Andrew Turner
ec7d251e09 Pull out the fdt mapping code into intr.c. The arm_intrng branch also
defines this function allowing the mapping method to change when we move
to it.
2014-12-21 21:27:12 +00:00
Ian Lepore
734ba86366 Eliminate a "cast discards qualifiers" warning when building with gcc. 2014-12-21 21:24:19 +00:00
Ian Lepore
f55abc7e4b Eliminate a redundant declaration. 2014-12-21 21:23:53 +00:00
Ian Lepore
9d87c6c8fb Remove a volatile qualifier on return type that is ignored and results in
a -Wreturn-type warning when compiled with gcc.
2014-12-21 21:11:54 +00:00
Andrew Turner
d0e17309d7 Further reduce the diff between the arm_intrng gic driver and the version
in head.
2014-12-21 17:25:21 +00:00
Steven Hartland
b4843bd68b Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12
Previously we used gnop(8) to fake 4K sector size disks but ZFS now has a
sysctl to control this when creating new top level vdev's so use that
instead.

Differential Revision:	D566
MFC after:	1 month
Sponsored by:	Multiplay
2014-12-21 17:21:29 +00:00
Ian Lepore
18f4019f87 Allow whitspace to appear between device name and unit number in loaderdev.
This allows the same value to be used in u-boot commands and the loaderdev
env var that gets passed to ubldr, for example 'fatload mmc 1 ${bootfile}".
2014-12-21 17:10:24 +00:00
Andrew Turner
27ad9746c0 Reduce the diff between the lpc interrupt controller in head and arm_intrng 2014-12-21 16:59:41 +00:00
Andrew Turner
3d6451aef8 Reduce the diff in the Ti aintc between head and arm_intrng 2014-12-21 16:48:57 +00:00
Steven Hartland
e4a8f2e2ec style (9) nits
Use return (val); instead of return val;

Differential Revision:	D838
MFC after:	2 weeks
Sponsored by:	Multiplay
2014-12-21 16:38:29 +00:00
Andrew Turner
171af33c53 Reduce the diff between head and arm_intrng with the bcm2835 interrupt
controller.
2014-12-21 16:35:42 +00:00
Steven Hartland
5f59ea478e Return the error from ahci_setup_interrupt in ahci_attach
Previously ahci_attach returned a hard coded ENXIO instead of the value
from ahci_setup_interrupt. This is effectively a NOOP change as currently
ahci_setup_interrupt only ever returns 0 or ENXIO, so just there to protect
against any future changes to that.

Differential Revision:	D838
MFC after:	2 weeks
Sponsored by:	Multiplay
2014-12-21 16:32:57 +00:00
Andrew Turner
2fe8c9e132 Reduce the diff to the arm_intrng project branch by having the read/write
macros take the softc they are accessing.
2014-12-21 16:21:56 +00:00
Steven Hartland
a12f5777df Clamp ahci max irq's to AHCI_MAX_IRQS
This prevents the possiblity of any overruns on the statically allocated
struct irqs field.

Differential Revision:	D838
MFC after:	2 weeks
X-MFC-With:	r276012
Sponsored by:	Multiplay
2014-12-21 16:15:29 +00:00
Steven Hartland
55972826f2 Add a constant AHCI_MAX_IRQS removing magic number
Sponsored by:	Multiplay
2014-12-21 16:07:46 +00:00
Michael Tuexen
f3ba71bee4 Don't check twice that inp is not NULL.
Reported by:	Coverity
CID:		748671
MFC after:	3 days
2014-12-21 13:58:53 +00:00
Konstantin Belousov
8ee9765a9d Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
the created file name was cached.  Use the flag for core dumps.

Requested by:	rpaulo
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-12-21 13:32:07 +00:00
Konstantin Belousov
789bdfdbc6 Handle MAKEENTRY cnp flag in the VOP_CREATE(). Curiously, some
fs, e.g. smbfs, already did it.

Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-12-21 13:29:33 +00:00
Christian Brueffer
0aee91e1fb Various mdoc fixes and a few EOL whitespace removals.
Found with:	mandoc -Tlint
2014-12-21 12:36:36 +00:00
Christian Brueffer
67304db7c1 Various mdoc fixes.
Found with:	mandoc -Tlint
2014-12-21 12:13:49 +00:00
Andrew Turner
afa6f59cca Fix the indentation to simplify comparing the ARM config files. 2014-12-21 11:55:40 +00:00
Andrew Turner
0c08f78521 tart to clean up the armv6 kernel configs by reducing the diff between
them in the first sections and the later FDT support.

Differential Revision:	https://reviews.freebsd.org/D1346
Reviewed by:	rpaulo (earlier version)
2014-12-21 11:37:00 +00:00
Christian Brueffer
1e9469d188 Fix various mdoc issues and some EOL whitespace.
Found with:	mandoc -Tlint
2014-12-21 10:57:42 +00:00
Christian Brueffer
05a1e019f3 Remove EOL whitespace.
Found with:	mandoc -Tlint
2014-12-21 10:04:26 +00:00
Christian Brueffer
0b3504fd3b Fix various mdoc issues.
Found with:	mandoc -Tlint
2014-12-21 09:53:29 +00:00
Warner Losh
61f26cae7d Where appropriate, use the modern terms for the one true time base
(UTC) rather than the archaic (GMT) in comments. Except where the
comments are making fun of people doing this (and pedants who insist
on the new terms).
2014-12-21 05:07:11 +00:00
Adrian Chadd
1de34f860e Update ieee80211_sta_tim_notify() to do double duty - handle STA sleep
to awake transition as well as handle waking up a VAP in STA powersave
mode if it's in bgscan.

This was a reasonably hairy bug to try and figure out and it became
more obvious because of stuff I've done.

Specifically:

* a NIC would go into bgscan mode - either because of a bgscan timer
  or wpa_supplicant asked it to;
* the AP would indicate there's traffic for the STA by setting the TIM
  bitmap bit for it;
* mindwell would be met during scan, so it'd wake up and break out of
  the scan loop in scan_task(), but
* because the scan wasn't completed, it wouldn't bring the VAP out of
  STA mode powersave (so it wouldn't tell the AP about it and it would
  block VAP TX);
* .. but because we kept seeing the TIM bit set, ic->ic_lastdata was
  being constantly updated, and ..
* bgscancont() would thus never say "yes we can continue a bgscan"
  so the bgscan would hang and never make progress.

Now, I do see this particular state occur on iwn(4) - /however/ -
this NIC has the firmware call ieee80211_scan_next() once the firmware
scan for that channel has completed.  This has the effect of moving
the scan along to the next channel.  I do see the debug that I'm adding
where we see a beacon with a TIM bit set whilst we're in bgscan, so
the condition about waking up to receive traffic is triggering.
It just won't cause a hang.

For other NICs - all of the USB ones and at least ath(4) -
ieee80211_scan_next() / ieee80211_scan_done() isn't called.
So it relies upon the mindwell timer, the beacon receive and the
beacon / probe response -> ieee80211_add_scan() to move along
the scan state.

In the above case, mindwell triggered, there's no beacons triggering
the scan_add code to move things along, and we weren't waking things
up when seeing the TIM set for us.  So it just hung until the interface
was dropped.

So, the short-term fix here is to do what the comment in scan_task()
says - if we are in bgscan mode and we see our TIM bit set, just wake
up the VAP.  If it's already awake then it's a nop.  If we're awake
then we transition to awake and handle the traffic.  Once there's no
TX or RX traffic going on, ic->ic_lastdata won't be updated anymore
and bgscancont() will continue.

This was triggered more often after my initial SLEEP state handling
for software sleep states - because now I update ic->ic_lastdata
upon seeing a TIM bit set, not just the RX of the subsequent traffic.
That's needed so the thing doesn't ping-pong up and down between
seeing the TIM bit set, sending the "I'm awake" NULL data frame, and
starting to receive data from the AP.

I'd like to subsequently split ic_lastdata into two - one for TX and
one for RX - so it becomes easier to use the correct one (or both!)
when making decisions like whether to scan, go to sleep, etc.

I'd appreciate this getting some further testing.

Tested:

* rsu(4), STA mode, bgscan on
* iwn(4), STA mode, bgscan on
2014-12-21 04:58:45 +00:00
Adrian Chadd
3b00b9a60a Break out the unicast/multicast TIM bit setting into "set something
that indicates we have traffic" bit and a "do something if we have
traffic bit."

I'm going to be fleshing out this stuff more over time and it'll make
more sense to have it broken out into two pieces here.
2014-12-21 04:48:54 +00:00
Adrian Chadd
2c6179401b Add more debugging to try and track down this scan hang nonsense. 2014-12-21 01:15:55 +00:00
Adrian Chadd
f13a4d33ef Add some more debugging to the scan cancel methods - I'd like to see
what situations would cause the scan cancel's to not complete.
2014-12-20 23:41:37 +00:00
Gleb Smirnoff
e834a84026 Revert r274494, r274712, r275955 and provide extra comments explaining
why there could appear a zero-sized mbufs in socket buffers.

A proper fix would be to divorce record socket buffers and stream
socket buffers, and divorce pru_send that accepts normal data from
pru_send that accepts control data.
2014-12-20 22:12:04 +00:00