Commit Graph

114671 Commits

Author SHA1 Message Date
Marius Strobl
0c49d17584 Style and minor changes:
- Merge esp_sbus.c rev. 1.31 from NetBSD: nuke trailing whitespace.
  Rev. 1.28 and 1.30 were already merged, 1.29 is not relevant for FreeBSD.
- Remove unused headers.
- Use BUS_PROBE_DEFAULT.
- Use __func__ instead of hardcoded function names in error messages.
- Correct some comments.
- Correct some function declarations to match their prototypes.
- Some style(9) fixes (don't use function calls in initializers; indentation).
- Zero the allocated structs to avoid problems with uninitialized members.
- Remove the ifdef'ed out SBus interrupt priority code and the hook for
  ncr53c9x_reset(), remove the unused SBus interrupt priority member from
  esp_softc. On FreeBSD setting the SBus interrupt priority is entirely done
  in sbus(4) and the reset function isn't even really used in NetBSD.
- s,dma,DMA, in comments.
- Make the code fit in 80 columns.
2005-04-17 17:42:36 +00:00
Marius Strobl
c64c7a0f7a Style and minor changes:
- Merge lsi64854.c rev. 1.25 from NetBSD: nuke trailing whitespace.
- Update NetBSD RCS IDs according to what was actually already merged.
- Remove dv_name from the lsi64854_softc and use device_printf() instead.
- Use __func__ instead of hardcoded function names in error messages.
- Use ulmin() instead of min() for comparing the DMA sizes as the values
  involved actually are represented by 64bit unsigned instead of 32bit
  unsigned. As far as I can't tell this doesn't make a difference in
  practice though.
- Some style(9) fixes (mainly indentation).
- Remove unnecessary braces.
2005-04-17 17:41:32 +00:00
Tim Kientzle
e90e8e4b97 Support path-rewriting options (including --strip-components) for both
extraction and creation.  While I'm here, fix a bug reported by Garrett
Wollman: when stripping the leading '/' from the path "/", don't produce
an entry with an empty name; produce "." instead.
2005-04-17 17:20:54 +00:00
Mathew Kanner
fe862a9b36 Fix a bug where we call pcm_getbuffersize twice.
Pointed out by:	Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp>
2005-04-17 16:26:08 +00:00
Robert Watson
ad77d81512 NFS write gathering defers execution of NFS server write requests to wait
to see if additional write requests will arrive that can be coalesced and
clustered with earlier ones.  When doing so, it must determine whether
the two requests are made by credentials with the same access writes, so
as not to coalesce improperly.  NFSW_SAMECRED() implements a test of two
credentials using a binary compare.

Replace NFSW_SAMECRED() macro with nfsrv_samecred() function, which is
aware of the contents and layout of a struct ucred, rather than a simple
binary compare.  While the binary compare works when ucred is simply a
zero'd and embedded 'struct ucred' in the NFS descriptor, it will work
less well when the ucred associated with an NFS descriptor is "real", so
has defined and populated reference count, mutex, etc.

MFC after:	1 week
Obtained from:	TrustedBSD Project
2005-04-17 16:25:36 +00:00
Simon L. B. Nielsen
c632f6dbda Catch up with new naming scheme for USB serial devices: s/ucom/cuaU/.
PR:		docs/80027
Submitted by:	Rong-En Fan <rafan@infor.org>
2005-04-17 16:08:51 +00:00
Mathew Kanner
ece089c054 De-dma the uaudio <-> pcm bridge. We were not capable of doing DMA from
this buffer anyway so the constraint that it had to be DMA capable only
caused pain when devices failed to aquire the memory.  Use a regular
malloc instead with sndbuf_setup.

Approved by:    tanimura (mentor)
2005-04-17 15:26:51 +00:00
Xin LI
6d44c5c74b Fix build for !YP case.
BTW.  Shall we change these fields to have yp_ prefix?  That will make the
code easier to read.
2005-04-17 15:10:30 +00:00
Stefan Farfeleder
7f964aa6aa Use __CONCAT() in the TUNABLE_ macros, this way we don't have to use 3
macros per type.
2005-04-17 15:08:34 +00:00
Hajimu UMEMOTO
109e5709c0 libc-internal interfaces should have two underscores in front
of their names.

Pointed out by:	das
2005-04-17 14:42:52 +00:00
Søren Schmidt
07015a1afd Add one more Promise SATAII/150 chip id. 2005-04-17 13:37:57 +00:00
Marius Strobl
b34639da21 Re-commit the following changes which were committed to these files
at their old location in sys/dev/esp after they were repo-copied to
sys/sparc64/sbus at rev. 1.1:

sys/dev/esp/lsi64854.c rev. 1.2
sys/dev/esp/lsi64854var.h rev. 1.2

Add some style(9) touch ups; style(9) states that new code should follow
these conventions and, well, this is a new driver.

Tested on:	i386, sparc64
Reviewed by:	scottl
2005-04-17 12:45:20 +00:00
Marius Strobl
a6e0d96148 Forced commit to denote that these files were repo-copied from
sys/dev/esp to sys/sparc64/sbus at rev. 1.1.
2005-04-17 12:41:22 +00:00
Marius Strobl
743aeb6467 - Split the bus probe function into a bus probe and a bus attach function
with the attaching of the children done in the bus attach function like
  it's supposed to be.
- In the bus probe nomatch function print the resources of the children
  like it's done in the other sparc64 specific bus drivers.
- For the clock frequency IVAR use the per-child values and fall back to
  the bus default in case a child doesn't have the respective property
  instead of always using the bus default so a child driver doesn't need
  to obtain the per-child value itself (see also the commit message of
  sys/dev/esp/esp_sbus.c rev. 1.7).
- Add support for pass-through allocations. The comment preceding
  sbus_alloc_resource() wasn't quite correct, we need to support pass-
  through allocations for the 'espdma' and 'ledma' (pseudo-)busses which
  hang off of the SBus in Ultra 1 machines. There can also be actual
  bridges like the SBus-to-PCMCIA bridge on the SBus and the XBox (SBus
  extension box) probably also involves one.
2005-04-17 11:32:34 +00:00
Marius Strobl
b38701668b Some clean-up announced in rev. 1.31:
- Use auto-generated typedefs for the prototypes of the device interface
  functions.
- Style(9) fixes (mainly don't use function calls in initializers).
- Use __func__ instead of hardcoded function names in error messages.
- Try to make error messages sound uniform.
- Try to keep the code within 80 columns.
- Correct some typos.
- Correct some function declarations to match their prototypes.
- Remove unused headers, macros and variables.
- Remove a bzero() superfluous due to allocating with M_ZERO.
- Use FBSDID.
2005-04-17 11:28:41 +00:00
Gleb Smirnoff
8d6e44f80f Add startup script and default configuration file for bsnmpd.
Reviewed by:	harti
2005-04-17 10:47:58 +00:00
Yoshihiro Takahashi
3033cea56c MFi386: revision 1.1194 (Update the drm driver). 2005-04-17 10:43:43 +00:00
Yoshihiro Takahashi
da7b97560b Fix the apm module on pc98.
Pointed out by:	Kuwamura Shinya <kuwa at lares dot dti dot ne dot jp>
MFC after:	1 day
2005-04-17 10:41:59 +00:00
Yoshihiro Takahashi
19983c91ba Remove unneeded include. 2005-04-17 09:44:17 +00:00
Julian Elischer
0224b85a14 On record only devices, don't fail if we don't have a play channel.
MFC after: 3 days
2005-04-17 07:42:28 +00:00
Xin LI
5c83bb4912 Wrong working directory, sorry. The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to:	me
2005-04-17 04:00:55 +00:00
Xin LI
f5d25e4900 Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3).  POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR:		standards/80008
Requested by:	Xin Liu <lx@knight.6test.edu.cn>
Reviewed by:	freebsd-standards (das)
MFC After:	2 weeks
2005-04-17 03:56:07 +00:00
David Schultz
8318eaae8b s/int/size_t/ as appropriate.
Noticed by:	bde
2005-04-17 01:06:37 +00:00
Mike Silbersack
fb3153e1ee Add another regression test - one we don't pass right now. 2005-04-17 00:56:38 +00:00
Mike Silbersack
756f6b7398 Have the regression test use a path in /tmp for a mount point
instead of a directory that only exists on my machine.
2005-04-17 00:40:27 +00:00
David Schultz
23e8fcaf66 Disable negative name caching for msdosfs to work around a bug.
Since the name cache is case-sensitive and msdosfs isn't,
creating a file 'foo' won't invalidate a negative entry for 'FOO'.
There are similar problems related to 8.3 filenames.

A better solution is to override VOP_LOOKUP with a method that
canonicalizes the name, then calls vfs_cache_lookup().  Unfortunately,
it's not quite that simple because vfs_cache_lookup() will call
msdosfs_lookup() on a cache miss, and msdosfs_lookup() needs a way to
get at the original component name.
2005-04-16 23:47:19 +00:00
Marcel Moolenaar
02b47ea204 Add a kpte command to DDB. It dumps the PTE of a KVA. This helps
to analyze faults and TLB/VHPT inconsistencies.
2005-04-16 23:38:32 +00:00
David Schultz
1be5319a76 Be bug-for-bug compatible with the C standard with respect to
printf("%#.0o", 0).  Cite an amusing passage from a defect report.
2005-04-16 22:36:51 +00:00
David Schultz
a4ca7ca8ac More optimized math functions. 2005-04-16 21:12:55 +00:00
David Schultz
2f2ee27de4 Implement truncl() based on floorl(). 2005-04-16 21:12:47 +00:00
Stefan Farfeleder
0f7d553f53 Concatenate the line number rather than the string `__FILE__' in the
NET_NEEDS_GIANT macro.  Until now this wasn't a problem because no
translation unit contains NET_NEEDS_GIANT more than once.
2005-04-16 20:47:32 +00:00
Søren Schmidt
c2c2204605 Spell ATA_NFORCE4_S2 correctly. 2005-04-16 20:03:49 +00:00
Robert Watson
7f53207b92 Introduce three additional MAC Framework and MAC Policy entry points to
control socket poll() (select()), fstat(), and accept() operations,
required for some policies:

        poll()          mac_check_socket_poll()
        fstat()         mac_check_socket_stat()
        accept()        mac_check_socket_accept()

Update mac_stub and mac_test policies to be aware of these entry points.
While here, add missing entry point implementations for:

        mac_stub.c      stub_check_socket_receive()
        mac_stub.c      stub_check_socket_send()
        mac_test.c      mac_test_check_socket_send()
        mac_test.c      mac_test_check_socket_visible()

Obtained from:	TrustedBSD Project
Sponsored by:	SPAWAR, SPARTA
2005-04-16 18:46:29 +00:00
Tom Rhodes
932d3e21cc Those who are ungodlike should be returned an error. 2005-04-16 18:41:00 +00:00
Robert Watson
f0c2044bd9 In mac_get_fd(), remove unconditional acquisition of Giant around copying
of the socket label to thread-local storage, and replace it with
conditional acquisition based on debug.mpsafenet.  Acquire the socket
lock around the copy operation.

In mac_set_fd(), replace the unconditional acquisition of Giant with
the conditional acquisition of Giant based on debug.mpsafenet.  The socket
lock is acquired in mac_socket_label_set() so doesn't have to be
acquired here.

Obtained from:	TrustedBSD Project
Sponsored by:	SPAWAR, SPARTA
2005-04-16 18:33:13 +00:00
Nate Lawson
2626a56934 Extend a local buffer to prevent an overflow of the XSDT address.
Submitted by:	Joerg Sonnenberger
Obtained from:	DragonflyBSD
MFC after:	1 day
2005-04-16 17:38:24 +00:00
Giorgos Keramidas
5970af4cd4 Reduce the width of the THR column to 4 characters, to avoid wrap-around
of lines in SMP machines (which are wider), until we have a better way
of handling window sizes & columns in top.

Caught by:	ache, Andre Guibert de Bruet <andy@siliconlandmark.com>
Point hat:	keramida
2005-04-16 15:43:38 +00:00
Marius Strobl
ea35b592d4 Increase default HZ for sparc64 to 1000. 2005-04-16 15:07:41 +00:00
Marius Strobl
2f15864c85 - MFi386: sys/i386/i386/intr_machdep.c rev. 1.11
Don't use atomic ops to increment interrupt stats.
  On sparc64 this reduces delay until tick interrupts are service by 1/10th
  on average. In turn this reduces the clock drift caused by these delays
  so there's less drift which has to be compensated in tick_hardclock().
  This includes switching from atomically incrementing the global cnt.v_intr
  to the asm equivalent of PCPU_LAZY_INC(cnt.v_intr) in exception.S
- Correct some comments to match the registers actually used.
- Correct some format specifiers, interrupt levels passed in are u_int.
- Use FBSDID.

Ok'ed by:	jhb
2005-04-16 15:05:56 +00:00
Marius Strobl
197bb5864f Some changes to intr_execute_handlers():
- Fix NULL pointer dereferences caused when an ithread or a handler is
  NULL which happens when a stray interrupt triggers after the respective
  device interrupt was torn down.
- Remove the critical section around INTR_FAST handlers which actually
  was a nested critical section. Both tl0_intr() and tl1_intr() already
  enter a critical section for calling intr_execute_handlers().

MFC after:	3 days
2005-04-16 15:02:16 +00:00
Marius Strobl
50f046e614 - In sparc64_init() remove the call to tick_stop(). There's no need to
call tick_stop() again after tick_init() as tick interrupts already
  have been disabled as part of tick_init().
- In spinlock_enter() replace the magic value for PIL TICK with the
  respective macro.
- Use FBSDID.
2005-04-16 15:00:09 +00:00
Marius Strobl
7bed9b320b - Add a workaround for a bug in BlackBird CPUs (said to be part of the
SpitFire erratum #54) which can cause writes to the TICK_CMPR register
  to fail. This seems to fix the dying clocks problem reported by jhb@
  and kris@. [1]
- In tick_start() don't reset the tick counter of the boot processor to
  zero. It's initially reset in _start() and afterwards but _before_
  tick_start() is called on the BSP the APs synchronise with the tick
  counter of the BSP in mp_startup(). Resetting the tick counter of the
  BSP in tick_start() probably also was the cause of problems seen when
  using the CPU tick counter as timecounter on SMP machines.
  Not resetting the tick counter of the BSP in mp_startup() makes the
  tick counters and tick interrupts between the BSP and APs be pretty
  much in sync as it's supposed to be. This also means there's no longer
  a real reason to have separate tick_start() and tick_start_ap() so
  merge them and zap tick_start_ap(). This is also a first step in
  simplifying the interface to the tick counters in preparation to use
  alternate clock hardware where available.
- Switch to the algorithm used on FreeBSD/ia64 for updating the tick
  interrupt register and which compensates the clock drift caused by
  varying delays between when the tick interrupts actually trigger and
  when they are serviced. Not compensating the clock drift mainly hurts
  interactive performance especially when using WITNESS. [2]
  For further information about the algorithm also see the commit log
  of sys/ia64/ia64/interrupt.c rev. 1.38.
  On sparc64 the sysctls for monitoring the behaviour of the tick
  interrupts are machdep.tick.adjust_edges, machdep.tick.adjust_excess,
  machdep.tick.adjust_missed and machdep.tick.adjust_ticks.
- In tick_init() just use tick_stop() for stopping the tick interrupts
  until a proper handler is set up later. This also stops the system
  tick interrupt on USIII systems earlier.
- In tick_start() check for a rough upper limit of HZ.
- Some minor changes, e.g. use FBSDID, remove unused headers, etc.

Info obtained from:	Linux [1]
Ok'ed by:		marcel [2]
Additional testing by:	kris (earlier version of the workaround), jhb
X-MFC after:		3 days [1]
2005-04-16 14:57:38 +00:00
Marius Strobl
c066bca62d Fix a style(9) bug in the stxa_sync() macro (DO NOT use function calls
in initializers).
2005-04-16 14:47:50 +00:00
Robert Watson
030a28b3b5 Introduce new MAC Framework and MAC Policy entry points to control the use
of system calls to manipulate elements of the process credential,
including:

        setuid()                mac_check_proc_setuid()
        seteuid()               mac_check_proc_seteuid()
        setgid()                mac_check_proc_setgid()
        setegid()               mac_check_proc_setegid()
        setgroups()             mac_check_proc_setgroups()
        setreuid()              mac_check_proc_setreuid()
        setregid()              mac_check_proc_setregid()
        setresuid()             mac_check_proc_setresuid()
        setresgid()             mac_check_rpoc_setresgid()

MAC checks are performed before other existing security checks; both
current credential and intended modifications are passed as arguments
to the entry points.  The mac_test and mac_stub policies are updated.

Submitted by:	Samy Al Bahra <samy@kerneled.org>
Obtained from:	TrustedBSD Project
2005-04-16 13:29:15 +00:00
Christian Brueffer
a431f9bb61 Xref ataraid(4). 2005-04-16 12:43:17 +00:00
Christian Brueffer
4b40473f20 Manual page for the ataraid(4) software RAID driver.
Reviewed by:	sos
2005-04-16 12:40:38 +00:00
Dag-Erling Smørgrav
02dcaf2fd1 Unbreak the build on 64-bit architectures. 2005-04-16 12:37:16 +00:00
Robert Watson
453ffeef5e Add ALQ and KTR_ALQ to NOTES so that they are built into LINT. 2005-04-16 12:14:43 +00:00
Robert Watson
e551d45211 Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0.  Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.

Discussed with/pointed out by:	hmp
Reveiwed by:	jeff, hmp
MFC after:	3 days
2005-04-16 12:12:27 +00:00
Robert Watson
babcc5ad79 Starting point for a regression test for mac_bsdextended(4)/libugidfw(3).
Currently only performs basic tests against the library string routines,
and queries less important kernel state.

Obtained from:	TrustedBSD Project
Sponsored by:	SPAWAR, SPARTA
MFC after:	3 days
2005-04-16 12:06:40 +00:00