Commit Graph

191599 Commits

Author SHA1 Message Date
Ian Lepore
c311f7078c When arm 64-bit atomic ops are available, define ARM_HAVE_ATOMIC64. Use
that symbol (which will be correct in both kernel and userland contexts)
rather than just __arm__ to decide whether to use a local implementation.
2014-08-02 03:44:27 +00:00
Navdeep Parhar
f10405b396 cxgbe(4): Fix an off by one error when looking for the BAR2 doorbell
address of an egress queue.

MFC after:	2 weeks
2014-08-02 01:48:25 +00:00
Navdeep Parhar
b2daa9a9cd cxgbe(4): minor optimizations in ingress queue processing.
Reorganize struct sge_iq.  Make the iq entry size a compile time
constant.  While here, eliminate RX_FL_ESIZE and use EQ_ESIZE directly.

MFC after:	2 weeks
2014-08-02 00:56:34 +00:00
Ian Lepore
814f4c5896 Use the 64-bit atomics now provided by arm machine/atomic.h instead of
(conflicting) local versions.
2014-08-01 23:45:50 +00:00
Rui Paulo
551a78956c In the shm_open() and shm_unlink() syscalls, export the path to KTR.
MFC after:	1 week
2014-08-01 23:29:04 +00:00
Rui Paulo
777d35f477 Add kdump support for shm_open().
MFC after:	1 week
2014-08-01 23:28:21 +00:00
Steven Hartland
6a369c018c Don't return ZIO_PIPELINE_CONTINUE from vdev_op_io_start methods
This prevents recursion of vdev_queue_io_done as per r265321 but
using a different method as recommended on the openzfs list.

We now use zio_interrupt(zio) and return ZIO_PIPELINE_STOP instead
of returning ZIO_PIPELINE_CONTINUE from vdev_*_io_start methods.

zio_vdev_io_start now ASSERTS the that vdev_op_io_start returns
ZIO_PIPELINE_STOP to ensure future changes don't reintroduce
ZIO_PIPELINE_CONTINUE returns.

Cleanup flow in vdev_geom_io_start while I'm here.

Also fix some cases not using SET_ERROR(..)

MFC after:	2 weeks
X-MFC-With:	r265321
2014-08-01 23:16:48 +00:00
Ian Lepore
eaa4e27642 Use atomic_load/store_64() in the arm implementation of counter(9), and
remove the XXX comments about non-atomic access to the counters.
2014-08-01 23:06:38 +00:00
Ian Lepore
9d203d4512 Add 64-bit atomic ops for armv4, only for kernel code, mostly so that we
don't need any #ifdef stuff to use atomic_load/store_64() elsewhere in
the kernel.  For armv4 the atomics are trivial to implement for kernel
code (just disable interrupts), less so for user mode, so this only has
the kernel mode implementations for now.
2014-08-01 22:56:41 +00:00
Xin LI
125f68e708 Split gethrtime() and gethrtime_waitfree() and make the former use
nanouptime() instead of getnanouptime().  nanouptime(9) provides more
precise result at expense of being slower.

In r269223, gethrtime() is used as creation time of dbuf, which in turn
acts as portion of lookup key to maintain AVL invariant where there can
not be duplicate items.  Before this change, gethrtime() have preferred
better execution time by sacrificing precision, which may lead to panic
on busy systems with:

	panic: avl_find() succeeded inside avl_add()

Reported by:	allanjude, mav
PR:		kern/192284
MFC after:	11 days
X-MFC-with:	r269223
2014-08-01 22:33:23 +00:00
Ian Lepore
59561ab3e1 Add 64-bit atomic ops for armv6. The only safe way to access a 64-bit
value shared across multiple cores is with atomic_load_64() and
atomic_store_64(), because the normal 64-bit load/store instructions
are not atomic on 32-bit arm.  Luckily the ldrexd/strexd instructions
that are atomic are fairly cheap on armv6.  Because it's fairly simple
to do, this implements all the ops for 64-bit, not just load/store.

Reviewed by:	andrew, cognet
2014-08-01 22:28:36 +00:00
Michael Tuexen
47aac6fa4b Remove the asconf_auth_nochk sysctl. This was off by default and only
existed to be able to test with non-compliant peers a long time ago.
2014-08-01 20:49:27 +00:00
Ian Lepore
bda25c28ac Tell the assembler we're building for armv7a with security extensions,
so that the 'smc' (secure monitor call) opcode is valid.

Submitted by:	Stepan Dyatkovskiy <stpworld@narod.ru>
2014-08-01 20:32:29 +00:00
Ian Lepore
2d0ef32f84 Teach as(1) to handle the arm .arch_extension pseudo-op, which accepts
the same values as the -march= command line option.  Add support for the
"sec" extension (security extensions).

We've been getting away without support for the sec extension because
it's bogusly enabled even on arches where its presence is optional.  This
support for .arch_extension is being added mainly so that we can use the
right directives in our source code, and that helps folks using external
toolchains (and will help us when we finally update our toolchain).
2014-08-01 20:30:24 +00:00
Ian Lepore
b7ea64e98d Fix an bug in as(1) parsing of arm -march=arch+ext options. Compare the
arch name to just the characters before the '+' in 'arch+ext'.
2014-08-01 20:21:41 +00:00
Peter Wemm
6ffcf5d515 Like with /usr/lib + /usr/lib/compat, add the optional /usr/lib32/compat
to the ldconfig32 default path.  /usr/lib32 is the 32 bit versions of
*current* libraries, while old versions should be able to be in
/usr/lib32/compat, like with /usr/lib/compat.  The separation is meant to
keep the compile time default search paths cleaner.
2014-08-01 19:32:20 +00:00
Peter Grehan
07b4e38313 Fix byte ordering in default RSS key.
The rss_key[] array in netinet/in_rss.c has the bytes in incorrect
order. This results in the RSS test vectors in the Microsft RSS spec
and Intel NIC specs giving incorrect results, and making it difficult
to verify correct hash operation when RSS functionality is added to
new NICs.

CR:		https://phabric.freebsd.org/D516
Reviewed by:	adrian
2014-08-01 18:36:40 +00:00
Ian Lepore
25166187e3 Fix unwind-info errors in our hand-written arm assembler code.
We have functions nested within functions, and places where we start a
function then never end it, we just jump to the middle of something else.
We tried to express this with nested ENTRY()/END() macros (which result
in .fnstart and .fnend directives), but it turns out there's no way to
express that nesting in ARM EHABI unwind info, and newer tools treat
multiple .fnstart directives without an intervening .fnend as an error.

These changes introduce two new macros, EENTRY() and EEND().  EENTRY()
creates a global label you can call/jump to just like ENTRY(), but it
doesn't emit a .fnstart.  EEND() is a no-op that just documents the
conceptual endpoint that matches up with the same-named EENTRY().

This is based on patches submitted by Stepan Dyatkovskiy, but I made some
changes and added the EEND() stuff, so blame any problems on me.

Submitted by:	Stepan Dyatkovskiy <stpworld@narod.ru>
2014-08-01 18:24:44 +00:00
Alan Cox
081b8e203b Simplify the selection of the pvo_head and pvo allocation zone in
moea_enter_locked() and moea64_enter().

Eliminate an unused variable from moea64_enter().
2014-08-01 17:09:50 +00:00
Andrew Turner
42ee878213 Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us
in line with gcc in base as this makes llvm generate code for the armv6k
variant of the instruction set.
2014-08-01 16:53:04 +00:00
Ruslan Bukin
d440ef2d73 Rename files: keep codename only to make it shorter. 2014-08-01 15:10:55 +00:00
Michael Tuexen
ce11b8429b Cleanup sctp_send_initiate() and sctp_send_initiate_ack() to be
in sync as much as possible. This simplifies upcoming changes.
2014-08-01 12:42:37 +00:00
Ruslan Bukin
835b36e211 Add support for Chromebook2 -- next-generation 8-core
(4 in operation), 4GB ram (3.5 usable) ARM machine.

Support covers device drivers for:
- Serial Peripheral Interface (SPI)
- Chrome Embedded Controller (EC) - SPI-based version
- XHCI and USB 3.0 dual-role device PHY

Also:
- Add support for Exynos5420 in Pad module
- Move power-related functions to separate driver --
  Power Management Unit (PMU)
- Enable XHCI for Chromebook1

Special thanks to grehan@ for hardware, and to
hselasky@ for r269139.
2014-08-01 06:20:25 +00:00
Alan Cox
eb2af3e758 Retire PVO_EXECUTABLE. It's neither used nor set correctly. 2014-08-01 04:53:35 +00:00
Navdeep Parhar
21b787b81a List one file per line in the Makefiles. This makes it easier to read
diffs when a file is added or removed.

MFC after:	2 weeks
2014-08-01 01:53:39 +00:00
Alan Cox
add0359068 Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed
by the combination of r268591 and r269134: When we attempt to add the
wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing.
(They only set the wired attribute on newly created mappings.)

Tested by:	andreast
2014-08-01 01:48:41 +00:00
Navdeep Parhar
88998d7afc Improve compliance with style.Makefile(5).
MFC after:	2 weeks
2014-08-01 01:30:16 +00:00
Warner Losh
4eeeb4a12a NANO_OBJ shouldn't end with a '/', so remove it here. This makes the
pathnames printed not have the dreaded // which makes it hard to cut
and paste into an emacs find file command...

MFC After: 3 days
2014-08-01 00:00:54 +00:00
Warner Losh
55c0fbe047 Use rm -x only on FreeBSD 10 and newer. Many people still build from
older hosts, which still works, so don't break that gratuitously.

MFC After: 3 days
2014-08-01 00:00:46 +00:00
Marcel Moolenaar
e9759f8bd3 Add pkgfs, a file system implementation for reading files out of a
compressed tarball, aka package. The file system assumes that the
files are layed-out in the same order as needed to allow for the
package to be streamed. As such, it does not read an entire package
into memory first.

Some properties of the file system:
o   Files that start with '+' are silently skipped. These are found
    in FreeBSD package files.
o   Files smaller than or equal to 4KB will be cached in memory and
    as such allow for some flexibility in accessing files out of
    order.
o   Files with the .tgz suffix are assumed to be (sub-)packages and
    signal the end for a directory scan.

Obtained from:	Juniper Networks, Inc.
2014-07-31 23:25:13 +00:00
George V. Neville-Neil
e1c97af45e Update shellsnoop to work on FreeBSD.
Contributed by: skreuzer
2014-07-31 23:19:01 +00:00
Warner Losh
0523fd7c90 Fix a typo in the example script. 2014-07-31 22:32:39 +00:00
Devin Teske
7729d5e3ac Update command and add check for edge-case. 2014-07-31 22:13:31 +00:00
Joerg Wunsch
8d92719522 Fix breakage introduced by r256843: removing the SA_CCB_WAITING bit
left some of the decisions based on its counterpart, SA_CCB_BUFFER_IO
being random.  As a result, propagation of the residual information
for the SPACE command was broken, so the number of filemarks
encountered during a SPACE operation was miscalculated.  Consequently,
systems relying on properly tracked filemark counters (like Bacula)
fell apart.

The change also removes a switch/case in sadone() which r256843
degraded to a single remaining case label.

PR:		192285
Approved by:	ken
MFC after:	2 weeks
2014-07-31 22:09:50 +00:00
Devin Teske
13243ba9b2 Fix a syntax error when running under bash(1) for portability. 2014-07-31 22:05:18 +00:00
Devin Teske
4d5a468d88 Define a setvar() function for platforms using a shell unlike FreeBSD's
sh(1) for `/bin/sh' (e.g., bash(1) which lacks a setvar definition).
This is to improve portability to other Operating Systems (e.g., Linux).
2014-07-31 22:00:36 +00:00
Konstantin Belousov
e7375b6fa5 Do not generate 1000 unique lock names for nfsrc hash chain locks.
It overflows witness.

Shorten the names of some nfs mutexes.

Reported and tested by:	pho
No objections from:	rmacklem, mav
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-07-31 19:24:44 +00:00
George V. Neville-Neil
46b315b29a Various style(9) and related fixes.
Update the copyright to be more in line with the current version in
our tree.
Remove the ancient rcsid.
Add a proper return from the main function

Pointed out by: bz
2014-07-31 18:02:38 +00:00
Hans Petter Selasky
5eb1caa8c8 - Updated SYSCTL manual pages after recent changes to the kernel
SYSCTL code. Added description of new macros and functions.
- Merged dynamic and static SYSCTL related content into a single
manual page, hence parameters and functionality is very much the same.
- Uppercased all occurrences of "OID".
- Updated all SYSCTL examples.

PR:	192101
2014-07-31 17:18:40 +00:00
Ian Lepore
f3a4b7f73b Export an mmc or sd card's serial number from the mmc layer as an ivar.
In the mmcsd layer use this value to populate disk->d_ident.  Also set
disk->d_descr to the full set of card identification info (includes vendor,
model, manufacturing date, etc).
2014-07-31 16:54:54 +00:00
Steven Hartland
5af464bbe0 Ensure that IP's added to CARP always use the CARP MAC
Previously there was a race condition between the address addition
and associating it with the CARP which resulted in the interface
MAC, instead of the CARP MAC, being used for a brief amount of time.

This caused "is using my IP address" warnings as well as data being
sent to the wrong machine due to incorrect ARP entries being recorded
by other devices on the network.
2014-07-31 16:43:56 +00:00
Alan Cox
974524373d Correct a defect in r268591. In the implementation of the new function
pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before
any changes are made to the PVO.  Otherwise, MOEA64_PVO_TO_PTE() will
panic.

Reported by:	andreast
2014-07-31 16:17:30 +00:00
Ed Maste
ee8e9ecaf1 elfdump: use existing ELF constants where available
Sponsored by:	The FreeBSD Foundation
2014-07-31 15:40:03 +00:00
Ed Maste
2d538f8c83 elfdump: add EM_AARCH64 64-bit ARM machine architecture 2014-07-31 15:25:12 +00:00
Steven Hartland
d34165f759 Only check error if one could have been generated 2014-07-31 09:18:29 +00:00
George V. Neville-Neil
ea43014585 Add an example program to show how to use libpmc from a program.
This particular program attempts to use the TSC to measure how long
certainly libpmc operations take.  Depending on the quality of
the rdtsc() macro on a particular architecture this may work
more or less well.
2014-07-31 09:18:15 +00:00
Nick Hibma
500e59c62d Fix the example: free the memory that was allocated by getline(). 2014-07-31 08:28:42 +00:00
Rui Paulo
d18aa577d5 Copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util to keep
the kernel self-contained.

Requested by:	jhb
2014-07-31 08:07:23 +00:00
Baptiste Daroussin
88ce49a42a lower warning level to fix build with gcc 2014-07-31 05:56:15 +00:00
Kevin Lo
5dc8bea6de Replace the whole license block with the standard one.
Suggested by:	emaste
2014-07-31 05:12:21 +00:00