Commit Graph

206190 Commits

Author SHA1 Message Date
Dimitry Andric
85ab8f98e6 Install the public sanitizer headers. These are useful for programs
that want to directly interface with sanitizer internals.
2015-11-29 16:28:40 +00:00
Dag-Erling Smørgrav
4d8b056ef1 Use .netrc for HTTP sites and proxies, not just FTP.
PR:		193740
Submitted by:	TEUBEL György <tgyurci@gmail.com>
MFC after:	1 week
2015-11-29 14:26:59 +00:00
Edward Tomasz Napierala
5c859bfb63 Improve error reporting to clearly show problematic rules.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 13:14:45 +00:00
Edward Tomasz Napierala
4cf0d89598 Simplify rule retrieval and improve error handling.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:33:56 +00:00
Ulrich Spörlein
73e900646a Fix make depend 2015-11-29 12:23:08 +00:00
Edward Tomasz Napierala
5e7a25553c Fix some memory management problems.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:21:02 +00:00
Edward Tomasz Napierala
f4e361a725 Handle asprintf(3) errors in a standards-compliant way.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:09:12 +00:00
Edward Tomasz Napierala
0971623e61 Rewrite the rctl(8) utility to make it possible to add multiple rules
in a single run.  This speeds up operation with large rulesets.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:01:36 +00:00
Konstantin Belousov
b89def80f5 Minor cleanup.
Systematically use ANSI C functions definitions.
Correct type of the flags argument to the dev_pager_putpages() function.
Use vm_pager_free_nonreq().

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-11-29 11:37:25 +00:00
Edward Tomasz Napierala
478f7a726b User and group identifiers the rctl(8) utility receives from the kernel
are always in numeric form; don't try to resolve them by names.  This
speeds up rule listing with large rulesets by about 50%.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 11:30:17 +00:00
Michal Meloun
d3214e8d6d AHCI: Fix AHCI driver for ARM.
On ARM, we must ensure proper interdevice write ordering.
The AHCI interrupt status register must be updated in HW before
registers in interrupt controller.
Unfortunately, only way how we can do it is readback.

Discussed with:	mav
Approved by:	kib (mentor)
Differential Revision: https://reviews.freebsd.org/D4240
2015-11-29 11:28:04 +00:00
Nathan Whitehorn
7c259020fb Make ELFv2 powerpc64 kernels build and run. Loader support will come in a
separate commit.
2015-11-29 07:16:08 +00:00
Nathan Whitehorn
466d476aac Fix build with new binutils. This gets a working kernel with GCC 5.2 and
binutils 2.24. Without this, the self-relocation code in locore64.S was
failing due to a misaligned TOC section.

MFC after:	2 weeks
2015-11-29 06:40:09 +00:00
Daniel Eischen
77a498d991 Disable a couple of tests, perhaps temporarily, since they use private
symbols that are not exported from librt.
2015-11-29 06:16:25 +00:00
Daniel Eischen
bf1adfbdcd Unbreak symbol versioning. I have no idea when it was broken, but it's been
at least a few months if not a year or more.
2015-11-29 06:14:51 +00:00
Adrian Chadd
cd15736797 Add support for the integrated wifi for the QCA953x base config and
AP143.

Tested:

* AP143 reference design board
2015-11-29 05:49:49 +00:00
Adrian Chadd
27e2ad4687 Add initial support for the QCA953x SoC (honeybee) wifi.
This is a 2x2 2GHz 802.11n part.  It works enough at the moment to
bring up, scan and associate.  I haven't started using this as
a day to day AP.

The specifics:

* add honeybee initvals
* add in changes; a mix from the QCA HAL and ath9k;
* fix a bug in AR_SREV_AR9580_10_OR_LATER(), which is only used
  for one capability check and we don't even implement it - so it's
  a big no-op.

Shady things:

* ath9k has the "platform data" define the 25/40MHz clock.
  This HAL .. doesn't.  Honeybee gets hard-coded to 25MHz which
  it likely shouldn't be.  I'll have to go and identify/fix those.

Tested:

* Qualcomm Atheros AP143 reference design board.

Obtained from:	Qualcomm Atheros; Linux ath9k
2015-11-29 05:47:52 +00:00
Andrew Rybchenko
460cb5684c sfxge: add prefast annotation to common code return types
Using a typedef for common code return types (rather than "int")
allows the Prefast static analyser to understand when a function
has been successful (and thus when its postconditions must hold).

This greatly reduces then number of false positives reported by
prefast for error paths in common code functions.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-11-29 05:42:49 +00:00
Adrian Chadd
c56cfc9553 u32 -> uint32_t. 2015-11-29 05:42:18 +00:00
Andrew Rybchenko
5d4e8a8629 sfxge: cleanup: fix prefast annotations on mac stats updates
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
X-MFC with:     r291397
2015-11-29 05:38:40 +00:00
Adrian Chadd
f647fde2e8 [ath_hal] add AR9461 (jupiter) 2.1 support.
Obtained from:	Linux ath9k
2015-11-29 05:34:00 +00:00
Andrew Rybchenko
a1ae428b7d sfxge: modify nvram update functions for uio platform to support RFID-selectable presets
Dynamic config partitions on boards that support RFID are divided into
a number of segments, each formatted like a partition, with header,
trailer and end tags. The first segment is the current active
configuration.

The segments are initialised by manftest and each contain a different
configuration e.g. firmware variant. The firmware can be instructed
via RFID to copy a segment over the first segment, hence changing the
active configuration. This allows ops to change the configuration of
a board prior to shipment using RFID.

Changes to the dynamic config may need to be written to all segments (in
particular firmware versions written by manftest) or just the first
segment (changes to the active configuration). See SF-111324-SW.
If only the first segment is written the code still needs to be aware of
the possible presence of subsequent segments as writing to a segment may
cause its size to increase, which would overwrite the subsequent
segments and invalidate them.

Boards that do not support RFID will only have one segment in their
dynamic config partition.

Submitted by:   Paul Fox <pfox at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4302
2015-11-29 05:08:23 +00:00
Jean-Sébastien Pédron
75fcfd2d4b drm/i915: Reduce diff with Linux 3.8
There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after:	2 months
2015-11-28 17:38:27 +00:00
Jean-Sébastien Pédron
99ebb75d84 drm/i915: Further reduce the diff in i915_dma.c
MFC after:	2 months
2015-11-28 17:37:41 +00:00
Jean-Sébastien Pédron
31f37716a0 drm/i915: Reduce diff with Linux 3.8
There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after:	2 months
2015-11-28 15:22:46 +00:00
Michal Meloun
b1d2c95e1c AHCI: Use bus_dmamap_sync(9) when accessing DMA buffers.
Reviewed by:	mav
Approved by:	kib (mentor)
Differential Revision: https://reviews.freebsd.org/D4240
2015-11-28 14:30:42 +00:00
Michal Meloun
1eb1d41a56 ARM: Implement atomic_swap_int(9). It's used in DRM2 code.
Approved by:	kib (mentor)
2015-11-28 12:12:28 +00:00
Michal Meloun
1d687ba2d1 ARM: Add support for new KRAIT 300 CPU revision.
Approved by:	kib (mentor)
2015-11-28 12:11:44 +00:00
Michal Meloun
20fc8f2bb5 ARM: Cumulative fixes for GIC
- fix detection of interrupt root controller
 - allow (but warn) unsupported configuration bits
 - dont send EOI for spurious interrupts
 - print more informations for spurious interrupts
 - use device_printf() where appropriate

Reviewed by:	ian (earlier version)
Approved by:	kib (mentor)
2015-11-28 12:09:36 +00:00
Konstantin Belousov
724f4b62b0 Remove sv_prepsyscall, sv_sigsize and sv_sigtbl members of the struct
sysent.

sv_prepsyscall is unused.

sv_sigsize and sv_sigtbl translate signal number from the FreeBSD
namespace into the ABI domain.  It is only utilized on i386 for iBCS2
binaries.  The issue with this approach is that signals for iBCS2 were
delivered with the FreeBSD signal frame layout, which does not follow
iBCS2.  The same note is true for any other potential user if
sv_sigtbl.  In other words, if ABI needs signal number translation, it
really needs custom sv_sendsig method instead.

Sponsored by:	The FreeBSD Foundation
2015-11-28 08:49:07 +00:00
Konstantin Belousov
493a48901f Disconnect iBCS2 emulator from the build. The ibcs2 option, the build
glue and the sources are not removed for now.

Discussed with:	emaste
Sponsored by:	The FreeBSD Foundation
2015-11-28 08:31:32 +00:00
Adrian Chadd
2c9b30a91f [ath_hal] use the correct revision information for QCA953x.
This probe/attaches correctly in my local branch and now displays
a useful message:

ath0: <Qualcomm Atheros QCA953x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
...
ath0: AR9530 mac 1280.0 RF5110 phy 0.0
2015-11-28 06:50:09 +00:00
Adrian Chadd
1b34d2614e Add AR9530 (honeybee) config option. 2015-11-28 01:09:30 +00:00
Hajimu UMEMOTO
26b79d5b83 Regen src.conf.5 for recent option changes. 2015-11-28 00:55:49 +00:00
Hajimu UMEMOTO
f1f871e17d Fix breakage by recent collation change.
LC_ALL has to be exported.
2015-11-28 00:41:37 +00:00
Adrian Chadd
70aca315ac * Add device string for QCA955x (scorpion);
* Add device ID and device string for QCA953x (honeybee).
2015-11-28 00:27:16 +00:00
Adrian Chadd
19b34b5685 wrap in ATH_DEBUG.
Thanks sparc64 build!
2015-11-28 00:14:37 +00:00
Adrian Chadd
20b0b9ea74 [ath] conditionally print out the rate series information if ATH_DEBUG_XMIT is set. 2015-11-27 22:33:40 +00:00
Michael Tuexen
c6d2bd4812 Take also the send queue and sent queue into account when triggering
the sending of outgoing stream reset requests.

MFC after:	3 days
2015-11-27 22:11:46 +00:00
Ed Maste
632ddb8753 kbdmap: include filename when reporting fopen() failure
Previously only one of two cases reported the file name. Use the same
error string in both cases.

Sponsored by:	The FreeBSD Foundation
2015-11-27 21:27:39 +00:00
Konstantin Belousov
2eb2f0d5e3 In vm_pageout_grow_cache(), do not re-try the inactive queue when
active queue scan initiated write.

Re-trying from the inactive queue when doing active scan makes the
loop never end if number of domains is greater than 1 and inactive or
active scan cannot reach the target.

Reported and tested by:	Andrew Gallatin <gallatin@netflix.com>
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-11-27 19:43:36 +00:00
Zbigniew Bodek
cdf23c193a Add helper to catch single step debug event and distinguish it from bkpt
Some architectures (including ARMv6/v7) do not have separate single step
events and cannot see difference between breakpoint and single step.
Add db_pc_is_singlestep() to avoid skipping instruction we stepped on
to trigger debug event.
This commit does not change the existing functionality but adds possibility
to implement custom db_pc_is_singlestep().

Reviewed by:   imp
Submitted by:  Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4036
2015-11-27 19:03:59 +00:00
John Baldwin
7f911abe54 Add support to libkvm for reading vmcores from other architectures.
- Add a kvaddr_type to represent kernel virtual addresses instead of
  unsigned long.
- Add a struct kvm_nlist which is a stripped down version of struct nlist
  that uses kvaddr_t for n_value.
- Add a kvm_native() routine that returns true if an open kvm descriptor
  is for a native kernel and memory image.
- Add a kvm_open2() function similar to kvm_openfiles().  It drops the
  unused 'swapfile' argument and adds a new function pointer argument for
  a symbol resolving function.  Native kernels still use _fdnlist() from
  libc to resolve symbols if a resolver function is not supplied, but cross
  kernels require a resolver.
- Add a kvm_nlist2() function similar to kvm_nlist() except that it uses
  struct kvm_nlist instead of struct nlist.
- Add a kvm_read2() function similar to kvm_read() except that it uses
  kvaddr_t instead of unsigned long for the kernel virtual address.
- Add a new kvm_arch switch of routines needed by a vmcore backend.
  Each backend is responsible for implementing kvm_read2() for a given
  vmcore format.
- Use libelf to read headers from ELF kernels and cores (except for
  powerpc cores).
- Add internal helper routines for the common page offset hash table used
  by the minidump backends.
- Port all of the existing kvm backends to implement a kvm_arch switch and
  to be cross-friendly by using private constants instead of ones that
  vary by platform (e.g. PAGE_SIZE).  Static assertions are present when
  a given backend is compiled natively to ensure the private constants
  match the real ones.
- Enable all of the existing vmcore backends on all platforms.  This means
  that libkvm on any platform should be able to perform KVA translation
  and read data from a vmcore of any platform.

Tested on:	amd64, i386, sparc64 (marius)
Differential Revision:	https://reviews.freebsd.org/D3341
2015-11-27 18:58:26 +00:00
Zbigniew Bodek
6a5289b068 Add support for exynos5_ehci in loader
Create new driver which initializes Arndale PHY and calls ehci_init

Reviewed by:   hselasky
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4192
2015-11-27 18:22:04 +00:00
Zbigniew Bodek
fcf39bdcc4 Increase malloc area in loader/usb
Previous value was not enough on Arndale platform.

Reviewed by:   hselasky
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4145
2015-11-27 18:20:21 +00:00
Zbigniew Bodek
5bb01ba335 Run callouts during infinite waiting inside cv_wait
During cv_wait we may be waiting for an event triggered by callout.
Run callbacks here to avoid code blocking.

Reviewed by:   hselasky
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4144
2015-11-27 18:19:11 +00:00
Zbigniew Bodek
bbcfaa4eb8 Implement simple ops for umass_disk
The initial IOCTL implementation supports reading disk physical
geometry.
Two additional functions were added. They allow reading/writing raw
data to the disk (default partition).

Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4143
2015-11-27 18:17:53 +00:00
Zbigniew Bodek
09a37b41c5 Do not zero memory in umass_detach
The detach function is called very often, for example from
get_capacity function. We don't want to loose any pointers
here, so disable detaching for umass driver.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4141
2015-11-27 18:16:10 +00:00
Zbigniew Bodek
2646d9c030 Implement missing bus_space_subregion in kshim
Add missing function, used by exynos5_ehci driver.

Reviewed by:   hselasky
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4141
2015-11-27 18:14:45 +00:00
Zbigniew Bodek
7f34c97a79 Use properly aligned buffer in usb_alloc
The PA adress must be gathered from an aligned VA,
not the RAW pointer to the memory space.

Reviewed by:   hselasky
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4140
2015-11-27 18:13:28 +00:00