Commit Graph

198927 Commits

Author SHA1 Message Date
Adrian Chadd
03ab093569 Return the correct HAL data type for HAL_DIAG_ANI_STATS.
I .. stupidly added code to return HAL_ANI_STATS to HAL_DIAG_ANI_STATS.
I discovered this in a noisy environment when the returned values were
enough to .. well, make everything terrible.

So - restore functionality.

Tested:

* AR5416 (uses the AR5212 HAL), in a /very/ noisy 2GHz environment.
  Enough to trigger ANI to get upset and generate useful data.
2015-04-06 01:12:53 +00:00
Rui Paulo
c282164d42 psm: print newer Synaptics Touchpad capabilities. 2015-04-06 01:04:08 +00:00
Adrian Chadd
d338532820 Typecast things. 2015-04-06 00:34:59 +00:00
Pedro F. Giffuni
db8026c7bb sort: style knits / cleanups.
Obtained from:	OpenBSD
2015-04-05 23:06:42 +00:00
Pedro F. Giffuni
bd0f80c667 sort: Fix a comment.
Obtained from:	OpenBSD
2015-04-05 22:34:03 +00:00
Pedro F. Giffuni
f79477ebd5 sort: Cleanup small issues with spaces.
Obtained from:	OpenBSD
2015-04-05 22:22:43 +00:00
Adrian Chadd
c2dc6e2aab Convert the DIR-825C1 to use the new map based MAC address configuration.
Tested:

* DIR-825C1
2015-04-05 22:00:44 +00:00
Konstantin Belousov
2359e2dcc3 Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact,
it should be a nop for ro.

PR:	199152
Reviewed by:	bde (PR version of the patch)
Submitted by:	longwitz@incore.de
MFC after:	1 week
2015-04-05 21:10:38 +00:00
Konstantin Belousov
420d65d9e4 Assert that an msdosfs mount is not read-only when FAT modifications
are requested.

PR:	199152
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-04-05 21:08:04 +00:00
Adrian Chadd
e1f0bb305b Update the board MAC address configuration for the DIR-655A1.
The MAC addresses were totally wrong. They're like the DIR-625C1 - at
0x1ffe0004 and 0x1ffe0018. They're however stored as text strings.
The ath0 MAC address is also not set, even though the calibration
partition is valid.

So, pick the board address / first MAC as the ath0 MAC, and derive
arge0/arge1 from that.  That way they're hopefully unique enough
for people with multiple devices.

Tested:

* DIR-655A1

TODO:

* Do the same for the DIR-625A1 and DIR-625C1.
2015-04-05 20:56:51 +00:00
Alan Cox
b5ab20c066 Until the lock assertions in vm_page_advise() are properly reevaluated,
vm_fault_dontneed() should acquire a write lock on the first object in
the shadow chain.

Reported by:	gleb, David Wolfskill
2015-04-05 20:07:33 +00:00
Andrew Turner
45304e75b9 Move boot1.efi to the global CLEANFILES list, it's not x86 specific. 2015-04-05 18:57:58 +00:00
Raphael Kubo da Costa
822a51b396 bthidd: Consider usage ranges when dealing with array inputs.
So far, we were always using HID_USAGE() to determine the Usage ID of a
certain HID report input item. This does not work as intended if a field
is an array and the allowed usages are specified with a usage range, as
HID_USAGE() will return 0. We need to use the field value as an index in
the usage range list in this case instead.

This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard
5000 be properly recognized. The relevant part of the HID report looks
like this:

  0xA1, 0x01,        // Collection (Application)
  0x85, 0x07,        //   Report ID (7)
  0x05, 0x0C,        //   Usage Page (Consumer)
  0x19, 0x00,        //   Usage Minimum (Unassigned)
  0x2A, 0xFF, 0x03,  //   Usage Maximum (0x03FF)
  0x95, 0x01,        //   Report Count (1)
  0x75, 0x10,        //   Report Size (16)
  0x15, 0x00,        //   Logical Minimum (0)
  0x27, 0xFF, 0x03, 0x00, 0x00,  //   Logical Maximum (1023)
  0x81, 0x00,        //   Input (Data,Array,Abs,No Wrap,Linear,Preferred
                     //   State,No Null Position)

When a key such as "volume down" is pressed, the following data is
transferred through Interrupt In:

  0x07 0xEA 0x00

Differential Revision:	https://reviews.freebsd.org/D2229
Reviewed by:	emax
Approved by:	emax
MFC after:	1 week
2015-04-05 18:53:48 +00:00
Andrew Turner
947d2519e3 Spell MACHINE_CPUARCH correctly 2015-04-05 18:42:43 +00:00
Andrew Turner
60ac534440 Add FDT support to loader.efi. This will be used on arm and arm64.
Differential Revision:	https://reviews.freebsd.org/D2219
2015-04-05 18:37:39 +00:00
Dmitry Chagin
1d2c0c460c Fix wrong kassert msg in uma.
PR:		199172
Submitted by:	luke.tw gmail com
MFC after:	1 week
2015-04-05 18:25:23 +00:00
Josh Paetzel
120e0283fc Bug fixes and feature adds
- Remove extranious echo that breaks puppet
- Handle restarts of multiple pflog devices correctly
- Add the ability to perform actions on specific pflog devices.

PR:	199150
Submitted by:	jason.unovitch@gmail.com
MFC after:	3 days
2015-04-05 17:09:58 +00:00
Justin Hibbits
6d53f4a6ae Missed this in r281096 as well.
Renumber EXC_DEBUG to be above EXC_LAST, so as not to conflict with AIM trap
vectors.
2015-04-05 16:35:13 +00:00
Alexander Motin
91b9f63738 Add DTrace probe to the new ARC reclaim cause added in r281026.
MFC after:	1 month
2015-04-05 14:45:52 +00:00
Alexander Motin
cdd09fea28 Add vmem locking to r281026.
While races there are not fatal, they cause result underestimation, that
cause unneeded ARC reclaims.

MFC after:	1 month
2015-04-05 14:17:26 +00:00
Ed Maste
ba29f2ddfb MIPS rtld: report missing symbol rather than segfaulting
This is only an interim fix; MIPS should be using the MI code instead,
which does not have this issue.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D661
2015-04-05 14:06:11 +00:00
Andrew Turner
02df43b866 dev/ofw/openfirm.h is not needed in the arm machine/fdt.h 2015-04-05 09:50:22 +00:00
Eitan Adler
f5cd4abcd0 adrian asked me to revert and get more testing 2015-04-05 05:18:14 +00:00
Rui Paulo
bc3464096a hwpmc: add initial Intel Broadwell support.
The full list of aliases and events will follow in a subsequent
commit.

MFC after:	1 month
2015-04-05 05:14:20 +00:00
Rui Paulo
03a24b7026 Remove whitespace. 2015-04-05 05:09:38 +00:00
Eitan Adler
7e937fbfc2 head/sys/amd64/amd64/support.S: unroll loop
unroll the loop in ENTRY(pagezero)
	acc' to the submitter this results in a reproducible 1% perf
	improvement under buildworld like workload

	I validated correctness and run-testing, but not performance impact

Submitted by:	lidl@pix.net
Reviewed by:	adrian
PR:		199151
MFC After:	1 month
2015-04-05 05:07:24 +00:00
Adrian Chadd
00e2f0a3cb Oops, add missing file from previous commit.
(Sorry bsdimp, I did break the build.)
2015-04-05 05:00:25 +00:00
Adrian Chadd
f6e6460dfc Add support for the MIPS74K SoC family performance counters events.
These are similar to the mips24k performance counters - some are
available on perfcnt0/3, some are available on perfcnt1/4.
However, the events aren't all the same.

* Add the events, named the same as from Linux oprofile.
* Verify they're the same as  "MIPS32(R) 74KTM Processor Core Family
  Software User's Manual"; Document Number: MD00519; Revision 01.05.
* Rename INSTRUCTIONS to something else, so it doesn't clash with
  the alias INSTRUCTIONS.  I'll try to tidy this up later; there
  are a few other aliases to add and shuffle around.

Tested:

* QCA9558 SoC (AP135 board) - MIPS74Kc core (no FPU.)
* make universe; where it didn't fail for other reasons.

TODO:

* It'd be nice to support the four performance counters
  in at least this hardware, rather than just two.

Reviewed by:	bsdimp ("looks good; don't break world".)
2015-04-05 02:57:02 +00:00
Justin Hibbits
c4f9a74168 Add file missed in r281096. 2015-04-05 02:43:36 +00:00
Justin Hibbits
28cbb9b173 Unify Book-E and AIM trap.c
Summary:
Book-E and AIM trap.c are almost identical, except for a few bits.  This is step
1 in unifying them.

This also renumbers EXC_DEBUG, to not conflict with AIM vector numbers.  Since
this is the only one thus far that is used in the switch statement in trap(),
it's the only one renumbered.  If others get added to the switch, which conflict
with AIM numbers, they should also be renumbered.

Reviewers: #powerpc, marcel, nwhitehorn

Reviewed By: marcel

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D2215
2015-04-05 02:42:52 +00:00
Konstantin Belousov
4cfc037c30 Restore proper error from oshmctl(2), used by COMPAT_43, when the
segment cannot be found.  Broken by r280323.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-04-04 23:56:38 +00:00
Andrew Turner
e8cfd62ed8 Re-add machine/bus.h to machine/fdt.h on arm, it's still needed. 2015-04-04 23:10:13 +00:00
Andrew Turner
087af50ab8 Include vm/pmap.h for pmap_kextract. 2015-04-04 23:03:11 +00:00
Andrew Turner
610373a6f7 Include machine/intr.h for arm_post_filter. 2015-04-04 23:00:37 +00:00
Andrew Turner
8c7336d57f Don't include unneeded files in the arm machine/fdt.h. While here, remove
it from more files.
2015-04-04 22:22:04 +00:00
Edward Tomasz Napierala
aca050aaaa Remove icl_conn_connected(); was unused.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-04 22:11:38 +00:00
Andrew Turner
7defa9a75c Move the definition of fdt_localbus_devmap to a Marvell specific file as
it's only used there.
2015-04-04 22:05:43 +00:00
Jilles Tjoelker
78d75aba77 utimensat: Correct Capsicum required capability rights. 2015-04-04 21:47:54 +00:00
Andrew Turner
ff3b52bb19 Stop using machine/fdt.h in the arm kernel code when we don't need it. 2015-04-04 21:34:26 +00:00
Josh Paetzel
7c924aae61 Fix thinko/copypaste error.
When checking the length of the mutual secret password the variable for
the secret password was used by mistake.  This resulted in ctld never
warning about the length of the mutual secret being wrong even if it was.

MFC after:	3 days
Sponsored by:	iXsystems
2015-04-04 20:55:47 +00:00
Andreas Tobler
b9c2f094f2 Fix build race on armv6* and powerpc*.
Tested with cross builds amd64 -> armv6(hf) and powerpc(64).

Suggested by:	andrew@
2015-04-04 20:30:20 +00:00
Jilles Tjoelker
d30c6f8edf fts: Don't return FTS_SLNONE if it's not a symlink (if race).
When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0)
failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This
incorrectly triggered if a filename existed to be read from the directory,
was deleted before the fstatat(flag=0) and created again after the
fstatat(flag=0).

Fix this by only returning FTS_SLNONE if the result from
fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a
symlink, treat it as if fstatat(flag=0) succeeded.

PR:		196724
Reported and tested by:	pho
MFC after:	1 week
2015-04-04 20:22:12 +00:00
Baptiste Daroussin
b0aa40ed29 Make sure forth manpages are only installed once.
Differential Revision:	https://reviews.freebsd.org/D2224
Reviewed by:	imp
2015-04-04 19:56:54 +00:00
Alan Cox
a8b0f1009d Replace vm_fault()'s heuristic for automatic cache behind with a heuristic
that performs the equivalent of an automatic madvise(..., MADV_DONTNEED).
The current heuristic, even with the improvements that I made a few years
ago, is a good example of making the wrong trade-off, or optimizing for
the infrequent case.  The infrequent case being reading a single file that
is much larger than memory using mmap(2).  And, in this case, the page
daemon isn't the bottleneck; it's the I/O.

In all other cases, the current heuristic has too many false positives,
i.e., it caches too many pages that are later reused.  To give one
example, thousands of pages are cached by the current heuristic during a
buildworld and all of them are reactivated before the buildworld
completes.  In particular, clang reads source files using mmap(2) and
there are some relatively large source files in our source tree, e.g.,
sqlite, that are read multiple times.  With the new heuristic, I see fewer
false positives and they have a much lower cost.

I actually tried something like this more than two years ago and it
didn't perform as well as the cache behind heuristic.  However, that was
before the changes to the page daemon in late summer of 2013 and the
existence of pmap_advise().  In particular, with the page daemon doing
its work more frequently and in smaller batches, it now completes its
work while the application accessing the file is blocked on I/O.
Whereas previously, the page daemon appeared to hog the CPU for so long
that it caused "hiccups" in the application's execution.

Finally, I'll add that the elimination of cache pages is a prerequisite
for NUMA support.

Reviewed by:	jeff, kib
Sponsored by:	EMC / Isilon Storage Division
2015-04-04 19:10:22 +00:00
Andrew Turner
a8b295acf3 Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
not build uart_cpu_fdt.c in all configs.
2015-04-04 18:45:25 +00:00
Andrew Turner
06d8b1ed6e Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
here also use OF_getencprop in uart_fdt_get_clock.

Sponsored by:	The FreeBSD Foundation
2015-04-04 09:57:52 +00:00
Andrew Turner
3d2a63f5ac Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
us the wrong data in the failure case if shift was not zero.

Sponsored by:	The FreeBSD Foundation
2015-04-04 09:21:56 +00:00
Andrew Turner
3e1eb51df7 Add support for arm64 to the existing arm generic timer driver:
- Add macros to handle the differences in accessing these registers on arm
   and arm64.
 - Use the fdt data to detect if we are on an ARMv7 or ARMv8.
 - Use the virtual timer by default on arm64, we may not have access to
   the physical timer.

Differential Revision:	https://reviews.freebsd.org/D2208
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2015-04-04 09:07:31 +00:00
Konstantin Belousov
0122d251bf Remove useless initialization.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-04-04 08:44:20 +00:00
Rui Paulo
3d8e91f9ce urtwn: blink the LED when scanning.
Previously, the driver was trying to blink the LED in the newstate
function, but that only gets called once (unlike OpenBSD's net80211
stack).  Move the LED blinking to set_channel().

While there, don't try to set the channel when we switch to the SCAN
state.  This is already accomplished by the set_channel() function.

MFC after:	1 week
2015-04-04 08:41:02 +00:00