Commit graph

32774 commits

Author SHA1 Message Date
Warner Losh f60115a36c Define a PCI_INVALID_IRQ to augment PCI_INTERRUPT_VALID 2002-06-01 05:40:33 +00:00
Warner Losh 8ce1ab3a24 Use a common function to map the bogus intlines.
Don't require pin be non-zero before we map bogus intlines, always do it.
This fixes a number of problems on HP Omnibook computers.

Tested/Reviewed by: Brooks Davis
2002-06-01 05:14:11 +00:00
Brian S. Dean 181b15f9f8 Make a structure definition slightly more style(9) compliant (makes
the structure definition easier to find using grep).
2002-06-01 03:55:16 +00:00
Warner Losh c9579f73e0 Make this file mostly conform to style(9).
Approved by: msmith in principle before walkabout
2002-06-01 03:41:02 +00:00
Archie Cobbs f0184ff8e3 Fix GCC warnings caused by initializing a zero length array. In the process,
simply things a bit by getting rid of 'struct ng_parse_struct_info' which
was useless because it only contained one field.

MFC after:	2 weeks
2002-05-31 23:48:03 +00:00
Warner Losh cbcfdbcfe6 Quick, low impact band-aide to unbreak the build. Added && 0 so we
ifdef out what appears to be a bogus call to softintr using data
elements that aren't in the softc.
2002-05-31 23:39:04 +00:00
Eric Anholt 4956c7034c Warnings cleanup for gcc3. Also __FUNCTION__ -> __func__
Approved by:	des
2002-05-31 23:19:50 +00:00
Archie Cobbs 48d183faca Fix a bug in m_split(): the "m->m_ext.ext_size" field of an mbuf was being
set to zero. This field indicates the total space in the external buffer
and therefore should not be modified after the external buffer is added.

Add a comment warning that the mbufs returned by m_split() might be read-only.

Fix M_TRAILINGSPACE() to return zero if !M_WRITABLE(m).

Reviewed by:	freebsd-net
Obtained from:	Vernier Networks, Inc.
MFC after:	1 week
2002-05-31 22:09:57 +00:00
Hajimu UMEMOTO 0776834a11 __FreeBSD__ is not a compiler constant. We must use
__FreeBSD_version here.

Submitted by:	rwatson
2002-05-31 17:56:45 +00:00
Dag-Erling Smørgrav 7aa57dca57 Nit: kern.ttys is of type S,xtty, not S,tty. 2002-05-31 16:11:49 +00:00
Seigo Tanimura 4cc20ab1f0 Back out my lats commit of locking down a socket, it conflicts with hsu's work.
Requested by:	hsu
2002-05-31 11:52:35 +00:00
Robert Drehmel 280759e75e - Replace the bandaid introduced in revision 1.110 with
a better solution.
 - Add braces for a ``for'' statement containing a single
   multi-line statement.
2002-05-31 09:41:09 +00:00
Dag-Erling Smørgrav 8dcfdf3f80 Export nswapdev through sysctl(8).
Sponsored by:	DARPA, NAI Labs
2002-05-31 08:17:58 +00:00
Brooks Davis 09d225d8c3 The loop back device hasn't been a count device for a while so remove
the number of interfaces.
2002-05-31 06:28:13 +00:00
Mike Silbersack 54e84abb59 Ensure that packet counts are always reset to 0 when
a route is cloned.  Previously, they took on the count
of their parent route (which was sometimes nonzero.)

Submitted by:	Andre Oppermann <oppermann@pipeline.ch>
MFC after:	5 days
2002-05-31 04:27:51 +00:00
Alan Cox 9917e01041 Further work on pushing Giant out of the vm_map layer and down
into the vm_object layer:
 o Acquire and release Giant in vm_object_shadow() and
   vm_object_page_remove().
 o Remove the GIANT_REQUIRED assertion preceding vm_map_delete()'s call
   to vm_object_page_remove().
 o Remove the acquisition and release of Giant around vm_map_lookup()'s
   call to vm_object_shadow().
2002-05-31 03:48:55 +00:00
Warner Losh 6f20d5e68f Use __FreeBSD_version to test what things to use 2002-05-31 03:27:34 +00:00
Takanori Watanabe 6e8f09ca61 Fix build breakage on my pccard related commit. 2002-05-31 01:08:49 +00:00
Marcel Moolenaar 78dff92b6b Don't use an incomplete array type to mark the start of the padding
because the padding should be inserted before the array and not after
it, as is done by GCC 3.1. Instead use an explicit uint32_t field
to get what was intended and on top of that make the size of the
padding explicit. This also doesn't depend on a C99 feature.
While here, expand the comment. Just to make a point.

Pointed out by: fanf
2002-05-31 01:07:13 +00:00
Julian Elischer a86d27ac85 Add missing unlock
Submitted by: dirkx@covalent.net
2002-05-30 23:41:51 +00:00
Semen Ustimenko f576a00d1b Remove lock from ffs_vget introduced by v1.24. Instead of locking the
vnode creation globaly, we allow processes to create vnodes concurently.
In case of concurent creation of vnode for the one ino, we allow processes
to race and then check who wins.

Assuming that concurent creation of vnode for same ino is really rare case,
this is belived to be an improvement, as it just allows concurent creation
of vnodes.

Idea by:	bp
Reviewed by:	dillon
MFC after:	1 month
2002-05-30 22:04:17 +00:00
Garrett Wollman c7c5d95d56 Avoid unintentional trigraph. 2002-05-30 20:53:45 +00:00
Takanori Watanabe 154ce58548 Forget to change lookup function for oldcard side. 2002-05-30 18:48:44 +00:00
Takanori Watanabe 80f1001813 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
Poul-Henning Kamp eef633a71f Mistyped and lost a '&' in previous commit. 2002-05-30 16:26:39 +00:00
Poul-Henning Kamp fe71224650 Don't forget to factor in the boottime when we calculate PPS timestamps.
Submitted by:	Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp>
2002-05-30 10:34:01 +00:00
Jens Schweikhardt 730a2da5de Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after:	2 weeks
2002-05-30 09:24:01 +00:00
Doug Rabson 99bd783419 Move the definition of ElfN_Hashelt to common headers. The only platform
which has a different definition for this is alpha.
2002-05-30 08:32:18 +00:00
Alfred Perlstein 99b9331a4f Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:32:58 +00:00
Alfred Perlstein 524683999f correct commented out preprocessor test for i386 to __i386__ 2002-05-30 07:28:43 +00:00
Alfred Perlstein 8e5e1ed874 Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:13:40 +00:00
Marcel Moolenaar fd8706be29 Add compile time asserts for the size of struct gpt_hdr and struct
gpt_ent. Use offsetof() for struct gpt_hdr to exclude padding.
2002-05-30 06:33:07 +00:00
Jeff Roberson 7181624aaa Record the file, line, and pid of the last successful shared lock holder. This
is useful as a last effort in debugging file system deadlocks.  This is enabled
via 'options DEBUG_LOCKS'
2002-05-30 05:55:22 +00:00
Marcel Moolenaar 2e1cdcf311 o Remove GCC specific attribute packed.
o  Add incomplete array padding.
2002-05-30 05:44:23 +00:00
Julian Elischer 628855e758 CURSIG() is not a macro so rename it cursig().
Obtained from:	KSE tree
2002-05-29 23:44:32 +00:00
Jens Schweikhardt ece450c42f Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after:	2 weeks
2002-05-29 22:57:18 +00:00
David E. O'Brien 31741f8a9e PHK claims there is a crc32.c now. 2002-05-29 21:58:56 +00:00
Poul-Henning Kamp fc3f3f6575 For some reason this didn't get added in my previous commit. 2002-05-29 21:58:12 +00:00
David E. O'Brien 22f24d720a Back out revision 1.639. PHK filed to commit the libkern file. 2002-05-29 21:57:27 +00:00
Garrett Wollman b3ec920c0e Version bump for addition of dlfunc(3). 2002-05-29 21:04:25 +00:00
Julian Elischer 2d0231f5da diff reduction from KSE to keep WW-III from happenning on -current 2002-05-29 20:40:50 +00:00
Matthew Dillon 9424cbcf69 PR: kern/38208
X-MFC after:	immediate w/ release eng approval.
2002-05-29 20:25:59 +00:00
Poul-Henning Kamp f4258597dc Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
Jake Burkholder 626d38b529 Forgot to commit this file. Catch up to loader->kernel abi changes. 2002-05-29 19:48:03 +00:00
Jake Burkholder 8c7b34b8a3 Add needed include of queue.h. Remove unneeded include of smp.h. 2002-05-29 19:38:49 +00:00
Jake Burkholder f7e0360261 Forward declare struct trapframe. 2002-05-29 19:25:14 +00:00
Jake Burkholder 819c7d570b Remove BOOTP_WIRED_TO= since I keep forgetting to take this out and screwing
over people with gems.
2002-05-29 19:22:17 +00:00
David E. O'Brien 69d18565e0 Do not refer to the Intel PRO/1000 by its internal name.
Requested by:	pdeuskar
2002-05-29 18:42:26 +00:00
Brooks Davis 26722a1909 Restore the irq=0 => irq=255 hack to pci_cfgintr_search(). Just having
it in pci_cfgregread() wasn't sufficent on at least the HP Omnibook 500.

Reviewed by:	imp
2002-05-29 16:16:16 +00:00
Peter Wemm 7550be9c57 The kernel printf does not have %i 2002-05-29 08:25:13 +00:00
Jake Burkholder a2b4810ee7 Don't try to flush illegal alises from the data cache in vmapbuf and
vunmapbuf, this is handled by pmap now.
2002-05-29 06:16:47 +00:00
Jake Burkholder 20bd6675fb Add an MD page flag for tracking if a page is cacheable or not, so that
we don't flush all mappings of a physical page in order to make it
virtually cachable again, if it is already cachable.
2002-05-29 06:12:13 +00:00
Jake Burkholder 468303c500 Remove an unused variable. 2002-05-29 06:10:37 +00:00
Jake Burkholder 1982efc5c2 Merge the code in pv.c into pmap.c directly. Place all page mappings onto
the pv lists in the vm_page, even unmanaged kernel mappings.  This is so
that the virtual cachability of these mappings can be tracked when a page
is mapped to more than one virtual address.  All virtually cachable
mappings of a physical page must have the same virtual colour, or illegal
alises can be created in the data cache.  This is a bit tricky because we
still have to recognize managed and unmanaged mappings, even though they
are all on the pv lists.
2002-05-29 06:08:45 +00:00
Jake Burkholder e793e4d0b3 Add pv list linkage and a pmap pointer to struct tte. Remove separately
allocated pv entries and use the linkage in the tte for pv operations.
2002-05-29 05:56:05 +00:00
Jake Burkholder 35738638d6 Use a contrived 'tlb_entry' structure for passing the mappings for the
kernel text and data from the loader to the kernel, so that the tte format
is not part of the loader->kernel ABI.
2002-05-29 05:49:59 +00:00
Jake Burkholder b08270ba0f Remove pmap.pm_pvlist and make the functions that use it no-ops. These are
all optimizations for architectures which have large sparse page tables,
and/or can't put the pv linkage inside of the page table entries.
2002-05-29 05:24:16 +00:00
Marcel Moolenaar 60c6f9b332 Remove the definition of struct mca_guid and use the generic
struct uuid defined in <sys/uuid.h>.

Use uuid/UUID instead of guid/GUID to emphasize that the
identifiers are DCE version 1 identifiers and also to avoid
inconsistencies as much a possible.
2002-05-29 05:19:07 +00:00
Marcel Moolenaar ea71f12b92 Remove bktr for ia64. Same problem as vinum. See PR 38678. 2002-05-29 05:09:51 +00:00
Marcel Moolenaar ed323145fe Vinum doesn't build on ia64.
See PR: 38678
2002-05-29 04:51:14 +00:00
Marcel Moolenaar cd84983468 Add attribute packed to struct gpt_hdr to avoid unwanted padding at
the end of the struct to make it an integral number of "longs" on
64-bit architectures. The size of the struct must be 92, not 96.
2002-05-29 02:58:41 +00:00
Jake Burkholder d9f2757eaa Sync with i386. The loader was being installed before the beforeinstall
target, which conventiently moved it to loader.old, leaving no loader.
2002-05-28 23:09:59 +00:00
Josef Karthauser 43c6b63e82 NetBSD have adopted our usage of the DMAADDR macro:
date: 2002/05/28 12:42:39;  author: augustss;
    Change DMAADDR macro slightly.

Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
2002-05-28 20:51:43 +00:00
Søren Schmidt d9d34030a4 Use %02d in track numbers, so that 1 is 01, much easier for scripts 2002-05-28 17:39:17 +00:00
Bruce Evans 97be9f99d2 Fixed some style bugs in recent commits. 2002-05-28 15:24:13 +00:00
Dag-Erling Smørgrav 6b658142fd Add some checks to prevent NULL dereferences.
Submitted by:	jhay
2002-05-28 14:29:56 +00:00
Maxime Henrion 8eb0098f4c Remove a duplicated vfs_freeopts() that I introduced in last
revision.
2002-05-28 13:27:55 +00:00
Benno Rice c05529221e The stack is not at the top of the user struct. 2002-05-28 12:31:34 +00:00
Benno Rice 3cdee89f99 Remove an assertion as to whether the current thread already had the FPU or
not.  It may be desirable to put something similar back, but it's getting in
the way in it's current form.
2002-05-28 12:28:22 +00:00
Benno Rice 60ead00ef8 - Move macros that represent where syscall args are kept in a trapframe from
trap.c to frame.h
- Use the macros in vm_machdep.c:cpu_fork() to set up the trap frame of the
  new thread.
2002-05-28 12:24:29 +00:00
Benno Rice 8e36f0ec3f Remove the old prototype for kcopy. It's in cpu.h now. 2002-05-28 09:38:02 +00:00
Marcel Moolenaar bcd46c600a Add support to GEOM for GUID Partition Tables (GPTs). The support
is currently conditional on both the GEOM and GEOM_GPT options to
avoid getting GPT by default and having the MBR and GPT classes
clash.
The correct behaviour of the MBR class would be to back-off (reject)
a MBR if it's a Protective MBR (a MBR with a single partition of type
0xEE that spans the whole disk (as far as the MBR is concerned).
The correct behaviour if the GPT class would be to back-off (reject)
a GPT if there's a MBR that's not a Protective MBR.

At this stage it's inconvenient to destroy a good MBR when working
with GPTs that it's more convenient to have the MBR class back-off
when it detects the GPT signature on disk and have the GPT class
ignore the MBR.

In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions
have been defined:

GPT_ENT_TYPE_FREEBSD
	FreeBSD slice with disklabel. This is the equivalent of
	the well-known FreeBSD MBR partition type.
GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM}
	FreeBSD partitions in the context of disklabel. This is
	speculating on the idea to use the GPT to hold partitions
	instead if slices and removing the fixed (and low) limits
	we have on the number of partitions.

This commit lacks a GPT image for the regression suite.
2002-05-28 09:04:48 +00:00
Benno Rice 25e2288dd7 Implement pmap_copy and pmap_copy_page. 2002-05-28 07:38:55 +00:00
Benno Rice 37d87c9ff8 Move the kcopy() function from trap.c to machdep.c. Add a prototype. 2002-05-28 07:36:36 +00:00
Dag-Erling Smørgrav 6c533ac713 Add NAI copyright. 2002-05-28 06:53:41 +00:00
Dag-Erling Smørgrav b0405a2ad3 Back out part of previous commit; the dev_t union trick is still useful in
the kvm case.
2002-05-28 06:34:28 +00:00
Marcel Moolenaar 52183d0145 Add uuidgen(2) and uuidgen(1).
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.

From the Perforce logs (change 11995):

Round of cleanups:
o  Give uuidgen() the correct prototype in syscalls.master
o  Define struct uuid according to DCE 1.1 in sys/uuid.h
o  Use struct uuid instead of uuid_t. The latter is defined
   in sys/uuid.h but should not be used in kernel land.
o  Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
   to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o  Rename the non-standard struct uuid in kern/kern_uuid.c
   to struct uuid_private and give it a slightly better definition
   for better byte-order handling. See below.
o  In sys/gpt.h, fix the broken uuid definitions to match the now
   compliant struct uuid definition. See below.
o  In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.

A note about byte-order:
        The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
2002-05-28 06:16:08 +00:00
Marcel Moolenaar 494eefd86b Add syscall uuidgen() for generating Univerally Unique Identifiers
(UUIDs). On ia64 UUIDs, aka GUIDs, are used by EFI and the firmware
among others. To create GUID Partition Tables (GPTs), we need to
be able to generate UUIDs.
2002-05-28 05:58:06 +00:00
Dag-Erling Smørgrav 1a149fcd67 Introduce struct xtty, used when exporting tty information to userland.
Make kern.ttys export a struct xtty rather than struct tty.  Since struct
tty is no longer exposed to userland, remove the dev_t / udev_t hack.

Sponsored by:	DARPA, NAI Labs
2002-05-28 05:40:53 +00:00
Alan Cox 8f2ba19c90 o Remove unused #defines. 2002-05-27 22:10:28 +00:00
Benno Rice 31956eeb9e Print srr1 in printtrap()
Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:20:19 +00:00
Benno Rice 31c82d0332 Get the correct memory regions from OpenFirmware. We were getting the
"available" ranges, not the "physical" ranges.  Clean up some of the
bootstrap code in the process.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:18:12 +00:00
Benno Rice 7ed61facaa Use correct types in [sf]uword32. 2002-05-27 10:50:47 +00:00
Dima Dorfman ad308c10c7 Don't tsleep() with an sb_mtx held. 2002-05-27 05:20:15 +00:00
Mike Barcroft aa37be50ad Use underscored variant of BYTE_ORDER and friends to allow this to
work in a !__BSD_VISIBLE environment.
2002-05-27 00:55:17 +00:00
Josef Karthauser ca3971124e Regen. 2002-05-27 00:01:21 +00:00
Josef Karthauser b826a68b7f Add a couple of new aue ethernet adapters from NetBSD:
ELECOM LDUSBLTX
	IODATA USBETTXS
2002-05-27 00:00:48 +00:00
Josef Karthauser 12d2a2a729 Use aue_lookup for looking up devices. 2002-05-26 23:54:37 +00:00
Josef Karthauser 5908b50130 Correct the usage of DMAADDR in a piece of '#if 0'd code. (The compiler
didn't pick it up.)
2002-05-26 22:13:09 +00:00
Josef Karthauser cc12206976 MFNetBSD:
revision 1.124
    date: 2002/05/26 03:10:02;  author: minoura;  state: Exp;  lines: +3 -3
    Clear done_head in the HCCA *before* acknoledging the interrupt.
    Driver lost some completed transfers under heavy loads.
2002-05-26 22:11:34 +00:00
Josef Karthauser 883d14d6c6 MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)
date: 2002/05/19 06:24:31;  author: augustss;  state: Exp;
    Update dma memory access API a little.

NetBSD have adopted our way of using the KERNADDR macro.  Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
2002-05-26 22:00:06 +00:00
Poul-Henning Kamp 291daf5735 Add a proof-of-concept encryption class.
"The only hard problem in cryptography is key-management."

All sectors are encrypted with AES in CBC mode using a constant key,
currently compiled in and all zero.

To activate this module, write the magic header on the partition:

	echo "<<FreeBSD-GEOM-AES>>" | dd conv=sync of=/dev/md98

The encrypted device will be one sector shorter and have ".aes"
appended to its name.

Sponsored by: DARPA & NAI Labs.
2002-05-26 18:14:38 +00:00
Poul-Henning Kamp d4116af4f9 Give the closet-dev_t we hand to the diskdrivers a name. 2002-05-26 17:35:14 +00:00
Poul-Henning Kamp 855f8b26f2 Only clear the spoiled flag if the class had no spoiled method, the spoiled
method may have deallocated the consumer already and modifying free()'ed
memory is bad style.

Sponsored by: DARPA & NAI Labs.
2002-05-26 17:17:25 +00:00
Doug Rabson 396a429cfd Add declarations of suword32 and suword64. Add implementations of one or
the other (or both) to all the platforms. Similar for fuword32 and
fuword64.
2002-05-26 16:03:13 +00:00
Jake Burkholder a6b82b31b1 Remove a hack for using an external compiler if cross compiling. 2002-05-26 15:55:28 +00:00
Dag-Erling Smørgrav 7b856994fd Make sure there's a statement after the out: label in clockattach(). 2002-05-26 11:23:00 +00:00
Nick Hibma 44b279e2f6 Cosmetic change (align with other boot blocks):
CONSPEED -> COMSPEED

Approved by:	nyan
2002-05-26 10:11:17 +00:00
Poul-Henning Kamp fcf867e9f7 Mis-edit in last commit. 2002-05-26 09:57:59 +00:00
Poul-Henning Kamp fde2a2e414 Be a bit smarter about rewriting data so we don't loose too much performance.
Sponsored by: DARPA & NAI Labs.
2002-05-26 09:38:51 +00:00
Poul-Henning Kamp f43b2bac72 Use an umazone per unit for allocating the sectors for malloc backing.
Clean up things properly when we unconfigure malloc backed units.

Sponsored by:	DARPA & NAI Labs.
2002-05-26 06:48:55 +00:00
Alan Cox 4b9fdc2bce o Acquire and release Giant around pmap operations in vm_fault_unwire()
and vm_map_delete().  Assert GIANT_REQUIRED in vm_map_delete()
   only if operating on the kernel_object or the kmem_object.
 o Remove GIANT_REQUIRED from vm_map_remove().
 o Remove the acquisition and release of Giant from munmap().
2002-05-26 04:54:56 +00:00
Poul-Henning Kamp c6517568df Give the "malloc" backing of md(4) an adaptive multilevel index tree to
remove the need for a contiguous array with pointers to all the sectors.

Try to make failure to malloc(9) memory a non-hang situation.

Eventually this will allow us to test the 64bit cleanness of the disk
I/O patch, but more work is outstanding here and elsewhere.

Sponsored by:	DARPA & NAI Labs.
2002-05-25 20:44:20 +00:00
Brooks Davis c69b7ffe7d Make discard devices clonable and unloadable. Also, change the
interface name from ds# to disc#.
2002-05-25 20:20:35 +00:00
Brooks Davis ae5a19be8e Move all unit number management cloned interfaces into the cloning
code.  The reverts the API change which made the <if>_clone_destory()
functions return an int instead of void bringing us into closer
alignment with NetBSD.

Reviewed by:	net (a long time ago)
2002-05-25 20:17:04 +00:00
Alan Cox a739e09c6e o Remove some unnecessary casting from and add some necessary casting to
aio_suspend() and lio_listio().

Submitted by:	bde
2002-05-25 18:39:42 +00:00
Dag-Erling Smørgrav 4b4c18f861 ANSIfy (significant portions were already partly ANSIfied) 2002-05-25 15:52:53 +00:00
Dag-Erling Smørgrav b7457aabf6 Remove register. 2002-05-25 15:44:38 +00:00
Dag-Erling Smørgrav dedf14f521 Automated whitespace cleanup. 2002-05-25 15:43:06 +00:00
Bruce Evans e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Bruce Evans ae4c33defa "Fixed" printf format errors (64-bit daddr_t casualties; should use %jx
instead of %llx when %j is available).

Changed nearby output formats from %x to %#x so that it is obvious that the
numbers are in hex (vinum mostly uses 0x%x elsewhere).

Didn't fix nearby format printf errors (long lines).
2002-05-25 11:12:30 +00:00
Bruce Evans ff8cc2eb35 Fixed printf format errors. Most of them are 64-bit daddr_t casualties.
Printing daddr_t's using %d format was always an error, but gcc's
warning about it was ignored for supported 64-bit arches and not printed
for supported 32-bit arches.  Hundreds if not thousands thousands of
previously "fixed" daddr_t printings are now broken on 32-bit machines
by casting daddr_t's to longs.  daddr_t's should be printed using %jd
format, but this fix uses %lld since %j is not implemented in the
kernel yet.

Fixed some nearby format printf errors (style bugs).
2002-05-25 11:05:07 +00:00
Bruce Evans 5cc5b1d344 Fixed a printf format error. It was old and should have been detected by
gcc-2.9x, but somehow wasn't fixed already.
2002-05-25 10:48:03 +00:00
Jake Burkholder 4d574756ac Convert the interrupt queue from an array to a linked list. Implement
intr_dequeue in asm so that it can easily be modified to do light weight
context switching.
2002-05-25 02:39:28 +00:00
Jake Burkholder 0679dc5f91 Try to handle "double faults" occuring at more trap levels (ie 4 :)). 2002-05-25 01:45:11 +00:00
Jake Burkholder 597e13d8c5 Minor style. 2002-05-25 01:44:08 +00:00
Jake Burkholder d2ac231616 Make the run queue parameters machine dependent. Optimize 64 bit
architectures by using a 64 bit word for the bit array which keeps
track of non-empty queues.

Reviewed by:	peter
2002-05-25 01:12:23 +00:00
Alfred Perlstein fa09b4015d Backout 1.54 (restore definition for printf0 to actually do something). 2002-05-24 19:16:08 +00:00
Maxime Henrion ad841cb9b2 Convert ext2fs to nmount(2). 2002-05-24 17:38:01 +00:00
Thomas Moestl 9bb711b95d Fully reset a gem on some error conditions; otherwise it would hang in
about 1 of 10 cases.

Proposed and tested by:	phk
2002-05-24 12:47:41 +00:00
Mark Murray 1422d23663 The previous ANSIfication did not take into account earlier,
non-compliant compilers. Revert to the compatible form to allow
upgrade-builds.
2002-05-24 09:40:51 +00:00
Mark Murray f1f239b30d The previous ANSIfication did not take into account upgrade-builds
uing an earlier, non-compliant compiler. Revert to the compatible
form.
2002-05-24 09:37:10 +00:00
SUZUKI Shinsuke db49169620 Fixed AES encryption algorithm bug
PR:             kern/38465
Obtained from:  Ramana Yarlagadda <ramana.yarlagadda@analog.com>
2002-05-24 07:26:17 +00:00
Peter Wemm 55be04ab11 Fix warnings: deprecated use of label at end of compound statement 2002-05-24 07:02:04 +00:00
Peter Wemm daefef7cae Fix warnings due to macro varargs. 2002-05-24 06:32:18 +00:00
Peter Wemm b01d78f42f Oops, I missed this warning. Comment out extra junk after #endif 2002-05-24 06:22:48 +00:00
Peter Wemm 260a7c5a44 Pacify gcc by preinitializing a variable. 2002-05-24 06:17:42 +00:00
Peter Wemm 86a492bffa Fix a few warnings by adding a missing prototype 2002-05-24 06:17:17 +00:00
Peter Wemm ac0f456146 Fix warning; Extra tokens after #endif 2002-05-24 06:11:07 +00:00
Peter Wemm 46d870bc0c Fix warning; remove unused arg that was passed through uninitialized. 2002-05-24 06:10:25 +00:00
Peter Wemm 34e3110c70 Fix warnings. Also, removed an unused variable that I found that was just
initialized and never used afterwards.
2002-05-24 06:06:18 +00:00
Peter Wemm 885fbc97c1 Fix new compiler unhappiness. 2002-05-24 06:01:07 +00:00
Peter Wemm 7d05a38314 Fix deprecated use of label at end of compound statement 2002-05-24 05:58:13 +00:00
Peter Wemm 70148712be Constify a debug function arg that we pass __func__ to in order to pacify
gcc-3.1's 'const char *__func__;'
2002-05-24 05:57:47 +00:00
Peter Wemm 3fec4bb98a Fix warnings; deprecated use of label at end of compound statement 2002-05-24 05:54:40 +00:00
Peter Wemm 3b688a9484 pacify gcc-3.1's -Wunused checking. 2002-05-24 05:53:57 +00:00
Peter Wemm e82685e79f Fix warning; deprecated use of label at end of compound statement 2002-05-24 05:50:28 +00:00
Peter Wemm fe8ae4dd13 Fix some low hanging fruit warnings. There are problems in i4b_ing.c
still, but they are due due to some bogosity in netgraph.
2002-05-24 05:46:50 +00:00
Peter Wemm dacd8bbbd6 Fix trivial warning:
smb_iod.c:560: deprecated use of label at end of compound statement
2002-05-24 05:40:51 +00:00
Peter Wemm 9c580bea80 Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly
again.
2002-05-24 05:21:36 +00:00
Gordon Tetlow 666df9ddf3 Add support for reading an additional loader configuration file. By default,
this is called /boot/nextboot.conf. This file is required to have it's first
line be nextboot_enable="YES" for it to be read. Also, this file is
rewritten by the loader to nextboot_enable="NO"<space> after it is read.
This makes it so the file is read exactly once. Finally, the nextboot.conf
is removed shortly after the filesystems are mounted r/w.

Caution should be taken as you can shoot yourself in the foot. This is only
the loader piece. There will be a tool called nextboot(8) that will manage
the nextboot.conf file for you. It is coming shortly.

Reviewed by:	dcs
Approved by:	jake (mentor)
2002-05-24 02:28:58 +00:00
Alan Cox 4e94f40222 o Replace the vm_map's hint by the root of a splay tree. By design,
the last accessed datum is moved to the root of the splay tree.
   Therefore, on lookups in which the hint resulted in O(1) access,
   the splay tree still achieves O(1) access.  In contrast, on lookups
   in which the hint failed miserably, the splay tree achieves amortized
   logarithmic complexity, resulting in dramatic improvements on vm_maps
   with a large number of entries.  For example, the execution time
   for replaying an access log from www.cs.rice.edu against the thttpd
   web server was reduced by 23.5% due to the large number of files
   simultaneously mmap()ed by this server.  (The machine in question has
   enough memory to cache most of this workload.)

   Nothing comes for free: At present, I see a 0.2% slowdown on "buildworld"
   due to the overhead of maintaining the splay tree.  I believe that
   some or all of this can be eliminated through optimizations
   to the code.

Developed in collaboration with: Juan E Navarro <jnavarro@cs.rice.edu>
Reviewed by:	jeff
2002-05-24 01:33:24 +00:00
Peter Wemm e09d00a880 For now, make the .ifdef GCC3 case default. We should change -Wno-format
back to -fformat-extensions (or whatever) when we have the functionality.
We are gaining warnings again that should be fixed but the are being hidden
by NO_WERROR and all the -Wformat noise.
2002-05-24 01:02:45 +00:00
Maxime Henrion a9f5c04aae Convert unionfs to nmount. 2002-05-24 00:44:44 +00:00
Andrew R. Reiter d5f2cdc5f2 - Remove a few storage pools and replace them with UMA zones. The spans
code is now storage pool free, so I believe this only leaves the uni
  base not cleaned.
2002-05-24 00:39:58 +00:00
Andrew R. Reiter 8f73020eca - Turn a couple of storage pools into UMA zones and their associated calls
to the appropriate UMA api calls.
2002-05-24 00:38:25 +00:00
Maxime Henrion 23bb7c1425 Fix comments. 2002-05-24 00:16:13 +00:00
Maxime Henrion 2274ec995c Style nit, no functional changes. 2002-05-23 23:22:22 +00:00
Andrew R. Reiter e7d3d526c0 - Fix uma_zcreate parameters -- don't pass M_* flags here, doh. 2002-05-23 23:21:00 +00:00
Maxime Henrion cdb5638a27 Update comments to better match reality. 2002-05-23 23:18:25 +00:00