Commit Graph

31144 Commits

Author SHA1 Message Date
Robert Watson
4584bb3945 Since cred never appears to be passed into the securelevel calls as
NULL, turn warning printf's into panic's, since this call has been
restructured such that a NULL cred would result in a page fault anyway.

There appears to be one case where NULL is explicitly passed in in the
sysctl code, and this is believed to be in error, so will be modified.
Securelevels now always require a credential context so that per-jail
securelevels are properly implemented.

Obtained from:	TrustedBSD Project
Sponsored by:	NAI Labs
Discussed with:	bde
2002-03-22 14:49:12 +00:00
Bill Paul
98b28ee5b4 Teach the bge driver about the BCM5701 (specifically, the 3Com
3c996B-T, with the 5701 rev B5 ASIC). One thing that confuses me
still is that the 'link state change' bit in the status block seems
to change state an awful lot. I have a workaround for this in place
now, but it needs more investigation. For the moment though, this
is enough to get the driver to work with this card.
2002-03-22 06:45:40 +00:00
Bill Paul
6577eb9103 regenerate 2002-03-22 06:39:13 +00:00
Bill Paul
15f962ed42 Teach the brgphy driver about the BCM5701's internal copper PHY. 2002-03-22 06:38:52 +00:00
Andrew R. Reiter
fe3240e9aa - Back out the commit to make the linker_load_file() securelevel check
made aware in jail environments.  Supposedly something is broken, so
  this should be backed out until further investigation proves otherwise,
  or a proper fix can be provided.
2002-03-22 04:56:09 +00:00
Mike Silbersack
9e5a5ed4c5 Change the ephemeral port range from 1024-5000 to 49152-65535.
This increases the number of concurrent outgoing connections from ~4000
to ~16000.  Other OSes (Solaris, OS X, NetBSD) and many other NAT
products have already made this change without ill effects, so we
should not run into any problems.

MFC after:	1 week
2002-03-22 03:28:11 +00:00
Robert Watson
1b350b4542 Break out the "see_other_uids" policy check from the various
method-based inter-process security checks.  To do this, introduce
a new cr_seeotheruids(u1, u2) function, which encapsulates the
"see_other_uids" logic.  Call out to this policy following the
jail security check for all of {debug,sched,see,signal} inter-process
checks.  This more consistently enforces the check, and makes the
check easy to modify.  Eventually, it may be that this check should
become a MAC policy, loaded via a module.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-22 02:28:26 +00:00
Benno Rice
bf76ba7826 Collect all functions for copying to and from userspace into the one file.
This allows me to reimplement [sf]u{byte,word} as separate functions and not
as calls to copy{in,out}.
2002-03-21 23:45:59 +00:00
Matt Jacob
371777b161 Limit fabric search to a default 256 entries. This will all go away
soon because it's just getting harder and harder to find switches
that correctly implement the GET ALL NEXT subcommands for the SNS
protocol.

Latch up result out pointer and set a busy flag when we're looking
at the response queue. This allows for a cleaner way to make sure
we don't get multiple CPUs trying to read the same response queue
entries.

Change how isp_handle_other_response returns values (clarity).

Make PORT UNAVAILABLE the same as PORT LOGOUT (force a LIP).

Do some formatting changes.

MFC after:	0 days
2002-03-21 21:10:16 +00:00
Alan Cox
8fcaddd792 o Use the MI vm_map_growstack() instead of grow_stack() in trap_pfault()
and trapwrite().
 o On i386/pc98, remove the (now) unused grow_stack().
2002-03-21 19:27:15 +00:00
David E. O'Brien
8fb3f3f682 Remove 'register' keyword. 2002-03-21 18:49:23 +00:00
Andrew Gallatin
ddf23aa842 shut up the compiler 2002-03-21 18:48:00 +00:00
Andrew R. Reiter
e85b9ae9ac - Fix a logic error in checking the securelevel that was introduced in the
previous commit.

Pointy hats to: arr, rwatson
2002-03-21 15:27:39 +00:00
Benno Rice
6da4e60a23 - Make all inlines for manipulating supervisor-level registers accept/return
register_t values.
- Implement an inline for isync.
2002-03-21 13:07:31 +00:00
Benno Rice
54551c77ee GC some unused, bogus interrupt functions and replace them with proper
implementations of intr_disable and intr_restore.
2002-03-21 12:04:58 +00:00
Doug Rabson
6720311838 Change critical_t to register_t for intr_disable/restore. 2002-03-21 09:50:11 +00:00
Doug Rabson
77b51ddfcd Change cpu_critical_enter/exit to intr_disable/restore. 2002-03-21 09:35:18 +00:00
Ruslan Ermilov
7a43a96ab0 Replaced hacks in sbin/Makefile,v 1.99 and usr.sbin/Makefile,v 1.217
with the NO_IPFILTER make.conf(5) knob.

(So that we can "make the-rest-of-the-world" again.)
2002-03-21 09:15:39 +00:00
Peter Wemm
c302e53c27 In UP mode, the primary cpu's per-cpu current_pmap was not initialized -
this was only done as a side effect of calling cpu_mp_start().  I haven't
actually tested that this fixes UP kernels, but it feels about right.
2002-03-21 07:41:02 +00:00
Warner Losh
03742795eb intr_disable returns register_t 2002-03-21 06:21:32 +00:00
Warner Losh
ba74981e71 Fix abuses of cpu_critical_{enter,exit} by converting to
intr_{disable,restore} as well as providing an implemenation of
intr_{disable,restore}.

Reviewed by: jake, rwatson, jhb
2002-03-21 06:19:08 +00:00
Warner Losh
b70c0e8b00 Fix abuses of cpu_critical_{enter,exit} by converting to
intr_{disable,restore} as well as providing an implemenation of
intr_{disable,restore}.
2002-03-21 06:14:58 +00:00
Warner Losh
cb9a238a8a Remove last two abuses of cpu_critical_{enter,exit} in the MI code.
Reviewed by: jake, jhb, rwatson
2002-03-21 06:11:09 +00:00
Benno Rice
565ab9395f Add a change mirroring that made to kern/subr_trap.c and others.
This makes kernel builds with DIAGNOSTIC work again.

Apparently forgotten by:	jhb
Might want to be checked by:	jhb
2002-03-21 02:47:51 +00:00
Jeff Roberson
eca80f82ea Remove references to vm_zone.h and switch over to the new uma API.
Approved by:	peter
2002-03-21 02:46:56 +00:00
Jeff Roberson
74cbb73ba8 Remove references to vm_zone.h and switch over to the new uma API.
Reviewed by:	jake
2002-03-21 02:30:27 +00:00
Mike Smith
0a702a9b3a Fix error introduced in the 20020217 update, where GetPossibleResources
was spammed with GetCurrentResources.

Submitted by:	Munehiro Matsuda <haro@h4.dion.ne.jp>
2002-03-21 02:02:31 +00:00
Jeff Roberson
378862a72d Remove references to vm_zone.h and switch over to the new uma API. 2002-03-21 01:11:31 +00:00
Jeff Roberson
46d0abf370 Remove references to vm_zone.h and switch over to the new uma API. 2002-03-21 00:48:25 +00:00
Alfred Perlstein
91f5bcb812 Remove __P.
profile.h and bus.h were excluded because there is currently WIP.

Reviewed by: tmm
2002-03-21 00:06:55 +00:00
Alfred Perlstein
e41ed5da90 Remove __P.
Reviewd by: peter
2002-03-20 23:30:31 +00:00
Alfred Perlstein
812344bc0b Remove __P.
Reveiwed by: benno
2002-03-20 23:17:50 +00:00
Jeff Roberson
59295dba57 UMA permited us to utilize the 'waitok' flag to soalloc. 2002-03-20 21:23:26 +00:00
John Baldwin
01c04d2de9 Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.
Instead of caching the ucred reference, just go ahead and eat the
decerement and increment of the refcount.  Now that Giant is pushed down
into crfree(), we no longer have to get Giant in the common case.  In the
case when we are actually free'ing the ucred, we would normally free it on
the next kernel entry, so the cost there is not new, just in a different
place.  This also removse td_cache_ucred from struct thread.  This is
still only done #ifdef DIAGNOSTIC.

[ missed this file in the previous commit ]

Tested on:	i386, alpha
2002-03-20 21:12:04 +00:00
John Baldwin
f25fcd64b8 Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.
Instead of caching the ucred reference, just go ahead and eat the
decerement and increment of the refcount.  Now that Giant is pushed down
into crfree(), we no longer have to get Giant in the common case.  In the
case when we are actually free'ing the ucred, we would normally free it on
the next kernel entry, so the cost there is not new, just in a different
place.  This also removse td_cache_ucred from struct thread.  This is
still only done #ifdef DIAGNOSTIC.

Tested on:	i386, alpha
2002-03-20 21:09:09 +00:00
John Baldwin
c1a513c951 - Push down Giant into crfree() in the case that we actually free a ucred.
- Add a cred_free_thread() function (conditional on DIAGNOSTICS) that drops
  a per-thread ucred reference to be used in debugging code when leaving
  the kernel.
2002-03-20 21:00:50 +00:00
John Baldwin
565f27f116 Add PCI ID for the SeaLevel Ultra 530.PCI single port card.
Sponsored by:	The Weather Channel
2002-03-20 19:38:26 +00:00
Warner Losh
d82f87481f Minor cleanups to post.mk from bde. Mostly ordering 2002-03-20 19:18:42 +00:00
Warner Losh
c38b6719e5 No need to conditionalize on pci being in the kernel for this 2002-03-20 19:13:13 +00:00
Warner Losh
e7b110dcf7 Fix minor style(9) violation in de__Ping 2002-03-20 19:04:56 +00:00
Warner Losh
91f60fd74f Better power code and better power diagnostics 2002-03-20 19:02:08 +00:00
Warner Losh
285ed29005 Define masks for the VCC an VPP voltages 2002-03-20 19:01:16 +00:00
David E. O'Brien
d0ce7d0078 Remove __P(). This was tested on the GENERIC kernel. 2002-03-20 18:58:47 +00:00
Alfred Perlstein
51dbee9db1 Remove __P. 2002-03-20 18:22:19 +00:00
David E. O'Brien
06989891ed Fix warnings on 64-bit hosts. 2002-03-20 18:04:11 +00:00
John Baldwin
8d0747c9c8 Document that MD pcpu fields are defined in PCPU_MD_FIELDS in
machine/pcpu.h.

Requested by:	dillon
2002-03-20 18:01:52 +00:00
David Malone
527f5ce021 Two minor changes to dirhash, which result in some marginal benchmark
improvements.

1) If deleting an entry results in a chain of deleted slots ending in an
   empty slot, then we can be a bit more aggressive about marking slots as
   empty.

2) The last stage of the FNV hash is to xor the last byte of data
   into the hash. This means that filenames which differ only in
   the last byte will be placed close to one another in the hash
   table, which forms longer chains. To work around this common
   case, we also hash in the address of the dirhash structure.

     news/cancel = news/articles/control/cancel for a tradspool inn server
     squid2 = squid level 2 directory (dirs called 00->FF)
     squid3 = squid level 3 directory (files called 00001F00->00001FFF)

                             mean #probes for
                  home dir  mh inbox  news/cancel  tmp    squid2  squid3
old   successful  1.02      3.19      4.07         1.10    7.85   2.06
new   successful  1.04      1.32      1.27         1.04    1.93   1.17

old unsuccessful  1.08      4.50      5.37         1.17   10.76   2.69
new unsuccessful  1.08      1.73      1.64         1.17    2.89   1.37

Reviewed by:	iedowse
MFC after:	2 weeks
2002-03-20 17:58:02 +00:00
Doug Rabson
a2763677ec Change intr_enable to intr_restore for consistency with sparc64. 2002-03-20 17:28:40 +00:00
Andrew R. Reiter
c457a4403a - Change a check of securelevel to securelevel_gt() call in order to help
against users within a jail attempting to load kernel modules.
- Add a check of securelevel_gt() to vfs_mount() in order to chop some
  low hanging fruit for the repair of securelevel checking of linking and
  unlinking files from within jails.  There is more to be done here.

Reviewed by: rwatson
2002-03-20 16:03:42 +00:00
Orion Hodson
f0f3379ed5 Send periodic ARP requests when ARP entries for hosts we are sending
to are about to expire.  This prevents high packet rate flows from
experiencing packet drops at the sender following ARP cache entry
timeout.

PR:		kern/25517
Reviewed by:	luigi
MFC after:	7 days
2002-03-20 15:56:36 +00:00
Andrew R. Reiter
dca9d05526 - Remove a semi-colon from after SYSINIT that was introduced in rev. 1.163. 2002-03-20 14:46:38 +00:00
KATO Takenori
26b2476ba6 MFi386: revision 1.65. 2002-03-20 12:28:03 +00:00
KATO Takenori
68ee1c91c8 Remove __P. 2002-03-20 12:22:31 +00:00
KATO Takenori
237a429e22 Remove __P. 2002-03-20 11:52:56 +00:00
KATO Takenori
a3535ef8a4 MFi386: revision 1.505 (remove __P.) 2002-03-20 11:31:17 +00:00
KATO Takenori
eca3d78127 MFi386: revision 1.504. 2002-03-20 11:15:05 +00:00
KATO Takenori
881cfd8387 MFi386: revision 1.503. 2002-03-20 11:13:41 +00:00
Jeff Roberson
851031501a Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 10:35:22 +00:00
Jeff Roberson
2684b6af7a Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 10:17:00 +00:00
Jeff Roberson
070adb7022 Remove unused include. 2002-03-20 10:12:07 +00:00
Jeff Roberson
ab426dc822 Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 10:07:52 +00:00
Doug Rabson
c526161420 Replace calls to cpu_critical_enter/exit with appropriate calls to
either explicitly disable interrupts or use a real critical section,
as appropriate.
2002-03-20 10:04:08 +00:00
Doug Rabson
95f7adfa1a Recreate intr_disable/intr_enable and implement cpu_critical_enter/exit
in terms of that (for now).
2002-03-20 10:00:05 +00:00
Jeff Roberson
421e6a659e Remove unused include. 2002-03-20 09:55:07 +00:00
Jeff Roberson
c186f9b280 Remove unused header. 2002-03-20 09:46:04 +00:00
Alfred Perlstein
15fe306743 Remove __P. 2002-03-20 08:56:31 +00:00
Poul-Henning Kamp
c7ec79b076 Various style issues from a recent brucification:
use uint_%dt not u_int%dt
  Avoid LL suffixed intergers where we can by using explicit casts.
  (The last two I don't know how to avoid.)
  Add an explanation why truncation rather than rounding is used.

Inspired by:	bde
2002-03-20 08:48:21 +00:00
Jeff Roberson
e2f8f8a6b6 Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 08:48:07 +00:00
Jeff Roberson
9454002711 Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 08:03:54 +00:00
Alfred Perlstein
03d1b8bc94 Remove __P. 2002-03-20 08:00:54 +00:00
Alfred Perlstein
89c9a48352 Remove __P. 2002-03-20 07:51:46 +00:00
Alfred Perlstein
e57574233a Remove __P. 2002-03-20 06:48:11 +00:00
Alfred Perlstein
b63dc6ad47 Remove __P. 2002-03-20 05:48:58 +00:00
Jeff Roberson
69c2d429c1 Switch vm_zone.h with uma.h. Change over to uma interfaces. 2002-03-20 05:48:55 +00:00
Jeff Roberson
586c8b6b29 Add calls to uma_zone_set_max() to restore previously enforced limits. 2002-03-20 05:30:58 +00:00
Jeff Roberson
736ee5907f Add uma_zone_set_max() to add enforced limits to non vm obj backed zones. 2002-03-20 05:28:34 +00:00
Benno Rice
21d7ec8915 Increment pmap_pvo_count in the right place. 2002-03-20 05:25:33 +00:00
Alfred Perlstein
14e10f9952 Remove __P. 2002-03-20 05:14:42 +00:00
Alfred Perlstein
aa075405f6 Remove __P. 2002-03-20 05:00:21 +00:00
Jeff Roberson
54d77689ed Backout part of my previous commit; I was wrong about vm_zone's handling of
limits on zones w/o objects.
2002-03-20 04:39:32 +00:00
Jeff Roberson
9e9d298a9b Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 04:11:52 +00:00
Jeff Roberson
c897b81311 Remove references to vm_zone.h and switch over to the new uma API.
Also, remove maxsockets.  If you look carefully you'll notice that the old
zone allocator never honored this anyway.
2002-03-20 04:09:59 +00:00
Matthew Dillon
e38eb7fbe4 Fix a bug introduced in 1.11 (and also MFCd to stable AND the security branch)
that causes a machine to panic when the kernel PPP / DEFLATE code is used.
1.11 moved a ZFREE to a point after the structural members were clobbered
by stores into a union'd structure.

This commit fixes the bug and adds a big whopping comment to make sure
the code isn't 'cleaned up' again :-)

Ian Dowse came up with the same patch independantly 68 seconds before I
did, talk about Karma!

I would also like to thank Eugene Grosbein for marathon work in tracking the
problem down by udpating his -stable based on date over and over again
to close in on the commit that caused his crashes.

PR:		kern/35969
Reviewed by:	Ian Dowse <iedowse@maths.tcd.ie>
X-MFC after:	 immediately
2002-03-20 04:05:26 +00:00
Jeff Roberson
670d17b5c0 Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 04:02:59 +00:00
Alfred Perlstein
96abb1618a Remove __P. 2002-03-20 02:39:27 +00:00
Jeff Roberson
df66668c42 Force the boot cpu to wait for the APs to finish starting up. This eliminates
a race where the AP and the boot cpu were trying to printf at the same time,
which was confusing the console too much for it to continue working.
2002-03-20 02:27:55 +00:00
Alfred Perlstein
8febc6ba17 Remove __P. 2002-03-20 02:15:46 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Peter Wemm
1a8f253b64 Cast pointers to uintptr_t rather than u_int32_t. This doesn't work too
well on machines with 64 bit pointers.
2002-03-19 23:28:35 +00:00
Peter Wemm
41d0e15f86 Pacify gcc-3.1. 2002-03-19 23:26:37 +00:00
Peter Wemm
0d87e7d007 Fix some gcc-3.1+ warnings:
warning: deprecated use of label at end of compound statement
umass.c:2626:46: multi-line string literals are deprecated
2002-03-19 23:20:21 +00:00
Peter Wemm
efcbdfb72b Add EFI write support to loader 2002-03-19 23:05:33 +00:00
Alfred Perlstein
6f1e855112 Remove __P. 2002-03-19 22:40:48 +00:00
Alfred Perlstein
11caded34f Remove __P. 2002-03-19 22:20:14 +00:00
Josef Karthauser
2d4ac0e834 Sync the uhci_dump_foo routines with NetBSD, and remove an errant additional
uhci_dump_ii function that landed there, probably during a recent merge.

Spotted by:	alfred
2002-03-19 22:14:08 +00:00
Alfred Perlstein
929ddbbb89 Remove __P. 2002-03-19 21:54:18 +00:00
Alfred Perlstein
67b362072d add missing semicolon. 2002-03-19 21:44:49 +00:00
Alfred Perlstein
4d77a549fe Remove __P. 2002-03-19 21:25:46 +00:00
Alfred Perlstein
1f31a77ce8 don't generate files with __P. 2002-03-19 20:48:32 +00:00
Alfred Perlstein
205c9d4c30 fix blockno printf formatting warnings. 2002-03-19 20:46:30 +00:00
Alfred Perlstein
789f12fe69 Remove __P 2002-03-19 20:18:42 +00:00
Alfred Perlstein
be1673823f Fix bio->bio_blkno format warning. 2002-03-19 20:12:08 +00:00
Alfred Perlstein
72b1d826be Remove duplicate extern declarations to silence warnings. 2002-03-19 19:45:41 +00:00
Andrew R. Reiter
08a54da785 - Change a malloc / bzero pair to make use of the M_ZERO malloc(9) flag. 2002-03-19 15:41:21 +00:00
Darren Reed
40c407243f do not include the missing ip_h323_pxy.c 2002-03-19 15:14:18 +00:00
Darren Reed
620fa9eb93 put an extern for ip6_protox in here where it is only used for kernel compiling 2002-03-19 15:01:21 +00:00
Darren Reed
dcb46aa29b put an extern for inet6sw in here and make it active only for kernel compiling 2002-03-19 14:56:59 +00:00
Poul-Henning Kamp
00dcdc8d67 Add five GEOM oriented ioctls to get basic information about a geom device. 2002-03-19 13:54:15 +00:00
Peter Wemm
3acb2ae91f #if 0 some unused variables (only in #if 0 code) 2002-03-19 12:15:29 +00:00
Peter Wemm
bcb6ef7c82 Add some break's after default: in the end of switch statements to
keep gcc-3.1+ happy:
ata-all.c:410: warning: deprecated use of label at end of compound statement
ata-all.c:587: warning: deprecated use of label at end of compound statement
ata-raid.c:99: warning: deprecated use of label at end of compound statement
ata-raid.c:151: warning: deprecated use of label at end of compound statement
2002-03-19 12:14:14 +00:00
Jeff Roberson
9eb6e51923 Quit a warning introduced by UMA. This only occurs on machines where
vm_size_t != unsigned long.

Reviewed by:	phk
2002-03-19 11:49:10 +00:00
Darren Reed
b38f3fb061 fix conflicts (mostly damn rcs id's) generated by import 2002-03-19 11:44:16 +00:00
Darren Reed
b90bc1632d This file is being removed pending the all clear on its licence by someone
else.
2002-03-19 11:42:12 +00:00
Darren Reed
f72fae2740 This commit was generated by cvs2svn to compensate for changes in r92680,
which included commits to RCS files with non-trunk default branches.
2002-03-19 11:30:21 +00:00
Darren Reed
28613e5584 Import IPFilter 3.4.25 (last version 3.4.20) 2002-03-19 11:30:21 +00:00
Peter Wemm
bfed03d6df Enabling the SKI option is a guaranteed breakage for me. Interrupts no
longer work.
I can only get a box to boot with 'options SMP'.
2002-03-19 11:21:12 +00:00
Peter Wemm
5044ed104d My ia64 box for some reason likes to fragment the beginning/end of memory
a bit before handing it over to the OS.  I occasionally have 11
segments with several 8K or so fragments depending on nvram settings and
what I have done under loader(8) before booting.  This needs to be
revisited.
2002-03-19 11:18:47 +00:00
Peter Wemm
3b406873c7 Fix some unused variables. 2002-03-19 11:15:26 +00:00
Peter Wemm
12adcbdf35 Move a couple of prototypes together instead of being incompletely
scattered around.
2002-03-19 11:14:52 +00:00
Peter Wemm
6d4a5aee06 __func__ is a const char *, not a "string" that can be concatenated. 2002-03-19 11:11:37 +00:00
Peter Wemm
90f9252584 Fix a pointer/int warning 2002-03-19 11:10:30 +00:00
Peter Wemm
21eec46f33 #ifdef SMP some variables that are only used elsewhere under #ifdef SMP
also.
2002-03-19 11:10:03 +00:00
Peter Wemm
34adf9e4f1 Work around an apparent compiler bug with gcc-3.1, although it might be
a language feature that I do not know about.  gcc is complaining about
a left shift >= sizeof type, even when shifting a (cast) 64 bit type left
by 43 bits.
2002-03-19 11:09:24 +00:00
Peter Wemm
51ea8b33df Believe it or not, I ran into the 32MB stack size limit using a natively
hosted gcc.
2002-03-19 11:07:09 +00:00
Peter Wemm
e42d7cebec #if 0 out some unused code. 2002-03-19 11:06:01 +00:00
Peter Wemm
675ceea82b Add some #includes after things got broken with the last round of
MI include file (<sys/smp.h> I think) tweaks.
2002-03-19 11:05:07 +00:00
Peter Wemm
4ff9e8d5e5 Turn off the ia64 ITC timecounter when SMP is present since it has the
same problem as the TSC on the x86 - ie: it is not synchronized.
#if 0 out some unused functions, ia64 doesn't calibrate clocks yet.
2002-03-19 11:03:48 +00:00
Peter Wemm
30171114b3 Fix a gcc-3.1+ warning.
warning: deprecated use of label at end of compound statement

ie: you cannot do this anymore:
switch(foo) {
....

default:
}
2002-03-19 11:02:06 +00:00
Peter Wemm
3ba30c18a2 Pacify gcc-3.1+, initialize two variables to avoid -Wuninitialized
warnings.
2002-03-19 10:57:40 +00:00
Peter Wemm
a5e7c7da5e Fix warnings on gcc-3.1+ where __func__ is a const char * instead of a
string.
2002-03-19 10:56:46 +00:00
Peter Wemm
9a8fa41c6f Regen; post SMC id's and also pick up a previously forgotten regen(?). 2002-03-19 10:55:39 +00:00
Peter Wemm
58b0048916 Add another SMC device ID and the hub ID that it went with. 2002-03-19 10:54:40 +00:00
Peter Wemm
5f4a0f788b Add the ia64 bus space tag for the IO ports (!).
Add a #else and #error so that this doesn't go unnoticed again.
2002-03-19 10:53:33 +00:00
Peter Wemm
17694298c0 Use the FreeBSD cross tools instead of the linux ones. 2002-03-19 10:52:44 +00:00
Peter Wemm
1d7914a5bd Add -ffreestanding to avoid printf/puts/putchar conversions 2002-03-19 10:51:57 +00:00
Peter Wemm
436122c232 Boot from efifs first. 2002-03-19 10:50:41 +00:00
Peter Wemm
9b6a75edb3 gcc-3.1 likes to have extra { } around the internal array initializers in
the GUID templates.
2002-03-19 10:50:09 +00:00
Jeff Roberson
8355f576a9 This is the first part of the new kernel memory allocator. This replaces
malloc(9) and vm_zone with a slab like allocator.

Reviewed by:	arch@
2002-03-19 09:11:49 +00:00
Bruce Evans
a7ac916bc7 Backed out the part of the previous commit related to xargs. It just
broke things, since "name=value ... cmd ..." only works for simple
commands (not for pipelines).
2002-03-19 08:20:44 +00:00
Alan Cox
b949bce678 Add #include so that the previous change compiles. 2002-03-19 06:45:25 +00:00
Bruce Evans
09f2f5ad67 Removed env(1) commands. make(1) uses a real shell, and
"env name=value ... cmd ..." is just a pessimized way of doing
"name=value ... cmd ..." in real shells.  Set the environment
(without using env(1)) before starting xargs so that env(1)
is not needed in "xargs env name=value ... cmd ..."
2002-03-19 06:30:24 +00:00
Alfred Perlstein
12ca2c2ede fix perfmon for DEVFS.
PR: kern/36008
2002-03-19 06:14:34 +00:00
Jeff Roberson
1274438838 Initialize variables before use. This was needed to pass -Werror.
Reviewed by:	jake
2002-03-19 05:14:23 +00:00
Alan Cox
89734883fa Eliminate unnecessary calls to grow_stack() and useracc() from linux_sendsig()
and linux_rt_sendsig().  (See i386/i386/machdep.c revisions 1.503 and 1.504.)
2002-03-19 04:54:30 +00:00
Alfred Perlstein
4a950215ef Close a race when vfs_syscalls.c:checkdirs() runs.
To do this protect the filedesc pointer in the proc with PROC_LOCK
in both checkdirs() and kern_descrip.c:fdfree().
2002-03-19 04:30:04 +00:00
Bruce Evans
367b50a28f Fixed some printf format errors (hopefully all of the remaining daddr64_t
ones for GENERIC, and all others on the same line as those).  Reformat
the printfs if necessary to avoid new long lones or old format printf
errors.
2002-03-19 04:09:21 +00:00
Bruce Evans
1ab0b5f920 The previous commit missed fixing 2 old printf format errors and
introduced a format printf error.
2002-03-19 04:07:29 +00:00
Andrew Gallatin
54ed0c3221 Fix printf warning caused by recent changes in bio_pblkno's type. 2002-03-19 01:45:04 +00:00
Bruce Evans
07e929da1c Fixed printf format errors in previous commit. %llu is no more suitable
than %u for printing signed 64-bit types.  It fails on different machines,
and has the wrong signdness.

Fixed old printf format error on the same line.  %u is not suitable for
printing 32-bit types on all machines.

"Fixed" format printf error in previous commit.  This file is not
formatted in KNF.  Partially restore bug for bug compatibility: indent
the printf args too much, but don't format them for 160-column terminals.
2002-03-18 23:38:16 +00:00
Bruce Evans
1b7fb13116 Fixed printf format errors in previous commit. %llu is no more suitable
than %u for printing signed 64-bit types.  It fails on different machines,
and has the wrong signdness.

Fixed old printf format error on the same line.  %u is not suitable for
printing 32-bit types on all machines.
2002-03-18 23:24:00 +00:00
Warner Losh
8321855307 Formats that print the block number need to be changed from %u to
%llu due to recent changes in bio_pblkno's type.
2002-03-18 20:50:04 +00:00
Alfred Perlstein
558626dc49 have the SYSCALL_MODULES macro provide an initializer for the 'old_sysent'
to avoid pedandic warnings.
2002-03-18 18:53:18 +00:00
Josef Karthauser
916e6e02e5 Add a USB comm driver.
Ported from NetBSD by:	akiyama
2002-03-18 18:23:42 +00:00
Brian Feldman
25adb370be Back out the modification of vm_map locks from lockmgr to sx locks. The
best path forward now is likely to change the lockmgr locks to simple
sleep mutexes, then see if any extra contention it generates is greater
than removed overhead of managing local locking state information,
cost of extra calls into lockmgr, etc.

Additionally, making the vm_map lock a mutex and respecting it properly
will put us much closer to not needing Giant magic in vm.
2002-03-18 15:08:09 +00:00
Søren Schmidt
a86fb2a588 Cleanup the chipset setup a bit.
Add some (for all I know unneeded) setup code for the rosb4.
2002-03-18 13:56:44 +00:00
Maxime Henrion
a272b5d2cd Unbreak the build of smbfs.ko.
Reviewed by:	sheldonh
2002-03-18 13:06:57 +00:00
Søren Schmidt
2c66127540 Add support for the ServerWorks CSB5 chips 2002-03-18 12:13:13 +00:00
Doug Rabson
789327f183 Remove a couple of stray linuxisms to make this work for FreeBSD/ia64. 2002-03-18 10:16:57 +00:00
Ruslan Ermilov
bbb467cd9a lint the previous lint commit.
Reviewed by:	markm
2002-03-18 09:35:45 +00:00
Doug Rabson
568a940b99 Fix spelling. 2002-03-18 09:29:16 +00:00
Alan Cox
8bf0e8324d Eliminate grow_stack() from (o)sendsig(). If the stack needs to grow,
copyout() will page fault and perform grow_stack() from trap_pfault().
These calls to grow_stack() accomplish nothing.

Reviewed by:	bde
2002-03-18 07:59:57 +00:00
Andrew R. Reiter
9b3851e9e3 - Lock down the ``module'' structure by adding an SX lock that is used by
all the global bits of ``module'' data.  This commit adds a few generic
  macros, MOD_SLOCK, MOD_XLOCK, etc., that are meant to be used as ways
  of accessing the SX lock.  It is also the first step in helping to lock
  down the kernel linker and module systems.

Reviewed by: jhb, jake, smp@
2002-03-18 07:45:30 +00:00
Kirk McKusick
b70428b2f0 Cannot release vnode underlying the nullfs vnode in null_inactive
as it leaves the nullfs vnode allocated, but with no identity. The
effect is that a null mount can slowly accumulate all the vnodes
in the system, reclaiming them only when it is unmounted. Thus
the null_inactive state instead accelerates the release of the
null vnode by calling vrecycle which will in turn call the
null_reclaim operator. The null_reclaim routine then does the
freeing actions previosuly (incorrectly) done in null_inactive.
2002-03-18 05:39:04 +00:00
Crist J. Clark
42786f6c03 Add hooks for very basic IPFilter support in bridging. Set,
# sysctl net.link.ether.bdg_ipf=1

To enable. Just like ipfw(8) bridging, only input packets are filtered
in the bridge. Filtering works just like in the IP layer, ipf(8)
first, then ipfw(8). And just like in the IP layer, both are
independent, one need not be run to use the other. (Note: This will
not work in, but doesn't break, the bridge.ko module. The ipl.ko
module would need to be fixed before that is worth worrying about.)

Reviewed by:	luigi
2002-03-18 00:55:23 +00:00
Benno Rice
49f8f7273b Changes and fixes in preparation for UMA:
- Bootstrap pvo entries are now allocated by stealing pages.
- Just return if we're pmap_enter'ing a mapping that's already there.  Don't
  remove it and re-enter it.
2002-03-17 23:58:12 +00:00
Benno Rice
508473baea Lowercase all of the trap names. 2002-03-17 23:55:11 +00:00
Benno Rice
9737e23c11 Clean up and fix up copyin and copyout. 2002-03-17 23:54:55 +00:00
Dag-Erling Smørgrav
2d5c9da3d9 s/options\t\t/options \t/ 2002-03-17 23:48:24 +00:00
Crist J. Clark
3b6c640c2a Spelling: s/guesst/guessed/ 2002-03-17 22:02:05 +00:00
Poul-Henning Kamp
117bae1fd3 Need a different #include for the userland regression test. 2002-03-17 19:15:28 +00:00
Poul-Henning Kamp
a6de455253 Make this compile in the userland-regression testsuite again. 2002-03-17 18:57:49 +00:00
Alan Cox
9f0567f557 Remove vm_object_count: It's unused, incorrectly maintained and duplicates
information maintained by the zone allocator.
2002-03-17 18:37:37 +00:00
Maxim Sobolev
fb74e5f595 Add splitfs vfs layer into libstand, which allows loading big kernels and
modules split across several physical medias. Following is how it works:

The splitfs code, when asked to open "foo" looks for a file "foo.split"
which is a text file containing a list of filenames and media names, e.g.

	foo.aa "Kernel floppy 1"
	foo.ab "Kernel floppy 2"
	foo.ac "Kernel and modules floppy"

For each file segment, the process is:

- try to open the file
- prompt "Insert the disk labelled <whatever> and press any key..."
- try to open the file
- return error if file could not be located

RE team is free to use this feature in the upcoming 5.0-DP1.

Reviewed by:	msmith, dcs
2002-03-17 12:18:05 +00:00
Mark Murray
766f7d6e03 Allow "make lint" to mostly work. Our sources are very unclean WRT
lint, so this is turned off by default. Setting WANT_LINT will turn
on generation of lint libraries for /usr/libdata/lint/*.ln.

Reviewd by:	silence in -audit.
2002-03-17 10:05:57 +00:00
Hellmuth Michaelis
e0d83003c4 Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD,
OpenBSD and BSD/OS and respective code, remove pre $FreeBSD CVS id's,
remove #if(def)s and respective code for FreeBSD versions < 5 .
2002-03-17 09:33:15 +00:00
Poul-Henning Kamp
b14d84e24b Change the giant-dropping method a fair bit to keep WITNESS more
happy.
2002-03-17 07:42:54 +00:00
Alan Cox
5ee9fe6ba1 Undo part of revision 1.57: Now that (o)sendsig() doesn't call useracc(),
the motivation for saving and restoring the map->hint in useracc() is gone.
(The same tests that motivated this change in revision 1.57 now show that
there is no performance loss from removing it.)  This was really a hack and
some day we would have had to add new synchronization here on map->hint
to maintain it.
2002-03-17 07:01:42 +00:00
Poul-Henning Kamp
c4269c63a2 Forgot to remove the old g_malloc() call when I split it.
Spotted by:	dima
2002-03-17 07:00:39 +00:00
Warner Losh
fb33cfa8f5 Regen for 1.28 of pccarddevs 2002-03-17 05:06:37 +00:00
Warner Losh
a5a492981c Add support for the home Wireless Network airway wireless pcmcia card.
I cannot find where I got these patches, but I think it was from the
bsd-nomads mailing list.  Please contact me if you posted them there.
2002-03-17 05:05:42 +00:00
Alan Cox
42d5624e1f o Stop calling useracc() in (o)sendsig() now that we use copyout()
to copy the sigframe to the user's stack.  Useracc() takes a non-trivial
   amount of time.  Eliminating it speeds up signal delivery by 15% or more.
 o Update some comments.

Submitted by:	bde
2002-03-17 04:21:19 +00:00
Bruce Evans
eabfc7877d Work around a PLX9050 bug that causes system lockup in certain systems,
depending on the MMIO addresses allocated to the board.

PR:		30965, 20845 (maybe)
Submitted by:	Daniela Squassoni <daniela@cyclades.com>
Tested by:	Arjan Knepper <arjan@jak.nl>
		Scott Klement <klemscot@klements.com>
2002-03-17 04:10:38 +00:00
Alan Cox
2f6c16e1e8 Acquire a read lock on the map inside of vm_map_check_protection() rather
than expecting the caller to do so.  This (1) eliminates duplicated code in
kernacc() and useracc() and (2) fixes missing synchronization in munmap().
2002-03-17 03:19:31 +00:00
Jake Burkholder
9bc8610af5 Don't demap the requested page from the tlb in pmap_kenter or pmap_kremove,
even on the local cpu.  These are no longer used unsafely in MI code, and
the MD code has been adjusted to compensate.
2002-03-17 01:53:51 +00:00
Jake Burkholder
bfd501b637 Fix a problem where kernel text could become unmapped when clearing out all
the user mappings from the tlb due to the context numbers rolling over.  The
store to the internal mmu register must be followed by a membar #Sync before
much else happens to "avoid data corruption", so we use special inlines which
both disable interrupts and ensure that the compiler will not insert extra
instructions between the two.  Also, load the tte tag and check if the context
is nucleus context, rather than relying on the priviledged bit which doesn't
actually serve any purpose in our design, and check the lock bit too for
sanity.
2002-03-17 01:51:32 +00:00
Jake Burkholder
2f3e2b8795 Use the tlb data access register to map the kernel tsb, rather than the data
in register.  The latter uses the random replacment algorithm to pick the
slot, we want a specific slot.
2002-03-17 01:45:29 +00:00
Kirk McKusick
a0595d0249 Add a flags parameter to VFS_VGET to pass through the desired
locking flags when acquiring a vnode. The immediate purpose is
to allow polling lock requests (LK_NOWAIT) needed by soft updates
to avoid deadlock when enlisting other processes to help with
the background cleanup. For the future it will allow the use of
shared locks for read access to vnodes. This change touches a
lot of files as it affects most filesystems within the system.
It has been well tested on FFS, loopback, and CD-ROM filesystems.
only lightly on the others, so if you find a problem there, please
let me (mckusick@mckusick.com) know.
2002-03-17 01:25:47 +00:00
Jake Burkholder
ac59490b5e Convert all pmap_kenter/pmap_kremove pairs in MI code to use pmap_qenter/
pmap_qremove.  pmap_kenter is not safe to use in MI code because it is not
guaranteed to flush the mapping from the tlb on all cpus.  If the process
in question is preempted and migrates cpus between the call to pmap_kenter
and pmap_kremove, the original cpu will be left with stale mappings in its
tlb.  This is currently not a problem for i386 because we do not use PG_G on
SMP, and thus all mappings are flushed from the tlb on context switches, not
just user mappings.  This is not the case on all architectures, and if PG_G
is to be used with SMP on i386 it will be a problem.  This was committed by
peter earlier as part of his fine grained tlb shootdown work for i386, which
was backed out for other reasons.

Reviewed by:	peter
2002-03-17 00:56:41 +00:00
Maxim Sobolev
95bd81d145 Extend CONS_GETINFO ioctl to provide information about size of the currently
displayed font.

MFC after:	2 weeks
2002-03-16 23:31:15 +00:00
Warner Losh
654d58ca24 Don't call the bios if the interrupt appaers to be already routed. Some
older PCI BIOSes hate this and this leads to panics when it is done.  Also,
assume that a uniquely routed interrupt is already routed.  This also
seems to help some older laptops with feable BIOSes cope.
2002-03-16 23:02:41 +00:00
Warner Losh
048d9f99d1 o Rework the identify routine a little, merging it with NetBSD's wi.
o Add exerpimental support for identifying lucent cards.  All of mine
  come back with ID of 1, but NetBSD committed code for 5.  So accept
  both.
o rename wi_prism2_ver to wi_firmware_ver so that we could, if necessary,
  do special things for lucent cards too.
o Bring in a small part of the changes from airtools: The wi_cmd function
  now takes two additional arguments.  I didn't bring in their ioctls yet.
o eliminate the use of LE16TOH, and remove its define.
o Print the firmware as if there were 100 versions instead of 10.  This means
  that 6.1 and 6.10 aren't confusing to people.  We now print 6.01 in the
  former case.

# A good junior hacker project would be to merge the NetBSD, FreeBSD, and
# OpenBSD drivers into one source base.
2002-03-16 22:59:15 +00:00
Mark Murray
19026919f5 Bump the FreeBSD version to mark the import of Perl 5.6.1. 2002-03-16 21:44:02 +00:00
Søren Schmidt
4e887e1915 Add more functionality to the CDIOCREADSUBCHANNEL ioctl.
PR: 26644
2002-03-16 15:56:54 +00:00
Søren Schmidt
698d5a2c84 Fix 64bit arch problems. 2002-03-16 15:55:20 +00:00
Søren Schmidt
e1a86e393c Remove useless splXXX set. 2002-03-16 15:54:41 +00:00
Poul-Henning Kamp
14e4cefcf8 Hmm, talk about optimizer-fodder. Make the DIOCGDVIRGIN hack work again. 2002-03-16 13:47:57 +00:00
Bruce Evans
bccfa3f5d5 Fixed some style bugs:
- 2 redundant forward declarations of "struct thread"
- missing function parameter names in prototypes
- misformatting
2002-03-16 12:50:02 +00:00
Josef Karthauser
3ede2e88ea Merge from NetBSD:
ohcivar.h (1.22), uhcivar.h (1.29):
	============================================================
	date: 2000/04/25 09:20:55;  author: augustss;
	Move the size of the mapped bus_space region into the bus
	independent softc.
	============================================================

ohci.c (1.88), uhci.c (1.112):
	============================================================
	date: 2000/04/25 14:28:13;  author: augustss;
	Insert (very conservative!) bus_space_barrier() calls at
	all register accesses.
	The bus_space(9) man page says you've gotta have them...
	============================================================
2002-03-16 12:44:21 +00:00
Josef Karthauser
cdd493aa00 Bump some $NetBSD$ idents for patches that have already been previously
ported.
2002-03-16 12:24:00 +00:00
Josef Karthauser
5a11d73afa Huge merge from NetBSD:
usbdi.c (1.61):
	===================================================================
	revision 1.61
	date: 2000/01/31 20:13:07;  author: augustss;  lines: +20 -4
	Change the way the HC done method is invoked a little.
	===================================================================

usbdi.c (1.65):
	===================================================================
	revision 1.65
	date: 2000/03/08 15:34:10;  author: augustss;  lines: +4 -2
	Get the status right when a polled transfer times out.
	===================================================================

ohci.c (1.79), uhci.c (1.89), uhcivar.h (1.24), usb_port.h (1.22),
usbdivar.h (1.48):
	===================================================================
	date: 2000/03/23 07:01:46;  author: thorpej;
	New callout mechanism with two major improvements over the old
	timeout()/untimeout() API:
	- Clients supply callout handle storage, thus eliminating problems of
	  resource allocation.
	- Insertion and removal of callouts is constant time, important as
	  this facility is used quite a lot in the kernel.

	The old timeout()/untimeout() API has been removed from the kernel.
	===================================================================

uhci.c (1.80), usbdi.c (1.66):
	===================================================================
	date: 2000/03/23 18:59:10;  author: thorpej;
	Shake out some bugs from the callout changes.
	===================================================================

ohci.c (1.80), uhci.c (1.91), uhcivar.h (1.25), usb_port.h (1.23),
usbdi.c (1.67), usbdivar.h (1.49):
	===================================================================
	date: 2000/03/24 22:03:30;  author: augustss;
	Some cleanup and renaming of the callouts used in USB drivers.
	===================================================================

uhci.c (1.92), uhcivar.h (1.26):
	===================================================================
	date: 2000/03/24 22:57:58;  author: augustss;
	Two major changes:

	  Make each xfer have its own intr_info.  This is necessary if we want
	  to queue multiple xfers on an endpoint.  This should get rid of the
	  (mostly harmless) DIAGNOSTICs about intr_infos (not) being done.

	  Change (again!) how xfers are aborted.  Aborting a TD is a nightmare
	  on the braindead UHCI controller.  (Unless you stop the HC, thereby
	  losing isoc traffic.)  Hopefully I got it right this time.
	===================================================================

usbdivar.h (1.50):
	===================================================================
	revision 1.50
	date: 2000/03/25 00:10:19;  author: augustss;  lines: +4 -2
	GC an unsued field and add some DIAGNOSTIC in xfer.
	===================================================================

ums.c: Use the callout functions instead of the timeout ones.

uhci.c (1.93):
	===================================================================
	revision 1.93
	date: 2000/03/25 00:11:21;  author: augustss;
	lines: +26 -1
	Add more DIAGNOSTIC when aborting isoc.
	===================================================================

uhci.c (1.94), usbdivar.h (1.51):
	===================================================================
	date: 2000/03/25 07:13:05;  author: augustss;
	More DIAGNOSTIC.
	Initialize a callout handle I forgot.
	===================================================================

uhci.c (1.95):
	===================================================================
	revision 1.95
	date: 2000/03/25 07:23:12;  author: augustss;
	Exp;  lines: +24 -7
	Improve uhci_dump_ii().
	===================================================================

ohci.c (1.81), uhci.c (1.96), uhcivar.h (1.27), usb_subr.c (1.68),
usbdi.c (1.68), usbdivar.h (1.52):
	===================================================================
	date: 2000/03/25 18:02:33;  author: augustss;
	Rename and move around callout handles to make it more sane.
	Add some DIAGNOSTIC.
	Fix buglet in isoc abort on UHCI.
	===================================================================

uhci.c (1.98):
	===================================================================
	revision 1.98
	date: 2000/03/27 07:39:48;  author: augustss;  lines: +12 -4
	Make it compile without DIAGNOSTIC.
	===================================================================

uhci.c (1.99):
	===================================================================
	revision 1.99
	date: 2000/03/27 08:01:09;  author: augustss;  lines: +1 -5
	Remove some debug nonsense.
	===================================================================

uhci.c (1.100):
	===================================================================
	revision 1.100
	date: 2000/03/27 09:41:36;  author: augustss;  lines: +13 -3
	Don't mess with QH in bulk abort for the moment.
	===================================================================

uhci.c (1.102):
	===================================================================
	revision 1.102
	date: 2000/03/27 22:42:57;  author: augustss;  lines: +66 -26
	Be a little more careful when aborting.
	Preallocate some TDs for large buffers.
	===================================================================

uhci.c (1.103):
	===================================================================
	date: 2000/03/28 09:47:10;  author: augustss;  lines: +11 -1
	Another patch for xfer abort...
	XXX The current xfer queueing and aborting semantics should really
	XXX be changed.  It cannot be implemented in a sane way on UHCI.
	XXX One day when I have lots of time I'll redesign it...
	===================================================================

uhci.c (1.104): Correct a debug message.
uhci.c (1.105): Be more defensive in a DIAGNOSTIC test.

uhci.c (1.106):
	===================================================================
	revision 1.106
	date: 2000/03/29 01:49:13;  author: augustss;  lines: +14 -309
	*SIGH*  Revert back to the old method of aborting xfers.
	I had tested the new stuff for two months now, but as soon as I commited
	it the problems started to appear.  Murphy, no doubt...
	===================================================================

usb_subr.c (1.70), usbdi.c (1.71), usbdivar.h (1.53):
	===================================================================
	revision 1.70
	date: 2000/03/29 01:45:20;  author: augustss;  lines: +2 -1
	Do not accept new xfers for queuing while a pipe is aborting.
	===================================================================
2002-03-16 12:06:01 +00:00