Commit Graph

66236 Commits

Author SHA1 Message Date
Remko Lodder
f17edc7494 Set the baudrate for if_ti.
PR:		kern/40516
Submitted by:	"Jin Guojun[VFF]" <jin at adsl-63-198-35-122 dot dsl dot snfc21 dot pacbell dot net>
Approved by:	imp (mentor, implicit for minor changes)
MFC After:	1 week
2008-02-19 20:54:42 +00:00
Ruslan Ermilov
58eefce0e6 Eliminate whitespace diffs to the i386 version. 2008-02-19 06:30:49 +00:00
Yaroslav Tykhiy
c6446de05d Undo the damage I did in sys/kern/vfs_mount.c #1.274 and
sbin/mount_nfs/mount_nfs.c #1.76.  Let the dragons sleep.

Requested by:	rodrigc, des
PR:		kern/120319 (welcome the bug back)
2008-02-18 20:58:57 +00:00
Yaroslav Tykhiy
37ed722f78 Add a remark on a questionable property of vfs_mergeopts(). 2008-02-18 10:10:42 +00:00
Yaroslav Tykhiy
39fb1e8f88 Prevent the NFS client from losing MNT_ROOTFS on the root
file system.  In particular, stop overwriting mount point
flags in nfs_mountdiskless() because now they are set
elsewhere.  (They were _initialized_ by that function in
the 4.4BSD days, when mount structures were not allocated
in a centralized manner -- see rev. 1.1 of this file.)

Fix nfs_mount(), which happened to depend on the loss of
MNT_ROOTFS when it came to update handling.

Also note that mountnfs() no longer handles updates.  Now
they shouldn't reach this function, so printf a diagnostic
message if that happens due to a coding error.
2008-02-17 22:32:08 +00:00
Marcel Moolenaar
a515bae433 Move the $FreeBSD$ tag in a comment as __FBSDID doesn't work. 2008-02-17 20:38:22 +00:00
Marcel Moolenaar
65beb4ed7a Hook the U-Boot library up to the build. 2008-02-17 20:34:35 +00:00
Antoine Brodin
370f990d30 Make sysctl_kern_arnd return a random buffer instead of a random long,
as it is expected by userland (stack protector guard setup for example).

PR:		119129
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-02-17 16:44:48 +00:00
Justin T. Gibbs
2e9878a7c5 Only print sense data diagnostics if debugging is enabled with the
AHD_SHOW_SENSE flag.
2008-02-17 16:00:36 +00:00
Kris Kennaway
e17660e79c Switch from conditionally dropping Giant in exit1() to asserting it is
not held, which appears to be always true.
2008-02-17 15:28:28 +00:00
Justin T. Gibbs
d950018dc2 Remove superfluous setting of the transport_version field of our
path inquiry response - a likely holdover from the port of this code
from the aic7xxx driver.
2008-02-17 15:22:26 +00:00
Robert Watson
fa8003c6b9 Remove custom queue macros in Coda, replacing them with queue(9) tailq
macros.  The only semantic change was the need to add a vc_opened field
to struct vcomm since we can no longer use the request queue returning
to an uninitialized state to hold whether or not the device is open.

MFC after:	1 month
2008-02-17 14:33:28 +00:00
Robert Watson
b15ce9be2e Remove namecache performance-tuning todo for Coda: we now use the FreeBSD
name cache.

MFC after:	1 month
2008-02-17 12:40:27 +00:00
Justin T. Gibbs
accbb18a61 Advertise to CAM the ability of 790X controllers to negotiate information
unit transfers (packetized/U320 protocol) and QAS.
2008-02-17 06:14:59 +00:00
Warner Losh
6b4d690c62 Fix typo in comment. 2008-02-17 02:46:54 +00:00
Marcel Moolenaar
da049ec7a5 MFp4 (e500):
Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.

Credits to: raj@
2008-02-16 22:40:55 +00:00
Marcel Moolenaar
63094c199a MFp4 (e500):
Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.

Credits to: raj@
2008-02-16 22:13:11 +00:00
Marcel Moolenaar
aeafe92a61 Re-sort options. While here:
o  remove COMPAT_FREEBSD5
o  add INVARIANTS
o  add WITNESS
2008-02-16 18:30:58 +00:00
Marcel Moolenaar
a2d791e235 Enable option WITNESS_SKIPSPIN by default. 2008-02-16 17:59:27 +00:00
Hajimu UMEMOTO
d1c0178bfe Create a thread to handle passive cooling for 1st zone which has _PSV,
_TSP, _TC1 and _TC2.

Contirmed by:	"Alexandre \"Sunny\" Kovalenko" <alex.kovalenko_at_verizon.net>
Reviewed by:	njl
MFC after:	1 week
2008-02-16 07:15:34 +00:00
Rui Paulo
9e684e54fe Allow the user to override the current active cooling state if state
is currently TZ_ACTIVE_NONE.

Submitted by:   Andriy Gapon <avg at icyb.net.ua>
Reviewed by:    njl (mentor)
Approved by:    njl (mentor)
Requested by:   njl (mentor)
MFC after:      3 days
2008-02-16 02:09:05 +00:00
Rui Paulo
6e1de64dca Skip validation of the C3 state if we disabled C3 by software (i.e.,
via quirk).

Submitted by:	Andriy Gapon <avg at icyb.net.ua>
Reviewed by:	njl (mentor)
Approved by:	njl (mentor)
Requested by:	njl (mentor)
MFC after:	3 days
2008-02-16 02:00:25 +00:00
Antoine Brodin
74727f1209 Remove a superfluous line in run_interrupt_driven_config_hooks(),
next_entry is already initialized during TAILQ_FOREACH_SAFE().

PR:		kern/119604
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-02-15 21:54:21 +00:00
Attilio Rao
e2442c2081 Bump __FreeBSD_version in order to signal introduction of lockmgr_args()
and LK_INTERNAL removal.
2008-02-15 21:08:18 +00:00
Attilio Rao
24463dbbee - Introduce lockmgr_args() in the lockmgr space. This function performs
the same operation of lockmgr() but accepting a custom wmesg, prio and
  timo for the particular lock instance, overriding default values
  lkp->lk_wmesg, lkp->lk_prio and lkp->lk_timo.
- Use lockmgr_args() in order to implement BUF_TIMELOCK()
- Cleanup BUF_LOCK()
- Remove LK_INTERNAL as it is nomore used in the lockmgr namespace

Tested by:	Andrea Barberio <insomniac at slackware dot it>
2008-02-15 21:04:36 +00:00
Robert Watson
5a14b2bf8e Add privilege PRIV_NNPFS_DEBUG for use with Arla/nnpfs. This privilege
will authorize debugging system calls.

MFC after:	1 month
2008-02-15 20:26:17 +00:00
Robert Watson
a8c34e8ee0 The possibly interruptible msleep in coda_call() means well, but is
fundamentally fairly confused about how signals work and when it is
appropriate for upcalls to be interrupted.  In particular, we should
be exempting certain upcalls from interruption, we should not always
eventually time out sleeping on a upcall, and we should not be
interrupting the sleep for certain signals that we currently are
(including SIGINFO).  This code needs to be reworked in the style of
NFS interruptible mounts.

MFC after:	1 month
2008-02-15 13:31:35 +00:00
Robert Watson
c30ddc8d99 Spell replys as replies.
MFC after:	1 month
2008-02-15 12:11:45 +00:00
Robert Watson
93b510870f Reorder and clean up make_coda_node(), annotate weaknesses in the
implementation.

MFC after:	1 month
2008-02-15 11:58:11 +00:00
Scott Long
7bbd40c57e Teach the dump and minidump code to respect the maxioszie attribute of
the disk; the hard-coded assumption of 64K doesn't work in all cases.
2008-02-15 06:26:25 +00:00
Marcel Moolenaar
7a1f364c7d On Montecito processors, the instruction cache is in fact not
coherent with the data caches. Implement a quick fix to allow
us to boot on Montecito, while I'm working on a better fix in
the mean time.

Commit made on Montecito-based Itanium...
2008-02-14 18:46:50 +00:00
Yaroslav Tykhiy
38a7fd05f7 In the new order of things dictated by nmount(2), a read-only mount
is to be requested via a "ro" option.  At the same time, MNT_RDONLY
is gradually becoming an indicator of the current state of the FS
instead of a command flag.  Today passing MNT_RDONLY alone to the
kernel's mount machinery will lead to various glitches.  (See the
PRs for examples.)

Therefore mount the root FS with a "ro" option instead of the
MNT_RDONLY flag.  (Note that MNT_RDONLY still is added to the mount
flags internally, by vfs_donmount(), if "ro" was specified.)

To be able to pass "ro" cleanly to kernel_vmount(), teach the latter
function to accept options with NULL values.

Also correct the comment explaining how mount_arg() handles length
of -1.

PR:		bin/106636 kern/120319
Submitted by:	Jaakko Heinonen <see PR kern/120319 for email> (originally)
2008-02-14 17:04:31 +00:00
Andrew Gallatin
91ed89132c Now that mxge supports MSI-X interrupts, reverse the logic and flag
legacy interrupts rather than MSI as a special case.  Prior to this
commit, the interrupt handler was doing the slow handshaking with
the device to ensure the legacy interrupt was lowered in both
the legacy and MSI-X case.  This handshaking was not
required for MSI-X.
2008-02-14 16:24:14 +00:00
Rui Paulo
18d6902161 Don't attach to non Core CPUs. This is needed because on the PIII,
querying the number of sensors returns > 0.

PR:		120541
Approved by:	njl (mentor)
2008-02-14 14:14:59 +00:00
Simon L. B. Nielsen
1b7089994c Fix sendfile(2) write-only file permission bypass.
Security:	FreeBSD-SA-08:03.sendfile
Submitted by:	kib
2008-02-14 11:44:31 +00:00
Pyun YongHyeon
9fb59f5567 Prefer NULL over integer 0 for pointer type. 2008-02-14 01:25:01 +00:00
Pyun YongHyeon
cdca0fe8be Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame.
 o Removed unneeded jlist lock which was used to manage jumbo
   buffers.
 o Don't reinitialize hardware if MTU was not changed.
 o Added additional check for minimal MTU size.
 o Added a new tunable hw.skc.jumbo_disable to disable jumbo frame
   support for the driver. The tunable could be set for systems that
   do not need to use jumbo frames and it would save
   (9K * number of Rx descriptors) bytes kernel memory.
 o Jumbo buffer allocation failure is no longer critical error for
   the operation of sk(4). If sk(4) encounter the allocation failure
   it just disables jumbo frame support and continues to work without
   user intervention.

With these changes jumbo frame performance of sk(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure. Previously sk(4) tried to allocate physically contiguous
memory, 3388KB for 256 Rx descriptors. Sometimes that amount of
contiguous memory region could not be available for running systems
which in turn resulted in failure of loading the driver.

Tested by:	Cy Schubert < Cy.Schubert () komquats dot com >
2008-02-14 01:10:48 +00:00
Robert Watson
c0964f549b Remove debugging code under OLD_DIAGNOSTIC; this is all >10 years old and
hasn't been used in that time.

MFC after:	1 month
2008-02-14 00:55:03 +00:00
Robert Watson
57a77b811f In Coda, flush the attribute cache for a cnode when its fid is
changed, as its synthesized inode number may have changed and we
want stat(2) to pick up the new inode number.

MFC after:	1 month
2008-02-14 00:30:06 +00:00
Andrew Gallatin
37d89b0c5e Add minimally invasive shims to ease MFCs of mxge back as far
as RELENG_6

Sponsored by: Myricom, Inc.
2008-02-14 00:09:59 +00:00
John Baldwin
ad69e26b69 Add KASSERT()'s to catch attempts to recurse on spin mutexes that aren't
marked recursable either via mtx_lock_spin() or thread_lock().

MFC after:	1 week
2008-02-13 23:39:05 +00:00
John Baldwin
1d9c3ad3ef Mark the syscons video spin mutex as recursable since it is currently
recursed in a few places.

MFC after:	1 week
2008-02-13 23:38:08 +00:00
John Baldwin
bf49347744 Mark sleepqueue chain spin mutexes are recursable since the sleepq code
now recurses on them in sleepq_broadcast() and sleepq_signal() when
resuming threads that are fully asleep.

MFC after:	1 week
2008-02-13 23:36:56 +00:00
John Baldwin
13c85a48df Add a couple of assertions and KTR logging to thread_lock_flags() to
match mtx_lock_spin_flags().

MFC after:	1 week
2008-02-13 23:33:50 +00:00
Andrew Gallatin
615fc0983c Make the type of the firmware arrays match those
in the other eth*_z8e.h files.
2008-02-13 21:58:46 +00:00
John Baldwin
7471277054 Add an automatic kernel module version dependency to prevent loading
modules using invalid ABI versions (e.g. a 7.x module with an 8.x kernel)
for a given kernel:
- Add a 'kernel' module version whose value is __FreeBSD_version.
- Add a version dependency on 'kernel' in every module that has an
  acceptable version range of __FreeBSD_version up to the end of the
  branch __FreeBSD_version is part of.  E.g. a module compiled on 701000
  would work on kernels with versions between 701000 and 799999 inclusive.

Discussed on:	arch@
MFC after:	1 week
2008-02-13 21:34:06 +00:00
Attilio Rao
d98b6d4496 Bump __FreeBSD_version after the introduction of:
- lockmgr_assert()
- BUF_ASSERT_*() family functions

which enriched the KPI.
2008-02-13 20:59:28 +00:00
Attilio Rao
84887fa362 - Add real assertions to lockmgr locking primitives.
A couple of notes for this:
  * WITNESS support, when enabled, is only used for shared locks in order
    to avoid problems with the "disowned" locks
  * KA_HELD and KA_UNHELD only exists in the lockmgr namespace in order
    to assert for a generic thread (not curthread) owning or not the
    lock.  Really, this kind of check is bogus but it seems very
    widespread in the consumers code.  So, for the moment, we cater this
    untrusted behaviour, until the consumers are not fixed and the
    options could be removed (hopefully during 8.0-CURRENT lifecycle)
  * Implementing KA_HELD and KA_UNHELD (not surported natively by
    WITNESS) made necessary the introduction of LA_MASKASSERT which
    specifies the range for default lock assertion flags
  * About other aspects, lockmgr_assert() follows exactly what other
    locking primitives offer about this operation.

- Build real assertions for buffer cache locks on the top of
  lockmgr_assert().  They can be used with the BUF_ASSERT_*(bp)
  paradigm.

- Add checks at lock destruction time and use a cookie for verifying
  lock integrity at any operation.

- Redefine BUF_LOCKFREE() in order to not use a direct assert but
  let it rely on the aforementioned destruction time check.

KPI results evidently broken, so __FreeBSD_version bumping and
manpage update result necessary and will be committed soon.

Side note: lockmgr_assert() will be used soon in order to implement
real assertions in the vnode namespace replacing the legacy and still
bogus "VOP_ISLOCKED()" way.

Tested by:      kris (earlier version)
Reviewed by:    jhb
2008-02-13 20:44:19 +00:00
Robert Watson
89d1d7886a Update cache flushing behavior in light of recent namecache and
access cache improvements:

- Flush just access control state on CODA_PURGEUSER, not the full
  namecache for /coda.

- When replacing a fid on a cnode as a result of, e.g.,
  reintegration after offline operation, we no longer need to
  purge the namecache entries associated with its vnode.

MFC after:	1 month
2008-02-13 19:50:17 +00:00
John Baldwin
1951e633c4 Use RTFREE_LOCKED() instead of rtfree() when releasing a reference on the
'rt' route in rtredirect() as 'rt' is always locked.

MFC after:	1 week
PR:		kern/117913
Submitted by:	Stefan Lambrev  stefan.lambrev of moneybookers.com
2008-02-13 16:57:58 +00:00