]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 years agoAdd support for printing out the contents of a PCI BIOS $PIR interrupt
jhb [Fri, 6 Sep 2002 16:10:12 +0000 (16:10 +0000)]
Add support for printing out the contents of a PCI BIOS $PIR interrupt
routing table on the console.  Eventually it will be printed during
verbose boots.

22 years agoPrefer the physical bus number of the PCI bus as the unit of the pciX
jhb [Fri, 6 Sep 2002 16:09:07 +0000 (16:09 +0000)]
Prefer the physical bus number of the PCI bus as the unit of the pciX
device created.

22 years agoAdd a helper routine acpi_SetIntrModel() to call the _PIC method to set
jhb [Fri, 6 Sep 2002 16:08:08 +0000 (16:08 +0000)]
Add a helper routine acpi_SetIntrModel() to call the _PIC method to set
the interrupt model in use so that ACPI can properly route interrupts for
machines using APIC's or SAPIC's.

22 years agoMinor spelling tweak: assume "his" is actually "This".
rwatson [Fri, 6 Sep 2002 13:22:44 +0000 (13:22 +0000)]
Minor spelling tweak: assume "his" is actually "This".

22 years agoRemoved vestiges of the -a and -d options.
bde [Fri, 6 Sep 2002 13:16:24 +0000 (13:16 +0000)]
Removed vestiges of the -a and -d options.

Fixed other bugs in the usage message so that it matches the man page.

22 years agoStyle: One space between "restrict" qualifier and "*".
tjr [Fri, 6 Sep 2002 11:24:06 +0000 (11:24 +0000)]
Style: One space between "restrict" qualifier and "*".

22 years agoExpand a contraction in the text of style(9) for consistency.
robert [Fri, 6 Sep 2002 10:53:57 +0000 (10:53 +0000)]
Expand a contraction in the text of style(9) for consistency.
Do not touch contractions in comments of code examples because
their usage seems to be justified by space contraints.

22 years agoRemove magicspace from reference data.
phk [Fri, 6 Sep 2002 08:51:55 +0000 (08:51 +0000)]
Remove magicspace from reference data.

Sponsored by: DARPA & NAI Labs.

22 years agoRemove "magicspace". It looks good on paper, it doesn't work in practice.
phk [Fri, 6 Sep 2002 08:50:28 +0000 (08:50 +0000)]
Remove "magicspace".  It looks good on paper, it doesn't work in practice.

Sponsored by: DARPA & NAI Labs.

22 years agoexpat2 changed the name of their include file to expat.h
phk [Fri, 6 Sep 2002 08:44:15 +0000 (08:44 +0000)]
expat2 changed the name of their include file to expat.h

Sponsored by: DARPA & NAI Labs.

22 years agoFix an indentation typo.
phk [Fri, 6 Sep 2002 08:43:15 +0000 (08:43 +0000)]
Fix an indentation typo.

Sponsored by: DARPA & NAI Labs.

22 years agoAdd a zeroed out sector one for the GPT hack and test T003.
phk [Fri, 6 Sep 2002 08:41:48 +0000 (08:41 +0000)]
Add a zeroed out sector one for the GPT hack and test T003.

Sponsored by: DARPA & NAI Labs.

22 years agoRemove the -a maxcontig option, the kernel doesn't inspect fs_maxcontig
phk [Fri, 6 Sep 2002 07:59:10 +0000 (07:59 +0000)]
Remove the -a maxcontig option, the kernel doesn't inspect fs_maxcontig
anymore.

Sponsored by: DARPA & NAI Labs.

22 years agoDon't respect the O_EXCL flag, we don't get it back on close so we cannot
phk [Fri, 6 Sep 2002 07:57:29 +0000 (07:57 +0000)]
Don't respect the O_EXCL flag, we don't get it back on close so we cannot
correctly track it.

Spotted by: peter
Sponsored by: DARPA & NAI Labs.

22 years agoBump the -mev56 to -mev6. Otherwise, when you compile with gcc using
peter [Fri, 6 Sep 2002 07:27:41 +0000 (07:27 +0000)]
Bump the -mev56 to -mev6.  Otherwise, when you compile with gcc using
ev6 or pca56 etc this downgrades the cpu specification passed to gas.
As a result, gas will fail when gcc generates media instructions (in
uipc_usrreq.c).  This only affects what gas will accept, not what gcc
generates or what our *.s file contain.

22 years agoUse UMA as a complex object allocator.
julian [Fri, 6 Sep 2002 07:00:37 +0000 (07:00 +0000)]
Use UMA as a complex object allocator.
The process allocator now caches and hands out complete process structures
*including substructures* .

i.e. it get's the process structure with the first thread (and soon KSE)
already allocated and attached, all in one hit.

For the average non threaded program (non KSE that is) the allocated thread and its stack remain attached to the process, even when the process is
unused and in the process cache. This saves having to allocate and attach it
later, effectively bringing us (hopefully) close to the efficiency
of pre-KSE systems where these were a single structure.

Reviewed by: davidxu@freebsd.org, peter@freebsd.org

22 years agoUse sys/libkern.h not /usr/include/string.h
peter [Fri, 6 Sep 2002 06:04:36 +0000 (06:04 +0000)]
Use sys/libkern.h not /usr/include/string.h

22 years agonfsnode.h was moved to ../nfsclient ages ago. I forgot to remove it here.
peter [Fri, 6 Sep 2002 05:47:33 +0000 (05:47 +0000)]
nfsnode.h was moved to ../nfsclient ages ago.  I forgot to remove it here.

22 years agoo Fix namespace scope issues in <ctype.h> by using the relatively new
mike [Fri, 6 Sep 2002 04:22:54 +0000 (04:22 +0000)]
o Fix namespace scope issues in <ctype.h> by using the relatively new
  visibility primitives.
o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in
  <ctype.h>.
o Reduce pollution in <runetype.h> by removing typedefs and using
  implementation namespaced types.
o Add a typedef in <rune.h> to compensate for <runetype.h> losing its
  typedefs.

Reviewed by: bde

22 years agorev 1.6 claimed to add 'bootparams', but in fact added 'bootparamd' which
peter [Fri, 6 Sep 2002 01:23:31 +0000 (01:23 +0000)]
rev 1.6 claimed to add 'bootparams', but in fact added 'bootparamd' which
does not exist.

22 years agoRemove extra ';'
davidxu [Fri, 6 Sep 2002 00:18:52 +0000 (00:18 +0000)]
Remove extra ';'

22 years agoUpdated release notes: ACPIA CA 20020815, Binutils 2.12.1
bmah [Thu, 5 Sep 2002 23:54:26 +0000 (23:54 +0000)]
Updated release notes:  ACPIA CA 20020815, Binutils 2.12.1
(fix snapshot date), XFree86 4.2.1.

MFCs noted:  linux_base 7.1.

22 years agoOnly try to initialize syscons if /dev/ttyv0 exists and it's not a pcvt.
fenner [Thu, 5 Sep 2002 23:51:28 +0000 (23:51 +0000)]
Only try to initialize syscons if /dev/ttyv0 exists and it's not a pcvt.

22 years agoOnly try to run /usr/sbin/ispcvt if it exists and is executable.
fenner [Thu, 5 Sep 2002 23:50:34 +0000 (23:50 +0000)]
Only try to run /usr/sbin/ispcvt if it exists and is executable.

22 years agoImplement the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.
phk [Thu, 5 Sep 2002 20:59:42 +0000 (20:59 +0000)]
Implement the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.

Use extattr_check_cred() to check access to EAs.

This is still a WIP.

Sponsored by:   DARPA & NAI Labs.

22 years agoIntroduce the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.
phk [Thu, 5 Sep 2002 20:56:14 +0000 (20:56 +0000)]
Introduce the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.

Together these two implement a simple transcation style grouping for
modifications of extended attributes on a vnode.

VOP_CLOSEEXTATTR() takes a boolean "commit" argument, which determines
if the aggregate changes are attempted written or not.  A commit will
fail if any of the VOP_SETEXTATTR() calls since the VOP_OPENEXTATTR()
have failed to meet their objective or if the flush to disk fails.

The default operations for these two VOP's is to return EOPNOTSUPP.

This API may still be subject to change.

Sponsored by:   DARPA & NAI Labs

22 years agoFix an inherited style bug: compare with NOCRED instead of NULL.
phk [Thu, 5 Sep 2002 20:46:19 +0000 (20:46 +0000)]
Fix an inherited style bug:  compare with NOCRED instead of NULL.

Sponsored by: DARPA & NAI Labs.

22 years agoUse canonical extattr_check_cred() instead of private implementation of the
phk [Thu, 5 Sep 2002 20:39:36 +0000 (20:39 +0000)]
Use canonical extattr_check_cred() instead of private implementation of the
same policy.

Sponsored by: DARPA & NAI Labs.

22 years agoIntroduce new extattr_check_cred() function which implements the canonical
phk [Thu, 5 Sep 2002 20:38:57 +0000 (20:38 +0000)]
Introduce new extattr_check_cred() function which implements the canonical
crential washing for extended attributes.

Sponsored by: DARPA & NAI Labs.

22 years agoAdd an archdep script and hook it up to the build.
gordon [Thu, 5 Sep 2002 20:29:18 +0000 (20:29 +0000)]
Add an archdep script and hook it up to the build.

Submitted by: Mike Makonnen <makonnen@pacbell.net>

22 years agoFix credentials check: do not leak ENOATTR until we know if they're
phk [Thu, 5 Sep 2002 20:28:24 +0000 (20:28 +0000)]
Fix credentials check: do not leak ENOATTR until we know if they're
supposed to know.

Sponsored by: DARPA & NAI Labs.

22 years agoUpdate rc.conf.5 man page to reflect bootparamd_enable and _flags
gordon [Thu, 5 Sep 2002 20:19:03 +0000 (20:19 +0000)]
Update rc.conf.5 man page to reflect bootparamd_enable and _flags

22 years agoHook bootparams up to the world
gordon [Thu, 5 Sep 2002 20:15:08 +0000 (20:15 +0000)]
Hook bootparams up to the world

22 years agoIntroduce bootparamd into the boot scripts. Add a bootparamd_enable and
gordon [Thu, 5 Sep 2002 20:14:46 +0000 (20:14 +0000)]
Introduce bootparamd into the boot scripts. Add a bootparamd_enable and
_flags to rc.conf

Submitted by: John Hay <jhay@zibbi.icomtek.csir.co.za>

22 years agoFixed namespace pollution in uma changes:
bde [Thu, 5 Sep 2002 19:48:52 +0000 (19:48 +0000)]
Fixed namespace pollution in uma changes:
- use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
  a prerequisite.
- don't include <sys/uma.h>.
Namespace pollution makes "opaque" types like uma_zone_t perfectly
non-opaque.  Such types should never be used (see style(9)).

Fixed subsequently grwon dependencies of this header on its own pollution:
- include <sys/_mutex.h> and its prerequisite <sys/_lock.h> instead of
  depending on namespace pollution 2 layers deep in <sys/uma.h>.

22 years agoRe-insert TUNABLE() export of MAC Biba and MAC MLS module 'enabled'
rwatson [Thu, 5 Sep 2002 18:52:52 +0000 (18:52 +0000)]
Re-insert TUNABLE() export of MAC Biba and MAC MLS module 'enabled'
sysctls.  Apparently lost during some or another merge.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

22 years agoMake the printf messages when routing interrupts more consistent in the
jhb [Thu, 5 Sep 2002 17:08:35 +0000 (17:08 +0000)]
Make the printf messages when routing interrupts more consistent in the
various PCI bridge drivers.

22 years agoTest PCIbios.ventry against 0 to see if we found a PCIbios entry point,
jhb [Thu, 5 Sep 2002 17:07:07 +0000 (17:07 +0000)]
Test PCIbios.ventry against 0 to see if we found a PCIbios entry point,
not the 'entry' member.  The entry point is formed from both a base and
a relative entry point.  'entry' is that relative offset.  It is perfectly
valid to have an entry point with a relative offset of 0.  PCIbios.ventry
is the virtual address of the entry point that takes both 'base' and
'entry' into account, thus it is the proper variable to test to see if we
have an entry point or not.

22 years agoWarns cleanups for netstat:
dwmalone [Thu, 5 Sep 2002 17:06:51 +0000 (17:06 +0000)]
Warns cleanups for netstat:
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
   a word).

22 years agoMove some variables to the BSS instead of explicitly zero'ing them. This
jhb [Thu, 5 Sep 2002 17:05:15 +0000 (17:05 +0000)]
Move some variables to the BSS instead of explicitly zero'ing them.  This
also makes all of the PCIbios variable be zero'd, not just the entry field.

22 years agoStatically compile pcn(4) into the install kernel vs. using as module.
obrien [Thu, 5 Sep 2002 15:45:01 +0000 (15:45 +0000)]
Statically compile pcn(4) into the install kernel vs. using as module.
lnc(4) will attach to AMD PCnet/FAST NICs if pcn(4) does not attach.
I.e. pcn(4) gets first chance.  There is a problem however in that pcn(4)
was moved out of the install kernel so that the module would be used.
This however causes bad installs if one has an AMD PCnet/FAST NIC.

22 years agoAdd the PCN module.
obrien [Thu, 5 Sep 2002 15:41:09 +0000 (15:41 +0000)]
Add the PCN module.

22 years agoMake recursion prevention variable per-instance and remove XXX comment
sobomax [Thu, 5 Sep 2002 15:35:38 +0000 (15:35 +0000)]
Make recursion prevention variable per-instance and remove XXX comment
about thread-unsafety.

MFC after: 2 weeks

22 years agoInclude <sys/mutex.h> and its prerequisite <sys/lock.h> instead of depending
bde [Thu, 5 Sep 2002 15:33:30 +0000 (15:33 +0000)]
Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of depending
on namespace pollution 4 layers deep in <netinet/in_pcb.h>.

Removed unused includes.  Sorted includes.

22 years agoUse `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
bde [Thu, 5 Sep 2002 14:04:34 +0000 (14:04 +0000)]
Use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
a prerequisite.

22 years agoInclude <sys/systm.h> for the definition of offsetof() instead of depending
bde [Thu, 5 Sep 2002 13:08:22 +0000 (13:08 +0000)]
Include <sys/systm.h> for the definition of offsetof() instead of depending
on the definition being misplaced in <sys/types.h>.  The definition probably
belongs in <sys/stddef.h>.

22 years agoInclude <sys/systm.h> for the definition of offsetof() instead of depending
bde [Thu, 5 Sep 2002 12:58:57 +0000 (12:58 +0000)]
Include <sys/systm.h> for the definition of offsetof() instead of depending
on the definition being misplaced in <sys/types.h>.  The definition probably
belongs in <sys/stddef.h>.

22 years agoDo not cast from a pointer to an integer of a possibly different size.
bde [Thu, 5 Sep 2002 12:30:54 +0000 (12:30 +0000)]
Do not cast from a pointer to an integer of a possibly different size.
This fixes a warning on i386's with 64-bit longs.

22 years agoAdd debug.rman_debug sysctl MIB and loader tunable instead of broken
iwasaki [Thu, 5 Sep 2002 11:45:02 +0000 (11:45 +0000)]
Add debug.rman_debug sysctl MIB and loader tunable instead of broken
RMAN_DEBUG option.
This would be useful for debugging resource manager code.

22 years agoFix a format buglet.
phk [Thu, 5 Sep 2002 11:42:03 +0000 (11:42 +0000)]
Fix a format buglet.

Spotted by: iedowse

22 years agoParse hint.acpi.0.disabled correctly.
iwasaki [Thu, 5 Sep 2002 11:16:23 +0000 (11:16 +0000)]
Parse hint.acpi.0.disabled correctly.
Now that hint.acpi.0.disabled="0" won't disable acpi as expected.

Pointed-out by: bde

22 years agoInclude <sys/malloc.h> instead of depending on namespace pollution 2
bde [Thu, 5 Sep 2002 09:43:24 +0000 (09:43 +0000)]
Include <sys/malloc.h> instead of depending on namespace pollution 2
layers deep in <sys/proc.h> or <sys/vnode.h>.

Include <sys/vmmeter.h> instead of depending on namespace pollution in
<sys/pcpu.h>.

Sorted includes as much as possible.

22 years agoForward declare struct uio so that <sys/uio.h> isn't a prerequisite.
bde [Thu, 5 Sep 2002 09:31:14 +0000 (09:31 +0000)]
Forward declare struct uio so that <sys/uio.h> isn't a prerequisite.

Removed bogus forward declarations of structs.

22 years agoThe changes mentioned below were accidently committed as part of
dwmalone [Thu, 5 Sep 2002 09:11:20 +0000 (09:11 +0000)]
The changes mentioned below were accidently committed as part of
my previous commit, so the commit message is incorrect for them.
The actual changes were:

elfcore.c 1.11:
Use a uintmax_t 'cos we con't know if php->p_filesz will be a
Elf32_Size or an Elf64_Size and we don't know how these relate to
size_t. Change some ints to size_t and ssize_ts.

gcore.c 1.28:
Include <arpa/inet.h> for ntohl, which is used in N_BADMAG.
Use a uid_t for a uid.

md-nop.c 1.6:
Mark some parameters as unused.

22 years agoInclude <sys/malloc.h> instead of depending on namespace pollution 2
bde [Thu, 5 Sep 2002 08:13:20 +0000 (08:13 +0000)]
Include <sys/malloc.h> instead of depending on namespace pollution 2
layers deep in <sys/proc.h> or <sys/vnode.h>.

Removed unused includes.  Sorted includes.

22 years agoPad after "char *n_name;" in the !_AOUT_INCLUDE_ case so that struct nlist
bde [Thu, 5 Sep 2002 08:03:02 +0000 (08:03 +0000)]
Pad after "char *n_name;" in the !_AOUT_INCLUDE_ case so that struct nlist
has some chance of having the same layout in all cases on machines with
sizeof(char *) != sizeof(long).

22 years agoForward declare struct vnode so that <sys/vnode.h> or some other header
bde [Thu, 5 Sep 2002 07:54:03 +0000 (07:54 +0000)]
Forward declare struct vnode so that <sys/vnode.h> or some other header
that happens to forward declare struct vnode isn't a prerequisite (most
places get it from <sys/imgact.h>).

22 years agoInclude stdint.h to make this compile.
iedowse [Thu, 5 Sep 2002 07:43:34 +0000 (07:43 +0000)]
Include stdint.h to make this compile.

Submitted by: Garance A Drosihn <drosih@rpi.edu>

22 years agos/SGNL/SIG/
davidxu [Thu, 5 Sep 2002 07:30:18 +0000 (07:30 +0000)]
s/SGNL/SIG/
s/SNGL/SINGLE/
s/SNGLE/SINGLE/

Fix abbreviation for P_STOPPED_* etc flags, in original code they were
inconsistent and difficult to distinguish between them.

Approved by: julian (mentor)

22 years agoInclude <sys/malloc.h> instead of depending on namespace pollution 2
bde [Thu, 5 Sep 2002 07:02:43 +0000 (07:02 +0000)]
Include <sys/malloc.h> instead of depending on namespace pollution 2
layers deep in <sys/proc.h> or <sys/vnode.h>.

Removed unused includes.

Fixed some printf format errors (1 fatal on i386's; 1 fatal on alphas;
1 not fatal on any supported machine).

22 years agoUncommented MAC options so that they get linted. This exposes brokenness
bde [Thu, 5 Sep 2002 06:46:11 +0000 (06:46 +0000)]
Uncommented MAC options so that they get linted.  This exposes brokenness
in kern_mac.c.

22 years agoImplement LINUX_TIOCSCTTY.
marcel [Thu, 5 Sep 2002 02:51:25 +0000 (02:51 +0000)]
Implement LINUX_TIOCSCTTY.

PR: kern/42404

22 years agoSplit up ptrace() into a wrapper that does the copying to and from
iedowse [Thu, 5 Sep 2002 01:02:50 +0000 (01:02 +0000)]
Split up ptrace() into a wrapper that does the copying to and from
user space and a kern_ptrace() implementation. Use the kern_*()
version in the Linux emulation code to remove more stack gap uses.

Approved by: des

22 years agoremove #pragma ident
alfred [Wed, 4 Sep 2002 23:58:23 +0000 (23:58 +0000)]
remove #pragma ident

22 years agoANSIify function definitions.
dwmalone [Wed, 4 Sep 2002 23:29:10 +0000 (23:29 +0000)]
ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5

22 years agoAdd a tip about using sed(1)'s FreeBSD-specific -i option.
jmallett [Wed, 4 Sep 2002 23:28:35 +0000 (23:28 +0000)]
Add a tip about using sed(1)'s FreeBSD-specific -i option.

MFC after: 42 days

22 years agoAvoid a signedness warning by casting chain_index to a size_t.
dwmalone [Wed, 4 Sep 2002 21:22:49 +0000 (21:22 +0000)]
Avoid a signedness warning by casting chain_index to a size_t.
(Should be OK as chain_index is supposed to be positive).

22 years agoNo need to declare optind as an external int.
dwmalone [Wed, 4 Sep 2002 21:16:51 +0000 (21:16 +0000)]
No need to declare optind as an external int.

22 years agoMake syslogd -u treat "*" as all levels by explictly setting pri_cmp
dwmalone [Wed, 4 Sep 2002 21:11:25 +0000 (21:11 +0000)]
Make syslogd -u treat "*" as all levels by explictly setting pri_cmp
for it.

While I'm here, add a the ability to say "!level" in a way which
should be compatible with Linux's syslogd.

PR: 28935
No objections: audit
MFC after: 2 weeks

22 years agoWhen printing the wait status, break it down into a signal and a exit status.
dwmalone [Wed, 4 Sep 2002 21:00:45 +0000 (21:00 +0000)]
When printing the wait status, break it down into a signal and a exit status.

PR: 41912
Submitted by: Aaron Smith <aaron@mutex.org>
MFC after: 2 weeks

22 years agoSwap sense of no_v[46]bind variables and rename as v[46]bind_ok -
dwmalone [Wed, 4 Sep 2002 20:31:53 +0000 (20:31 +0000)]
Swap sense of no_v[46]bind variables and rename as v[46]bind_ok -
this avoids some double negatives which are a bit difficult to
parse.

Always tread v[46]bind{,_ok} as booleans.

22 years agoFix parsing of unix domain entries after addition of IPv6 RPC support.
dwmalone [Wed, 4 Sep 2002 20:15:20 +0000 (20:15 +0000)]
Fix parsing of unix domain entries after addition of IPv6 RPC support.

PR: 40771
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>

22 years agoUnder DIAGNOSTIC, complain if a timeout(9) routine took more than 1msec.
phk [Wed, 4 Sep 2002 20:05:00 +0000 (20:05 +0000)]
Under DIAGNOSTIC, complain if a timeout(9) routine took more than 1msec.

22 years agoOn the ElanSC520 CPU use general purpose timer#2 as timecounter.
phk [Wed, 4 Sep 2002 19:52:17 +0000 (19:52 +0000)]
On the ElanSC520 CPU use general purpose timer#2 as timecounter.

This is a vast improvement over the i8254, since it is a simple
memory load rather than a comples sequence of interrupt blocking,
multiple input/output instructions, and wrap-around detection.

I have not bothered to time the fundamental timecounter get routine,
but gettimeofday(2) is 10% faster with the ELAN timecounte.

The downside is that HZ=100 is not enough, 150 or more recommended,
I use 250 myself.

22 years agoChange the support for AMDs ElanSC520 CPU from being a device driver to
phk [Wed, 4 Sep 2002 19:43:22 +0000 (19:43 +0000)]
Change the support for AMDs ElanSC520 CPU from being a device driver to
be
options CPU_ELAN
(NB: Soekris.com users!)

It is cleaner this way.  We still recognize the cpu on the host-pci bridge.

22 years agoDo not employ timecounter hardware if our hz does not support their
phk [Wed, 4 Sep 2002 19:32:18 +0000 (19:32 +0000)]
Do not employ timecounter hardware if our hz does not support their
correct rewinding.

22 years agoFunction prototypes don't need 'extern'.
jhb [Wed, 4 Sep 2002 19:31:09 +0000 (19:31 +0000)]
Function prototypes don't need 'extern'.

22 years agoDon't let children attach fast interrupts if the parent interrupt is normal.
phk [Wed, 4 Sep 2002 18:50:40 +0000 (18:50 +0000)]
Don't let children attach fast interrupts if the parent interrupt is normal.

Submitted by: bde

22 years agoMake consistent; turn spaces into tabs where there is a mixture.
markm [Wed, 4 Sep 2002 18:14:17 +0000 (18:14 +0000)]
Make consistent; turn spaces into tabs where there is a mixture.

22 years agoBring back the PUC_FASTINTR option, and implement it correctly so that
phk [Wed, 4 Sep 2002 15:29:04 +0000 (15:29 +0000)]
Bring back the PUC_FASTINTR option, and implement it correctly so that
child devices also know if they are fast or normal.

Requested by: bde

22 years agoGive up on calling tc_ticktock() from a timeout, we have timeout
phk [Wed, 4 Sep 2002 10:15:19 +0000 (10:15 +0000)]
Give up on calling tc_ticktock() from a timeout, we have timeout
functions which run for several milliseconds at a time and getting
in queue behind one or more of those makes us miss our rewind.

Instead call it from hardclock() like we used to do, but retain the
prescaler so we still cope with high HZ values.

22 years agoAdd in_hosteq() and in_nullhost() macros to make life of developers
sobomax [Wed, 4 Sep 2002 09:55:50 +0000 (09:55 +0000)]
Add in_hosteq() and in_nullhost() macros to make life of developers
porting NetBSD code a little bit easier.

Obtained from: NetBSD

22 years agoSigh. The fix to the suspend code wasn't complete, since the resume
scottl [Wed, 4 Sep 2002 08:13:36 +0000 (08:13 +0000)]
Sigh.  The fix to the suspend code wasn't complete, since the resume
code was broken in the same way.

Submitted by: co9@xs4all.nl
MFC after: 3 days

22 years agoMore in the continuing saga of phk vs his strange serial card.
imp [Wed, 4 Sep 2002 06:53:37 +0000 (06:53 +0000)]
More in the continuing saga of phk vs his strange serial card.

In this installment, we learn that it is bad to access registers that
are only defined for mfc cards in the interrupt handler when we do not
in fact have a mfc card.  For MFC cards, we'll only call the ISR if
the this card interrupted bit is set.  For non mfc cards (which are
basically 90% of pccards in use), we always call the ISR and avoid
touching the suspect registers.  We always pacify the bit in the MFC
case on the off chance that will help in the itnerrupt handler not
being registed.

22 years agoAlright, fix the problems with the elf loader for the Alpha. It turns
dillon [Wed, 4 Sep 2002 04:42:12 +0000 (04:42 +0000)]
Alright, fix the problems with the elf loader for the Alpha.  It turns
out that there is no easy way to discern the difference between a text
segment and a data segment through the read-only OR execute attribute
in the elf segment header, so revert the algorithm to what it was before.

Neither can we account for multiple data load segments in the vmspace
structure (at least not without more work), due to assumptions obreak()
makes in regards to the data start and data size fields.

Retain RLIMIT_VMEM checking by using a local variable to track the
total bytes of data being loaded.

Reviewed by: peter
X-MFC after: ASAP

22 years agoFix up a comment.
jhb [Wed, 4 Sep 2002 03:53:21 +0000 (03:53 +0000)]
Fix up a comment.

22 years agoUse resource_list_print_type() instead of duplicating the code in
jhb [Wed, 4 Sep 2002 03:19:33 +0000 (03:19 +0000)]
Use resource_list_print_type() instead of duplicating the code in
nexus_print_resources().

22 years ago- Make pci_load_vendor_data() static and do it during MOD_LOAD instead of
jhb [Wed, 4 Sep 2002 03:13:16 +0000 (03:13 +0000)]
- Make pci_load_vendor_data() static and do it during MOD_LOAD instead of
  when the first PCI bus attaches.
- Create /dev/pci during MOD_LOAD as well.
- Destroy /dev/pci during MOD_UNLOAD (not that you can kldunload pci, but
  might as well get the code right)

22 years agoUse resource_list_print_types() instead of duplicating the code.
jhb [Wed, 4 Sep 2002 03:11:20 +0000 (03:11 +0000)]
Use resource_list_print_types() instead of duplicating the code.

22 years agoDie on -D=foo, when parsing options - we can't let someone define (nil).
jmallett [Wed, 4 Sep 2002 01:12:39 +0000 (01:12 +0000)]
Die on -D=foo, when parsing options - we can't let someone define (nil).

MFC after: 3 days

22 years agoDeprecate the use of sendmail_enable="NONE" as it adversely affects the
gshapiro [Tue, 3 Sep 2002 22:15:57 +0000 (22:15 +0000)]
Deprecate the use of sendmail_enable="NONE" as it adversely affects the
new rcNG effort.

Submitted by: Mike Makonnen <makonnen@pacbell.net>

22 years agoMake the text segment locating heuristics from rev 1.121 more reliable
peter [Tue, 3 Sep 2002 21:18:17 +0000 (21:18 +0000)]
Make the text segment locating heuristics from rev 1.121 more reliable
so that it works on the Alpha.  This defines the segment that the entry
point exists in as 'text' and any others (usually one) as data.

Submitted by: tmm
Tested on: i386, alpha

22 years ago- Change falloc() to acquire an fd from the process table last so that
jhb [Tue, 3 Sep 2002 20:16:31 +0000 (20:16 +0000)]
- Change falloc() to acquire an fd from the process table last so that
  it can do it w/o needing to hold the filelist_lock sx lock.
- fdalloc() doesn't need Giant to call free() anymore.  It also doesn't
  need to drop and reacquire the filedesc lock around free() now as a
  result.
- Try to make the code that copies fd tables when extending the fd table in
  fdalloc() a bit more readable by performing assignments in separate
  statements.  This is still a bit ugly though.
- Use max() instead of an if statement so to figure out the starting point
  in the search-for-a-free-fd loop in fdalloc() so it reads better next to
  the min() in the previous line.
- Don't grow nfiles in steps up to the size needed if we dup2() to some
  really large number.  Go ahead and double 'nfiles' in a loop prior
  to doing the malloc().
- malloc() doesn't need Giant now.
- Use malloc() and free() instead of MALLOC() and FREE() in fdalloc().
- Check to see if the size we are going to grow to is too big, not if the
  current size of the fd table is too big in the loop in fdalloc().  This
  means if we are out of space or if dup2() requests too high of a fd,
  then we will return an error before we go off and try to allocate some
  huge table and copy the existing table into it.
- Move all of the logic for dup'ing a file descriptor into do_dup() instead
  of putting some of it in do_dup() and duplicating other parts in four
  different places.  This makes dup(), dup2(), and fcntl(F_DUPFD) basically
  wrappers of do_dup now.  fcntl() still has an extra check since it uses
  a different error return value in one case then the other functions.
- Add a KASSERT() for an assertion that may not always be true where the
  fdcheckstd() function assumes that falloc() returns the fd requested and
  not some other fd.  I think that the assertion is always true because we
  are always single-threaded when we get to this point, but if one was
  using rfork() and another process sharing the fd table were playing with
  the fd table, there might could be a problem.
- To handle the problem of a file descriptor we are dup()'ing being closed
  out from under us in dup() in general, do_dup() now obtains a reference
  on the file in question before calling fdalloc().  If after the call to
  fdalloc() the file for the fd we are dup'ing is a different file, then
  we drop our reference on the original file and return EBADF.  This
  race was only handled in the dup2() case before and would just retry
  the operation.  The error return allows the user to know they are being
  stupid since they have a locking bug in their app instead of dup'ing
  some other descriptor and returning it to them.

Tested on: i386, alpha, sparc64

22 years agoDon't try (and fail) to fchmod /dev/stdout. Revert the manual page
fanf [Tue, 3 Sep 2002 19:37:23 +0000 (19:37 +0000)]
Don't try (and fail) to fchmod /dev/stdout. Revert the manual page
to suggest the portable alternative to -p.

PR: 42356
Submitted by: Kimura Fuyuki <fuyuki@hadaly.org>
MFC after: 1 week

22 years ago- Move $FreeBSD$ to the top of the file.
jhb [Tue, 3 Sep 2002 19:21:39 +0000 (19:21 +0000)]
- Move $FreeBSD$ to the top of the file.
- Fix a few grammar bogons.
- Add a small style guide.

Reviewed by: bde (a while ago)

22 years agoAdd some KASSERT()'s to ensure that we don't perform spin mutex ops on
jhb [Tue, 3 Sep 2002 18:25:16 +0000 (18:25 +0000)]
Add some KASSERT()'s to ensure that we don't perform spin mutex ops on
sleep mutexes and vice versa.  WITNESS normally should catch this but
not everyone uses WITNESS so this is a fallback to catch nasty but easy
to do bugs.

22 years agoAdhere to guidelines when testing for null strings.
eric [Tue, 3 Sep 2002 17:39:26 +0000 (17:39 +0000)]
Adhere to guidelines when testing for null strings.

Submitted by: rwatson

22 years agoRemove aic7xxx from the module build framework until all bootstrapping
gibbs [Tue, 3 Sep 2002 16:54:48 +0000 (16:54 +0000)]
Remove aic7xxx from the module build framework until all bootstrapping
issues are resolved.

22 years agonfsd doesn't die on SIGTERM but on SIGUSR1, correct script to kill nfsd with
gordon [Tue, 3 Sep 2002 16:02:57 +0000 (16:02 +0000)]
nfsd doesn't die on SIGTERM but on SIGUSR1, correct script to kill nfsd with
the right signal.

22 years agoDon't need to install the signal trampoline here anymore.
jake [Tue, 3 Sep 2002 14:59:41 +0000 (14:59 +0000)]
Don't need to install the signal trampoline here anymore.