Commit Graph

103657 Commits

Author SHA1 Message Date
Rick Macklem
7cfdc2a7bc MAXBSIZE defines both the largest UFS block size and the
largest size for a buffer in the buffer cache. This patch
defines a new constant MAXBCACHEBUF, which is the largest
size for a buffer in the buffer cache. Having a separate
constant allows MAXBCACHEBUF to be set larger than MAXBSIZE
on a per-architecture basis, so that NFS can do larger read/writes
for these architectures. It modifies sys/param.h so that BKVASIZE
can also be set on a per-architecture basis.
A couple of cases where NFS used MAXBSIZE instead of NFS_MAXBSIZE
is fixed as well.

Differential Revision:	https://reviews.freebsd.org/D2330
Reviewed by:	mav, kib
MFC after:	2 weeks
2015-04-25 00:52:01 +00:00
Kirk McKusick
74a87c3804 Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).

This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.

Reported by: Dmitry Sivachenko (demon@)
Tested by:   Dmitry Sivachenko (demon@)
MFC after:   2 weeks
2015-04-24 23:27:50 +00:00
Konstantin Belousov
b9062c934a Use correct length for sparse uiomove(). It must be the clipped to
the page size, len is the total transfer length, which may be larger
than zero_region.

Reported and tested by:	clusteradm (gjb)
Sponsored by:	The FreeBSD Foundation
X-MFC-With:	r281442
2015-04-24 22:05:12 +00:00
Andrey V. Elsukov
1ffc12bc42 Fix possible reference leak.
Sponsored by:	Yandex LLC
2015-04-24 21:05:29 +00:00
Pedro F. Giffuni
e8968b7eaf Add definition to support alloc_align attribute.
gcc 4.9 added support for new alignment attribute alloc_align:

The alloc_align attribute is used to tell the compiler that the function
return value points to memory, where the returned pointer minimum
alignment is given by one of the functions parameters. GCC uses this
information to improve pointer alignment analysis.

This attribute is not (yet) available on clang.
2015-04-24 18:07:34 +00:00
Ed Maste
382abd8c81 vt(4): Simplify mouse area detection
vt_is_cursor_in_area needs to return true if any part of the mouse
cursor is visible in the rectangle area. Replace the existing test with
a simpler version of a test for overlapping rectangles.

Differential Revision:	https://reviews.freebsd.org/D2356
Reviewed by:	ray
Sponsored by:	The FreeBSD Foundation
2015-04-24 17:36:26 +00:00
Scott Long
43ffa928f9 Revert r281451. It causes a panic/hang early in boot for a number of
users, myself included.  The original code is likely papering over a
larger bug that needs to be explored, but for now get things back to
a working state.

Obtained from:	Netflix, Inc.
MFC after:	immediately
2015-04-24 17:03:53 +00:00
John Baldwin
9662eef57a Watchdog drivers need to support rearming the watchdog in contexts which
are not permitted to sleep.  Only use the IPMI watchdog with backends
which poll driver-initiated requests to meet this requirement.

In practice this means that watchdogs will no longer be used on systems
that use the SSIF backend.

Differential Revision:	https://reviews.freebsd.org/D2062
MFC after:	2 weeks
2015-04-24 16:56:23 +00:00
Konstantin Belousov
02c26f81a7 Move common code from sys/i386/i386/mp_machdep.c and
sys/amd64/amd64/mp_machdep.c, to the new common x86 source
sys/x86/x86/mp_x86.c.

Proposed and reviewed by:	jhb
Review:	https://reviews.freebsd.org/D2347
Sponsored by:	The FreeBSD Foundation
2015-04-24 16:20:56 +00:00
John Baldwin
12b4b5a0da Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge
about kld filenames for network drivers that requires them to follow the
pattern of if_<foo>.  This also fixes the existing documentation in the
manpage which says to use if_oce_load=YES in loader.conf.

PR:		199095
MFC after:	1 week
2015-04-24 14:47:53 +00:00
John Baldwin
5abf821641 Update this driver to not save copies of registers that are no longer used
after r281874.  While here, also update it to always write the parent's
PCI bus number to the primary bus register.
2015-04-24 13:12:04 +00:00
Takanori Watanabe
7a4864d1bb Add Lynx-Point LP smbus controller ID. 2015-04-24 07:24:31 +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
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
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
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
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
Konstantin Belousov
dfe7b3bfbc Move some common code from sys/amd64/amd64/machdep.c and
sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c.  Most
of the code is related to the idle handling.

Discussed with:	pluknet
Sponsored by:	The FreeBSD Foundation
2015-04-22 12:32:14 +00:00
Andrew Turner
6c2d9cea22 Add the null implementation of stack_save and stack_save_td.
Sponsored by:	The FreeBSD Foundation
2015-04-22 12:24:38 +00:00
Andrew Turner
6dd719a463 Remove the calls to panic from pmap_object_init_pt and pmap_clear_modify.
Sponsored by:	The FreeBSD Foundation
2015-04-22 09:52:51 +00:00
Craig Rodrigues
d5fec48956 Support file verification in MAC.
* Add VCREAT flag to indicate when a new file is being created
* Add VVERIFY to indicate verification is required
* Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open
  and are removed from the accmode after
* Add O_VERIFY flag to rtld open of objects
* Add 'v' flag to __sflags to set O_VERIFY flag.

Submitted by:		Steve Kiernan <stevek@juniper.net>
Obtained from:		Juniper Networks, Inc.
GitHub Pull Request:	https://github.com/freebsd/freebsd/pull/27
Relnotes:		yes
2015-04-22 01:54:25 +00:00