Commit Graph

99141 Commits

Author SHA1 Message Date
Ian Lepore
7c54a52475 The exclusion_bounce() routine compares unchanging values in the tag with
unchanging values in the phys_avail array, so do the comparisons just once
at tag creation time and set a flag to remember the result.

Reviewed by:	cognet
2014-07-29 02:34:32 +00:00
Ian Lepore
751428ce88 Rename _bus_dma_can_bounce(), add new inline routines.
DMA on arm can bounce for several reasons, and _bus_dma_can_bounce() only
checks for the lowaddr/highaddr exclusion ranges in the dma tag, so now
it's named exclusion_bounce().  The other reasons for bouncing are checked
by the new functions alignment_bounce() and cacheline_bounce().

Reviewed by:	cognet
2014-07-29 02:31:29 +00:00
Konstantin Belousov
d3a3b8b038 Simplify the expression, by removing redundand calculation.
Noted by:	"O'Connor, Daniel" <Daniel.O'Connor@emc.com>
MFC after:	3 days
2014-07-29 01:46:31 +00:00
Jack F Vogel
60186ca3e7 Add new README to the driver... 2014-07-28 22:23:49 +00:00
Jack F Vogel
9d052f904b Update the new 40G XL710 driver to Release version 1.0.0 2014-07-28 21:57:09 +00:00
Edward Tomasz Napierala
e403cfdc57 Fix potential double free that could happen after connection error.
MFC after:	3 days
2014-07-28 21:14:41 +00:00
Aleksandr Rybalko
eeadf17a21 Revise font initialization handling.
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:41:22 +00:00
Aleksandr Rybalko
ba5c073ae3 Update comments.
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:37:59 +00:00
Aleksandr Rybalko
5cc762d4c0 Remove special handling of console window size. It's done in vt_upgrade() for
all windows.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:35:21 +00:00
Konstantin Belousov
5d9b4508fd For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.

Reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-07-28 14:27:05 +00:00
Konstantin Belousov
fe0e9a63e0 Initialize zfs vnode v_hash when the vnode is allocated, instead of
postponing it to zfs_vget().  zfs_root() returned vnode with the
default value of v_hash, which caused inconsistent v_hash value when
root vnode was obtained from zfs_vget().

Nullfs allocated two upper vnodes for the root zfs vnode due to
different hashes, causing consistency problems.

Reported and tested by:	Harald Schmalzbauer <h.schmalzbauer@omnilan.de>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-07-28 14:24:18 +00:00
Aleksandr Rybalko
9a0f8af7d4 Avoid embedding buffers into static virtual terminal window.
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:22:34 +00:00
Konstantin Belousov
0ebe0000b6 Assert that nullfs vnode has VV_ROOT set whenever lower vnode has.
Assert that dotdot lookup on the root vnode is not performed.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-07-28 14:20:31 +00:00
Aleksandr Rybalko
8b1932a845 o Remove useless debug string.
o Fix indent.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:15:41 +00:00
Aleksandr Rybalko
3f71a6b88a Remove unused macro VT_CONSDEV_DECLARE. Join console device now declared in one
place.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-28 14:14:33 +00:00
Shunsuke Akiyama
0bd50b2210 Add missing newline to output dmesg properly. 2014-07-28 13:47:02 +00:00
Pietro Cerutti
adecd05bf0 Unbreak the ABI by reverting r268494 until the compat shims are provided 2014-07-28 07:20:22 +00:00
Ruslan Bukin
4d3ff0c3e6 Add the rest of combined interrupt groups. 2014-07-28 05:37:10 +00:00
Adrian Chadd
3fdeac5b5a Update from mav@ - don't break the input switching. 2014-07-27 20:14:22 +00:00
Marcel Moolenaar
a2a6914f06 1. Suppress output for the TFTP-based PXE loader, but leave it in
place for the NFS-based PXE loader. Information like rootpath
    or rootip aren't that useful for TFTP and the gateway IP is
    typically already printed by the firmware.
2.  Only set boot.nfsroot.* environment variables for NFS. This
    makes it possible for the OS to work either way by checking
    for the presence or absence of environment variables.
3.  Set boot.netif.server when using TFTP so that the OS can fetch
    files as well. A typical use case for this is network-based
    installations with the installation process implemented on
    top of FreeBSD.
4.  The pxelinux loader has a set of alternative names it tries
    for configuration files. Make it easier to do something
    similar in Forth by providing the IP address as a 32-bit hex
    number in the pxeboot.ip variable and the MAC address with
    dashes in the pxeboot.hwaddr environment variable.

Obtained from:	Juniper Networks, Inc.
2014-07-27 16:29:57 +00:00
Marcel Moolenaar
7fe0b4f160 Give loaders more control over the Forth initialization process. In
particular, allow loaders to define the name of the RC script the
interpreter needs to use. Use this new-found control to have the
PXE loader (when compiled with TFTP support and not NFS support)
read from ${bootfile}.4th, where ${bootfile} is the name of the
file fetched by the PXE firmware.

The normal startup process involves reading the following files:
1.  /boot/boot.4th
2.  /boot/loader.rc or alternatively /boot/boot.conf

When these come from a FreeBSD-defined file system, this is all
good. But when we boot over the network, subdirectories and fixed
file names are often painful to administrators and there's really
no way for them to change the behaviour of the loader.

Obtained from:	Juniper Networks, Inc.
2014-07-27 16:12:51 +00:00
Adrian Chadd
dcd850637a Add support for my Lenovo T400.
Tested:

* Lenovo T400, model w/ P8700 Intel CPU on-board
2014-07-27 08:44:15 +00:00
Alexander Motin
1b5307b2b0 Fix several cases of NULL dereference when INQUIRY sent to absent LUN.
MFC after:	3 days
2014-07-27 06:49:55 +00:00
Adrian Chadd
c821a62f9c Commit some sins in the name of "oh god oh god I don't really want to
be able to claim I know how the UART code works."

* Just return 115200 as the current baud rate. I should cache it in the
  device struct and return that but I'm lazy right now.
* don't error out on other ioctl settings for now, just silently ignore them.
* remove some code that was copied from the 8250 driver that isn't needed
  any longer.

Tested:

* AR9331, Carambola-2 board.
2014-07-27 05:44:42 +00:00
Adrian Chadd
9682e34719 Add another revision of the AR8327. 2014-07-26 21:33:17 +00:00
Adrian Chadd
a32a326b6d store the AR9300 interrupts away when doing interrupt debugging. 2014-07-26 21:32:03 +00:00
Marcel Moolenaar
1e0a021e3d The accept filter code is not specific to the FreeBSD IPv4 network stack,
so it really should not be under "optional inet". The fact that uipc_accf.c
lives under kern/ lends some weight to making it a "standard" file.

Moving kern/uipc_accf.c from "optional inet" to "standard" eliminates the
need for #ifdef INET in kern/uipc_socket.c.

Also, this meant the net.inet.accf.unloadable sysctl needed to move, as
net.inet does not exist without networking compiled in (as it lives in
netinet/in_proto.c.) The new sysctl has been named net.accf.unloadable.

In order to support existing accept filter sysctls, the net.inet.accf node
has been added netinet/in_proto.c.

Submitted by:	Steve Kiernan <stevek@juniper.net>
Obtained from:	Juniper Networks, Inc.
2014-07-26 19:27:34 +00:00
Hans Petter Selasky
0722247439 Split the XHCI TRB allocations into smaller parts, so that we don't
end up allocating contiguous busdma buffers above PAGE_SIZE bytes.

MFC after:	1 week
Tested by:	Ruslan Bukin <br@bsdpad.com>
2014-07-26 19:08:52 +00:00
Xin LI
50b74c6ef1 Add two sysctls for newly added tunables.
MFC after:	2 weeks
2014-07-26 19:07:08 +00:00
Marcel Moolenaar
8bf2af7fc9 Add missing definition of ELF_MACHINE_OK, now used by gcore(1). 2014-07-26 18:52:23 +00:00
Ian Lepore
510b2cb75c Pull in the armv4 "fast out" code for checking whether busdma can bounce
due to an excluded region of physical memory.
2014-07-26 18:19:43 +00:00
Ian Lepore
9ec89d355f Remove completely bogus alignment check -- it's the physical address that
needs to be aligned, not the virtual, and it doesn't seem worth the cost
of a vtophys() call just to see if kmem_alloc_contig() works properly.
2014-07-26 18:14:16 +00:00
Alan Cox
0346250941 When unwiring a region of an address space, do not assume that the
underlying physical pages are mapped by the pmap.  If, for example, the
application has performed an mprotect(..., PROT_NONE) on any part of the
wired region, then those pages will no longer be mapped by the pmap.
So, using the pmap to lookup the wired pages in order to unwire them
doesn't always work, and when it doesn't work wired pages are leaked.

To avoid the leak, introduce and use a new function vm_object_unwire()
that locates the wired pages by traversing the object and its backing
objects.

At the same time, switch from using pmap_change_wiring() to the recently
introduced function pmap_unwire() for unwiring the region's mappings.
pmap_unwire() is faster, because it operates a range of virtual addresses
rather than a single virtual page at a time.  Moreover, by operating on
a range, it is superpage friendly.  It doesn't waste time performing
unnecessary demotions.

Reported by:	markj
Reviewed by:	kib
Tested by:	pho, jmg (arm)
Sponsored by:	EMC / Isilon Storage Division
2014-07-26 18:10:18 +00:00
Marcel Moolenaar
a9f31ae0a8 Build tsec(4) as a module.
Obtained from:	Juniper Networks, Inc.
2014-07-26 17:59:25 +00:00
Marcel Moolenaar
aa5fed07eb Remove bogus module dependencies. 2014-07-26 17:57:13 +00:00
Marcel Moolenaar
359ee827e1 Do not fail the low-level device probe simply because the kernel
doesn't have support for the Z8530. Embedded PowerPC platforms
typically don't. Fail when the device class we actually need is
not present.

Obtained from:	Juniper Networks, Inc.
2014-07-26 17:49:40 +00:00
Marcel Moolenaar
0327754b52 Avoid using ${.CURDIR} so that the module can be built from multiple
directories.

Obtained from:	Juniper Networks, Inc.
2014-07-26 17:24:58 +00:00
Marcel Moolenaar
8b4f33c5f6 Fix relocations related to dpcpu and vnet sets. The address is
rebased to point to the allocated memory, but for architectures
that have non-zero relocation addends, the address comparison
happens on the "unfinalized" address.
After the addend is taken into account, call elf_relocaddr() to
make sure we rebase properly.
2014-07-26 17:07:32 +00:00
Hans Petter Selasky
b8e3094c34 Fix for division by zero.
MFC after:	3 days
2014-07-26 16:06:01 +00:00
Marcel Moolenaar
be836fab6c Don't return ERESTART when the device is gone. In ttydev_leave() ERESTART
is the indication that draining got interrupted due to a revoke(2) and
that tty_drain() is to be called again for draining to complete. If the
device is flagged as gone, then waiting/draining is not possible. Only
return ERESTART when waiting is still possible.

Obtained from:	Juniper Networks, Inc.
2014-07-26 15:46:41 +00:00
Alexander Motin
67f586a8c1 Implement separate I/O dispatch method for ZVOLs in "dev" mode.
Unlike disk devices ZVOLs process all requests synchronously.  That makes
impossible sending multiple requests to them from single thread.  From the
other side ZVOLs have real d_read/d_write methods, which unlike d_strategy
can handle uio scatter/gather and have no strict I/O size limitations.

So, if ZVOL in "dev" mode is detected, use of d_read/d_write methods instead
of d_strategy allows to avoid pointless splitting of large requests into
MAXPHYS (128K) sized chunks.

MFC after:	1 week
2014-07-26 13:56:50 +00:00
Alexander Motin
696297ad2f Fix infinite loop, when doing WRITE SAME on file-backed LUN.
MFC after:	3 days
2014-07-26 13:43:25 +00:00
Xin LI
7e37b1e609 MFV r269010:
Import Illumos changes to address the following Illumos issues:
  4976 zfs should only avoid writing to a failing non-redundant
       top-level vdev
  4978 ztest fails in get_metaslab_refcount()
  4979 extend free space histogram to device and pool
  4980 metaslabs should have a fragmentation metric
  4981 remove fragmented ops vector from block allocator
  4982 space_map object should proactively upgrade when feature
       is enabled
  4984 device selection should use fragmentation metric

MFC after:	2 weeks
2014-07-26 10:20:48 +00:00
Alexander Motin
1bc04f6a8c Make sysctls under vfs.zfs.zfetch writeable.
I don't see any reason for them to be read-only, while tuning them without
reboot is much more convenient for experiments.

MFC after:	2 weeks
2014-07-26 09:09:14 +00:00
Simon J. Gerraty
5b6dc2efc9 Reviewed by: imp
LDFLAGS is supposed to be given to CC not LD.
Define _LDFLAGS as a filtered version of LDFLAGS safe to give to LD
2014-07-26 04:38:09 +00:00
Ian Lepore
8926f21ce1 Enable at91 systems to boot from high capacity SD cards.
This also fixes a few minor violations of the SD protocol, such as running
the bus at high speed during the card identification sequence.

The sdcard_init() routine now probes for SDHC cards so that later read
requests can make needed adjustments between block and byte offsets based
on card type.

There is a new MCI_readblocks() function that takes block number and block
count parameters instead of byte-offset values.  Using this routine, boot
loader code can load a kernel from any location on an SDHC or standard SD.

The old MCI_read() interface remains unchanged so that existing customized
boot loader code will still keep working without changes.  Using this
routine, boot loaders can load a kernel from anywhere in the first 4GB of
an SDHC card (or of course any location on a standard SD card).

A new sdcard_use4wire() routine allows boot loaders to request 4-bit
transfers; it should be called after sdcard_init().  The sdcard_init()
routine no longer assumes the hardware is 4-wire capable and by default
sets things up for 1-bit transfers.  (4-wire mode is unreliable on
at91rm9200, works on later SoCs.)

PR:		155894
Submitted by:	me.  years ago.
2014-07-26 04:16:04 +00:00
Ian Lepore
3ed6efc4ac The 'flags' variable is conflicting with some inline code in a header file
("variable flags shadows a global..."), just rename this variable to
wish away the problem.
2014-07-26 04:09:43 +00:00
Ian Lepore
a6fc334653 Eliminate "no previous prototype for main" warnings. 2014-07-26 03:33:19 +00:00
Ian Lepore
3e479cb537 Silence a clang warning about a while loop with an empty body. 2014-07-26 03:19:13 +00:00
Neel Natu
f008d1571d If a vcpu has issued a HLT instruction with interrupts disabled then it sleeps
forever in vm_handle_hlt().

This is usually not an issue as long as one of the other vcpus properly resets
or powers off the virtual machine. However, if the bhyve(8) process is killed
with a signal the halted vcpu cannot be woken up because it's sleep cannot be
interrupted.

Fix this by waking up periodically and returning from vm_handle_hlt() if
TDF_ASTPENDING is set.

Reported by:	Leon Dang
Sponsored by:	Nahanni Systems
2014-07-26 02:53:51 +00:00