Commit Graph

208656 Commits

Author SHA1 Message Date
Konstantin Belousov
830cd4b810 After nullfs rmdir operation, reclaim the directory vnode which was
unlinked.  Otherwise the vnode stays cached, causing leak.  This is
similar to r292961 for regular files.

Reported and tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-02-17 19:43:03 +00:00
Konstantin Belousov
fa48f413ef In bnoreuselist(), check both ends of the specified logical block
numbers range.

This effectively skips indirect and extdata blocks on the buffer
queue.  Since their logical block numbers are negative, bnoreuselist()
could loop infinitely.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-02-17 19:39:57 +00:00
Bryan Drewery
52d66ba6ae Fix build race after r295643.
Sponsored by:	EMC / Isilon Storage Division
2016-02-17 18:41:55 +00:00
Warner Losh
bd4c1dd6d6 Use the right size for zeroing.
Submitted by: rpokala@
2016-02-17 18:28:38 +00:00
Andrew Turner
4b68de9c1a Move the Allwinner kernels to use fdt_pinctrl. This will read the pin
configuration from the FDT data, then set the pins into the requested
state. As part of this the gpio controller now reports the correct number
of pins instead of returning the number of bank * 32.

To allow for a future consolidated kernel we add the SOC_ALLWINNER_A10 and
SOC_ALLWINNER_A20 kernel options. These need to be set as appropriate for
the SoC the kernel will boot on.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D5177
2016-02-17 18:28:03 +00:00
Michael Tuexen
828318e155 Add protection code for issues reported by PVS / D5245.
MFC after:	3 days
2016-02-17 18:12:38 +00:00
Michael Tuexen
815f806b82 Code cleanup which will silence a warning in PVS / D5245. 2016-02-17 18:04:22 +00:00
Michael Tuexen
7b0fd8f2af Address a warning reported by D5245 / PVS.
MFC after:	3 days
2016-02-17 17:52:46 +00:00
Warner Losh
c55f57071a Create an API to reset a struct bio (g_reset_bio). This is mandatory
for all struct bio you get back from g_{new,alloc}_bio. Temporary
bios that you create on the stack or elsewhere should use this before
first use of the bio, and between uses of the bio. At the moment, it
is nothing more than a wrapper around bzero, but that may change in
the future. The wrapper also removes one place where we encode the
size of struct bio in the KBI.
2016-02-17 17:16:02 +00:00
Svatopluk Kraus
ddf8a6680e Do not use PMAP_DOMAIN_KERNEL definition for __ARM_ARCH >= 6 as domains
are not utilized there. Only domain #0 is used and there is no reference
to it in the whole pmap-v6.c. Thus initialize domain access register in
locore-v6.c without reference too.
2016-02-17 14:39:29 +00:00
Ed Maste
cdfecc9da0 Hardcode date in RCS paper for reproducibility
The 1995/06/01 date is taken from the $Id$ entry in rcs.ms from RCS 5.7,
the last version we imported, and is more meaningful than the OS build
date.

Reviewed by:	eadler
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5299
2016-02-17 14:34:01 +00:00
Ruslan Bukin
5fe191b01e Add the implementation of atomic_swap_32(). 2016-02-17 14:32:03 +00:00
Ruslan Bukin
f936aa4a3a Use better form representing 32 x 128-bit floating-point registers.
Suggested by:	kib
2016-02-17 14:24:25 +00:00
Ruslan Bukin
6d005bb212 There is no need to pre save tp in cpu_fork().
Discussed with: jhb
2016-02-17 14:13:25 +00:00
Ruslan Bukin
6cb16b7e7a Add the implementation of savectx(). 2016-02-17 13:49:38 +00:00
Ruslan Bukin
486ff49853 Use callee-saved registers to pass args through fork_trampoline(). 2016-02-17 13:43:43 +00:00
Svatopluk Kraus
bcbc0ff17d Remove unneeded vector_page_setprot() for __ARM_ARCH >= 6. A vector
page is always mapped in KVA space and so it's always writeable.
2016-02-17 13:29:17 +00:00
Svatopluk Kraus
195ea683fb Include pte-v6.h only where needed. 2016-02-17 12:57:05 +00:00
Svatopluk Kraus
1413a3ab64 Remove pd_prot and pd_cache members from struct arm_devmap_entry.
The struct is used for definition of static device mappings which
should always have same protection and attributes.
2016-02-17 12:36:24 +00:00
Svatopluk Kraus
d6686e08be Evaluate also VM_PROT_EXECUTE protection in pmap_preboot_map_attr().
Before this change all mappings done by this function were executable
as pte entries have NOT EXECUTABLE bit.

The function is used only for static device mappings at present. Thus
this is also a fix as DEVICE memory should not be mapped as executable.
2016-02-17 12:30:59 +00:00
Bryan Drewery
fb99179af4 Fix build race after r295643.
Sponsored by:	EMC / Isilon Storage Division
2016-02-17 00:30:28 +00:00
Justin Hibbits
3dcaa2b5e9 Bump __FreeBSD_Version for u_long -> rman_res_t change (r294883). 2016-02-16 23:47:52 +00:00
Bryan Drewery
6b128c1707 DIRDEPS_BUILD: Hookup CLANG_EXTRAS.
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 23:11:09 +00:00
John Baldwin
f8ed4050d5 Remove an unused variable that snuck into the previous revision. 2016-02-16 22:13:25 +00:00
John Baldwin
00ddbdf2ee Fetch the current thread and it's syscall state from the trussinfo object
instead of passing some of that state as arguments to print_syscall() and
print_syscallret().  This just makes the calls of these functions shorter
and easier to read.
2016-02-16 22:00:01 +00:00
John Baldwin
1662c2ae80 The locking annotations for struct sockbuf originally used the key from
struct socket.  When sockbuf.h was moved out of socketvar.h, the locking
key was no longer nearby.  Instead, add a new key for sockbuf and use
a single item for the socket buffer lock instead of separate entries for
receive vs send buffers.

Reviewed by:	adrian
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D4901
2016-02-16 21:42:53 +00:00
Pedro F. Giffuni
0bfdca975c Fix naive use of ftell(3).
Secure coding practices, FIO19-C.
2016-02-16 21:39:19 +00:00
Justin Hibbits
a721585d27 Another conversion u_long -> rman_res_t 2016-02-16 21:30:55 +00:00
Pedro F. Giffuni
e78e0c43ba crontab: ftruncate() with ftello() instead of ftell().
Obtained from:	OpenBSD (CVS rev. 1.47)
2016-02-16 21:19:39 +00:00
Pedro F. Giffuni
b83c6ff578 cron: use (char *)NULL instead of (char *)0 in execle.
Obtained from:	OpenBSD (CVS Rev 1.25)
2016-02-16 20:59:49 +00:00
Michael Tuexen
467f0d55b4 Whitespace changes. 2016-02-16 20:33:18 +00:00
Michael Tuexen
2b1c7de4d8 Improve the teardown of the SCTP stack.
Obtained from:	bz@
MFC after: 1 week
2016-02-16 19:36:25 +00:00
Bryan Drewery
ae038fc336 Add CLEANDEPEND[FILES|DIRS] and simplify the tags cleanup to use it.
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 19:11:17 +00:00
Bryan Drewery
b601b230d8 Always remove .depend.* regardless of WITH_FAST_DEPEND in case of changing
which is used.

Sponsored by:	 EMC / Isilon Storage Division
2016-02-16 19:02:04 +00:00
Bryan Drewery
3b1e60a40a Remove temporary hack from r294370 for SSH upgrades.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 19:00:22 +00:00
Justin Hibbits
89977ce227 Convert a few more long -> rman_res_t. 2016-02-16 17:55:10 +00:00
Bryan Drewery
b265efb65b Revert r295648 for now.
This builds fine with FAST_DEPEND but the mkdep method requires that
include/ generates the headers during 'make depend' so the subsequent
directories can find them when running mkdep.

Sponsored by:	EMC / Isilon Storage Division
2016-02-16 16:07:12 +00:00
Andrew Turner
45fd186285 Allow callers of OF_decode_addr to get the size of the found mapping. This
will allow for code that uses the old fdt_get_range and fdt_regsize
functions to find a range, map it, access, then unmap to replace this, up
to and including the map, with a call to OF_decode_addr.

As this function should only be used in the early boot code the unmap is
mostly do document we no longer need the mapping as it's a no-op, at least
on arm.

Reviewed by:	jhibbits
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D5258
2016-02-16 15:18:12 +00:00
Ed Maste
3884d6f8bd Allow elfcopy to convert between two non-ELF formats
If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.

ELF Tool Chain ticket #517

Reviewed by:	kai
Obtained from:	ELF Tool Chain r3411
2016-02-16 14:03:25 +00:00
Svatopluk Kraus
547e50e022 Use EARLY_DRIVER_MODULE() for ti_scm driver to be attached before
am335x_prcm driver which uses it. Used BUS_PASS_BUS is a quick pick
for now and may be revised when other drivers start using multipass
feature.

This is needed after an update of Linux dts files done in r295436.
2016-02-16 13:40:23 +00:00
Svatopluk Kraus
ec950d0aef Do not use DMA channels used by GPU.
(1) The channel mask is get from "brcm,dma-channel-mask" property of
    dma node, and if not provided, from "broadcom,channels" property.
(2) Consequently, sdhci driver does not allocate any specific channel.
(3) Use CS_RESET bit for initial channel reset.

Differential Revision:    https://reviews.freebsd.org/D4303
2016-02-16 12:19:06 +00:00
Andrew Turner
86914a0f9b Add a sysctl to read the internal temperature of the AXP209 Power
Management IC.

Submitted by:	Jared McNeill <jmcneill@invisible.ca>
Differential Revision:	https://reviews.freebsd.org/D5298
2016-02-16 11:51:54 +00:00
Andrew Turner
ba9b71631d Add an analog audio driver for the audio codec found on the Allwinner
A10/A20 SoC. Based loosely on the submitters NetBSD driver, tested on
Cubieboard 2. Playback and capture are supported.

Submitted by:	Jared McNeill <jmcneill@invisible.ca>
Differential Revision:	https://reviews.freebsd.org/D5202
2016-02-16 11:45:46 +00:00
Zbigniew Bodek
9ccaab6db5 Support PEM that is not a PCI endpoint on ThunderX
Some chip revisions don't have their external PCIe buses
behind the internal bridge. Add support for FDT-configurable
PEMs but keep ability for PCIe enumeration.

Reviewed by:   andrew, wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5285
2016-02-16 11:43:57 +00:00
Svatopluk Kraus
95b2d200ef Temporary overwrite bad definition of elm interrupt property in Linux
dts files. It may be removed once it will be fixed upstream.

This is done just to supresses a warning during dtb evaluation as
there is no elm driver in tree at present.
2016-02-16 11:38:38 +00:00
Andrew Turner
276b1ac928 Only read the power state register when we will be using its value. While
here remove magic shifts, and cleanup pwr_name.

Sponsored by:	ABT Systems Ltd
2016-02-16 11:03:21 +00:00
Olivier Cochard
f53fab99ae Add myself as ports committer (including calendar)
Approved by:	jadawin
Differential Revision:	https://reviews.freebsd.org/D5295
2016-02-16 10:33:45 +00:00
Eric van Gyzen
bb51c27943 ichsmb: add PCI device ID for Intel Sunrise Point-H SMBus controller
MFC after:	3 days
Sponsored by:	Dell Inc.
2016-02-16 02:23:39 +00:00
Bryan Drewery
9d8a81b4e4 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 02:14:30 +00:00
Bryan Drewery
a2109e0056 Filemon: Fix panic when fork1() is called from kproc_create().
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 02:14:25 +00:00