Commit Graph

198713 Commits

Author SHA1 Message Date
Eitan Adler
9073a96a85 Add some additional quirks for various Western Digital Caviar MHDDs
Submitted by:	Jeremy Chadwick
PR:		188685
MFC After:	1 month
2015-03-30 09:05:20 +00:00
Eitan Adler
918057d9a9 And it turns out someone beat me to it....
PR:		199013
2015-03-30 08:54:59 +00:00
Eitan Adler
d930009250 Add support for "MosChip MCS9922 PCIe to Peripheral Controller" to uart
Submitted by:	<mlsemon35@gmail.com>
PR:		199013
MFC After:	1 month
2015-03-30 08:48:35 +00:00
Andrew Turner
303c8079ab Remove support for CPU_FA626TE. It's unused by any of our kernel configs. 2015-03-30 08:38:18 +00:00
Andrew Turner
f855addb53 Only build cpufunc_asm_armv4.S when needed. 2015-03-30 08:37:03 +00:00
Colin Percival
963412283a Clean up filesystem unmounting in vmimage builds:
* Remove vm_umount_base function which is currently unused.
* Add umount_loop function which loops attempting to unmount one filesystem.
* Replace calls to umount with calls to umount_loop.
* Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted.

The looping is necessary because sometimes umount fails due to filesystems
being busy.  The most common cause of such busyness is periodic(8) jobs
running `find / ...`.

Reviewed by:	gjb
2015-03-30 08:33:19 +00:00
Roger Pau Monné
df62b8a25f xen: add a handler for the debug interrupt
Handle the VIRQ_DEBUG signal and print a stack trace of each vCPU on the Xen
console. This is only used for debug purposes and is triggered by the
administrator of the Xen host.

Sponsored by: Citrix Systems R&D
MFC after: 1 week
2015-03-30 07:09:07 +00:00
Mark Johnston
16a62fc514 Fix ping(8) and ping6(8) usage in a couple of ip provider tests, and
update expected test output to reflect differences in default TTL and
payload length.

MFC after:	1 week
2015-03-30 04:06:36 +00:00
Mark Johnston
3f05af05ac Fix ping(8) usage in funcs/tst.system.d so that the test actually completes.
MFC after:	1 week
2015-03-30 04:03:01 +00:00
Mark Johnston
41aeaf2a30 Replace dtest.pl, the upstream DTrace test suite harness, with a shell
script. This reimplementation is much simpler than dtest.pl and is more
amenable to being run under Kyua - dtest.pl writes error output to a
temporary directory that is deleted when the run finishes, making it hard
to debug test failures. This change also removes the test suite's dependency
on perl.
2015-03-30 04:01:49 +00:00
Mark Johnston
09a15aa38d Import a missing piece of commit b8fac8e162eda7e98d from illumos-gate.
This adds an upper bound, dtrace_ustackdepth_max, to the number of frames
traversed when computing the userland stack depth. Some programs - notably
firefox - are otherwise able to trigger an infinite loop in
dtrace_getustack_common(), causing a panic.

MFC after:	1 week
2015-03-30 03:55:51 +00:00
Andrew Turner
53b2405ec0 arm11_sleep is no longer needed, remove it. 2015-03-29 22:46:07 +00:00
Andrew Turner
37b25ee6f2 pj4b_config and pj4bv7_setup are only used when CPU_MV_PJ4B is defined. 2015-03-29 22:45:33 +00:00
Andrew Turner
0ebebb1260 Build the cpufunc_asm_* files based on the cpu type, not which config file
we happen to be building.
2015-03-29 22:43:39 +00:00
Jilles Tjoelker
9d14d0aaae wordexp(): Add testcase for non-default IFS in environment.
The non-default IFS is expected to be used.

MFC after:	1 week
2015-03-29 22:00:24 +00:00
Adrian Chadd
9778bf377b Add initial support for the HAL channel survey support to the AR9300 HAL.
This is used by the 'athsurvey' command to print out channel survey
statistics - % busy times transmit, receive and airtime.

It's as buggy and incomplete as the rest of the HAL survey support -
notably, tying into the ANI code to read channel stats and occasionally
getting garbage counters isn't very nice.  It also doesn't (yet!) get
channel survey information during a scan.  But it's good enough for
basic air-time debugging, which is why I'm committing it in this state.

Tested:

* AR9380, STA mode
2015-03-29 21:53:08 +00:00
Adrian Chadd
b0602bec18 Move the HAL channel survey support out to be in the top-level HAL,
rathe than private in each HAL module.

Whilst here, modify ath_hal_private to always have the per-channel
noisefloor stats, rather than conditionally.  This just makes
life easier in general (no strange ABI differences between different
HAL compile options.)

Add a couple of methods (clear/reset, add) rather than using
hand-rolled versions of things.
2015-03-29 21:50:21 +00:00
Adrian Chadd
5f63869372 Add a new field to HAL_ANISTATS - the extension channel busy count.
This is only used by the AR9300 HAL for now - but just be careful if
you decide to recompile the kernel with NO_CLEAN=1.
2015-03-29 21:45:48 +00:00
Andrew Turner
d9d02715d3 Remove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used. 2015-03-29 21:45:28 +00:00
Adrian Chadd
9bbfde1eb9 Fix more ticks wrapping bugs exposed by the ticks wrapping bug check.
This symptom is "calibrations don't ever run", which may cause some
pretty spectacularly bad behaviour in noisy environments or with longer
uptimes.

Thanks to dtrace to make it easy to check if specific non-inlined functions
are getting called by things like the ANI and calibration HAL methods.
Grr.

Tested:

* AR9380, STA mode
2015-03-29 21:41:05 +00:00
Andrew Turner
930798f3a1 Remove arm1136 support. We don't have any configs that use it, and I don't
expect us to add support for any more arm11 SoCs.
2015-03-29 21:12:59 +00:00
Andrew Turner
9a25f3e847 Remove the bootconfig parsing. We never used it and always passed either an
empty string or NULL to the setup functions that called into it.
2015-03-29 20:37:28 +00:00
Alexander Motin
e5dcb72f45 Some cosmetic polishing. No functional change.
MFC after:	1 week
2015-03-29 20:28:18 +00:00
Andrew Turner
760b9ede07 We only need cpufunc_asm_arm11.S on bcm2835, not bcm2836 2015-03-29 20:21:59 +00:00
Pedro F. Giffuni
4b069c8287 Clean some spaces vs tabs.
No, this file doesn't conform with KNF at all.
2015-03-29 20:20:45 +00:00
Konstantin Belousov
02211f0a93 Formatting changes to the pthread_testcancel(3).
Use list for the cancellation points enumeration.  Move notes about
functions into the list inline.

The discussion of the idiomatic use of cancellation facilities does
not belong to RETURN VALUES section, move it to NOTES.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-03-29 19:37:41 +00:00
Konstantin Belousov
b072e86d09 Make kevent(2) a cancellation point.
Note that to cancel blocked kevent(2) call, changelist must be empty,
since we cannot cancel a call which already made changes to the
process state.  And in reverse, call which only makes changes to the
kqueue state, without waiting for an event, is not cancellable.  This
makes a natural usage model to migrate kqueue loop to support
cancellation, where existing single kevent(2) call must be split into
two: first uncancellable update of kqueue, then cancellable wait for
events.

Note that this is ABI-incompatible change, but it is believed that
there is no cancel-safe code that relies on kevent(2) not being a
cancellation point.  Option to preserve the ABI would be to keep
kevent(2) as is, but add new call with flags to specify cancellation
behaviour, which only value seems to add complications.

Suggested and reviewed by:	jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-03-29 19:14:41 +00:00
Andrew Turner
fd78c994f5 Remove ARM9_CACHE_WRITE_THROUGH, none of our configs define it. 2015-03-29 18:59:04 +00:00
Konstantin Belousov
0c4f9ecde3 Change compiler setting to make default visibility of the symbols for
rtld on x86 to be hidden.  This is a micro-optimization, which allows
intrinsic references inside rtld to be handled without indirection
through PLT.  The visibility of rtld symbols for other objects in the
symbol namespace is controlled by a version script.

Reviewed by:	kan, jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-03-29 18:53:21 +00:00
Andrew Turner
ba14973ac5 Remove the unused armv5 cpufunc code. 2015-03-29 18:46:12 +00:00
Jean-Sébastien Pédron
7b5702f3df drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri May 31 12:17:08 2013 +0000

    drm: Sort connector modes based on vrefresh

    Keeping the modes sorted by vrefresh before the pixel clock makes the
    mode list somehow more pleasing to the eye.

    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

PR:		198936
Obtained from:	Linux
MFC after:	1 month
MFC with:	r280183
2015-03-29 18:45:51 +00:00
Andrew Turner
6532862008 Remove unused cpufunc arm11 and armv6 code. While here only define the
remaining functions in the context we use them in.
2015-03-29 18:44:15 +00:00
Andrew Turner
745202c280 We don't use cpufunc_asm_armv5.S in any of these configs, remove it. 2015-03-29 18:41:43 +00:00
Andrew Turner
c0fde778ab Remove unused arm10_* functions. The remaining functions are only used in
mv configs.
2015-03-29 17:42:32 +00:00
Andrew Turner
698234c19b Stop building unused cpuvunc_* files, we don't need anything from these. 2015-03-29 17:33:03 +00:00
Andrew Turner
7a959e4944 Remove support for CPU_ARM10. No kernel configs could possibly use this as
it's not an available option. Along with this we will never support this
cpu type as very few arm10 chips were made.
2015-03-29 17:13:44 +00:00
Andrew Turner
4ef84196c9 Reorder to help with moving the efi loader parts to sys/boot/efi. As these
will depend on ficl having been built, and are set via bsd.arch.inc.mk we
need to place this after ficl.

As Makefile.amd64 is now late enough we can add the i386 directory to this.
2015-03-29 15:43:24 +00:00
Andrew Rybchenko
cfaf34ff99 sfxge: fix bug in TSO when a DMA segment has both header and data
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2163
2015-03-29 15:18:04 +00:00
Alexander Motin
b308aaed27 Add four new DDB commands to display vmem(9) statistics.
In particular, such DDB commands were added:
        show vmem <addr>
        show all vmem
        show vmemdump <addr>
        show all vmemdump

As possible usage, that allows to see KVA usage and fragmentation.
2015-03-29 10:02:29 +00:00
Adrian Chadd
9cecaef7d6 Fix a long-standing bug with the early MAC address initialisation path,
which showed up after I started changing addresses this early.

It turns out that there's some other malarky going on behind the scenes
in the HAL and merely setting the net80211/ifp mac address this early
isn't enough.  If the MAC is set from kenv at attach time, the HAL
also needs to be programmed early.

Without this, the VAP wouldn't work enough for finishing association -
probe requests would be fine as they're broadcast, but association
request would fail.
2015-03-29 06:05:00 +00:00
Pedro F. Giffuni
912a62418a cdefs.h: Fix macros for pre-C99 compilers.
Older compilers, and compatibility modes, may not support variadic macros.
I normally wouldn't go out of my way to support those old compilers but
there is a prescendent in other system headers for using the same macro
multiple times, and the solution (although non-elegant IMHO) works.

Requested by:	bde
Solution by:	tijl
2015-03-29 03:16:52 +00:00
Adrian Chadd
e133fa3e58 Add hints to set the board MAC address and derived values for each interface.
This allows the TL-WDR3600 to use the correct MAC address for ath0, ath1
and arge0.  arge1 isn't used; until I disable it entirely it'll just
show up with a randomly generated MAC.
2015-03-28 23:42:59 +00:00
Adrian Chadd
240b1f1dca Update if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address.
This is used by the AR71xx platform code to choose a local MAC based on
the "board MAC address", versus whatever potentially invalid/garbage
values are stored in the Atheros calibration data.
2015-03-28 23:41:23 +00:00
Adrian Chadd
b7d7ad0b90 Begin moving support for board MAC addresses over to being explicitly defined.
A lot of these dinky atheros based MIPS boards don't have a nice, well,
anything consistent defining their MAC addresses for things.

The Atheros reference design boards will happily put MAC addresses
into the wifi module calibration data like they should, and individual
ethernet MAC addresses into the calibration area in flash.
That makes my life easy - "hint.arge.X.eeprommac=<addr>" reads from
that flash address to extract a MAC, and everything works fine.

However, aside from some very well behaved vendors (eg the Carambola 2
board), everyone else does something odd.

eg:

* a MAC address in the environment (eg ubiquiti routerstation/RSPRO)
   that you derive arge0/arge1 MAC addresses from.
* a MAC address in flash that you derive arge0/arge1 MAC addresses from.
* The wifi devices having their own MAC addresses in calibration data,
  like normal.
* The wifi devices having a fixed, default or garbage value for a MAC
  address in calibration data, and it has to be derived from the
  system MAC.

So to support this complete nonsense of a situation, there needs to be
a few hacks:

* The "board" MAC address needs to be derived from somewhere and squirreled
  away.  For now it's either redboot or a MAC address stored in calibration
  flash.

* Then, a "map" set of hints to populate kenv with some MAC addresses
  that are derived/local, based on the board address.  Each board has
  a totally different idea of what you do to derive things, so each
  map entry has an "offset" (+ve or -ve) that's added to the board
  MAC address.

* Then if_arge (and later, if_ath) should check kenv for said hint and
  if it's found, use that rather than the EEPROM MAC address - which may
  be totally garbage and not actually work right.

In order to do this, I've undone some of the custom redboot expecting
hacks in if_arge and the stuff that magically adds one to the MAC
address supplied by the board - instead, as I continue to test this
out on more hardware, I'll update the hints file with a map explaining
(a) where the board MAC should come from, and (b) what offsets to use
for each device.

The aim is to have all of the tplink, dlink and other random hardware
we run on have valid MAC addresses at boot, so (a) people don't get
random B:S:Dx:x ethernet MACs, and (b) the wifi MAC is valid
so it works rather than trying to use an invalid address that
actually upsets systems (think: multicast bit set in BSSID.)

Tested:

* TP-Link TL_WDR3600 - subsequent commits will add the hints map
  and the if_ath support.

TODO:

* Since this is -HEAD, and I'm all for debugging, there's a lot of
  printf()s in here.  They'll eventually go under bootverbose.
* I'd like to turn the macaddr routines into something available
  to all drivers - too many places hand-roll random MAC addresses
  and parser stuff.  I'd rather it just be shared code.
  However, that'll require more formal review.
* More boards.
2015-03-28 23:40:29 +00:00
Konstantin Belousov
eeb697c8e9 Make debug.vmem_check a tunable. It is useful to set it early.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-03-28 23:30:51 +00:00
Adrian Chadd
012bc22a86 Turns out the AR933x looks like the AR7240/AR7241 switch as far as VLAN
configuration is concerned.

So, remove the now-erroneous comment.

Tested:

* AR9331 - Carambola2, with transmitting dot1q tagged packets around.
2015-03-28 23:20:46 +00:00
Adrian Chadd
746e48e321 Remove the second MODULES_OVERRIDE; add if_vlan to the list. 2015-03-28 23:01:59 +00:00
Justin Hibbits
cf0b1c3340 Wrap #ifdef guards around pmap_bootstrap ap. It's only used in SMP, and
building without SMP causes a build failure.

MFC after:	1 month
2015-03-28 21:39:42 +00:00
Eric van Gyzen
10813ab380 pmcstat.8: fix -a flag description; improve -m flag to match
The -a flag reads a file saved by -O, not -o.

The -m flag requires the -R flag.  Copy that paragraph from -a.

Reviewed by:	adrian
Approved by:	kib (mentor)
MFC after:	1 week
Sponsored by:	Dell Inc
2015-03-28 21:28:22 +00:00
Eric van Gyzen
e858b027db Clean up some cosmetic nits in kern_umtx.c, found during recent work
in this area and by the Clang static analyzer.

Remove some dead assignments.

Fix a typo in a panic string.

Use umtx_pi_disown() instead of duplicate code.

Use an existing variable instead of curthread.

Approved by:	kib (mentor)
MFC after:	3 days
Sponsored by:	Dell Inc
2015-03-28 21:21:40 +00:00