Commit Graph

170482 Commits

Author SHA1 Message Date
Andriy Gapon 99a312d048 i386 bootinfo: re-arrange EFI fields for natural alignment and packing
Suggested by:	bde
MFC after:	2 weeks
2012-05-13 09:25:39 +00:00
Andriy Gapon dfc351d8e9 zfs boot code: mark spa_t arguments as const where they are used as such
MFC after:	1 month
2012-05-13 09:22:18 +00:00
Marius Strobl 0837ca3329 Regenerate after r235388. 2012-05-13 05:09:36 +00:00
Marius Strobl 2040613422 - Get rid of debugging support in order to get rid of the V8-specific C
compiler frame size used there so this whole thing is V8/V9-agnostic.
- Use 32-bit function alignment as GCC does when using UltraSPARC I or
  higher optimizations.
- Don't waste delay slots when possible.

Unfortunately, this still doesn't make libcompiler_rt a viable replacement
for libgcc on sparc64 though as once installed instead, buildworld times
increase by nearly 60% (which isn't related to these assembler functions).
2012-05-13 05:08:13 +00:00
Jason Evans edaa25bdae Fix config_lazy_lock so that thread caching isn't used for
single-threaded applications.
2012-05-13 01:33:28 +00:00
Rick Macklem 2108487ead Fix two cases in the new NFS server where a tsleep() is
used, when the code should actually protect the tested
variable with a mutex. Since the tsleep()s had a 10sec
timeout, the race would have only delayed the allocation
of a new clientid for a client. The sleeps will also
rarely occur, since having a callback in progress when
a client acquires a new clientid, is unlikely.
in practice, since having a callback in progress when
a fresh clientid is being acquired by a client is unlikely.

MFC after:	1 month
2012-05-12 22:20:55 +00:00
George V. Neville-Neil f2f9999d8b Import dtracetoolkit into cddl/contrib 2012-05-12 21:25:48 +00:00
Adrian Chadd 6130ff50fb Setup the CPU port and broadcast map on the AR7240, rather than
depending upon the bootloader initialising it.

The aim is to eventually support a full switch set and reinitialisation
rather than relying on a consistent bootloader setup.

Remove the port flood config from arswitch.c, it's not yet used and
it's totally incorrect.

Whilst I'm here, also add in a comment describing why the full switch
reset is disabled.

Obtained from:	Linux (OpenWRT) - Values
2012-05-12 21:08:07 +00:00
Glen Barber f32235d532 Remove leading .Ns macro to silence mdoc(7) warning. 2012-05-12 20:53:00 +00:00
Konstantin Belousov b7ac5a8571 Add new pager type, OBJT_MGTDEVICE. It provides the device pager
which carries fictitous managed pages. In particular, the consumers of
the new object type can remove all mappings of the device page with
pmap_remove_all().

The range of physical addresses used for fake page allocation shall be
registered with vm_phys_fictitious_reg_range() interface to allow the
PHYS_TO_VM_PAGE() to work in pmap.

Most likely, only i386 and amd64 pmaps can handle fictitious managed
pages right now.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:49:58 +00:00
Glen Barber ecb0bac9ab mdoc(7) markup cleanup. 2012-05-12 20:46:19 +00:00
Konstantin Belousov b6de32bd9b Add a facility to register a range of physical addresses to be used
for allocation of fictitious pages, for which PHYS_TO_VM_PAGE()
returns proper fictitious vm_page_t. The range should be de-registered
after consumer stopped using it.

De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate
over registered ranges.

A hash container might be developed instead of range registration
interface, and fake pages could be put automatically into the hash,
were PHYS_TO_VM_PAGE() could look them up later. This should be
considered before the MFC of the commit is done.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:42:56 +00:00
Glen Barber e525498959 Fix mdoc(7) markup. 2012-05-12 20:41:40 +00:00
Adrian Chadd 22814a7515 .. oops, include setting the MTU. 2012-05-12 20:40:13 +00:00
Adrian Chadd 031f3eaed4 Document what the flood register setting does. 2012-05-12 20:39:41 +00:00
George V. Neville-Neil 055173dba4 Add the remaining scripts from the DTraceToolkit, version 0.99, to the
vendor tree.

http://www.brendangregg.com/dtrace.html#DTraceToolkit
2012-05-12 20:38:18 +00:00
Adrian Chadd 2015605e8d * Add in the AR7240 global control field for setting the maximum frame
size for the AR7240.

* Include SM/MS macros, thanks to ath_hal(4).

* This field is for normal packets, VLAN and other headers are added to
  this by the switch device.

* Set the MTU to 1536, to match what is done in Linux.  Use the SM
  macro to write this field.

Obtained from:	Atheros (AR7240 datasheet), Linux OpenWRT (MTU default)
2012-05-12 20:36:12 +00:00
Konstantin Belousov e461aae747 Split the code from vm_page_getfake() to initialize the fake page struct
vm_page into new interface vm_page_initfake(). Handle the case of fake
page re-initialization with changed memattr.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:34:22 +00:00
Konstantin Belousov 116c213502 Assert that the page passed to vm_page_putfake() is unmanaged.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:27:51 +00:00
Andriy Gapon 32df866434 sparc64/zfs boot: take advantage of new libzfsboot capabilities
Also drop the now unneeded compatibility shims.

Tested by:	marius
MFC after:	1 month
2012-05-12 20:27:33 +00:00
Joel Dahl 790752beb4 Minor mdoc nits. 2012-05-12 20:27:13 +00:00
Konstantin Belousov 7900f95d88 Assert that fictitious or unmanaged pages do not appear on
active/inactive lists.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:24:46 +00:00
Andriy Gapon f7f7b759f6 zfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs
This is to silence warnings that result from different definitions of
uint64_t on different architectures, specifically i386 and sparc64.

MFC after:	1 month
2012-05-12 20:23:30 +00:00
Michael Tuexen a2b42326b5 Provide in the association change notification the received ABORT chunk
if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458.

MFC after: 3 days
2012-05-12 20:11:35 +00:00
Konstantin Belousov 13a0b7bcc4 Commit the change forgotten in r235356.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:10:18 +00:00
Glen Barber 9255dffde1 Set formatting width and offset in DB_COMMAND(9). 2012-05-12 20:08:16 +00:00
Glen Barber 437f059811 Fix an mdoc(7) nit. 2012-05-12 20:06:17 +00:00
Konstantin Belousov 0c26bb71f6 Make the vm_page_array_size long. Remove redundand zero initialization
for vm_page_array_size and nearby variablees.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	1 month
2012-05-12 20:03:06 +00:00
Joel Dahl 4228c8a2b1 Remove end of line whitespace. 2012-05-12 19:59:37 +00:00
Joel Dahl 2e27f04f55 Minor mdoc nit. 2012-05-12 19:53:44 +00:00
Adrian Chadd c7551b8b46 Remove duplicate config bits.
Submitted by:	juli
2012-05-12 19:43:22 +00:00
Marius Strobl 0a7ac239c9 Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently,
all integrated and on-board peripherals except the DataFlash (at91_spi(4)
and at45d(4) still need to be unb0rken) and NAND Flash (missing NAND
framework) are working.
AFAICT, this makes FreeBSD the first operating system besides Nut/OS
supporting Ethernut 5 out of tree.
2012-05-12 18:11:26 +00:00
Glen Barber e18a29ac35 Docuement requirement to alter some sysctls when using igb(4) with
jumbo frames.

PR:		153738
Submitted by:	Tom Judge (tom!tomjudge.com)
Discussed with:	jfv (in part, a long time ago...)
MFC after:	1 week
2012-05-12 18:10:27 +00:00
Adrian Chadd 0d96099845 Revert this - I disabled it whilst hwpmc is/was broken. 2012-05-12 17:42:22 +00:00
Adrian Chadd 1111c8313a Flip on WN1043ND switch PHY support.
* Add the i2c bitbang bus;
* Add the etherswitch/rtl8366rb drivers;
* "fix" the USB GPIO configuration so USB actually works.

Submitted by:	Stefan Bethke <stb@lassitu.de>
2012-05-12 17:41:42 +00:00
Joel Dahl 5da4420931 mdoc: use Po and Pc macros instead of parens. Also avoid starting a line
with Ns.
2012-05-12 17:14:55 +00:00
Andriy Gapon 9da75f3a36 add a zfs spa_t change missed in r235329
sys/cddl/boot is obviously not under sys/boot...

Pointed out by:	Jan Beich <jbeich@tormail.org>
Pointyhat to:	avg
MFC after:	1 month
2012-05-12 16:36:54 +00:00
Glen Barber a5e4c905ee Regenerate src.conf(5) for mdoc(7) and typo corrections.
PR:		167804
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-12 16:12:36 +00:00
Joel Dahl 9650117163 Remove tab from kernel configuration option. This is consistent with the rest
of our manual pages.
2012-05-12 16:08:05 +00:00
Adrian Chadd 60807f5b81 Add opt_wlan.h includes, so IEEE80211_* configuration changes are
correctly picked up.

Noticed by:	Justin Hibbits, whilst debugging @ BSDCan
2012-05-12 15:11:53 +00:00
Glen Barber 7b1d17a1bc General mdoc(7) and typo fixes.
PR:		167804
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-12 15:08:22 +00:00
Joel Dahl cd92c96215 mdoc: remove redundant paragraph macro. 2012-05-12 14:46:49 +00:00
Joel Dahl 70c8684f0b mdoc: remove redundant Pp and end a display block with Ed. 2012-05-12 14:43:52 +00:00
Rui Paulo 82f98de5fe Convert the if_vr(4) driver model to the interrupt filter model and use
a taskqueue.

This gives a 16% performance improvement under high load on slow systems,
especially when vr shares an interrupt with another device, which is
common with the Alix x86 boards.
Contrary to the other devices, I left the interrupt processing for loop
in because there was no significant difference in performance and this
should avoid enqueuing more taskqueues unnecessarily.
We also decided to move the vr_start_locked() call inside the for loop
because we found out that it helps performance since TCP ACKs now have a
chance to go out quicker.

Reviewed by:	yongari (older version, same idea)
Discussed with:	yongari, jhb
2012-05-12 14:37:25 +00:00
Alexander Motin 711f661393 Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing
them to the CAM SWI thread removing extra context switch.
Modify all ATA/SATA drivers to use them.

Reviewed by:	gibbs, ken
MFC after:	2 weeks
2012-05-12 13:55:36 +00:00
Rick Macklem 7af1242a34 PR# 165923 reported intermittent write failures for dirty
memory mapped pages being written back on an NFS mount.
Since any thread can call VOP_PUTPAGES() to write back a
dirty page, the credentials of that thread may not have
write access to the file on an NFS server. (Often the uid
is 0, which may be mapped to "nobody" in the NFS server.)
Although there is no completely correct fix for this
(NFS servers check access on every write RPC instead of at
open/mmap time), this patch avoids the common cases by
holding onto a credential that recently opened the file
for writing and uses that credential for the write RPCs
being done by VOP_PUTPAGES() for both NFS clients.

Tested by:	Joel Ray Holveck (joelh at juniper.net)
PR:		kern/165923
Reviewed by:	kib
MFC after:	2 weeks
2012-05-12 12:02:51 +00:00
Antoine Brodin 2963a15591 Add more obsolete files. 2012-05-12 10:53:49 +00:00
Andriy Gapon 0da23ac99d zfs boot: try to set vfs.root.mountfrom from currdev as a fallback
This way with the new zfsloader there is no need to explicitly set zfs
root filesystem either via vfs.root.mountfrom or fstab.
It should be automatically picked up from currdev which is by default
is set from bootfs.

Tested by:	Florian Wagner <florian@wagner-flo.net> (x86)
MFC after:	1 month
2012-05-12 09:07:41 +00:00
Andriy Gapon 1702e62f67 zfsboot/zfsloader: support accessing filesystems within a pool
In zfs loader zfs device name format now is "zfs:pool/fs",
fully qualified file path is "zfs:pool/fs:/path/to/file"
loader allows accessing files from various pools and filesystems as well
as changing currdev to a different pool/filesystem.

zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or,
as before, pool:path/to/file; in the latter case a default filesystem
is used (pool root or bootfs).  zfsboot passes guids of the selected
pool and dataset to zfsloader to be used as its defaults.

zfs support should be architecture independent and is provided
in a separate library, but architectures wishing to use this zfs support
still have to provide some glue code and their devdesc should be
compatible with zfs_devdesc.
arch_zfs_probe method is used to discover all disk devices that may
be part of ZFS pool(s).

libi386 unconditionally includes zfs support, but some zfs-specific
functions are stubbed out as weak symbols.  The strong definitions
are provided in libzfsboot.
This change mean that the size of i386_devspec becomes larger
to match zfs_devspec.

Backward-compatibility shims are provided for recently added sparc64
zfs boot support.  Currently that architecture still works the old
way and does not support the new features.

TODO:
- clear up pool root filesystem vs pool bootfs filesystem distinction
- update sparc64 support
- set vfs.root.mountfrom based on currdev (for zfs)

Mid-future TODO:
- loader sub-menu for selecting alternative boot environment

Distant future TODO:
- support accessing snapshots, using a snapshot as readonly root

Reviewed by:	marius (sparc64),
		Gavin Mu <gavin.mu@gmail.com> (sparc64)
Tested by:	Florian Wagner <florian@wagner-flo.net> (x86),
		marius (sparc64)
No objections:	fs@, hackers@
MFC after:	1 month
2012-05-12 09:03:30 +00:00
Joel Dahl 8521fde5fc mdoc: end list context with El. 2012-05-12 07:52:45 +00:00