]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoEnable the relaxed behavior for op regions and other workarounds for
njl [Fri, 3 Dec 2004 08:01:09 +0000 (08:01 +0000)]
Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.  We used to implement this in local patches but
now that ACPI-CA has merged/re-implemented most of our fixes, they were
no longer needed and we just needed to turn this knob on.  Also, remove
an unnecessary cast.

Tested by: phk

19 years agoAdd myself to the committers' birthday calendar
dumbbell [Fri, 3 Dec 2004 01:41:55 +0000 (01:41 +0000)]
Add myself to the committers' birthday calendar

Reviewed by: mux

19 years agoInclude <sys/signalvar.h> for trapsignal().
cognet [Thu, 2 Dec 2004 23:31:48 +0000 (23:31 +0000)]
Include <sys/signalvar.h> for trapsignal().

19 years agoClarify the structure element size ordering.
dds [Thu, 2 Dec 2004 23:20:17 +0000 (23:20 +0000)]
Clarify the structure element size ordering.

Obtained from: OpenBSD style.9 1.38

19 years agoFix import conflicts from tzdata2004g.
wollman [Thu, 2 Dec 2004 23:01:25 +0000 (23:01 +0000)]
Fix import conflicts from tzdata2004g.

Obtained from: ftp://elsie.nci.nih.gov/pub/tzdata2004g.tar.gz

19 years agoMake the tests runnable on a read-only src. To do this you must make sure
harti [Thu, 2 Dec 2004 17:00:58 +0000 (17:00 +0000)]
Make the tests runnable on a read-only src. To do this you must make sure
that you create one of the object directories make knows (see make(1)).
This uses the -C flag, so add a test that checks that make actually accepts
-C. Also fix the test that selects csh via the .SHELL target to work for
tcsh users too.

This commit renames shell_test to shell_test.sh. There is no history
to preserve so go without a repo-copy.

Reviewed by: ru

19 years agoAm I smoking crack? Correct stupid, wrong ASSERT -> if conversion and make
mlaier [Thu, 2 Dec 2004 15:47:15 +0000 (15:47 +0000)]
Am I smoking crack? Correct stupid, wrong ASSERT -> if conversion and make
it do what I had in mind.

Noticed by: glebius
Pointyhat to: me, myself and mlaier

19 years agoo Do not dump core in -W if dumpdates was not readable and ddatev == NULL.
maxim [Thu, 2 Dec 2004 13:56:53 +0000 (13:56 +0000)]
o Do not dump core in -W if dumpdates was not readable and ddatev == NULL.

PR: bin/69977

o Remove unused ddates_in.

Obtained from: NetBSD
MFC after: 3 weeks

19 years agoo Add a missed "." .
maxim [Thu, 2 Dec 2004 13:13:27 +0000 (13:13 +0000)]
o Add a missed "." .

Reviewed by: ru
MFC after: 3 weeks

19 years agoo Terminate an endless loop sh -T goes into in dowait() around waitproc().
maxim [Thu, 2 Dec 2004 13:12:43 +0000 (13:12 +0000)]
o Terminate an endless loop sh -T goes into in dowait() around waitproc().

XXX from Tor: "The shell can also go into a similar loop if the child was
killed by signal 127, since the shell would believe the child to have
only stopped (WIFSTOPPED() macro returns nonzero value).  Disallowing
signals 127 and 128 will fix that problem."  See kern/19402 for details.

PR: bin/66242
Submitted by: tegge
Analysis and testcase by: demon
MFC after: 3 weeks

19 years agoDrop ffree() as a separate function and incorporate the only place used.
phk [Thu, 2 Dec 2004 12:17:27 +0000 (12:17 +0000)]
Drop ffree() as a separate function and incorporate the only place used.

19 years agoStyle polishing.
phk [Thu, 2 Dec 2004 11:56:13 +0000 (11:56 +0000)]
Style polishing.

Use grepable functions
Other minor nitpickings.

19 years agoRemove the de_devvp and stop VREF'ing it for every vnode we create.
phk [Thu, 2 Dec 2004 10:09:33 +0000 (10:09 +0000)]
Remove the de_devvp and stop VREF'ing it for every vnode we create.

19 years agoSpecifically use the 32-bit version of fuword/suword since that's what
obrien [Thu, 2 Dec 2004 09:38:34 +0000 (09:38 +0000)]
Specifically use the 32-bit version of fuword/suword since that's what
we really want vs. the size changing 'long' (i386 vs. AMD64).
This fixes the problem with DRM with Radeon's on AMD64.

Submitted by: Jung-uk Kim <jkim@niksun.com>

19 years agoTurn ACPI and PCI devices off or to a lower power state in suspend and
njl [Thu, 2 Dec 2004 08:07:12 +0000 (08:07 +0000)]
Turn ACPI and PCI devices off or to a lower power state in suspend and
back on again in resume.  Override the default of D3 with the value the
BIOS specifies in _SxD, if present.  Skip serial devices (PNP05xx) since
they seem to hang when set to D3 and may require special driver support.
Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet
save/restore their config space and that seems to be necessary.

If this gives you trouble with suspend/resume, you can disable the new
ACPI and PCI power behavior separately with these tunables & sysctls:
    debug.acpi.do_powerstate
    hw.pci.do_powerstate

Approved by: imp (pci)
Tested by: acpi@ (numerous)

19 years agoAdd the ACPI_PWR_FOR_SLEEP method. It takes a device and outputs the
njl [Thu, 2 Dec 2004 08:04:57 +0000 (08:04 +0000)]
Add the ACPI_PWR_FOR_SLEEP method.  It takes a device and outputs the
appropriate power (Dx) state, if the BIOS suggests one.

MFC after: 3 weeks

19 years agoFor efficiency eliminate the call to pmap_pte() from pmap_protect()'s and
alc [Thu, 2 Dec 2004 04:06:40 +0000 (04:06 +0000)]
For efficiency eliminate the call to pmap_pte() from pmap_protect()'s and
pmap_remove()'s inner loop.  Instead, call pmap_pde_to_pte(), a new
function, prior to the inner loop.

Reviewed by: peter@, tegge@

19 years agoFor efficiency move the call to pmap_pte_quick() out of pmap_protect()'s
alc [Thu, 2 Dec 2004 03:29:17 +0000 (03:29 +0000)]
For efficiency move the call to pmap_pte_quick() out of pmap_protect()'s
and pmap_remove()'s inner loop.

Reviewed by: peter@, tegge@

19 years agoCatch up with AcpiOsSleep() interface change.
marks [Thu, 2 Dec 2004 00:25:35 +0000 (00:25 +0000)]
Catch up with AcpiOsSleep() interface change.
Catch up with some #define's renaming.
Implement AcpiOsGetTimer() as per ACPI 3.0.

Approved by: njl
MFC after: 1 week

19 years agoThis commit was generated by cvs2svn to compensate for changes in r138298,
marks [Thu, 2 Dec 2004 00:12:19 +0000 (00:12 +0000)]
This commit was generated by cvs2svn to compensate for changes in r138298,
which included commits to RCS files with non-trunk default branches.

19 years agoOops, remove unnecessary cast in original, out-commented code.
marks [Thu, 2 Dec 2004 00:12:19 +0000 (00:12 +0000)]
Oops, remove unnecessary cast in original, out-commented code.
This was a debug leftover.

MFC after: 1 week

19 years agoThis commit was generated by cvs2svn to compensate for changes in r138296,
marks [Thu, 2 Dec 2004 00:05:02 +0000 (00:05 +0000)]
This commit was generated by cvs2svn to compensate for changes in r138296,
which included commits to RCS files with non-trunk default branches.

19 years agoLocal change: Supporting code not yet available, use previous behavior
marks [Thu, 2 Dec 2004 00:05:02 +0000 (00:05 +0000)]
Local change: Supporting code not yet available, use previous behavior
instead for the time being. Intel should fix this.

Note that if this commit is correct, it is made on the vendor branch.
We expect the Intel folks to fix it, and we don't want to unnecessarily
take files off the vendor branch.

Approved by: njl
MFC after: 1 week

19 years agoLocal change: Remove warnings from vendor files.
marks [Wed, 1 Dec 2004 23:42:21 +0000 (23:42 +0000)]
Local change: Remove warnings from vendor files.

Approved by: njl
MFC after: 1 week

19 years agoLocal change: In the resume path, give up after waiting for a while
marks [Wed, 1 Dec 2004 23:40:48 +0000 (23:40 +0000)]
Local change:  In the resume path, give up after waiting for a while
for WAK_STS to be set.  Some BIOSs never set it.

Approved by: njl
MFC after: 1 week

19 years agoLocal change: Put various debugging options under ACPI_DISASSEMBLER.
marks [Wed, 1 Dec 2004 23:39:45 +0000 (23:39 +0000)]
Local change:  Put various debugging options under ACPI_DISASSEMBLER.

Approved by: njl
MFC after: 1 week

19 years agoUnchanged files that are off the vendor branch.
marks [Wed, 1 Dec 2004 23:34:39 +0000 (23:34 +0000)]
Unchanged files that are off the vendor branch.

Approved by: njl
MFC after: 1 week

19 years agoDo not leave build droppings in /usr/src for usr.sbin/pcvt/keycap and
peter [Wed, 1 Dec 2004 23:23:14 +0000 (23:23 +0000)]
Do not leave build droppings in /usr/src for usr.sbin/pcvt/keycap and
usr.bin/lex/lib for the 32 bit libraries on amd64.  Add an explicit
obj for these two directories that are built in for the "libraries" target.

19 years agoBack when VOP_* was introduced, we did not have new-style struct
phk [Wed, 1 Dec 2004 23:16:38 +0000 (23:16 +0000)]
Back when VOP_* was introduced, we did not have new-style struct
initializations but we did have lofty goals and big ideals.

Adjust to more contemporary circumstances and gain type checking.

Replace the entire vop_t frobbing thing with properly typed
structures.  The only casualty is that we can not add a new
VOP_ method with a loadable module.  History has not given
us reason to belive this would ever be feasible in the the
first place.

Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc.

Give coda correct prototypes and function definitions for
all vop_()s.

Generate a bit more data from the vnode_if.src file:  a
struct vop_vector and protype typedefs for all vop methods.

Add a new vop_bypass() and make vop_default be a pointer
to another struct vop_vector.

Remove a lot of vfs_init since vop_vector is ready to use
from the compiler.

Cast various vop_mumble() to void * with uppercase name,
for instance VOP_PANIC, VOP_NULL etc.

Implement VCALL() by making vdesc_offset the offsetof() the
relevant function pointer in vop_vector.  This is disgusting
but since the code is generated by a script comparatively
safe.  The alternative for nullfs etc. would be much worse.

Fix up all vnode method vectors to remove casts so they
become typesafe.  (The bulk of this is generated by scripts)

19 years agoVendor import of Intel ACPI-CA 20041119
marks [Wed, 1 Dec 2004 23:14:10 +0000 (23:14 +0000)]
Vendor import of Intel ACPI-CA 20041119

19 years agoThis commit was generated by cvs2svn to compensate for changes in r138287,
marks [Wed, 1 Dec 2004 23:14:10 +0000 (23:14 +0000)]
This commit was generated by cvs2svn to compensate for changes in r138287,
which included commits to RCS files with non-trunk default branches.

19 years agoAdd nfs4 to list of net filesystems.
rees [Wed, 1 Dec 2004 22:05:50 +0000 (22:05 +0000)]
Add nfs4 to list of net filesystems.

Approved by: alfred

19 years agodon't confuse NFSMNT_ flags with MNT_ flags in statfs
rees [Wed, 1 Dec 2004 21:47:51 +0000 (21:47 +0000)]
don't confuse NFSMNT_ flags with MNT_ flags in statfs

Approved by: alfred

19 years agoFix unvalidated pointer dereference. This is FreeBSD-SA-04:17.procfs.
cperciva [Wed, 1 Dec 2004 21:33:02 +0000 (21:33 +0000)]
Fix unvalidated pointer dereference.  This is FreeBSD-SA-04:17.procfs.

19 years ago- Do a better job of handling any Dependent Functions (aka DPFs) that appear
jhb [Wed, 1 Dec 2004 21:05:02 +0000 (21:05 +0000)]
- Do a better job of handling any Dependent Functions (aka DPFs) that appear
  in the _PRS or _CRS of link devices.  If faced with multiple DPFs in a
  _PRS, we just use the first one.  We assume that if _CRS has DPF tags they
  only contain a single set since multiple DPFs wouldn't make any sense.  In
  practice, the only DPFs I've seen so far for link devices are that the one
  IRQ resource is surrounded by a DPF tag pair for no apparent reason, and
  this should handle that case fine now.
- Only allocate link structures for IRQ resources for link devices rather
  than allocating a link structure for every resource.

Reviewed by: njl
Tested by: phk

19 years agohpfs_lookup() should have a vop_cachedlookup_t prototype an corresponding
phk [Wed, 1 Dec 2004 20:24:01 +0000 (20:24 +0000)]
hpfs_lookup() should have a vop_cachedlookup_t prototype an corresponding
argument.

19 years agoRemove redundant functions (repo-copied from nfsclient) for dealing with
phk [Wed, 1 Dec 2004 20:18:56 +0000 (20:18 +0000)]
Remove redundant functions (repo-copied from nfsclient) for dealing with
fifos.

19 years agoCorrectly prototype union_write with vop_write_t, not vop_read_t.
phk [Wed, 1 Dec 2004 19:15:00 +0000 (19:15 +0000)]
Correctly prototype union_write with vop_write_t, not vop_read_t.

19 years agoScripted modification of vop_* prototypes to use typedefs.
phk [Wed, 1 Dec 2004 19:08:40 +0000 (19:08 +0000)]
Scripted modification of vop_* prototypes to use typedefs.

19 years agoDon't allow ISO images to be made that try to use boot.flp to boot as the
jhb [Wed, 1 Dec 2004 18:03:18 +0000 (18:03 +0000)]
Don't allow ISO images to be made that try to use boot.flp to boot as the
boot.flp in 5.3 and later is not self-contained and thus not suitable for
CD booting.  /boot/cdboot is now the only way to boot the install CDs.

MFC after: 2 weeks

19 years agoFix for a bug in nfs_mkdir() that called vrele() instead of vput()
rees [Wed, 1 Dec 2004 17:58:37 +0000 (17:58 +0000)]
Fix for a bug in nfs_mkdir() that called vrele() instead of vput()
in the error cases, causing panics.

Adapted from similar fix to NFSv3 mkdir submitted by Mohan Srinivasan mohans
at yahoo-inc dot com

Approved by: alfred

19 years agoRemove a double test for the same ptr != NULL and use the official
harti [Wed, 1 Dec 2004 17:44:04 +0000 (17:44 +0000)]
Remove a double test for the same ptr != NULL and use the official
macro for this; reorder an if.

19 years agoIf a thread is resumed by thr_wake, it should return 0, especially it
davidxu [Wed, 1 Dec 2004 13:50:04 +0000 (13:50 +0000)]
If a thread is resumed by thr_wake, it should return 0, especially it
should not return ERESTART after it caught a signal, otherwise
thr_wake() call will be lost, also a timeout wait should not be
restarted. Final, using wakeup not wakeup_one to be safeness.

19 years agoMechanically change prototypes for vnode operations to use the new typedefs.
phk [Wed, 1 Dec 2004 12:24:41 +0000 (12:24 +0000)]
Mechanically change prototypes for vnode operations to use the new typedefs.

19 years agoThe following code sets up two connected TCP sockets that send data to each
nik [Wed, 1 Dec 2004 12:12:12 +0000 (12:12 +0000)]
The following code sets up two connected TCP sockets that send data to each
other until the window is closed. Then one of the sockets is closed, which
will generate a RST once the TCP at the other socket does a window probe.

All versions of FreeBSD prior to 11/26/2004 will ignore this RST into a 0
window, causing the connection (and application) to hang indefinitely.
On patched versions of FreeBSD (and other operating systems), the RST
will be accepted and the program will exit in a few seconds.

Submitted by: Michiel Boland
Reviewed by: silby

19 years agoMechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/g.
glebius [Wed, 1 Dec 2004 11:56:32 +0000 (11:56 +0000)]
Mechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/g.
This is done to keep both versions in RELENG_5 and support both APIs.

Reviewed by: scottl
Approved by: julian (mentor), implicitly

19 years agoemit a "typedef vop_foo_t(struct vop_foo_args *);" which we can use
phk [Wed, 1 Dec 2004 11:51:20 +0000 (11:51 +0000)]
emit a "typedef vop_foo_t(struct vop_foo_args *);" which we can use
to prototype VOP functions with.

19 years agoStyle: remove a lot of unnecessary casts, add some and spell the null
harti [Wed, 1 Dec 2004 10:29:20 +0000 (10:29 +0000)]
Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after

19 years agoWe already have a lock initialization function, use that for fdesc_mtx
phk [Wed, 1 Dec 2004 09:42:35 +0000 (09:42 +0000)]
We already have a lock initialization function, use that for fdesc_mtx
also.

Polish badfo stuff.

19 years agoCollect the stuff for the /dev/fd/{%d,std{in,out,err}} pseudo-device
phk [Wed, 1 Dec 2004 09:29:31 +0000 (09:29 +0000)]
Collect the stuff for the /dev/fd/{%d,std{in,out,err}} pseudo-device
driver at the bottom of the file.

19 years ago"nfiles" is a bad name for a global variable. Call it "openfiles" instead
phk [Wed, 1 Dec 2004 09:22:26 +0000 (09:22 +0000)]
"nfiles" is a bad name for a global variable.  Call it "openfiles" instead
as this is more correct and matches the sysctl variable.

19 years agoStyle: move data to top of file.
phk [Wed, 1 Dec 2004 08:06:27 +0000 (08:06 +0000)]
Style: move data to top of file.

19 years agoAdd missing #include
phk [Wed, 1 Dec 2004 07:34:08 +0000 (07:34 +0000)]
Add missing #include

19 years agoFix a bunch of stack leaks. These were theoretically harmless, except that
scottl [Wed, 1 Dec 2004 07:17:57 +0000 (07:17 +0000)]
Fix a bunch of stack leaks.  These were theoretically harmless, except that
they would leave enough elements on the stack that if you escaped to the
loader prompt and then typed 'setenv', it would pull in all of the leaked
junk and cause an exception in the environment.  There still seems to be
3 leaked elements, but they don't appear to be coming from this file.

19 years agoFix for a race between lookup and readdirplus, that causes
ps [Wed, 1 Dec 2004 06:51:07 +0000 (06:51 +0000)]
Fix for a race between lookup and readdirplus, that causes
a deadlock (with NFS exclusive vnode locks enabled). Lookup
grabs the parent's lock and wants to lock child. Readdirplus
locks the child and wants to lock parent (for loading the attrs
for ".."). The fix is to not load the attrs for ".." in
readdirplus.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoClean all dirty pages (dirtied by mmap'ed writes) in nfs_close().
ps [Wed, 1 Dec 2004 06:48:54 +0000 (06:48 +0000)]
Clean all dirty pages (dirtied by mmap'ed writes) in nfs_close().
This closes a major hole in close-to-open consistency support.
Added a new sysctl so that this can be disabled for single NFS
client applications with very large amounts of mmap'ed IO (for
performance).

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoFix for a (blocks) underrun bug where negative values were being
ps [Wed, 1 Dec 2004 06:42:21 +0000 (06:42 +0000)]
Fix for a (blocks) underrun bug where negative values were being
returned back to df from a statfs call. Causing df to print negative
values.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoChange gdb_cpu_setreg() to not take the value to which to set the
marcel [Wed, 1 Dec 2004 06:40:35 +0000 (06:40 +0000)]
Change gdb_cpu_setreg() to not take the value to which to set the
specified register, but a pointer to the in-memory representation of
that value. The reason for this is twofold:
1. Not all registers can be represented by a register_t. In particular
   FP registers fall in that category. Passing the new register value
   by reference instead of by value makes this point moot.
2. When we receive a G or P packet, both are for writing a register,
   the packet will have the register value in target-byte order and
   in the memory representation (modulo the fact that bytes are sent
   as 2 printable hexadecimal numbers of course). We only need to
   decode the packet to have a pointer to the register value.

This change fixes the bug of extracting the register value of the P
packet as a hexadecimal number instead of as a bit array. The quick
(and dirty) fix to bswap the register value in gdb_cpu_setreg() as
it has been added on i386 and amd64 can therefore be removed and has
in fact been that.

Tested on: alpha, amd64, i386, ia64, sparc64

19 years agoCompletely back out 1.37. Something else is going on and John wants to
njl [Wed, 1 Dec 2004 05:49:26 +0000 (05:49 +0000)]
Completely back out 1.37.  Something else is going on and John wants to
keep the locking and solve the real problem.

19 years agoRemove the last vestiges of the userconfig option. None of this actually
scottl [Wed, 1 Dec 2004 04:59:33 +0000 (04:59 +0000)]
Remove the last vestiges of the userconfig option.  None of this actually
did anything, so this commit should be considered a NO-OP.

19 years agoFix "Lock ACPI PCI link not exclusively locked
obrien [Wed, 1 Dec 2004 04:34:08 +0000 (04:34 +0000)]
Fix "Lock ACPI PCI link not exclusively locked
@sys/dev/acpica/acpi_pci_link.c:153" panic by backing out rev 1.37 in the SMP
case.  It appears that on a dual-proc machine the assertions in the rev 1.37
commit log hold true.

19 years agoImplement the check I was talking about in the previous message already.
mlaier [Tue, 30 Nov 2004 22:38:37 +0000 (22:38 +0000)]
Implement the check I was talking about in the previous message already.
Introduce domain_init_status to keep track of the init status of the domains
list (surprise). 0 = uninitialized, 1 = initialized/unpopulated, 2 =
initialized/done. Higher values can be used to support late addition of
domains which right now "works", but is potential dangerous. I choose to
only give a warning when doing so.

Use domain_init_status with if_attachdomain[1]() to ensure that we have a
complete domains list when we init the if_afdata array. Store the current
value of domain_init_status in if_afdata_initialized. This way we can update
if_afdata after a new protocol has been added (once that is allowed).

Submitted by: se (with changes)
Reviewed by: julian, glebius, se
PR: kern/73321 (partly)

19 years agoMove ng_socket and ng_btsocket initialization to SI_SUB_PROTO_DOMAIN as they
mlaier [Tue, 30 Nov 2004 22:28:50 +0000 (22:28 +0000)]
Move ng_socket and ng_btsocket initialization to SI_SUB_PROTO_DOMAIN as they
call net_add_domain(). Calling this function too early (or late) breaks
assertations about the global domains list.
Actually it should be forbidden to call net_add_domain() outside of
SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse
the domains list unprotected, but for now we allow late calls (mostly to
support netgraph). In order to really fix this we have to lock the domains
list in all places or find another way to ensure that we can safely walk the
list while another thread might be adding a new domain.

Spotted by: se
Reviewed by: julian, glebius
PR: kern/73321 (partly)

19 years agoRemove unused cnt variable for the SMP case. Trim some excessive blank
peter [Tue, 30 Nov 2004 20:25:46 +0000 (20:25 +0000)]
Remove unused cnt variable for the SMP case.  Trim some excessive blank
lines while here.

19 years agoRemove now unused variable.
njl [Tue, 30 Nov 2004 20:07:40 +0000 (20:07 +0000)]
Remove now unused variable.

Pointy hat: njl from nskyline_r35 at yahoo com

19 years agoadd myself as the contact for the pkg_install tools
eik [Tue, 30 Nov 2004 20:04:47 +0000 (20:04 +0000)]
add myself as the contact for the pkg_install tools

19 years agoRevert last change. It doesn't break mount(8) reporting
ru [Tue, 30 Nov 2004 19:36:40 +0000 (19:36 +0000)]
Revert last change.  It doesn't break mount(8) reporting
but allows a "nodev" in /etc/fstab, etc.

19 years agoDon't bother locking in attach(). At boot time, we're single-threaded
njl [Tue, 30 Nov 2004 17:48:10 +0000 (17:48 +0000)]
Don't bother locking in attach().  At boot time, we're single-threaded
anyway and for some reason, witness seems confused about what's already
locked and triggers a false panic.

19 years agoStylification: missing spaces, extra space after function names, casts
harti [Tue, 30 Nov 2004 17:46:29 +0000 (17:46 +0000)]
Stylification: missing spaces, extra space after function names, casts
and the sizeof operator, missing empty lines, void casts, extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Submitted by: Max Okumoto <okumoto@soe.ucsd.edu> (partly)

19 years agoUse ?= with WARNS.
wollman [Tue, 30 Nov 2004 16:41:40 +0000 (16:41 +0000)]
Use ?= with WARNS.

Requested by: ru

19 years agoMLINK crypto.4 to cryptodev.4
brueffer [Tue, 30 Nov 2004 16:16:34 +0000 (16:16 +0000)]
MLINK crypto.4 to cryptodev.4

Stumbled upon by: markus
MFC after: 3 days

19 years agoConstify the array of predefined shells. It turns out that we need two
harti [Tue, 30 Nov 2004 15:35:51 +0000 (15:35 +0000)]
Constify the array of predefined shells. It turns out that we need two
versions of the structure definition for this: one with const char
pointers, because otherwise gcc won't let us initialize the fields with
constant strings, and one without the const, because we need to work
with the structure.

19 years agoChmod the shell testscript to be executable if it isn't already. According
harti [Tue, 30 Nov 2004 15:33:18 +0000 (15:33 +0000)]
Chmod the shell testscript to be executable if it isn't already. According
to the CVS-Meisters x-mode just happens to work, but is not guaranteed to
do so. Try to be on the safe side.

19 years agoForgot to inline umtxq_unlock.
davidxu [Tue, 30 Nov 2004 12:18:53 +0000 (12:18 +0000)]
Forgot to inline umtxq_unlock.

19 years ago1. use per-chain mutex instead of global mutex to reduce
davidxu [Tue, 30 Nov 2004 12:02:53 +0000 (12:02 +0000)]
1. use per-chain mutex instead of global mutex to reduce
   lock collision.
2. Fix two race conditions. One is between _umtx_unlock and signal,
   also a thread was marked TDF_UMTXWAKEUP by _umtx_unlock, it is
   possible a signal delivered to the thread will cause msleep
   returns EINTR, and the thread breaks out of loop, this causes
   umtx ownership is not transfered to the thread. Another is in
   _umtx_unlock itself, when the function sets the umtx to
   UMTX_UNOWNED state, a new thread can come in and lock the umtx,
   also the function tries to set contested bit flag, but it will
   fail. Although the function will wake a blocked thread, if that
   thread breaks out of loop by signal, no contested bit will be set.

19 years agoInstead of just not defining a bunch of words when TESTMAIN is set, provide
scottl [Tue, 30 Nov 2004 11:35:30 +0000 (11:35 +0000)]
Instead of just not defining a bunch of words when TESTMAIN is set, provide
stubs that at least handle the stack correctly.  This makes it much easier to
experiment with loader scripts from userland.

19 years agoChange a couple of the primitve list functions to be macros. This changes
harti [Tue, 30 Nov 2004 10:35:04 +0000 (10:35 +0000)]
Change a couple of the primitve list functions to be macros. This changes
the semantic of Lst_Datum which formerly returned NULL when the argument
node was NULL. There was only one place in the source that relied on this
so change that place.

19 years agoAdd observations of the Linux98 and Grub/98 boot loaders. These
imp [Tue, 30 Nov 2004 09:40:11 +0000 (09:40 +0000)]
Add observations of the Linux98 and Grub/98 boot loaders.  These
observations lead me to believe that the convetion for pc98 boot
loaders is to have a jump unstruction, followed by a string, followed
by code.  The jump usually doesn't have a nop after it and usually the
string is NUL terminated, but Grub/98 breaks both of these rules.

# I looked for, but failed to find the Minux boot blocks for PC-9801 port.

19 years agoCreate a new definition, PSL_KERNSET, which is used for setting the
grehan [Tue, 30 Nov 2004 09:04:41 +0000 (09:04 +0000)]
Create a new definition, PSL_KERNSET, which is used for setting the
MSR in kernel mode. Redefine PSL_USERSET in terms of this by or'ing
in PSL_PR.

19 years agoReject tasting of this provider if the sector size isn't a multiple of
imp [Tue, 30 Nov 2004 08:00:14 +0000 (08:00 +0000)]
Reject tasting of this provider if the sector size isn't a multiple of
512.  If I had an audio cdrom in my cd player when I booted my system,
I'd get a panic from geom because you can't read 8192 bytes from an
audio cdrom.

Remove XXX comment about IPL1 and replace it with some information
from my soon to be published web page on the pc98 disk layout.  The
IPL1 test was the result of an observation of a disk with FreeBSD's
boot0 program.  It was testing part of an area what appears to be
reserved for a boot loader name, which comes after a jump over this
area.  I don't yet know if it is required to be any specific jump
instruction, or if the destination has to be location 11. [1]

[1] FreeBSD Press No. 13, page 115, poorly translated by myself.  The
picture there shows offset 8 as the destination of the jump, but
FreeBSD's boot0 program has three padding NULs after the IPL1 name and
uses a 16-bit 'jmp' instruction.

19 years agoMake sure the link array is big enough to hold both _CRS and _PRS
njl [Tue, 30 Nov 2004 06:55:43 +0000 (06:55 +0000)]
Make sure the link array is big enough to hold both _CRS and _PRS
resource lists.  It used to be sized based only on _CRS, hence _PRS could
perform an out-of-bounds access if it was larger (i.e., when there are
dependent functions).  Add asserts to detect this case.  Note, this is
only a temporary fix and I believe _PRS and _CRS should have separate
arrays.

Also, fix a typo where the wrong irq was being check for the APIC case.

Submitted by: tegge

19 years agoReplace a printf with a KASSERT that we are indeed running on the BSP.
njl [Tue, 30 Nov 2004 06:21:38 +0000 (06:21 +0000)]
Replace a printf with a KASSERT that we are indeed running on the BSP.

19 years agoMFamd64: Remove the cpu_reset_proxy cruft now that we run boot() on
njl [Tue, 30 Nov 2004 06:18:46 +0000 (06:18 +0000)]
MFamd64:  Remove the cpu_reset_proxy cruft now that we run boot() on
cpu 0.  Also, restructure cpu_reset to be cleaner (no functional change.)

19 years agoMakefile (only) changes to allow building a cross debugger.
marcel [Tue, 30 Nov 2004 05:12:37 +0000 (05:12 +0000)]
Makefile (only) changes to allow building a cross debugger.

19 years agoFix the build.
bms [Tue, 30 Nov 2004 03:23:35 +0000 (03:23 +0000)]
Fix the build.

19 years agos/MACHINE_ARCH/TARGET_ARCH/. We use TARGET_ARCH to pick the MD files
marcel [Tue, 30 Nov 2004 02:56:53 +0000 (02:56 +0000)]
s/MACHINE_ARCH/TARGET_ARCH/. We use TARGET_ARCH to pick the MD files
for libgdb and should do so here as well.

19 years agoUpdate the gdb register extraction support to use the pcb wherever
peter [Tue, 30 Nov 2004 00:55:49 +0000 (00:55 +0000)]
Update the gdb register extraction support to use the pcb wherever
possible, like on i386.  Registers are handled differently for caller
vs callee saved registers.

19 years agoSwitch from 1024hz to 1000hz on amd64 to match i386. 1024 is a bad
peter [Tue, 30 Nov 2004 00:25:26 +0000 (00:25 +0000)]
Switch from 1024hz to 1000hz on amd64 to match i386.  1024 is a bad
choice because it is so in sync with stathz (128hz or 4096hz etc).

19 years agoMFi386: join the %cr0 setup line now that i386 has lost the I386 ifdefs.
peter [Mon, 29 Nov 2004 23:27:07 +0000 (23:27 +0000)]
MFi386: join the %cr0 setup line now that i386 has lost the I386 ifdefs.

19 years agoTake advantage of the shutdown processing being wired to the BSP and
peter [Mon, 29 Nov 2004 23:25:56 +0000 (23:25 +0000)]
Take advantage of the shutdown processing being wired to the BSP and
eliminate the evil cpu_reset_proxy code now that it will never be
activated.  i386 should pick this up as well.

19 years agoIf soreceive() is called from a socket callback, there's no reason
ps [Mon, 29 Nov 2004 23:10:59 +0000 (23:10 +0000)]
If soreceive() is called from a socket callback, there's no reason
to do a window update to the peer (thru an ACK) from soreceive()
itself. TCP will do that upon return from the socket callback.
Sending a window update from soreceive() results in a lock reversal.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoMake soreceive(MSG_DONTWAIT) nonblocking. If MSG_DONTWAIT is passed into
ps [Mon, 29 Nov 2004 23:09:07 +0000 (23:09 +0000)]
Make soreceive(MSG_DONTWAIT) nonblocking. If MSG_DONTWAIT is passed into
soreceive(), then pass in M_DONTWAIT to m_copym(). Also fix up error
handling for the case where m_copym() returns failure.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoFix for a bug in nfs_mkdir() that called vrele() instead of vput()
ps [Mon, 29 Nov 2004 23:05:30 +0000 (23:05 +0000)]
Fix for a bug in nfs_mkdir() that called vrele() instead of vput()
in the error cases, causing panics.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoWhen upgrading the shared lock to an exclusive lock, if we discover
ps [Mon, 29 Nov 2004 22:58:32 +0000 (22:58 +0000)]
When upgrading the shared lock to an exclusive lock, if we discover
that the exclusive lock is already held, then we call panic. Don't
clobber internal lock state before panic'ing. This change improves
debugging if this case were to happen.

Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson

19 years agoAdd amd64 to the list of supported platforms.
ceri [Mon, 29 Nov 2004 19:51:50 +0000 (19:51 +0000)]
Add amd64 to the list of supported platforms.

PR: docs/74529
Submitted by: Jason Bacon <bacon at smithers dot neuro dot mcw dot edu>

19 years agoInstead of translating PCI to ACPI power states, just use a CTASSERT
njl [Mon, 29 Nov 2004 18:48:51 +0000 (18:48 +0000)]
Instead of translating PCI to ACPI power states, just use a CTASSERT
that they are equivalent.

19 years agoFixes a bug in SACK causing us to send data beyond the receive window.
ps [Mon, 29 Nov 2004 18:47:27 +0000 (18:47 +0000)]
Fixes a bug in SACK causing us to send data beyond the receive window.

Found by: Pawel Worach and Daniel Hartmeier
Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com

19 years agoSend NAS-IP-Address as well as NAS-Identifier
brian [Mon, 29 Nov 2004 17:11:15 +0000 (17:11 +0000)]
Send NAS-IP-Address as well as NAS-Identifier
Add ``disable NAS-IP-Address'' and ``disable NAS-Identifier'' options to
support pre-rfc2865 RADIUS servers.
This pushes our enable/disable items over the 32 bit limit, so reoganise
things to allow a bunch more options.
Go to version 3.4.1 so that any compatability problems can be identified.

19 years agoAttach the device at acpi_sony instead of acpi_snc. Rename some
imp [Mon, 29 Nov 2004 16:40:30 +0000 (16:40 +0000)]
Attach the device at acpi_sony instead of acpi_snc.  Rename some
internal variables as well to reflect the change.

19 years agoFix a bug that would truncate the full name of an archive member if
harti [Mon, 29 Nov 2004 16:23:34 +0000 (16:23 +0000)]
Fix a bug that would truncate the full name of an archive member if
the length of happens to be larger than MAXPATHLEN.

PR: bin/74368
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Obtained from: DragonFlyBSD