Commit Graph

191698 Commits

Author SHA1 Message Date
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Simon J. Gerraty
ffda191e30 After we finish using src/Makefile.inc1 to bootstrap legacy tools
use it to build the toolchain we actually want.
2014-08-19 06:37:33 +00:00
Ian Lepore
15fc287383 Export some new busdma stats via sysctl for armv6. Added:
hw.busdma.tags_total: 46
 hw.busdma.maps_total: 1302
 hw.busdma.maps_dmamem: 851
 hw.busdma.maps_coherent: 849
 hw.busdma.maploads_total: 1568812
 hw.busdma.maploads_bounced: 16750
 hw.busdma.maploads_coherent: 920
 hw.busdma.maploads_dmamem: 920
 hw.busdma.maploads_mbuf: 1542766
 hw.busdma.maploads_physmem: 0
2014-07-29 02:38:02 +00:00
Ian Lepore
b92672d0cb A while back, the array of segments used for a load/mapping operation was
moved from the stack into the tag structure.  In retrospect that was a bad
idea, because nothing protects that array from concurrent access by
multiple threads.

This change moves the array to the map structure (actually it's allocated
following the structure, but all in a single malloc() call).

This also establishes a "sane" limit of 4096 segments per map.  This is
mostly to prevent trying to allocate all of memory if someone accidentally
uses a tag with nsegments set to BUS_SPACE_UNRESTRICTED.  If there's ever
a genuine need for more than 4096, don't hesitate to increase this (or
maybe make it tunable).

Reviewed by:	cognet
2014-07-29 02:37:48 +00:00
Ian Lepore
0e58c32732 We never need bounce pages for memory we allocate. We cleverly allocate
memory the matches all the constraints of the dma tag so that bouncing
will never be required.

Reviewed by:	cognet
2014-07-29 02:37:31 +00:00
Ian Lepore
409b23f7a7 Replace a bunch of double-indirection with a local pointer var (that is,
(*mapp)->something becomes map->something).  No functional changes.

Reviewed by:	cognet
2014-07-29 02:37:24 +00:00
Ian Lepore
2746b8c41f Don't clear the DMAMAP_DMAMEM_ALLOC flag set a few lines earlier. Doh!
Reviewed by:	cognet
2014-07-29 02:36:50 +00:00
Ian Lepore
1da97d052e Memory belonging to an mbuf, or allocated by bus_dmamem_alloc(), never
triggers a need to bounce due to cacheline alignment.  These buffers
are always aligned to cacheline boundaries, and even when the DMA operation
starts at an offset within the buffer or doesn't extend to the end of the
buffer, it's safe to flush the complete cachelines that were only partially
involved in the DMA.  This is because there's a very strict rule on these
types of buffers that there will not be concurrent access by the CPU and
one or more DMA transfers within the buffer.

Reviewed by:	cognet
2014-07-29 02:36:41 +00:00
Ian Lepore
688e9d85f4 The run_filter() function doesn't just run dma tag exclusion filter
functions, it has evolved to make a variety of decisions about whether
the DMA needs to bounce, so rename it to must_bounce().  Rewrite it to
perform checks outside of the ancestor loop if they're based on information
that's wholly contained within the original tag.  Now the loop only checks
exclusion zones in ancestor tags.

Also, add a new function, might_bounce() which does a fast inline check
of flags within the tag and map to quickly eliminate the need to call
the more expensive must_bounce() for each page in the DMA operation.

Within the mapping loops, use map->pagesneeded != 0 as a proxy for all
the various checks on whether bouncing might be required.  If no pages
were reserved for bouncing during the checks before the mapping loop,
then there's no need to re-check any of the conditions that can lead
to bouncing -- all those checks already decided there would be no bouncing.

Reviewed by:	cognet
2014-07-29 02:36:27 +00:00
Ian Lepore
befb477022 Propagate any alignment restriction from the parent tag to a new tag,
keeping the more restrictive of the two values.

Reviewed by:	cognet
2014-07-29 02:36:09 +00:00
Ian Lepore
3de4bbe357 Reformat some continuation lines. No functional changes.
Reviewed by:	cognet
2014-07-29 02:36:02 +00:00
Ian Lepore
7b1ee35189 Correct the comparison logic when looking for intersections between
exclusion zones and phsyical memory.  The phys_avail[i] entries are the
address of the first byte of ram in the region, and phys_avail[i+1]
entries are the address of the first byte of ram in the next region
(i.e., they're not included in the region that starts at phys_avail[i]).

Reviewed by:	cognet
2014-07-29 02:35:44 +00:00
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
John Baldwin
18ae4fcc47 If telldir() is called immediately after a call to seekdir(), POSIX
requires the return value of telldir() to equal the value passed to
seekdir().  The current seekdir code with SINGLEUSE enabled breaks
this case as each call to telldir() allocates a new cookie.  Instead,
remove the SINGLEUSE code and change telldir() to look for an existing
cookie for the directory's current location rather than always creating
a new cookie.

CR:		https://phabric.freebsd.org/D490
PR:		121656
Reviewed by:	jilles
MFC after:	1 week
2014-07-29 00:16:33 +00:00
Simon J. Gerraty
faa8fa9077 We do not ever want _srcconf_included_ as MAIN target. 2014-07-28 23:36:21 +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
Alexander Motin
5e46a0660e Fix r269183 build woth GCC.
MFC after:	2 weeks
2014-07-28 14:32:20 +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
Alexander Motin
073edb1c91 Add netmasks support to initiator-portal option.
MFC after:	2 weeks
2014-07-28 12:47:09 +00:00
George V. Neville-Neil
56e397023c Update the list of cross references to include the more modern set of
processors that we now support.
2014-07-28 10:17:41 +00:00
Antoine Brodin
4b80295a17 libsbuf.so.6 is no longer obsolete 2014-07-28 10:01:23 +00:00
Xin LI
dc91b5609a When interval is set to very small value with limited amount of packets,
ping6(8) would quit before the remote side gets a chance to respond.

Solve this by resetting the itimer when we have reached the maximum packet
number have reached, but let the other handling to continue.

PR:		bin/151023
Submitted by:	tjmao at tjmao.net
MFC after:	2 weeks
2014-07-28 08:22:08 +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
Baptiste Daroussin
18a8f7ea3b Remove ohash_int.h forgotten in previous commit 2014-07-27 22:56:46 +00:00
Baptiste Daroussin
88497f0c68 Sync with OpenBSD
This brings:
- check for integer overflows in custom allocs
- fix potential integer overflows in memory allocation
- annotate regexp error messages with source string
- better error handling in mkstemp/unlink/fdopen logic
2014-07-27 22:54:13 +00:00
Konstantin Belousov
c448f58f45 Explicitely mention that inactivated or reclaimed vnode is locked
exclusively.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2014-07-27 20:55:47 +00:00
Konstantin Belousov
169b6a554f Remove man page for non-existent VOPs.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2014-07-27 20:48:56 +00:00
Konstantin Belousov
e4bf26280f Correct the locking statement.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2014-07-27 20:47:06 +00:00
Adrian Chadd
3fdeac5b5a Update from mav@ - don't break the input switching. 2014-07-27 20:14:22 +00:00
Peter Wemm
12f22a7820 Forced commit - testing commit mail etc pipelines. 2014-07-27 17:34:49 +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