Commit Graph

198514 Commits

Author SHA1 Message Date
Dimitry Andric
be01698709 Add FREEBSD-Xlist files for llvm, clang and lldb.
These are generated, and not "optimized" in any way, since I am not
entirely sure of the syntax or format of this type of file.  Feel free
to suggest ways of shortening these lists.

The general idea is the same for all three files, though:
* Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc)
* Delete tests, tools and utilities we don't want or use (including
  samples)
* Remove various bits of upstream metadata files that we don't want or
  use (.arcconfig, .gitignore, etc)
2015-03-22 17:56:49 +00:00
Adrian Chadd
83249cea34 Initialise the pps / packet tracking timestamp so 11n aggregation works again.
There's a bug in the ticks handling where when initialised at '0', once
the ticks counter wrapped the comparison math would never trigger.
The pps calculation would never happen, and thus aggregation was never
enabled.

It manifests itself as "oh you only get 11n transmit aggregation for the
first 10 minutes of uptime."

I'm sure there are other ticks related issues lurking in net80211.

Tested:

* ath / iwn, both with 'wlandebug +11n' and a little bit of iperf to
  kick off the transmit A-MPDU negotiation once the pps gets high enough.
2015-03-22 17:54:00 +00:00
Scott Long
d16528b2da Convert savecore to libxo. The 'verbose' paths still use printf since they're
meant for interactivity on the command line and contain a lot of redundant
information.

Obtained from:	Netflix, Inc.
2015-03-22 17:29:14 +00:00
Alexander Motin
6f954fb36b Remove MAXBSIZE use from drivers where it has nothing to do.
In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.

MFC after:	1 month
2015-03-22 16:10:28 +00:00
Pedro F. Giffuni
1b0c700c84 Small style(9) cleanup.
#define should always be followed by a tab not space.
2015-03-22 15:37:05 +00:00
Hans Petter Selasky
2793ea13aa Fix for out of order device destruction notifications when using the
delist_dev() function. In addition to this change:
- add a proper description of this function
- add a proper witness assert inside this function
- switch a nearby line to use the "cdp" pointer instead of cdev2priv()

MFC after:	3 days
2015-03-22 13:11:56 +00:00
Konstantin Belousov
c66d17c7bc msdosfs: mark unused compat-mount fields
The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
"old" vs "new" msdosfs mount arguments, has not been used since
2005; it should just go away now.

Likewise, the local-to-Unicode table that changed at the same
time is unused.

Leave the space reserved in the old style mount arguments, though,
since we still support the old mount call (via the cmount entry
point).

Submitted by:	Chris Torek <chris.torek@gmail.com>
MFC after:	2 weeks
2015-03-22 09:09:26 +00:00
Adrian Chadd
75fa40f89c Add initial D-Link DIR-655 (A1) support.
This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no
5GHz (11n or 11ac) chip is available.

It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N
gigabit switch - so it's quite a beefy router device.

Tested:

* Well, a unit, naturally

Obtained from:	Completely messing up an amazon.com order and getting this instead, and asking "hey, wonder if I could.."
2015-03-22 02:15:09 +00:00
Warren Block
8c2eccbf4b Describe the behavior when both -f and a message are given. Pointed out by
Raphael Abreu <raphael.lorenzeto@gmail.com> on freebsd-doc.

MFC after:	1 week
2015-03-22 01:25:57 +00:00
Adrian Chadd
442cfe16f1 re-enable building modules for the AR933x
* add ipfw
* delete ath / ath_ahb for now, until I can have Warner beat me
  with the clue stick about putting in conditional build things into
  the ath Makefile so the module builds can just have the HAL bits
  that are relevant for a particular target.
2015-03-21 23:39:34 +00:00
Adrian Chadd
f5ab408ee9 Quieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset
path.

* For now there's no exposed control over classic / LNA antenna diversity,
  so just stub them out.  Adding this will take quite a bit of time.

* Add a function to fetch the CTS timeout.

PR:		kern/198558
2015-03-21 23:12:46 +00:00
Dimitry Andric
7d0fba4fd9 Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Always include stddef.h to make sure size_t exists.

  From Alexander Esilevich.

Requested by:	andrew
2015-03-21 21:49:25 +00:00
Mateusz Guzik
f97af9706b proc: use MTX_NEW flag in proc_init
This allows us to get rid of bzero which was added specifically to make
mtx_init on p_mtx reliable.

This also fixes a potential problem where mtx_init on other mutexes
could trip over on unitialized memory and fire an assertion.

Reviewed by:	kib
2015-03-21 20:25:34 +00:00
Mateusz Guzik
ffb34484ee cred: add proc_set_cred_init helper
proc_set_cred_init can be used to set first credentials of a new
process.

Update proc_set_cred assertions so that it only expects already used
processes.

This fixes panics where p_ucred of a new process happens to be non-NULL.

Reviewed by:	kib
2015-03-21 20:24:54 +00:00
Mateusz Guzik
12cec311e6 fork: assign refed credentials earlier
Prior to this change the kernel would take p1's credentials and assign
them tempororarily to p2. But p1 could change credentials at that time
and in effect give us a use-after-free.

No objections from: kib
2015-03-21 20:24:03 +00:00
Dimitry Andric
22a3c2dd5d Correctly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL
(this has to be passed as a combination of two flags).  Should fix the
case where the clang version is before 3.5.0.

Submitted by:	Pedro Arthur <bygrandao@gmail.com>
X-MFC-With:	r279018, r279378
2015-03-21 19:13:13 +00:00
Alan Cox
3d653db063 Introduce vm_object_color() and use it in mmap(2) to set the color of
named objects to zero before the virtual address is selected.  Previously,
the color setting was delayed until after the virtual address was
selected.  In rtld, this delay effectively prevented the mapping of a
shared library's code section using superpages.  Now, for example, we see
the first 1 MB of libc's code on armv6 mapped by a superpage after we've
gotten through the initial cold misses that bring the first 1 MB of code
into memory.  (With the page clustering that we perform on read faults,
this happens quickly.)

Differential Revision:	https://reviews.freebsd.org/D2013
Reviewed by:	jhb, kib
Tested by:	Svatopluk Kraus (armv6)
MFC after:	6 weeks
2015-03-21 17:56:55 +00:00
Warner Losh
28e1e3e250 Make TARGET_ARCH=powerpc64 work without TARGET=powerpc. 2015-03-21 16:54:01 +00:00
Olivier Houchard
d8d2f47629 error is only used if MAC is defined, so make its declaration conditional
as well.
2015-03-21 16:16:17 +00:00
Olivier Houchard
f28d52a6d9 When waiting on PTE allocation, another thread could free the l2_dtable while
we're not looking at it.
Fix this by increasing l2->l2_occupancy before we try to alloc (and decrease
it if the allocation failed, or if another thread did a similar allocation).

Submitted by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>
MFC after:	1 week
2015-03-21 15:32:59 +00:00
Konstantin Belousov
0555fb3523 Somewhat modernize the SysV shm code:
- Use real locking, replace Giant with global sx protecting the
  subsystem.  Since the subsystem' lock is no longer dropped during
  the sleepsk, remove not needed SHMSEG_WANTED segment flag, and
  revert r278963.
- To do proper code simplification possible after the change of the
  lock, restructure several functions into _locked body and
  originally-named wrapper which calls into _locked variant.  This
  allows to eliminate the 'goto done2' spread over the code.
- Merge shm_find_segment_by_shmid() and shm_find_segment_by_shmidx().
- Consistently change all function prototypes to ANSI C.

Reviewed by:	mjg (who has earlier version of the similar patch to
	 introduce real locking)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-03-21 15:01:19 +00:00
Hans Petter Selasky
85bad58226 The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.

While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.

Make some variables 32-bit to avoid problems with multithreading.

MFC after:	3 days
PR: 		198444
2015-03-21 09:45:45 +00:00
Edward Tomasz Napierala
a600c3dd88 Make the autofs LDAP script cope with server returning entries with
ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation),
instead of before.

PR:		198557
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-21 09:42:37 +00:00
Adrian Chadd
771df80a72 Fix the LED configuration so the switch PHY LEDs work fine.
Tested:

* TP-Link TL-WDR3600; yes, by testing all five ethernet ports.

Obtained from:	Linux OpenWRT
2015-03-21 06:44:41 +00:00
Adrian Chadd
5daec26c5c Migrate these configs to use the geom map search function.
Now that the search function reliably works, this allows for
smaller images.
2015-03-21 06:18:25 +00:00
Adrian Chadd
d9b9920b70 Add support for the TP-Link TL-WDR4300 and TL-WDR3600.
These are actually almost the same units; except one is 3x3 5GHz, and
one is 2x2 5GHz.

Tested:

* TP-Link TL-WDR3600

TODO:

* The ath0/ath1 MAC addresses are ye garbage (00:02:03:04:05:06); fixing
  that will take a little more time.  It works fine with the ath0/ath1
  MAC addresses set manually.

* Go through and yank the AR9344 on-board switch config (arswitch1);
  it's not required here for this AP.
2015-03-21 06:16:23 +00:00
Adrian Chadd
0137d8b46e Re-enable the modules for now; I'm using them in some other test builds. 2015-03-21 06:13:30 +00:00
Adrian Chadd
9182d53e8c Now that the switch PHY fully works, don't limit arge0 to only being up
if the WAN port is up.

This way I can use it for arbitrary ports/vlans.
2015-03-21 06:12:46 +00:00
Adrian Chadd
753370121e Add GPIO function mux configuration for AR934x SoCs.
The AR934x (and maybe others in this family) have a more complicated
GPIO mux.  The AR71xx just has a single function register for a handful
of "GPIO or X" options, however the AR934x allows for one of roughly
100 behaviours for each GPIO pin.

So, this adds a quick hints based mechanism to configure the output
functions, which is required for some of the more interesting board
configurations.  Specifically, some use external LNAs to improve
RX, and without the MUX/output configured right, the 2GHz RX side
will be plain terrible.

It doesn't yet configure the "input" side yet; I'll add that if
it's required.

Tested:

* TP-Link TL-WDR3600, testing 2GHz STA/AP modes, checking some
  basic RX sensitivity things (ie, "can I see the AP on the other
  side of the apartment that intentionally has poor signal reception
  from where I am right now.")

Whilst here, fix a silly bug in the maxpin routine; I was missing
a break.
2015-03-21 06:08:35 +00:00
Adrian Chadd
358811c4e3 add QCA955x PCIe configuration registers.
These are /not/ absolute addresses, as the QCA955x SoC has 2 PCIe RC's
(and 1 PCIe EP.)
2015-03-21 06:00:46 +00:00
Adrian Chadd
3d58374a29 Note that the AR724x PCIe registers are actually from the PCI_CTRL
register range.
2015-03-21 05:59:45 +00:00
Mateusz Guzik
5bc0ff888a coredump: protect corefilename access with a lock
Previously format string traversal could happen while the string itself was
being modified.

Use allproc_lock as coredumping is a rare operation and as such we don't
have to create a dedicated lock.

Submitted by:	Tiwei Bie <btw mail.ustc.edu.cn>
Reviewed by:	kib
X-Additional:	JuniorJobs project
2015-03-21 04:39:33 +00:00
Devin Teske
febd9e9c94 Update copyright(s)
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:54:11 +00:00
Devin Teske
33112d9e9f Whitespace cleanup(s).
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:52:43 +00:00
Xin LI
4f9343fc7c Disable timestamping on devfs read/write operations by default.
Currently we update timestamps unconditionally when doing read or
write operations.  This may slow things down on hardware where
reading timestamps is expensive (e.g. HPET, because of the default
vfs.timestamp_precision setting is nanosecond now) with limited
benefit.

A new sysctl variable, vfs.devfs.dotimes is added, which can be
set to non-zero value when the old behavior is desirable.

Differential Revision:	https://reviews.freebsd.org/D2104
Reported by:	Mike Tancsa <mike sentex net>
Reviewed by:	kib
Relnotes:	yes
Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2015-03-21 01:14:11 +00:00
Pedro F. Giffuni
2fa7a2afac bsdgrep: fix regression in the -f option since r268799
Caused by an incomplete merge from NetBSD.

PR:		198725
MFC after:	3 days
2015-03-21 00:21:30 +00:00
Jung-uk Kim
3fde12b6f8 Disable insecure SSLv2 support from the base OpenSSL.
Differential Revision:	https://reviews.freebsd.org/D1304
2015-03-20 23:48:11 +00:00
Gleb Smirnoff
b1828acf05 Make vlan_config() the signle point of validity checks.
Sponsored by:	Nginx, Inc.
2015-03-20 21:09:03 +00:00
Gleb Smirnoff
f941c31aae In vlan_clone_match_ethervid():
- Use ifunit() instead of going through the interface list ourselves.
- Remove unused parameter.
- Move the most important comment above the function.

Sponsored by:	Nginx, Inc.
2015-03-20 20:42:58 +00:00
Allan Jude
1ea7a21e36 Fix grammar in epair(4) man page
PR:		196839
Differential Revision:	https://reviews.freebsd.org/D2090
Submitted by:	Jason Unovitch (original)
Approved by:	wblock (mentor)
Sponsored by:	ScaleEngine Inc.
2015-03-20 20:08:36 +00:00
Luiz Otavio O Souza
d7eb38c008 Add a driver for the Dallas/Maxim DS1307, another common i2c RTC.
Many thanks to ian who gently provided me the DS1307 breakout board.

Tested on:		Raspberry pi
Differential Revision:	https://reviews.freebsd.org/D2022
Reviewed by:		rpaulo
2015-03-20 19:51:24 +00:00
Colin Percival
25c1155771 When creating VM images, copy the contents of the created filesystem into
a new filesystem before packaging it into a disk image.  This prevents
"remnants" of deleted files from showing up in the VM images, and reduces
their compressed size (by about 10% for the cloudware images) as a result.

Looks good to:	gjb
2015-03-20 19:40:19 +00:00
Luiz Otavio O Souza
4e8058e313 Add the missing manual page link to the recently added function. 2015-03-20 19:29:59 +00:00
Jung-uk Kim
6f9291cea8 Merge OpenSSL 1.0.1m. 2015-03-20 19:16:18 +00:00
Andrew Turner
27eb3304cd Add a helper function to read clock frequencies from videocore and use this
to get the default frequency of the sdhci device.

While here use a u_int to hold the frequency as it may be too large to fit
in a 32-bit signed integer. This is the case when we have a 250MHz clock.
2015-03-20 16:54:21 +00:00
Alexander Motin
8187174a9b Add missing variable initialization.
Reported by:	Coverity
CID:		1288938
MFC after:	3 days
2015-03-20 16:05:13 +00:00
Jung-uk Kim
3d2030852d Import OpenSSL 1.0.1m. 2015-03-20 15:28:40 +00:00
Alexander Motin
0e2a18e657 Add comment explaining existing powerd behavior on SMP systems.
MFC after:	1 week
2015-03-20 15:07:05 +00:00
Andrew Turner
e5e85011ae Split out the common bcm283x fixes from the bcm2835 specific files. 2015-03-20 14:25:51 +00:00
Andrew Turner
df0968e45e Remove now unneeded headers from the Broadcom DWC driver 2015-03-20 14:23:40 +00:00