Commit Graph

191674 Commits

Author SHA1 Message Date
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
Adrian Chadd
a32a326b6d store the AR9300 interrupts away when doing interrupt debugging. 2014-07-26 21:32:03 +00:00
George V. Neville-Neil
9971b08e4c Update the header printing to match the rest of the output.
Pointed out by: mdf
2014-07-26 20:42:54 +00:00
George V. Neville-Neil
0100ace8a9 Since we cannot yet display the name print the file descriptor so that
it can be looked up manually using procstat(1).
2014-07-26 20:11:36 +00:00
Andreas Tobler
8edba45283 Further improvements on elfdump, to follow up r269092:
- Add ARM specific section header types.
- Add SHT_GNU_HASH section header type.
- Improve reporting of undefined tags in d_tags.
- Add DT_GNU_HASH tag.

Reviewed by:	emaste
2014-07-26 19:44:45 +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
George V. Neville-Neil
d9a499ce10 Remove debugging options from the rwsnoop script. 2014-07-26 19:25:52 +00:00
George V. Neville-Neil
69d22158da Port the rwsnoop DTrace Toolkit script to FreeBSD.
Remove dependency on the Korn Shell.
Remove Zones in favor of Jails.
Remove support (for now) for filename printing.
2014-07-26 19:21:53 +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
Marcel Moolenaar
31d743df76 Create 32-bit core files for 32-bit processes on 64-bit machines.
The 64-bit machine supported right now is amd64, but it's not too
hard to add powerpc64.

Obtained from:	Juniper Networks, Inc.
2014-07-26 16:45:11 +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
Dimitry Andric
02b6306fb0 In r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h
header with archive_crypto_private.h, and its ARCHIVE_HASH_xxx macros
were renamed to ARCHIVE_CRYPTO_xxx.

Rename these macros in lib/libarchive/config_freebsd.h, to re-enable the
hashes for libarchive again.  This affects the mtree format writer, and
the xar format reader and writer modules.

This also requires changes in the library order for statically linking
rescue, otherwise ld would complain about redefined symbols.  Thanks to
jkim for pointing out the solution.

Reviewed by:	kientzle
MFC after:	1 week
2014-07-26 15:33:20 +00:00
Pedro F. Giffuni
e66c50c738 strftime() xlocale cleanups.
Replace fprintf_l with fputs when output is unformatted.
Use locale_t in _conv() since it was using sprintf (now sprintf_l)
Use locale_t on _yconv() sinci it calls _conv()

Obtained from:	Apple Inc. (Libc 997.90.3)
CR:		D482
Reviewed by:	theraven
MFC after:	1 week
2014-07-26 14:24:13 +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
Stefan Eßer
895a99ef10 The previous commit (r269119) introduced a regression: It removed the
ability to specify the the full path name of the keymap file.

Instead leave the original search order intact, but insert the path for
newcons-specific fonts (if run on a system using newcons):

	- KEYMAP_PATH in environment
	- full path name
	- /usr/share/vt/keymaps		(only if newcons is in use!)
	- /usr/share/syscons/keymaps	(also as fall-back for newcons)

MFC after:	1 week
2014-07-26 13:14:28 +00:00
Stefan Eßer
e34c3e1817 Fix obvious off by one error: prefix[1] should be set to the path of the
newcons specific keymap files, not prefix[2]. The result of this bug was
that kbdcontrol ignored the files in the syscons keymap directory, which
apparently still work under newcons, for most locales.

MFC after:	1 week
2014-07-26 12:17:26 +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
Andrey A. Chernov
7922e2bb77 In the "Too many open files" edge cases don't try to preserve old
number for non-std* descriptors, but close old file and retry.

Obtained from:  inspired by Apple's change from pfg@
MFC after:      2 weeks
2014-07-26 08:41:03 +00:00
Dag-Erling Smørgrav
3cc381b09f Remove useless getpwnam() call.
Submitted by:	Arthur Mesh <amesh@juniper.net>
MFC after:	1 week
2014-07-26 07:40:31 +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