Commit Graph

199406 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
a44ba043c9 Fix growfs(8) build with debug enabled (make -DGFSDBG).
PR:		199641
Submitted by:	Willem Jan Withagen <wjw at digiware dot nl>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-24 12:48:48 +00:00
Enji Cooper
6eec0f2bda Avoid an infinite loop by ensuring that the amount of bytes read is greater
than 0 in MDXFileChunk when calculating the checksum

This edgecase can be triggered if the file is truncated while the checksum
is being calculated (i.e. the EOF is reached)

Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius)
PR: 196694
Reviewed by: delphij, ngie
Submitted by: Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division
2015-04-24 11:03:47 +00:00
David Chisnall
710ec77e3a __xlocale_C_ctype should not be const. It contains a reference count that is modified by newlocale / duplocale / freelocale.
MFC after:	1 week
2015-04-24 10:21:20 +00:00
David Chisnall
58912ae7c3 Small changes to locale-related man pages.
Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h.  Including xlocale.h is for legacy / Darwin compatibility so should not be encouraged.
2015-04-24 10:17:55 +00:00
Alexander Motin
6e8e105b22 Oops, add missing comma.
MFC after:	1 week
2015-04-24 09:52:41 +00:00
Alexander Motin
c54cb1bb5e Add link to mvs(4).
MFC after:	1 week
2015-04-24 09:47:10 +00:00
Edward Tomasz Napierala
9181358e8a Make nfsstat(1) build with WARNS=6.
Sponsored by:	The FreeBSD Foundation
2015-04-24 07:57:59 +00:00
Takanori Watanabe
7a4864d1bb Add Lynx-Point LP smbus controller ID. 2015-04-24 07:24:31 +00:00
Kevin Lo
caff7a39cf Plural fix. 2015-04-24 05:00:57 +00:00
Kevin Lo
0339d2cfcc - Fix the length of efuse content.
- Replace the magic numbers with something more readable.
2015-04-24 04:57:18 +00:00
Mark Johnston
8241ee3b2c Fix DTrace's panic() action.
It would previously call into some unfinished Solaris compatibility code and
return without actually calling panic(9). The compatibility code is
unneeded, however, so just remove it and have dtrace_panic() call vpanic(9)
directly.

Differential Revision:	https://reviews.freebsd.org/D2349
Reviewed by:	avg
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-04-24 03:19:30 +00:00
Mark Johnston
da10a60340 Make vpanic() externally visible so that it can be called as part of the
DTrace panic() action.

Differential Revision:	https://reviews.freebsd.org/D2349
Reviewed by:	avg
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-04-24 03:17:21 +00:00
Andrew Turner
092b8f61cd Add the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to
select which SoCs the kernel config will support.

Use these options to merge files.imx51 and files.imx53.
2015-04-23 22:20:43 +00:00
Andrew Turner
bb135ad6af Reduce the diff between files.imx51 and files.imx53 2015-04-23 21:39:32 +00:00
Andrew Turner
bb456994ee Pull out the common parts of the ODROIDC1 and VSATV102 kernels to a new
kernel config. This also removes the per-board config files from universe.
2015-04-23 21:31:06 +00:00
Andrew Turner
442938a94f Remove the need for board specific std files on aml8726 by moving the
options they set to the main kernel config.
2015-04-23 20:53:29 +00:00
Andrew Turner
4ca6cef0b5 Move KERNVIRTADDR to the common std.aml8726. 2015-04-23 20:43:24 +00:00
Andrew Turner
7a26ccdd87 - Move files selected in files.smp to files.aml8726 and remove it.
- Remove a redundant file from files.aml8726
2015-04-23 20:39:40 +00:00
Andrew Turner
3aaf2b23e7 Update the ODROIDC1 and VSATV102 to reduce the diff to the other armv6
kernel config files.
2015-04-23 20:28:56 +00:00
Ed Maste
2a4b3913bb Revert r281889, it broke keyboard input 2015-04-23 20:26:22 +00:00
Luiz Otavio O Souza
fb39e63bdf Now that we have an U-Boot for RPI2, do not use the static DTB compiled
into the kernel, which is used mostly on early development stages.

On RPI(2) the DTB is loaded and modified by firmware and then handed to
kernel via U-Boot and ubldr.

The RPI firmware adds (or modify) a few valuable data to the in memory
DTB, like:

 - System memory;
 - Ethernet MAC address;
 - framebuffer settings;
 - Board serial and revision;
 - clock-frequency for most of devices.
2015-04-23 19:50:22 +00:00
Luiz Otavio O Souza
b7ce14b99c Fix the gpio-leds node to match the LEDs on RPI2.
The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED
is connected to GPIO pin 47 (active high).

Remove the GPIO pin 47 from reserved pins list, previously it was used to
signaling the SD Card presence and now it is used by act LED.
2015-04-23 18:36:36 +00:00
Luiz Otavio O Souza
b7dee41fd4 Enable the watchdog on RPI2.
The watchdog is used to reset the SoC on cpu_reset().

Without this, RPI2 will not reboot when asked to.
2015-04-23 14:58:39 +00:00
Pedro F. Giffuni
77990dfda9 Plug memory leaks in kbdmux(4)
Al kudos here for the Clang static analyzer which, unlike Coverity,
failed to flag a false positive.

Found by:	clang static analyzer
CID:		1007072
CID:		1007073
CID:		1007074

MFC after:	1 week
2015-04-23 14:53:45 +00:00
Edward Tomasz Napierala
722e25522e Remove oldnfs support from nfsstat(1).
Reviewed by:	rmacklem@ (earlier version)
Sponsored by:	The FreeBSD Foundation
2015-04-23 14:36:01 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Ed Maste
15222dc5d6 Reduce diffs between the three copies of libstand's Makefile
This should be a non-functional change.  A future change should
address the functional differences between these three and converge
on a single source.

Differential Revision:	https://reviews.freebsd.org/D2058
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
2015-04-23 14:04:33 +00:00
Gleb Smirnoff
9f7d0f4830 Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to
quite unexpected result of toggling capabilities on the neighbour vlan(4)
interfaces.

Reviewed by:		melifaro, np
Differential Revision:	https://reviews.freebsd.org/D2310
Sponsored by:		Nginx, Inc.
2015-04-23 13:19:00 +00:00
Michael Tuexen
446734c25e A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
flag.
Thanks to Valentin Nechayev for reporting the issue.

MFC after: 1 week
2015-04-23 13:10:03 +00:00
Konstantin Belousov
fe8a824ca6 Handle incorrect ELF images specifying size for PT_GNU_STACK not being
multiple of page size.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-04-23 11:27:21 +00:00
Edward Tomasz Napierala
310e931198 Simplify linux_getcwd(), removing code that was longer used.
Differential Revision:	https://reviews.freebsd.org/D2326
Reviewed by:	dchagin@, kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-23 08:41:50 +00:00
Hans Petter Selasky
4e36e4528c Disable multi process interrupts, because the current code doesn't use
them. Else we can end up in an infinite interrupt loop in USB device
mode.

MFC after:	3 days
2015-04-23 07:41:58 +00:00
Marcelo Araujo
dbec2c5c65 Missing break in switch case.
Differential Revision:	D2342
Reviewed by:		neel
2015-04-23 02:50:06 +00:00
Pyun YongHyeon
0d3c2a9a16 Add another variant of BCM5708S controller to IBM HS21 workaround
list.

PR:		118238
MFC after:	2 weeks
2015-04-23 01:39:28 +00:00
Glen Barber
08a75d1f0e Create the arm64/aarch64 VM disk image as MBR instead of
GPT scheme.  UEFI needs to know the unique partition GUID
with GPT, which changes each time.  Specifically, the QEMU
EFI BIOS file has this hard-coded.[1]

Since the GPT labels are now unavailable, unconditionally
label the root filesystem as 'rootfs' with newfs(8), since
it does not hurt anything anywhere else.  For the arm64 case,
'/' is mounted from /dev/ufs/rootfs; for all other VM images,
'/' is mounted from /dev/gpt/rootfs.

Unfortunately, since the /dev/gpt/swapfs label is also lost,
set NOSWAP=1 for the arm64/aarch64 images.  This is temporary,
until I figure out a scalable solution to this.  But, a certain
piece of softare was written "very fast", and ended up living
for 15 years.  We can deal with this for a week or so.

Information from:	andrew, emaste [1]
Sponsored by:	The FreeBSD Foundation
2015-04-23 01:04:14 +00:00
Pedro F. Giffuni
e54379826c libgeom: plug memory leak in EndElement.
CID:		1016696
Found by:	Clang static checker
MFC after:	1 week
2015-04-22 22:23:56 +00:00
John Baldwin
ad6f36f845 Update the pci_cfg_save/restore routines to operate on bridge devices
(type 1 and type 2) as well as leaf devices (type 0).  In particular,
this allows the existing PCI bus logic to save and restore capability
registers such as MSI and PCI-express work for bridge devices rather than
requiring that code to be duplicated in bridge drivers.  It also means
that bridge drivers no longer need to save and restore basic registers
such as the PCI command register or BARs nor manage powerstates for the
bridge device.

While here, pci_setup_secbus() has been changed to initialize the 'sec'
and 'sub' fields in the 'secbus' structure instead of requiring the pcib
and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case.

Differential Revision:	https://reviews.freebsd.org/D2240
Reviewed by:	imp, jmg
MFC after:	2 weeks
2015-04-22 22:02:27 +00:00
John Baldwin
7212fc6a34 Don't explicitly manage power states for PCI-PCI bridge devices in the
driver's suspend and resume routines.  These have been redundant no-ops
since r214065 changed the PCI bus driver to manage power states for
all devices (including type 1/2 bridge devices) during suspend and resume.
2015-04-22 21:56:44 +00:00
John Baldwin
2ae5fd151f Fix some incorrect #if conditions around older workarounds for bus
numbering goofs.

MFC after:	1 week
2015-04-22 21:47:51 +00:00
John Baldwin
65c7c1b424 The minimim grant and maximum latency PCI config registers are only valid
for type 0 devices, not type 1 or 2 bridges.  Don't read them for bridge
devices during bus scans and return an error when attempting to read them
as ivars for bridge devices.
2015-04-22 21:41:59 +00:00
John Baldwin
f2d55827ea Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. 2015-04-22 21:38:21 +00:00
Luiz Otavio O Souza
b7fbc36963 Fetch the SDHCI frequency from videocore (our prefered source) and only if
it fails, fetch the clock-frequency from DTB.

If both methods fail, use the hardcoded default.
2015-04-22 18:35:02 +00:00
Craig Rodrigues
cb1ecf6cca Move zlib.c from net to libkern. 2015-04-22 18:15:18 +00:00
Pedro F. Giffuni
8ae028a62f Add definition for the argument_with_type_tag attribute.
This attribute originates in clang and brings support for checking types
of variadic functions' arguments for functions like fcntl() and ioctl().

Unfortunately lint(1) will complain about them: in particular as one of
the parameters is the function being tagged. For now define this attribute
in the lint-sensitive section.

Reference:
http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking
2015-04-22 18:13:28 +00:00
Alexander Motin
f743d981f3 Make AIO to not allocate pbufs for unmapped I/O like r281825.
While there, make few more performance optimizations.

On 40-core system doing many 512-byte AIO reads from array of raw SSDs
this change removes lock congestions inside pbuf allocator and devfs,
and bottleneck on single AIO completion taskqueue thread.  It improves
peak AIO performance from ~600K to ~1.3M IOPS.

MFC after:	2 weeks
2015-04-22 18:11:34 +00:00
Luiz Otavio O Souza
88d1700334 Fix the SDHCI clock frequency for RPI2, the default clock (for the newer
firmware versions) is 250MHz.
2015-04-22 17:35:58 +00:00
Pedro F. Giffuni
12eb0bca33 computematchjumps(): fix allocator sizeof operand mismatch.
Mostly cosmetical warning.

Found by:	Clang static analyzer
2015-04-22 17:09:02 +00:00
Pedro F. Giffuni
9acf5917d3 _pthread_cleanup_push: fix allocator sizeof operand mismatch
Same fix appears to be in DragonFly's libthread_xu.

Found by:	Clang Static Analyzer
MFC after:	1 week
2015-04-22 16:51:21 +00:00
Craig Rodrigues
d9db52256e Move zlib.c from net to libkern.
It is not network-specific code and would
be better as part of libkern instead.
Move zlib.h and zutil.h from net/ to sys/
Update includes to use sys/zlib.h and sys/zutil.h instead of net/

Submitted by:		Steve Kiernan stevek@juniper.net
Obtained from:		Juniper Networks, Inc.
GitHub Pull Request:	https://github.com/freebsd/freebsd/pull/28
Relnotes:		yes
2015-04-22 14:38:58 +00:00
Glen Barber
e19e678123 Remove the gptboot partition from the arm64 memory stick image,
which is not needed/used.

Sponsored by:	The FreeBSD Foundation
2015-04-22 13:52:29 +00:00