Commit Graph

148885 Commits

Author SHA1 Message Date
Konstantin Belousov
28fe6a3f3e In lf_iteratelocks_vnode, increment state->ls_threads around iterating
of the vnode advisory lock list. This prevents deallocation of state
while inside the loop.

Reported and tested by:	pho
MFC after:	2 weeks
2009-06-25 18:54:56 +00:00
Doug Barton
53ae1d202d Vendor import of BIND 9.6.1 2009-06-25 18:50:46 +00:00
Konstantin Belousov
9f80ce043d Change the type of uio_resid member of struct uio from int to ssize_t.
Note that this does not actually enable full-range i/o requests for
64 architectures, and is done now to update KBI only.

Tested by:	pho
Reviewed by:	jhb, bde (as part of the review of the bigger patch)
2009-06-25 18:46:30 +00:00
John Baldwin
2654ae4dfe Remove the d_spare2_t typedef. The d_spare2 field was replaced by
d_mmap_single().  I considered adding a new round of padding for 8.0.
However, since cdevsw already maintains a version field, new versions
can be handled without requiring the need for explicit padding fields.
2009-06-25 18:44:05 +00:00
Jack F Vogel
29af53f006 Decided to limit the interrupt bind to multiqueue
config as done in igb.
2009-06-25 18:40:27 +00:00
John Baldwin
9bd55acf5e Return errors from intr_event_bind() to the caller of intr_set_affinity().
Specifically, if a non-root user attempts to bind an interrupt the request
will now report failure with EPERM rather than silently failing with a
successful return code.

MFC after:	1 week
2009-06-25 18:35:19 +00:00
Robert Noland
a84a56f28b Some more cleanups for vblank code on Intel.
The Intel 2d driver calls modeset before reinstalling the handler on
a vt switch.  This means that vblank status ends up getting cleared
after it has been setup.  Restore saved values for the pipestat registers
rather than just wiping them out.

MFC after:	3 days
2009-06-25 18:27:08 +00:00
John Baldwin
b4805f449c - Restore the behavior of pre-allocating IDT vectors for MSI interrupts.
This is mostly important for the multiple MSI message case where the
  IDT vectors for the entire group need to be allocated together.  This
  also restores the assumptions made by the PCI bus code that it could
  invoke PCIB_MAP_MSI() once MSI vectors were allocated.
- To avoid whiplash with CPU assignments, change the way that CPUs are
  assigned to interrupt sources on activation.  Instead of assigning the
  CPU via pic_assign_cpu() before calling enable_intr(), allow the
  different interrupt source drivers to ask the MD interrupt code which
  CPU to use when they allocate an IDT vector.  I/O APIC interrupt pins
  do this in their pic_enable_intr() routines giving the same behavior as
  before.  MSI sources do it when the IDT vectors are allocated during
  msi_alloc() and msix_alloc().
- Change the intr_table_lock from an sx lock to a mutex.

Tested by:	rnoland
2009-06-25 18:13:46 +00:00
Rafal Jaworowski
18bef45673 Make ata-{dma,sata}.c dependent on atacore build option.
Discussed with:	mav
2009-06-25 18:09:23 +00:00
Sam Leffler
8351cacf89 temporarily disable optional uarts; apparently we hang when probing them
(and they are not present)
2009-06-25 18:07:19 +00:00
John Baldwin
14b99236f1 Remove COMPAT_FREEBSD5 from sun4v. There are no FreeBSD/sun4v 5.x binaries
to be compatible with.
2009-06-25 17:46:52 +00:00
Jilles Tjoelker
886bb28357 Add some tests for r194975 and r194977.
Approved by:	ed (mentor) (implicit)
2009-06-25 17:36:08 +00:00
Andrew Thompson
4e1c399323 Rename man4/if_bridge.4 to man4/bridge.4 in order to be consistent with other
peueso interfaces. The .Nm name hasnt been changed and all xrefs are still
valid.
2009-06-25 17:24:36 +00:00
Jack F Vogel
100121ebab Change intr_bind to bus_bind_intr, also limit this to
multiqueue setup which is not the shipping default for
igb (its set to 1).
2009-06-25 17:21:12 +00:00
Jack F Vogel
a55b6155c8 Change intr_bind to bus_bind_intr, thanks to John Baldwin
for pointing out this simplification.
2009-06-25 17:16:26 +00:00
Jilles Tjoelker
f19a2f6c57 Fix some weirdnesses in the NetBSD IFS code,
in particular "$@"$ifschar if the final positional parameter is empty.
With the NetBSD code, adding the $ifschar removes a parameter.

PR:		standards/79067
Approved by:	ed (mentor) (implicit)
2009-06-25 17:14:06 +00:00
John Baldwin
af88b2c276 Use the correct cast for the arguments passed to freebsd_shmctl() in
oshmctl().

Submitted by:	kib
2009-06-25 17:11:27 +00:00
Jilles Tjoelker
18d56246e9 Improve IFS expansion using code from NetBSD.
We now pass the ifs.sh testsuite.

PR:		standards/79067
Approved by:	ed (mentor) (implicit)
Obtained from:	NetBSD
2009-06-25 17:10:51 +00:00
Roman Divacky
a79c43d37f Fix the build by using proper format.
Pointy hat: me
Approved by: kib
2009-06-25 16:48:13 +00:00
Marius Strobl
fe2e5c4d36 Don't use the preprocessor while inside function-like macro
invocations as doing so violates the C specification. This
fixes the build with Clang.

Submitted by:	ed
2009-06-25 16:38:16 +00:00
Edward Tomasz Napierala
aec5372220 Tweak comment. 2009-06-25 16:36:57 +00:00
Robert Watson
d1da0a0672 Add address list locking for in6_ifaddrhead/ia_link: as with locking
for in_ifaddrhead, we stick with an rwlock for the time being, which
we will revisit in the future with a possible move to rmlocks.

Some pieces of code require significant further reworking to be
safe from all classes of writer-writer races.

Reviewed by:	bz
MFC after:	6 weeks
2009-06-25 16:35:28 +00:00
Edward Tomasz Napierala
b372d0d8bc Manual page tweaks. 2009-06-25 16:34:29 +00:00
Robert Noland
a2cc8f993b Initialize max_vblank_count earlier.
Small cleanup of the error paths while I'm here.

MFC after:	3 days
2009-06-25 16:17:07 +00:00
Brian Somers
53c405786b Support shadow.byname and shadow.byuid maps, protecting them by
insisting on privileged port access.

Include /var/yp/Makefile.local if it exists and suggest using
it to override /var/yp/Makefile behaviour.

Approved by:	re (kib)
MFC after:	3 weeks
2009-06-25 16:15:39 +00:00
Robert Noland
2642e635f2 Keep track of the hardware counter more aggressively while interrupts
are enabled.  This should help to reduce cases where the hardware
counter reference jumps by large amounts.

MFC after:	3 days
2009-06-25 15:47:32 +00:00
Robert Noland
a429bdf087 Fix one use of atomic for refcount missed in last commit.
MFC after:	3 days
2009-06-25 15:36:11 +00:00
Robert Noland
1f3c8cf88f Additional vblank cleanups.
Use the vbl_lock when maniputlating the refcount.  Eventually I want to
convert this to use our internal refcount code.  Continue to use atomic
ops for manipulating vblank count since we access it often just for
reading.

MFC after:	3 days
2009-06-25 15:30:25 +00:00
Robert Watson
64aeca7b42 Initialize in_ifaddr_lock using RW_SYSINIT() instead of in ip_init(),
so that it doesn't run multiple times if VIMAGE is being used.

Discussed with:	bz
MFC after:	6 weeks
2009-06-25 14:44:00 +00:00
Robert Noland
a708803975 Ensure that we always hold the lock when calling vblank_disable_fn()
MFC after:	3 days
2009-06-25 14:15:45 +00:00
John Baldwin
ca99828420 Tweak the oshmctl() compile fix: convert the K&R definition to ANSI. 2009-06-25 13:36:57 +00:00
Nick Hibma
6c001dbfbf - Make pprint print through fd 3, so it can be used in customisation
functions to print something to the screen.
- Prefix each line with the running time (bikeshed).

Submitted by:	Rick van der Zwet (Wireless Leiden)
2009-06-25 13:15:20 +00:00
Edward Tomasz Napierala
85e71e24c5 Fix c194955 - somehow I managed all the new files, tripling their
contents.
2009-06-25 13:08:02 +00:00
Edward Tomasz Napierala
ca48e73a18 Bump manual page timestamps. 2009-06-25 12:53:50 +00:00
Edward Tomasz Napierala
aa015c8e4a Add NFSv4 ACL support to libc.
This adds the following functions to the acl(3) API: acl_add_flag_np,
acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np,
acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np,
acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np,
acl_strip_np, acl_get_brand_np.  Most of them are similar to what Darwin
does.  There are no backward-incompatible changes.

Approved by:    rwatson@
2009-06-25 12:46:59 +00:00
John Baldwin
e68920db5f Raise the default size of the EFI partition on ia64 from 100MB to 400MB.
A fresh install of a current 8.0 snapshot uses 156MB with a single kernel
and having the filesystem too small prevented the system from booting.

Reviewed by:	marcel
MFC after:	1 week
2009-06-25 12:34:05 +00:00
Robert Watson
2d9cfabad4 Add a new global rwlock, in_ifaddr_lock, which will synchronize use of the
in_ifaddrhead and INADDR_HASH address lists.

Previously, these lists were used unsynchronized as they were effectively
never changed in steady state, but we've seen increasing reports of
writer-writer races on very busy VPN servers as core count has gone up
(and similar configurations where address lists change frequently and
concurrently).

For the time being, use rwlocks rather than rmlocks in order to take
advantage of their better lock debugging support.  As a result, we don't
enable ip_input()'s read-locking of INADDR_HASH until an rmlock conversion
is complete and a performance analysis has been done.  This means that one
class of reader-writer races still exists.

MFC after:      6 weeks
Reviewed by:    bz
2009-06-25 11:52:33 +00:00
Rafal Jaworowski
51500a4872 Include SMP support in the MPC85XX kernel by default. 2009-06-25 10:07:21 +00:00
Rafal Jaworowski
ebeaf70342 Enable all populated TWSI (I2C) controllers on Marvell SOCs.
Obtained from:	Semihalf
2009-06-25 10:03:51 +00:00
Luigi Rizzo
b94ee7c781 update the manpage to track existing options (including --iso),
and alphabetize them.

MFC after:	3 days
2009-06-25 09:28:04 +00:00
Roman Divacky
670013ead1 Switch cmd argument of ioctl to u_long as elsewhere in the kernel.
Propagate this change down the callchain.

Approved by:	kan (maintainer)
Approved by:	ed (mentor)
2009-06-25 08:52:20 +00:00
Robert Watson
3cfed08d1d Clean up reference management in in6_update_ifa and in6_unlink_ifa, and
in particular, add a reference for in6_ifaddrhead since we do remove a
reference for it when an IPv6 address is removed.  This fixes ifconfig
delete of an IPv6 alias.

Reported by:	tegge
MFC after:	6 weeks
2009-06-25 08:37:38 +00:00
Robert Watson
d4b9a71c71 Fix ibcs2_ipc.c build by adding missing limits.h include.
Submitted by:	keramida
2009-06-25 07:25:39 +00:00
Robert Watson
893ef4d21c oshmctl() now requires a sysv_shm.c-local function prototype. 2009-06-25 07:16:10 +00:00
Marcel Moolenaar
ed9f335141 Make a DVD for ia64. 2009-06-25 04:25:26 +00:00
Weongyo Jeong
90cbee43d6 updates AMRR statistics with tx complete status that if not the tx rate
always would be reduced.
2009-06-25 02:28:12 +00:00
Weongyo Jeong
7f97ca0347 uses ZYD_NOTIF_RETRYSTATUS info to count the number of retries. 2009-06-25 02:14:47 +00:00
Jeff Roberson
791d9a6e5d - Use DPCPU for SCHED_STATS. This is somewhat awkward because the
offset of the stat is not known until link time so we must emit a
   function to call SYSCTL_ADD_PROC rather than using SYSCTL_PROC
   directly.
 - Eliminate the atomic from SCHED_STAT_INC now that it's using per-cpu
   variables.  Sched stats are always incremented while we're holding
   a spinlock so no further protection is required.

Reviewed by:	sam
2009-06-25 01:33:51 +00:00
Jeff Roberson
e6e06a8b47 - Add a sysctl_dpcpu_long to support long typed pcpu stats.
- Remove the #ifndef SMP case as the SMP code works on UP as well.

Reviewed by:	sam
2009-06-25 01:31:59 +00:00
Rick Macklem
72263475c4 Fix two known problems in clnt_rc.c, plus issues w.r.t. smp noted
during reading of the code. Change the code so that it never accesses
rc_connecting, rc_closed or rc_client when the rc_lock mutex is not held.
Also, it now performs the CLNT_CLOSE(client) and CLNT_RELEASE(client)
calls after the rc_lock mutex has been released, since those calls do
msleep()s with another mutex held. Change clnt_reconnect_call() so that
releasing the reference count is delayed until after the
"if (rc->rc_client == client)" check, so that rc_client cannot have been
recycled.

Tested by:	pho
Reviewed by:	dfr
Approved by:	kib (mentor)
2009-06-25 00:28:43 +00:00