Commit Graph

30753 Commits

Author SHA1 Message Date
Thomas Moestl
e64a9d374a Set the busmaster enable bit in the PCI command register, as the firmware
of sparc64 machines will not do this for us if the interface is not used
for booting over the network.
2002-03-09 21:52:31 +00:00
Thomas Moestl
47792f8bb9 Fix some bugs in the handling of the case of not enough tx descriptors
being free to send a packet.
2002-03-09 21:50:25 +00:00
Mike Barcroft
d846855da8 o Don't require long long support in bswap64() functions.
o In i386's <machine/endian.h>, macros have some advantages over
  inlines, so change some inlines to macros.
o In i386's <machine/endian.h>, ungarbage collect word_swap_int()
  (previously __uint16_swap_uint32), it has some uses on i386's with
  PDP endianness.

Submitted by:	bde

o Move a comment up in <machine/endian.h> that was accidentially moved
  down a few revisions ago.
o Reenable userland's use of optimized inline-asm versions of
  byteorder(3) functions.
o Fix ordering of prototypes vs. redefinition of byteorder(3)
  functions, so that the non-GCC (libc asm) case has proper
  prototypes.
o Add proper prototypes for byteorder(3) functions in <sys/param.h>.
o Prevent redundant duplicate prototypes by making use of the
  _BYTEORDER_PROTOTYPED define.
o Move the bswap16(), bswap32(), bswap64() C functions into MD space
  for platforms in which asm versions don't exist.  This significantly
  reduces the complexity of some things at the cost of duplicate code.

Reviewed by:	bde
2002-03-09 21:02:16 +00:00
Poul-Henning Kamp
1c1676edca Delete "notyet" code before it becomes "ohh no" code. 2002-03-09 20:11:25 +00:00
Poul-Henning Kamp
875b0335f9 Hide the DIOCGPART ioctl from userland where it has no decent use.
It's use in the kernel is also highly suspect due to the total absense
of any kind of lifetime definition of the passed pointers.
2002-03-09 19:15:37 +00:00
Tor Egge
ff91d7800f Revert change in revision 1.53 and add a small comment to protect
the revived code.

vm pages newly allocated are marked busy (PG_BUSY), thus calling
vm_page_delete before the pages has been freed or unbusied will
cause a deadlock since vm_page_object_page_remove will wait for the
busy flag to be cleared.  This can be triggered by calling malloc
with size > PAGE_SIZE and the M_NOWAIT flag on systems low on
physical free memory.

A kernel module that reproduces the problem, written by Logan Gabriel
<logan@mail.2cactus.com>, can be found in the freebsd-hackers mail
archive (12 Apr 2001).  The problem was recently noticed again by
Archie Cobbs <archie@dellroad.org>.

Reviewed by:	dillon
2002-03-09 16:24:27 +00:00
Hellmuth Michaelis
a6cd6fedf9 after joerg's recent merge of i4b's sppp with the main sppp, remove
now obsolete file.
2002-03-09 13:31:56 +00:00
Hellmuth Michaelis
cd987b48ab remove BSD/OS specific ppp-interface file since the FreeBSD-BSD/OS merger
is IMHO likely not to happen anymore ...
2002-03-09 13:18:24 +00:00
Hellmuth Michaelis
b25b877461 After joergs merge of i4b's sppp with the main sppp, remove obsolete file. 2002-03-09 13:14:49 +00:00
Luigi Rizzo
c445626ad3 Enable DEVICE_POLLING in LINT now that it is safe to compile it there. 2002-03-09 08:04:58 +00:00
Luigi Rizzo
2dbd9d5bc3 Make the DEVICE_POLLING code compile with -Werror and in LINT 2002-03-09 08:02:52 +00:00
Søren Schmidt
fefe430118 Even more Highpoint RAID support.
Fix the 80pin cable detection system.
2002-03-08 21:36:49 +00:00
Hellmuth Michaelis
29c063831d make pcvt compile again without "options XSERVER".
PR: 35577
2002-03-08 19:06:46 +00:00
Robert Watson
7ed3fd6d72 Note that several of the recently documented clock-related kernel options
are for debugging purposes only.

Suggested by:	bde
2002-03-08 18:59:05 +00:00
John Baldwin
60e269643d - Use a MI critical section in witness_sleep() and witness_list() as they
simply need to prevent switching from another CPU and do not need
  interrupts disabled.
- Add a comment to witness_list() about why displaying spin locks for
  threads on other CPU's really is just a bad idea and probably shouldn't
  be done.
2002-03-08 18:57:57 +00:00
John Baldwin
c29824db05 Read KTR_CPU into a temporary variable so that we use a consistent value
for both the cpumask check and the cpu entry field w/o needing to use
a critical section.
2002-03-08 18:55:59 +00:00
Robert Watson
552c7f1b18 Apply a bit more of the patch from conf/35674: document the various
clock options in more detail.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:50:07 +00:00
Robert Watson
08d38d4560 Apply part of the patch from conf/35674 to move the PFIL_HOOKS option
to somewhere more useful, and improve documentation of it.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:47:32 +00:00
John Hay
db78e578e3 Remove the #if __FreeBSD_version glue now that the puc driver is part of
-stable.
2002-03-08 17:41:22 +00:00
Robert Watson
daaa73b51f Synchronize NOTES with -STABLE LINT with respects to the placement
and commenting of NETSMB, NETWMBCRYPTO, and SMBFS.  In NOTES, they
had all floated to the bottom of the file with the list of seemingly
random and unclassified kernel options.  This change moves them back
up to the network protocol and file system areas, and also documents
the dependencies.
2002-03-08 15:34:23 +00:00
Poul-Henning Kamp
14450b4dca #include <machine/smp.h> in the SMP case.
don't include <sys/smp.h> at all.

Fallout from:	probably something jake did.
Hint by:	jhb
2002-03-08 14:31:12 +00:00
Poul-Henning Kamp
f58932f237 vhold() our vnode while checking the remote side.
This is belived to be the only place where a soft reference to a vnode
is held with no sort of hard reference, consequently this change should
allow us to free(9) vnodes from the freelist after properly cleaning
them up.

Reviewed by:	dillon
2002-03-08 13:43:43 +00:00
Yoshihiro Takahashi
959168ab57 Add pc98 support. 2002-03-08 12:41:32 +00:00
Yoshihiro Takahashi
1de04d6919 - The pc98_ttspeedtab() function returns an error status instead of a divisor,
and sets a divisor to the third argument.
- The second argument of the pc98_set_baud_rate() function is changed from int
  to u_int.
2002-03-08 12:12:46 +00:00
Yoshihiro Takahashi
8a6d1ef4eb MFi386: revision 1.125 2002-03-08 11:38:00 +00:00
Søren Schmidt
84409b36ca Support newer Highpoint BIOS's extended config. 2002-03-08 11:33:52 +00:00
Søren Schmidt
b8ad1eb270 cosmetics 2002-03-08 11:31:37 +00:00
Poul-Henning Kamp
fb92273bdc Move the mount of the root filesystem to happen in the init process before
the exec if /sbin/init.

This allows the scheduler to get started and kthreads a chance to run
before we start filesystem operations.
2002-03-08 10:33:11 +00:00
Søren Schmidt
c1d33c30e9 Oops I mixed up the patch for -current & -stable, sorry .... 2002-03-07 19:20:23 +00:00
Robert Watson
6e8a94b268 DBA update: used the wrong of several NAI DBAs. 2002-03-07 17:52:03 +00:00
Robert Watson
409b188022 Update DBA for NAI. We have several. We used the wrong one. :-) 2002-03-07 17:49:06 +00:00
Matt Jacob
70e9673917 Disable RIO (reduced interrupt operation) for 2200 boards- it seemed like
it worked- but I ran into a case with a 2204 where commands were being lost
right and left. Best be safe.

For target mode, or things called if we call isp_handle_other response- note
that we might have dropped locks by changing the output pointer so we bail
from the loop. It's the responsibility of the entity dropping the lock to
make sure that we let the f/w know we've read thus far into the response
queue (else we begin processing the same entries again- blech!).

MFC after:	1 day
2002-03-07 17:32:45 +00:00
Søren Schmidt
216cc529d5 Minor cosmetic changes to minimise diffs for MFC. 2002-03-07 16:34:19 +00:00
Søren Schmidt
5ba86f4c8a Fix a couble of bugs in the rebuild code, return errors properly. 2002-03-07 16:32:21 +00:00
Brian Feldman
9d9737ecb2 Add new errno ``ENOATTR''. 2002-03-07 15:13:44 +00:00
Benno Rice
db9e94f707 Install the DSI and ISI trap handlers and their appropriate locations. 2002-03-07 12:22:44 +00:00
Benno Rice
3e4409437f Copy the "implementation" of pmap_prefault from sparc64. 2002-03-07 12:22:08 +00:00
Benno Rice
9164438ed2 Move tunable initialisation so it can get access to physmem. 2002-03-07 10:15:17 +00:00
Benno Rice
d2c1f57685 Calculate physmem. 2002-03-07 10:09:24 +00:00
Mike Smith
3f1166f04c Update for the 6.9 firmware family (6xxx controllers), as well as for
the upcoming 7.4 family (7xxx controllers).

 - improved error reporting and handling
 - more diagnostic output
 - add extra command packet definitions
 - merge sources again with -stable
2002-03-07 09:55:41 +00:00
Warner Losh
a268f9dbeb Don't use __FBSDID yet. Looks like most (all?) of the rest of the kernel
doesn't do that.
2002-03-07 08:12:40 +00:00
Warner Losh
b3889b6815 Implement hw.cardbus.debug and hw.cardbus.cis_debug to help debug some
of the cardbus problems that people may start seeing.
2002-03-07 08:10:42 +00:00
Warner Losh
7cdb5c5ec4 Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.
2002-03-07 08:03:53 +00:00
Jake Burkholder
4f91e3efb2 Implement delivery of tlb shootdown ipis. This is currently more fine grained
than the other implementations; we have complete control over the tlb, so we
only demap specific pages.  We take advantage of the ranged tlb flush api
to send one ipi for a range of pages, and due to the pm_active optimization
we rarely send ipis for demaps from user pmaps.

Remove now unused routines to load the tlb; this is only done once outside
of the tlb fault handlers.
Minor cleanups to the smp startup code.

This boots multi user with both cpus active on a dual ultra 60 and on a
dual ultra 2.
2002-03-07 06:01:40 +00:00
Jake Burkholder
39028e8396 Modify the tlb demap API to take a pmap instead of a tlb context number.
Due to allocating tlb contexts on the fly, we only ever need to demap the
primary context, non-primary contexts have already been implicitly flushed
by context switching.  All we really need to tell is if its a kernel demap
or not, and its easier just to compare against the kernel_pmap which is a
constant.
2002-03-07 05:25:15 +00:00
Jake Burkholder
bc9b764621 Implement kthread context stealing. This is a bit of a misnomer because
the context is not actually stolen, as it would be for i386.  Instead of
deactivating a user vmspace immediately when switching out, and recycling
its tlb context, wait until the next context switch to a different user
vmspace.  In this way we can switch from a user process to any number of
kernel threads and back to the same user process again, without losing any
of its mappings in the tlb that would not already be knocked by the automatic
replacement algorithm.  This is not expected to have a measurable performance
improvement on the machines we currently run on, but it sounds cool and makes
the sparc64 port SMPng buzz word compliant.
2002-03-07 05:15:43 +00:00
Mike Silbersack
77a7d074e4 Unconditionally limit maxproc so that it is not possible
to exhaust all kmaps.  The only reward for setting maxproc
to a value which will cause kmap exhaustion is a panic
during a forkbomb attack.

MFC after:	3 days
2002-03-07 04:50:36 +00:00
Jake Burkholder
74acd9bb58 Include machine/smp.h. 2002-03-07 04:48:17 +00:00
Jake Burkholder
752dff3d9c Add needed includes of machine/smp.h, remove nested include in sys/smp.h
so that inlines in machine/smp.h can use variables declared in sys/smp.h.
2002-03-07 04:43:51 +00:00
Matthew Dillon
8c5dffe8ca Fix a bug in the vm_map_clean() procedure. msync()ing an area of memory
that has just been mapped MAP_ANON|MAP_NOSYNC and has not yet been accessed
will panic the machine.

MFC after:	1 day
2002-03-07 03:54:56 +00:00
Warner Losh
a3133b5897 Two style(9) fixes:
- return(foo);	(note parens)
- use __FBSDID()
2002-03-07 00:11:42 +00:00
Warner Losh
8e635fb764 Check for NULL on resource allocation. For the moment, punt, but we should
be smarter about a) cleanup and b) fallback.
2002-03-07 00:05:26 +00:00
Crist J. Clark
c1b9f61d5e Sync with GENERIC. WITNESS_SKIPSPIN, and the ciss and iir devices. 2002-03-06 19:44:08 +00:00
John Hay
b72c70af4c Add the "Avlab Technology, PCI IO 2S" card.
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2002-03-06 17:37:27 +00:00
Dag-Erling Smørgrav
e97c3e3d5c Rename runq_find() to runq_findproc(), and hide it behind #ifdef DIAGNOSTIC,
as it can have a severe impact on performance under high load, and the bug
it was meant to catch was fixed ages ago.
2002-03-06 15:34:07 +00:00
Maxim Konovalov
cf11f48256 Fix a typo, unbreak the world.
Thanks to:	mux
Approved by:	ru
2002-03-06 12:28:51 +00:00
Bruce Evans
3006e31679 Don't (blindly) truncate the unit number to 4 digits when formatting the
string returned by device_get_nameunit().
2002-03-06 11:34:02 +00:00
Maxim Konovalov
9dfd307b10 Maximum semid is seminfo.semmni not seminfo.semmsl.
PR:		kern/34979
Submitted by:	James Gritton <jamie@gritton.org>
Reviewed by:	alfred, ru
Approved by:	ru
MFC after:	1 week
2002-03-06 10:52:49 +00:00
Ruslan Ermilov
97b6284457 Fixed compilation warnings. 2002-03-06 08:55:34 +00:00
Bruce Evans
d4621eac57 Fixed a printf format error again. Rev.127 was clobbered in rev.1.128
by removing parentheses.  The main bug is in gcc: on machines with
64-bit longs and 64-bit long longs,

    (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE))

has type plain unsigned long instead of the correctly promoted type
unsigned long long, so it can not be printfed using %llu format.  Even
1ULL / 1L is mispromoted.  Anyway, casting the correct operand
automatically avoids the problem.  We do not want to to pessimize the
division; we just want to convert to a common maximal type for printing.
2002-03-06 06:33:33 +00:00
Matthew Dillon
b9b7a4be90 Add a sequential iteration optimization to vm_object_page_clean(). This
moderately improves msync's and VM object flushing for objects containing
randomly dirtied pages (fsync(), msync(), filesystem update daemon),
and improves cpu use for small-ranged sequential msync()s in the face of
very large mmap()ings from O(N) to O(1) as might be performed by a database.

A sysctl, vm.msync_flush_flag, has been added and defaults to 3 (the two
committed optimizations are turned on by default).  0 will turn off both
optimizations.

This code has already been tested under stable and is one in a series of
memq / vp->v_dirtyblkhd / fsync optimizations to remove O(N^2) restart
conditions that will be coming down the pipe.

MFC after:	3 days
2002-03-06 02:42:56 +00:00
Matthew Dillon
2cfaf1e315 cleanup readability syntax prior to ongoing b_resid work commits.
MFC after:	1 day
2002-03-06 00:44:30 +00:00
Hajimu UMEMOTO
d692f3fc1a - use des_ecb3_encrypt().
- style: added spaces after /* and before */

Obtained from:	KAME
MFC after:	2 weeks
2002-03-05 21:12:41 +00:00
Hajimu UMEMOTO
b5d8e72dc3 Oops, now, encription and decription are separate function.
MFC after:	2 weeks
2002-03-05 20:32:49 +00:00
Julian Elischer
d2ca21a9b2 Official timeout routines for netgraph nodes that know how to
use (and abuse) the node locking system.

MFC after:	1 week
2002-03-05 20:26:20 +00:00
Robert Watson
89e1164ee2 Three p_ucred -> td_ucred's missed in jhb's earlier pass; all appear to
be safe.
2002-03-05 19:45:45 +00:00
Robert Watson
b0ad6e203a The change from td->td_proc->p_ucred to td->td_ucred has shortened some
lines: more agressively line wrap under those circumstances.
2002-03-05 19:31:25 +00:00
John Baldwin
c6f55f33ea - Use td_ucred for jail checks.
- Move jail checks and some other checks involving constants and stack
  variables out from under Giant.  This isn't perfectly safe atm because
  jail_sysvipc_allowed is read w/o a lock meaning that its value could be
  stale.  This global variable will soon become a per-jail flag, however,
  at which time it will either not need a lock or will use the prison lock.
2002-03-05 18:57:36 +00:00
Robert Watson
fdc6e087c0 Reserve a mount flag, MNT_MULTILABEL, used by the MAC subsystem and
individual filesystems to determine whether they should operate in
"file system as a single object" mode, or "file system as a set of objects
with individual labels" mode.  Note: in the trustedbsd_mac branch,
this is refered to as "MNT_MULTILEVEL", but the two mean the same thing.
MNT_MULTILABEL is more suggestive of a flexible policy system than one
providing purely hierarchal policies.  The need for a reserved flag will
go away once nmount() is done.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-05 18:48:15 +00:00
Robert Watson
7e595f7619 Merge reservation of two SI_SUB constants for the MAC policy framework
and for individual MAC policies.  The framework event initializes the
access control subsystem; the policy event allows policies to register
themselves.  The gap in between is for all the things we'll think of
later.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-05 18:44:11 +00:00
Eivind Eklund
f52bd684f3 * Move bswlist declaration and initialization from kern/vfs_bio.c to
vm/vm_pager.c, which is the only place it is used.
* Make the QUEUE_* definitions and bufqueues local to vfs_bio.c.
* constify buf_wmesg.
2002-03-05 18:20:58 +00:00
Brian Feldman
0346e9733a Use revoke_and_destroy_dev() instead of destroy_dev() when removing /dev/net
pseudo-devices when an interface goes away.  Otherwise, an open /dev/net/foo0
when the interface is removed can cause a crash.

Not objected to by:	jlemon
2002-03-05 17:50:35 +00:00
Eivind Eklund
04858e7ee4 Change wmesg to const char * instead of char * 2002-03-05 17:45:12 +00:00
Robert Drehmel
aa22cb469c Change every occurrence of "bootblock" into "boot1" after
the repo-move from "src/sys/boot/sparc64/bootblock".
2002-03-05 16:39:36 +00:00
Warner Losh
f1bdbc6674 Add roaming and microwave oven support. Some minor formatting nits.
Some buggy firmware workarounds.  Fix some endian bugs.

These reduce the diffs from NetBSD, but NetBSD does have more changes since
my last manual merge.
2002-03-05 16:18:14 +00:00
Robert Watson
ba51c2659d Part II: update various mechanically generated files to allow for new
system call number allocations.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-05 16:13:01 +00:00
Warner Losh
a90b09d20a Remove __P to reduce diffs with NetBSD and my private tree. 2002-03-05 16:12:41 +00:00
Robert Watson
11ffd032ff Reserve system call numbers for the MAC framework. This will prevent
people working on the MAC tree from getting toasted whenever system call
numbers are allocated in the main tree (for example, for KSE :-).
Calls allocated: __mac_{get,set}_proc, __mac_{get,set}_{fd,file}().

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-05 16:11:11 +00:00
Warner Losh
0e4c175bb9 Merge a little from NetBSD. 2002-03-05 16:06:54 +00:00
Eivind Eklund
eb8e6d5276 Document all functions, global and static variables, and sysctls.
Includes some minor whitespace changes, and re-ordering to be able to document
properly (e.g, grouping of variables and the SYSCTL macro calls for them, where
the documentation has been added.)

Reviewed by:	phk (but all errors are mine)
2002-03-05 15:38:49 +00:00
Robert Drehmel
6f60771b6d Fix a warning. 2002-03-05 15:19:33 +00:00
Poul-Henning Kamp
c794254d96 Move sysctl debug.sizeof into sys/sysctl.h where it belongs. 2002-03-05 13:56:58 +00:00
Poul-Henning Kamp
26facaeb4d If in strategy we find that we have no devsw on the device anymore we
are probably talking about some disk-device which wente away, so
return ENXIO instead of panicing.
2002-03-05 13:25:57 +00:00
Robert Drehmel
83ea6c23b5 - Fix seeking for offsets requiring more than 32 bits.
- Add sanity checks to lookup().
 - Implement the 'l' modifier in printf().

Submitted by:	tmm
2002-03-05 11:22:43 +00:00
Seigo Tanimura
5d0451a3ed Add sys/dev/ufm.c.
Forgotten by:	alfred
Spotted by:	LINT
2002-03-05 11:19:23 +00:00
Maxim Konovalov
21147bea38 Remove duplicated and wrong sc->sc_last_recv setting. It unbreaks
active-filter in pppd(8).

PR:			kern/12281
Submitted by:		Tim Moore <moore@bricoworks.com>
Not objected by:	peter
Reviewed by:		ru
Approved by:		ru
MFC after:		1 week
2002-03-05 10:12:04 +00:00
Jeff Roberson
88c99cfbc8 Add a new variable mp_maxid. This is used so that per cpu datastructures may
be allocated as arrays indexed by the cpu id.  Previously the only reliable
way to know the max cpu id was through MAXCPU. mp_ncpus isn't useful here
because cpu ids may be sparsely mapped, although x86 and alpha do not do this.

Also, call cpu_mp_probe much earlier so the max cpu id is known before the VM
starts up.  This is intended to help support per cpu queues for the new
allocator, but may be useful elsewhere.

Reviewed by:	jake
Approved by:	jake
2002-03-05 10:01:46 +00:00
Søren Schmidt
11de413756 Misc little cleanups:
Link if only ATAPI device in kernel config
Remove unused #includes
Rearrange a bit in ata-raid to make diff against -stable smaller
Enable wc as default again, dunne how this happend...
2002-03-05 09:24:19 +00:00
Hajimu UMEMOTO
b5a8f767a6 - Speedup 3DES by using assembly code for i386.
- Sync des/blowfish to more recent openssl.

Obtained from:	KAME/NetBSD
MFC after:	2 weeks
2002-03-05 09:19:02 +00:00
Marcel Moolenaar
2242af42cf Call ast() only when we're handling a user trap. 2002-03-05 06:13:22 +00:00
Seigo Tanimura
996abba928 Track the number of wired pages to avoid unwiring unwired pages.
Reviewed by:	alfred
2002-03-05 00:51:03 +00:00
Crist J. Clark
3174c81c9c Unbreak bridge.ko. Replace an unresolved symbol with the actions it
was meant to take.

Submitted by:	luigi
Approved by:	luigi
MFC after:	3 days
2002-03-05 00:07:17 +00:00
Brooks Davis
3d4ce33dbf Add cloning support to the loopback interface.
Submitted by:	mux
2002-03-04 21:46:00 +00:00
Brooks Davis
b75496fedf Change the network interface cloning API so the destroy function returns
an int errorcode instead of void in preperation for merging cloning of
the loopback device.

Submitted by:	mux
MFC after:	2 weeks
2002-03-04 21:43:49 +00:00
Søren Schmidt
cd82af3c08 Update header. 2002-03-04 21:08:35 +00:00
Alan Cox
2be21c5e68 o Create vm_pageq_enqueue() to encapsulate code that is duplicated time
and again in vm_page.c and vm_pageq.c.
 o Delete unusused prototypes.  (Mainly a result of the earlier renaming
   of various functions from vm_page_*() to vm_pageq_*().)
2002-03-04 18:55:26 +00:00
Mitsuru IWASAKI
899ccf541a Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00
Doug Rabson
2d0639e55d Add PSEUDOFS. 2002-03-04 18:01:56 +00:00
Doug Rabson
1fc142b38f Add emulation support for PAL_VM_SUMMARY. 2002-03-04 12:47:47 +00:00
Jake Burkholder
eb5b9c0be3 Add support for starting secondary cpus in kernel, as opposed to relying
on the loader to do it.  Improve smp startup code to be less racy and to
defer certain things until the right time.  This almost boots single user
on my dual ultra 60, it is still very fragile:

SMP: AP CPU #1 Launched!
Enter full pathname of shell or RETURN for /bin/sh:
# ls
Debugger("trapsig")
Stopped at      Debugger+0x1c:  ta              %xcc, 1
db> heh
No such command
db>
2002-03-04 07:12:36 +00:00
Jake Burkholder
907164660a Dig the information about which tlb slots were used to map the kernel out
of the metadata passed by the loader.
2002-03-04 07:07:10 +00:00
Jake Burkholder
5573db3f0b Allocate tlb contexts on the fly in cpu_switch, instead of statically 1 to 1
with pmaps.  When the context numbers wrap around we flush all user mappings
from the tlb.  This makes use of the array indexed by cpuid to allow a pmap
to have a different context number on a different cpu.  If the context numbers
are then divided evenly among cpus such that none are shared, we can avoid
sending tlb shootdown ipis in an smp system for non-shared pmaps.  This also
removes a limit of 8192 processes (pmaps) that could be active at any given
time due to running out of tlb contexts.

Inspired by:		the brown book
Crucial bugfix from:	tmm
2002-03-04 05:20:29 +00:00
Jake Burkholder
34aef253aa Fix obscure problems with vfork where part of the parent's stack could be
clobbered by the child.  This is more complicated than usual because the
window that could get clobbered is pushed in kernel mode, so a lot of
registers would have to be saved in other registers in userland and we
don't have enough.  What we do have is space in the pcb to temporarily
store user windows that were spilled in kernel mode, but could not be
immediately stored to the user stack.  So we copy in the parent's topmost
window and save it in the pcb, and arrange for it to be copied back out
when the child is done frobbing the stack.

Reviewed by:	tmm
2002-03-04 05:07:22 +00:00
Alfred Perlstein
63c6b757ab Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00
Warner Losh
dc4ec1188e Add a bunch of cards from NetBSD and maybe other places.
Ericsson Wireless Lan
Simple Tech Spectrum 24 Alt
Socket LP WLAN CF
Symbol LA4100
2002-03-04 02:59:20 +00:00
Orion Hodson
38c81beede Suspend and resume related patches from Toshikazu Ichinoseki <t.ichinoseki@nifty.com>.
PR's: kern/35484, kern/35230.
2002-03-04 00:36:04 +00:00
Alan Cox
64190c7a2f Call vm_pageq_remove_nowakeup() rather than duplicating it. 2002-03-03 22:36:14 +00:00
Bosko Milekic
5a4f147089 Fix bug in mb_alloc that made systems configured with
PAGE_SIZE / MCLBYTES == 1 crash. Fix them by changing the
appropriate "allocate new page and bucket" code in mb_alloc to use
the macro for properly grabbing an allocated object from a bucket,
the one that checks whether the bucket is empty.
This should allow ken to continue testing zero-copy stuff on -CURRENT.

Noticed and provided debug info: ken
2002-03-03 22:10:04 +00:00
Mark Murray
4a7cdfd7b9 Provide infrastructure for harvesting SWI entropy. 2002-03-03 20:09:42 +00:00
Mark Murray
e119960112 Massive lint-inspired cleanup.
Remove unneeded includes.
Deal with unused function arguments.
Resolve a boatload of signed/unsigned imcompatabilities.
Etc.
2002-03-03 19:44:22 +00:00
Doug Rabson
08cece4091 * Include <sys/ucontext.h> so that this compiles again.
* Move the section which manipulates ia64_pal_base to after cninit() so
  that we don't risk printing anything before we have a console.
* Don't call ia64_probe_sapics() for a SKI build. This should really
  be dependant on ACPICA being present or something.
2002-03-03 19:23:15 +00:00
Søren Schmidt
0f0e725b18 Forgot this litte patch, scale the individual disk size from the
arrays total size depending on width of the array.
2002-03-03 16:36:19 +00:00
Søren Schmidt
6f87be981b Major update of the ATA RAID code, part 3:
Add code to properly detach/attach disks that are part of a RAID.

Mark a disk that is attached on an ATA channel belonging to a
RAID as a spare disk that can be used for rebuilding failed RAID1's.

Add support for rebuilding failed RAID1's.

Several fixes to the detach/attach code.

For replacing a disk in a failed RAID1 do the following:

Find the controller channel# of the failed disk.

Exec 'atacontrol detach <channel#>' to free the disk from the system.

Replace the failed disk with a new one of at least the same size.
If your have your disks in drawers/enclosures this can be done with
the system still running.

Exec 'atacontrol attach <channel#>' to add the disk to the system and
mark it as a valid spare for rebuild.

Exec 'atacontrol rebuild <array#>'

The system will rebuild the array on the fly, the array can still
be used during this, although with slower performance.

Please let me know of any problems with this!

Sponsored by: Advanis Inc.

MFC after: 2 weeks
2002-03-03 15:36:21 +00:00
Søren Schmidt
95f78da7d8 Add new command definition for rebuilding RAID arrays. 2002-03-03 15:00:39 +00:00
Takanori Watanabe
54f737c3a6 Add two IrDA controller ID: IBM TP240(Probably NSC compatible), and SMC IrCC
controller.
2002-03-03 13:26:59 +00:00
Dima Dorfman
e74d483140 Check the version of ex_anon (a `struct xucred') before using it to
fill out netc_anon (a `struct ucred'), and add an XXX around the
entire operation since it isn't clear whether it's doing the right
thing with things like cr_uidinfo and cr_prison.
2002-03-03 06:07:57 +00:00
Warner Losh
d26fb41443 Get the generic name right 2002-03-03 01:04:39 +00:00
Alan Cox
5714577006 Remove some long dead code. 2002-03-02 22:21:42 +00:00
Yoshihiro Takahashi
900ae1c4ab MFi386: revision 1.394. 2002-03-02 13:21:12 +00:00
Yoshihiro Takahashi
47f470f8b5 MFi386: revision 1.498. 2002-03-02 13:19:22 +00:00
Seigo Tanimura
92c914f936 Fix lock leakage and late unlock.
Submitted by:	bde
2002-03-02 12:42:24 +00:00
Bruce Evans
ffb382b4dc Deverbosified previous 2 commits (removed the rotted list of reasons why
<sys/systm.h> is included instead of adding to it).

Approved by:	previous committer
2002-03-02 11:14:13 +00:00
Bruce Evans
b980740327 Fixed a printf format error. 2002-03-02 10:54:33 +00:00
Brooks Davis
16555f3a03 Make 128-bit WEP (aka 104-bit WEP) work with Prism based cards.
Submitted by:	Thomas Skibo <skibo@pacbell.net>
MFC after:	3 days
2002-03-02 00:06:23 +00:00
Matt Jacob
b96eda156f Make it compile again. 2002-03-01 23:15:45 +00:00
Matt Jacob
8f22da0d0b Fix mcpcia.c so it compiles again. 2002-03-01 23:10:19 +00:00
Orion Hodson
b3aeda3f1f Add support for VT8233. 2002-03-01 20:30:13 +00:00
Jake Burkholder
e45a21d07a We don't need KTR_COMPILE in assym.s, its already in opt_global.h. Add
assyms for more ktr trace classes.
2002-03-01 16:22:06 +00:00
Jake Burkholder
b8c926a9ab Use a better trace class for ktr traces in the tlb fault handlers, which are
rather loud.
2002-03-01 16:17:50 +00:00
Hajimu UMEMOTO
e4c606a0ca missing splx
Obtained from:	KAME
MFC after:	1 week
2002-03-01 13:13:17 +00:00
Hajimu UMEMOTO
ab101c5598 (when new sa is preferred than old sa)
even if we fail to send pfkey message, remove the old sa.

Obtained from:	KAME
MFC after:	1 week
2002-03-01 12:17:21 +00:00
David E. O'Brien
969e32658d Fix syntax error, where this was not compile tested after style(9)'ing. 2002-03-01 07:05:45 +00:00
Jake Burkholder
dd4af53607 Catch up to change in tte format.
Forgetten by:	jake
Submitted by:	tmm
2002-03-01 06:17:28 +00:00
David E. O'Brien
b7bbb709c2 Use vnode_if.awk rather than vnode_if.pl 2002-03-01 01:21:29 +00:00
David E. O'Brien
fda3199fb9 Return vnode_if back to its AWK roots.
It became a Perl script in rev 1.20.  This removes one more dependence
on perl for the kernel build.
2002-03-01 01:20:23 +00:00
Andrew R. Reiter
66c862bc1b - Move a comment from being on the same line as a #ifdef to the line
following it.  This should have gone in the previous commit, but
  misviewed Bruce's patch.

Requested by: bde
2002-02-28 21:52:08 +00:00
Mark Murray
f5d9a10b94 Make it a bit clearer where this file is to be used and where it
should not be. (Comments only)

Inspired by:	bde
2002-02-28 18:26:30 +00:00
Andrew Gallatin
ac278dcfc0 add inlines for bswap*.
smaller versions of the byteswap routines were obtained from NetBSD
2002-02-28 18:21:51 +00:00
Andrew Gallatin
030cb46918 recover from namespace collision caused by un-static'ing pci_alloc_resource()
in rev  1.187 of sys/dev/pci/pci.c
2002-02-28 18:18:41 +00:00
Mark Murray
6df66172e3 Adjust the includes a bit.
Requested by:	bde
2002-02-28 17:41:42 +00:00
Hajimu UMEMOTO
b7d6d9526c - Set inc_isipv6 in tcp6_usr_connect().
- When making a pcb from a sync cache, do not forget to copy inc_isipv6.

Obtained from:	KAME
MFC After:	1 week
2002-02-28 17:11:10 +00:00
Hajimu UMEMOTO
c3cf07a14a - In nd6_rtrequest(), ignored a route when it is created by cloning and
is not a neighbor.  see comments for the detailed reason.

- Rejected the process of nd6_rtrequest() when the request is RESOLVE and
the interface does not need neighbor caches.

Obtained from:	KAME
MFC After:	1 week
2002-02-28 17:05:46 +00:00
Benno Rice
677bcc872c cpu_switch now works, for kthreads at least. 2002-02-28 12:06:49 +00:00
Benno Rice
0e1338662a Various cleanups. 2002-02-28 12:00:24 +00:00
Benno Rice
b8160b5af4 - Prevent the decrementer interrupt handler from nesting.
- Catch some more cases of PSL_EE and PSL_RI getting out of sync.
2002-02-28 11:57:47 +00:00
Benno Rice
ac6ba8bd4a - Modify pmap_activate so it only marks the pmap as active.
- Add a pmap_deactivate function.
2002-02-28 11:55:44 +00:00
Ian Dowse
167b8d0334 In sosend(), enforce the socket buffer limits regardless of whether
the data was supplied as a uio or an mbuf. Previously the limit was
ignored for mbuf data, and NFS could run the kernel out of mbufs
when an ipfw rule blocked retransmissions.
2002-02-28 11:22:40 +00:00
Yoshihiro Takahashi
28a90658c4 Add -D_KERNEL to CFLAGS for ntohl(). 2002-02-28 10:08:23 +00:00
Mike Barcroft
0497c9b478 Remove the now unused NTOHL() family of macros. 2002-02-28 09:59:00 +00:00
Mike Barcroft
27aba6a42a Change two occurrences of HTONS() to use htons(). 2002-02-28 09:56:31 +00:00