Commit Graph

30053 Commits

Author SHA1 Message Date
Robert Watson
74237f55b0 Part I: Update extended attribute API and ABI:
o Modify the system call syntax for extattr_{get,set}_{fd,file}() so
  as not to use the scatter gather API (which appeared not to be used
  by any consumers, and be less portable), rather, accepts 'data'
  and 'nbytes' in the style of other simple read/write interfaces.
  This changes the API and ABI.

o Modify system call semantics so that extattr_get_{fd,file}() return
  a size_t.  When performing a read, the number of bytes read will
  be returned, unless the data pointer is NULL, in which case the
  number of bytes of data are returned.  This changes the API only.

o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t
  argument so as to return the size, if desirable.  If set to NULL,
  the size will not be returned.

o Update various filesystems (pseodofs, ufs) to DTRT.

These changes should make extended attributes more useful and more
portable.  More commits to rebuild the system call files, as well
as update userland utilities to follow.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-02-10 04:43:22 +00:00
Warner Losh
27d4dd7420 o Use bus_generic_setup_intr instead of bus_setup_intr.
o Call bus_generic_setup_intr and check its return value.  Don't setup
  func until we successfully get the interrupt from our parent.
o Add comments about some maybe questionable stuff so I can check later
  to make sure that it really is that way.
2002-02-10 03:34:44 +00:00
Warner Losh
cebd67fba3 o Use INTR_TYPE_AV (the highest possible) rather than INTR_TYPE_BIO
o Don't allow INTR_TYPE_FAST.  Since we are sharing the interrupt between
  CSC and the functions, they can't be FAST because fast interrupts can't
  be shared.
o Add the same workaround for resume that we have in OLDCARD.
o Also, return the error from bus_generic_resume rather than ignoring it.
2002-02-10 03:28:37 +00:00
Poul-Henning Kamp
d63e76cc21 It's OK to be pedantic, but long long literals are OK. 2002-02-10 02:30:53 +00:00
Poul-Henning Kamp
b6e1c37356 Remove di_inumber since LFS is long gone. 2002-02-10 00:55:49 +00:00
Warner Losh
5e0cb3e9d3 Boot verbosify printing the CIS, since we don't normally need to do that. 2002-02-09 21:34:06 +00:00
Warner Losh
344284854e Make unsupported memory range message bootverbose only 2002-02-09 21:32:02 +00:00
KATO Takenori
d3a257ce08 Recognize VIA C3 Samuel 2.
MFC after:	3 days
2002-02-09 05:18:01 +00:00
Julian Elischer
237a8a02da Replace accidentally removed setrunqueue()
solves problem with machines failing to sync in booting.
Submitted by: Tor.Egge@cvsup.no.freebsd.org
2002-02-09 01:38:16 +00:00
John Baldwin
18fc2ba9ff Use the mtx_owner() macro in one spot in _mtx_lock_sleep() to make the
code easier to read.
2002-02-09 00:12:53 +00:00
Thomas Moestl
2333d112fb Fix a bug introduced in r. 1.28: when copy{in,out} would fail for an
iovec that was not the last one in the uio, the error would be ignored
silently.

Bug found and fix proposed by:	jhb
2002-02-08 20:19:44 +00:00
John Baldwin
289da3dd99 Apparently during the KSE M2 commit bzero() on the i386 was changed so that
it's first parameter was volatile.  Catch i486_bzero() and i586_bzero()'s
prototypes up to this to quiet warnings.
2002-02-08 19:16:47 +00:00
John Baldwin
2deac418f3 Don't grab the ICU lock while reading the current pending interrupts and
current masked interrupts from the AT PIC.

Requested by:	bde
2002-02-08 18:30:36 +00:00
John Baldwin
6c2b6a945d Turn SMP back on by default in GENERIC on the Alpha. 2002-02-08 18:25:07 +00:00
John Baldwin
0730d79121 Turn interrupt thread preemption back on on the alpha.
Tested by:	mjacob
2002-02-08 18:23:46 +00:00
Yoshihiro Takahashi
4d42fb0aab MFi386: revisions 1.493 and 1.494. 2002-02-08 11:14:16 +00:00
Peter Wemm
1037bbb195 Fix broken Giant locking protocol introduced in rev 1.114. You cannot
unlock Giant if it is not locked in the first place.  This make the
nfstat(2) syscall (#278) a nice panic(2) implementation.
2002-02-08 09:16:57 +00:00
Peter Wemm
fe0d0493ac Bah, I managed to turn cosmetic things into real bugs. Fix shadowed
variable declarations. :-(  Definately not my day today.
2002-02-08 08:56:01 +00:00
Warner Losh
d0036d6ebc Remove bogus range restrictions that attempted to restrict the range
of I/O in 1.5.  It looks like I got it right only for some of the
cases.  Instead, allow ISA addresses as a special case.  Most PCI
bridges decode this range.  I need to investigate PCI bridges better
to know if this is always true or not, but for now assume that it is
since that seems to be the most common case.

# We need to allocate addresses better for the pccard stuff...

Submitted by: phk, mitsunaga-san
2002-02-08 07:31:02 +00:00
Robert Watson
143bb598d0 o Merge various recent fixes from the MAC branch relating to extattrctl():
- Fix null-pointer dereference introduced when snapshotting
	  was introduced.  This occured because unlike the previous code,
	  vn_start_write() doesn't always return a non-NULL mp, as
	  filesystems may not support the VOP_GETWRITEMOUNT() call.  For
	  now, rely on two pointers, so that vn_finished_write() works
	  properly.
	- Fix locking problems on exit, introduced at some past time,
	  some when snapshots came in, where a vnode might not be
	  unlocked before being vrele'd in various error situations.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-02-08 05:58:41 +00:00
Peter Wemm
a060acb154 Fix world breakage (compiling libstdc++):
sys/time.h:137: integer constant out of range
sys/time.h:137: warning: decimal integer constant is so large that it is unsigned
sys/time.h:153: integer constant out of range
sys/time.h:153: warning: decimal integer constant is so large that it is unsigned
2002-02-08 03:55:37 +00:00
Peter Wemm
de9ac44a24 Fix a fatal trap when using ksched_setscheduler() (eg: mozilla, netscape
etc) which use:  td->td_last_kse->ke_flags |= KEF_NEEDRESCHED;
2002-02-08 02:56:10 +00:00
Mike Smith
aafdbb39dc Add a helper script used to take an Intel-supplied ACPI CA drop and make it
ready for importing.  This should save me from my own over-cleanliness.
2002-02-08 02:16:45 +00:00
Julian Elischer
045e854101 remove superfluous blank line 2002-02-08 01:38:32 +00:00
Peter Wemm
2b8a08af6b Fix a couple of style bugs introduced (or touched by) previous commit. 2002-02-07 23:06:26 +00:00
Peter Wemm
2d008b444d Fix a whole bunch of long lines introduced by previous commit by using
td = FIRST_THREAD_IN_PROC(p) once, after we have identified the process
that we are operating on.
2002-02-07 23:05:40 +00:00
Peter Wemm
c2e42439ad Fix a long line touched in previous commit (but not caused by previous
commit)
2002-02-07 23:03:41 +00:00
Peter Wemm
620080d0c7 Attempt to patch up some style bugs introduced in the previous commit 2002-02-07 22:40:34 +00:00
Peter Wemm
1edc7ddee9 Attempt to unmangle some code touched in the previous commit. 2002-02-07 22:36:19 +00:00
Peter Wemm
588e970c0b Fix a long line introduced in previous commit. 2002-02-07 22:29:41 +00:00
Peter Wemm
3953037ff8 Fix long line added in previous commit. 2002-02-07 22:28:24 +00:00
Peter Wemm
6e948886d3 Patch up some long lines introduced in previous commit. 2002-02-07 22:26:51 +00:00
Peter Wemm
2850a06d42 Fix style bug introduced in previous commit. 2002-02-07 22:26:07 +00:00
Kirk McKusick
b06051cf7c Occationally background fsck would cause a spurious ``freeing free
inode'' panic. This change corrects that problem by setting the
fs_active flag when the inode map changes to notify the snapshot
code that the cylinder group must be rescanned.

Submitted by:	Robert Watson <rwatson@FreeBSD.org>
2002-02-07 22:13:56 +00:00
Matt Jacob
280304eb49 Replace a few more lines of code orphaned by MFREE going away.
MFC after:	1 day
2002-02-07 22:08:32 +00:00
Matt Jacob
943e9b67f5 You cannot take the address of a variable with the 'register' qualifier.
MFC after:	1 day
2002-02-07 22:06:23 +00:00
Poul-Henning Kamp
d627bedae5 Remove the inline assembly optimized versins of bintime_*() functions,
they have no measurable effect and they don't belong in an MI header
even if they did.
2002-02-07 21:57:28 +00:00
Poul-Henning Kamp
2028c0cdb9 Revise timercounters to use binary fixed point format internally.
The binary format "bintime" is a 32.64 format, it will go to 64.64
when time_t does.

The bintime format is available to consumers of time in the kernel,
and is preferable where timeintervals needs to be accumulated.

This change simplifies much of the magic math inside the timecounters
and improves the frequency and time precision by a couple of bits.

I have not been able to measure a performance difference which was not
a tiny fraction of the standard deviation on the measurements.
2002-02-07 21:21:55 +00:00
Julian Elischer
079b7badea Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.

Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
2002-02-07 20:58:47 +00:00
Poul-Henning Kamp
e0ee6f5629 GC the PC_SWITCH* symbols which are not used in assembly anymore. 2002-02-07 10:27:58 +00:00
Matt Jacob
2a62c7174a Replace the MFREE that Marshal (Quick Draw) Dillon apparently didn't look for.
MFC after:	1 day
2002-02-07 08:39:26 +00:00
Luigi Rizzo
273b222cdb Use ETHER_CRC_LEN instead of SIS_CRC_SIZE
Suggested-by: Archie, Doug Ambrisko
2002-02-07 08:04:24 +00:00
Luigi Rizzo
254d9d5f73 Fix a bug in the driver -- the chip will always include the CRC
in the received packet size, but the upper level routines want
the length without it.

Reported-by: Doug Ambrisko, ambrisko@freebsd.org
2002-02-07 07:47:00 +00:00
Warner Losh
fd173deae3 Remove DETACH_NOWARN 2002-02-07 06:43:29 +00:00
Warner Losh
3799207059 Get rid of the bogus DETACH_NOWARN and don't warn when asked to detach
a card that isn't there unless we're booting verbose.  It serves no
purpose.
2002-02-07 06:43:02 +00:00
Kirk McKusick
cfdaa88697 Occationally deleted files would hang around for hours or days
without being reclaimed. This bug was introduced in revision 1.95
dealing with filenames placed in newly allocated directory blocks,
thus is not present in 4.X systems. The bug is triggered when a
new entry is made in a directory after the data block containing
the original new entry has been written, but before the inode
that references the data block has been written.

Submitted by:	Bill Fenner <fenner@research.att.com>
2002-02-07 00:54:32 +00:00
Doug Ambrisko
4c2380660a Fix support for 630ET support. We don't need the Linux part to set the
mii access mode.  Fix the device ID and make it read the mac via sis_read_mac.

Reviewed by: 	imp
MFC after:	1 week
2002-02-06 22:06:47 +00:00
Julian Elischer
4ad88f2ca4 Make LINT compile after fruitless attempts to get the authors
to fix their code.

ata stuff:
Change name of ar_attach to not colide with existing ar_attach in if_ar.c.
usb stuff:
Create a dummy function to satisfy a call to it when in DEBUG mode.
2002-02-06 19:35:37 +00:00
John Baldwin
78a1485fd1 Fixes for alpha pmap on SMP machines:
- Create a private list of active pmaps rather than abusing the list of all
  processes when we need to look up pmaps.  The process list needs a sx lock
  and we can't be getting sx locks in the middle of cpu_switch()
  (pmap_activate() can call pmap_get_asn() from cpu_switch()).  Instead, we
  protect the list with a spinlock.  This also means the list is shorter
  since a pmap can be used by more than one process and we could (at least
  in thoery) dink with pmap's more than once, but now we only touch each
  pmap once when we have to update all of them.
- Wrap pmap_activate()'s code to get a new ASN in an explicit critical section
  so that when it is called while doing an exec() we can't get preempted.
- Replace splhigh() in pmap_growkernel() with a critical section to prevent
  preemption while we are adjusting the kernel page tables.
- Fixes abuse of PCPU_GET(), which doesn't return an L-value.
- Also adds some slight cleanups to the ASN handling by adding some macros
  instead of magic numbers in relation to the ASN and ASN generations.

Reviewed by:	dfr
2002-02-06 04:30:26 +00:00
Scott Long
fe94b852b3 Don't attach to Dell PERC2/QC cards that have a firmware rev of 1.x. This
check is complicated by the fact that the Adaptec 5400S cards claim to use
1.x firmware also.  PERC2/QC 1.x firmware is not compatible with this driver
and will cause a system hang.

MFC after:	3 days
2002-02-06 01:34:09 +00:00