Commit Graph

164730 Commits

Author SHA1 Message Date
Hans Petter Selasky
ff11fd7fa7 Add missing XHCI early takeover code. The XHCI takeover code
is supposed to disable the BIOS from using the XHCI controller
after bootup.

Approved by:	re (kib)
Reported by:	Mike Tancsa
MFC after:	1 week
2011-07-22 15:37:23 +00:00
Jonathan Anderson
7a270867e7 Turn on AUDIT_ARG_RIGHTS() for cap_new(2).
Now that the code is in place to audit capability method rights, start
using it to audit the 'rights' argument to cap_new(2).

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc
2011-07-22 12:50:21 +00:00
Adrian Chadd
c5f2a23c79 Implement a basic radar parameter API in the dfs_null module.
Since no actual radar data is ever handled, this won't
do anything. It's mostly here as a reference for those who
wish to experiment with radar detection.

Approved by:	re (kib)
2011-07-22 09:39:49 +00:00
Adrian Chadd
9381916024 Add athradar, an implementation of the radar parameter diagnostic
API.

This is a reimplementation from scratch.

Approved by:	re (kib)
2011-07-22 09:34:31 +00:00
Jonathan Anderson
6b7a28575f Declare more capability method rights.
This is a complete set of rights that can be held in a capability's
rights mask.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc
2011-07-21 21:08:33 +00:00
John Baldwin
e9f91b2b2a Allow non-fixed endpoints for a producer address range if the length of
the resource covers the entire range.  Some BIOSes appear to mark
endpoints as non-fixed incorrectly (non-fixed endpoints are supposed to
be used in _PRS when OSPM is allowed to allocate a certain chunk of
address space within a larger range, I don't believe it is supposed to be
used for _CRS).

Approved by:	re (kib)
2011-07-21 20:43:43 +00:00
George V. Neville-Neil
a388fa6823 Remove incorrect attribution.
Approved by:	re (kib)
Pointed out by: brueffer
Pointy hat to: gnn
2011-07-21 20:06:14 +00:00
Xin LI
101b7b5daa Bring the code more in-line with OpenSolaris source to
ease future port.

Reviewed by:	pjd, mm
Approved by:	re (kib)
2011-07-21 20:02:22 +00:00
Xin LI
b447d101fa A different implementation of r224231 proposed by pjd@,
which does not require change in the znode structure.
Specifically, it queries rdev from the znode in the
same sa_bulk_lookup already done in zfs_getattr().

Submitted by:	pjd (with some revisions)
Reviewed by:	pjd, mm
Approved by:	re (kib)
2011-07-21 20:01:51 +00:00
Alexander Motin
23454425b7 Fix diskinfo -t operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.

Approved by:	re (kib)
2011-07-21 19:39:40 +00:00
George V. Neville-Neil
c03b5ad6a9 Make both stpcpy and strcpy be assembly language implementations
on amd64.

Submitted by:	Guillaume Morin (guillaume at morinfr.org)
Reviewed by:	kib, jhb
Approved by:	re (bz)
MFC after:	1 month
2011-07-21 16:32:13 +00:00
Adrian Chadd
f51c84eaf6 This links in the ath dfs ioctl into the driver and defines the
ioctl interface for DFS modules to use.

Since there's no open source dfs code yet, this doesn't introduce any
operational changes.

Approved by:	re (kib)
2011-07-21 14:25:12 +00:00
Adrian Chadd
09ac182ca5 Modify the radar API a little to be easier to "change" via run-time
tools.

* introduce pe_enabled, which (will) indicate whether the radar
  detection stuff is enabled or not. Right now it's incorrectly
  set, based on something previously written. I'll sort it out
  later.

* Don't set HAL_PHYERR_PARAM_ENABLE in pe_relstep to say whether
  radar detection is on.

* Return whether blockradar, fir128 and enmaxrssi is enabled.

* Change some of the phyerr params to be integers rather than
  HAL_BOOL so they can be set to the NOPARAM value when the
  setup function is called. This is in line with other radar
  parameters.

* Add new configuration parameters for fir128, blockradar and
  enmaxrssi, rather than defaulting to off, on and on respectively.

Approved by:	re (kib)
2011-07-21 14:16:42 +00:00
Adrian Chadd
64d6d2d3fc Break out the PLL setup into (mostly) per-chip methods, rather than
polluting the AR5416 code with later chipset support.

Note: ar9280InitPLL() supports Merlin (AR9280) and later (AR9285, AR9287.)

Submitted by:	ssgriffonuser@gmail.com
Approved by:	re (kib)
2011-07-21 08:35:10 +00:00
Adrian Chadd
e8e6035991 This re-enables HT40 channels for use when DFS is enabled.
These should be disabled for the AR5416 in hostap/mesh/ibss mode,
as the AR5416 doesn't have support for radar detection on the
ext channel of a HT40 setup. Later chips do.

Approved by:	re (kib)
2011-07-21 08:31:55 +00:00
Hans Petter Selasky
14bd1ee52c Add new USB ID to u3g driver.
Approved by:	re (kib)
Submitted by:	Nick Hibma
MFC after:	3 days
2011-07-21 06:55:43 +00:00
Marius Strobl
1b57ae60a7 Merge from r224217:
Bump MAXCPU to 64.

Approved by:	re (kib)
2011-07-20 18:51:18 +00:00
Xin LI
b1ad061e42 Add a new field to in-core znode, z_rdev, to represent device nodes.
PR:		kern/159010
Reviewed by:	mm@
Approved by:	re (kib)
MFC after:	2 weeks
2011-07-20 16:53:32 +00:00
John Baldwin
7b4f570ca1 Note that the "kernel" variable in loader.conf is the name of a directory
containing a kernel under /boot and that it's default value is "kernel"
not "/boot/kernel/kernel".

PR:		docs/158992
Reported by:	Wayne Mitchell  wayne.mitchell.iz at gmail
Approved by:	re (kib)
MFC after:	1 week
2011-07-20 15:18:24 +00:00
Jonathan Anderson
1b7270658f Add cap_new(2) and cap_getrights(2) symbols to libc.
These system calls have already been implemented in the kernel; now we
hook up libc symbols so userspace can drive them.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc
2011-07-20 13:29:39 +00:00
Adrian Chadd
e2e849485f These two are ath_hal regulatory domain updates from the Atheros
reference driver.

* Australia should use FCC3_WORLD
* Add some new SKUs; these are just the EEPROM values and haven't been
  fully defined yet. As such they won't affect anything.

Obtained from:	Atheros
Approved by:	re (kib)
2011-07-20 12:46:58 +00:00
Jonathan Anderson
c30b9b5169 Export capability information via sysctls.
When reporting on a capability, flag the fact that it is a capability,
but also unwrap to report all of the usual information about the
underlying file.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc
2011-07-20 09:53:35 +00:00
Adrian Chadd
2168aaa506 This patch removes a check in ifconfig which disables HT/40 channels
on frequency bands with DFS. All Atheros chipsets >= AR9001 support
radar event detection on HT40 extension channels.

This should be a chipset specific item rather than enforced in the
regulatory domain database.

In addition, it's irrelevant for STA mode, as the radar detection is
done by the access point, not the STA.

Approved by:	re (kib)
2011-07-20 05:59:28 +00:00
Adrian Chadd
6f16ec31f7 Fix brokenness introduced by my last commit.
Approved by:	re (implicit)
2011-07-20 00:36:47 +00:00
Attilio Rao
6338c57958 Remove explicit MAXCPU usage from sys/pcpu.h avoiding a namespace
pollution.  That is a step further in the direction of building correct
policies for userland and modules on how to deal with the number of
maxcpus at runtime.

Reported by:	jhb
Reviewed and tested by:	pluknet
Approved by:	re (kib)
2011-07-19 16:50:55 +00:00
Adrian Chadd
886bbec199 This sets the BSS channel for each VAP for the given interface.
It's only relevant in STA mode.

The CSA forces a channel switch for the interface, but doesn't update
the VAP channel.

Approved by:	re (bz)
2011-07-19 15:24:44 +00:00
Adrian Chadd
2ad10b365c This patch enables listing DFS related flags when 'ifconfig -v wlanX
list channel' is run. The following new options are introduced:

* D: channel requires DFS
* R: channel has a radar event
* I: channel has detected inteference
* C: the CAC period has completed on a channel that requires it (ie,
  DFS + PASSIVE.)

It's relevant for developing, debugging and using the DFS and
interference options.

Approved by:	re (bz)
2011-07-19 15:22:35 +00:00
Attilio Rao
edf26ab83e Remove pc_name member of struct pcpu.
pc_name is only included when KTR option is and it does introduce a
subdle KBI breakage that totally breaks vmstat when world and kernel are
not in sync.
Besides, it is not used somewhere.

In collabouration with:	pluknet
Reviewed by:	jhb
Approved by:	re (kib)
2011-07-19 14:57:59 +00:00
Attilio Rao
786ef92b7b Bump MAXCPU for amd64, ia64 and XLP mips appropriately.
From now on, default values for FreeBSD will be 64 maxiumum supported
CPUs on amd64 and ia64 and 128 for XLP. All the other architectures
seem already capped appropriately (with the exception of sparc64 which
needs further support on jalapeno flavour).

Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduced
during the infrastructure cleanup for supporting MAXCPU > 32. This
covers cpumask_t retiral too.

The switch is considered completed at the present time, so for whatever
bug you may experience that is reconducible to that area, please report
immediately.

Requested by:	marcel, jchandra
Tested by:	pluknet, sbruno
Approved by:	re (kib)
2011-07-19 13:00:30 +00:00
Attilio Rao
732772c701 On 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes
storage.
Fix the sintrcnt/sintrnames specification.

No MFC is previewed for this patch.

Reported, reviewed and tested by:	marcel
Approved by:	re (kib)
2011-07-19 12:41:57 +00:00
Attilio Rao
68b739cd6f Add the possibility to specify from kernel configs MAXCPU value.
This patch is going to help in cases like mips flavours where you
want a more granular support on MAXCPU.

No MFC is previewed for this patch.

Tested by:	pluknet
Approved by:	re (kib)
2011-07-19 00:37:24 +00:00
John Baldwin
fcc3d62fa5 Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size.  Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array.  When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by:	re (kib)
MFC after:	1 week
2011-07-18 21:15:47 +00:00
John Baldwin
834377fe2d Tweak the interactive description of CPU vs WCPU.
PR:		bin/158819
Submitted by:	arundel
Approved by:	re (kib)
2011-07-18 21:08:14 +00:00
Bjoern A. Zeeb
c618a5222e Constantly print the command name and if set include the thread
name in per-thread mode.

Discussed with:	jhb
Obtained from:	Ed Maste at Sandvine Incorporated
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
Approved by:	re (kib)
2011-07-18 20:57:43 +00:00
Dimitry Andric
8bd9dc088e Fix building of 32-bit compat libraries on amd64 with clang, and using
-g, by reverting r219139.  The LLVM PR referenced in that revision was
fixed in the mean time, and we imported a clang snapshot soon
afterwards, so the temporary workaround of disabling clang's integrated
assembler is no longer needed.

In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to
output certain directives into assembly that our version of GNU as
chokes on.

Reported by:	dougb
Approved by:	re (kib)
2011-07-18 20:07:29 +00:00
Bjoern A. Zeeb
925af54487 Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by:	jhb
Reviewed by:	emaste
Sponsored by:	Sandvine Incorporated
Approved by:	re (kib)
2011-07-18 20:06:15 +00:00
Sergey Kandaurov
8953ac4334 sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.

Submitted by:	peter
Approved by:	re (kib)
2011-07-18 19:42:18 +00:00
Xin LI
54257e2cbd Disable gvmat64.S, the assembler version of longest_match for now.
PR:		kern/154073
MFC after:	3 days
Approved by:	re (kib)
2011-07-18 19:23:50 +00:00
John Baldwin
2417d97ebb - Export each thread's individual resource usage in in struct kinfo_proc's
ki_rusage member when KERN_PROC_INC_THREAD is passed to one of the
  process sysctls.
- Correctly account for the current thread's cputime in the thread when
  doing the runtime fixup in calcru().
- Use TIDs as the key to lookup the previous thread to compute IO stat
  deltas in IO mode in top when thread display is enabled.

Reviewed by:	kib
Approved by:	re (kib)
2011-07-18 17:33:08 +00:00
Attilio Rao
521ea19d1c - Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by:	pluknet
Reviewed by:	jhb
Approved by:	re (kib)
2011-07-18 15:19:40 +00:00
John Baldwin
9c931b6fdc Enable NEW_PCIB by default on ia64.
Approved by:	re (kib), marcel
2011-07-18 14:05:14 +00:00
John Baldwin
fbd3fc8fc7 Implement bus_adjust_resource() for the ia64 nexus driver.
Reviewed by:	marcel
Approved by:	re (kib)
2011-07-18 14:04:37 +00:00
Jonathan Anderson
778b0e42a8 Provide ability to audit cap_rights_t arguments.
We wish to be able to audit capability rights arguments; this code
provides the necessary infrastructure.

This commit does not, of itself, turn on such auditing for any
system call; that should follow shortly.

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc
2011-07-18 12:58:18 +00:00
Hans Petter Selasky
25abfdf02f Only the USB root HUB thread is allowed to attach and detach drivers
to and from USB devices. Remove related DEVMETHOD() lines from USB
drivers.

Reported by:	YongHyeon PYUN
MFC after:	3 days
2011-07-18 12:03:58 +00:00
Bjoern A. Zeeb
ad2571a225 If compiling RESCUE always ignore feature_present(3) calls so that
a /rescue/ifconfig more modern than the kernel could still configure
IPv4 or IPv6 addresses.

Reported by:	Andrzej Tobola (ato iem.pw.edu.pl)
Reported by:	gcooper
MFC after:	1 day
X-MFC:		will not MFC any time soon, just reminder for r222527
2011-07-18 10:29:16 +00:00
Martin Matuska
1bc399c4b1 ZFS tries to allocate blocks evenly across all devices. This means when
devices are imbalanced zfs will lots of CPU searching for space on devices
which tend to be pretty full. It should instead fail quickly on the full
devices and move onto devices which have more availability.

New loader tunable: vfs.zfs.mg_alloc_failures (min = 8)

Illumos-gate changeset:	13379:4df42cc92254

Obtained from:	Illumos (Bug #1051)
MFC after:	2 weeks
2011-07-18 08:29:49 +00:00
Doug Barton
6d489ccd32 The named.reload script is no longer useful in the age of rc.d 2011-07-18 08:10:49 +00:00
Martin Matuska
3ded43e7b7 Resurrect the ZFS "aclmode" property
Change default of "aclmode" to "discard".

Illumos-gate changeset:	13370:8c04143bd318

Obtained from:	Illumos (Feature #742)
MFC after:	2 weeks
2011-07-18 07:16:44 +00:00
Justin T. Gibbs
e96cf39826 cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
cddl/contrib/opensolaris/cmd/zpool/zpool.8:
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c:
	Add the "zpool labelclear" command.  This command can be
	used to wipe the label data from a drive that is not
	active in a pool.  The optional "-f" argument can be
	used to treat an exported or foreign vdev as "inactive"
	thus allowing its label information to be cleared.
2011-07-18 03:18:06 +00:00
Justin T. Gibbs
d7a00114ea Correct reporting of missing leaf vdevs so that the GUID required to
perform pool actions is always displayed.

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
	The "zpool status" command reports the "last seen at"
	device node path when the vdev name is being reported
	by GUID.  Augment this code to assume a GUID is reported
	when a device goes missing after initial boot in addition
	to the previous behavior of doing this for devices that
	aren't seen at boot.

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c:
	In zpool_vdev_name(), report recently missing devices
	by GUID.  There is no guarantee they will return at
	their previous location.
2011-07-18 03:00:59 +00:00