Commit Graph

33039 Commits

Author SHA1 Message Date
Andrew R. Reiter
e024f583de - Remove Giant acquisition from modevent(), modfnext(), modstat() and
modfind().  Giant is no longer needed by these functions for safe
  execution.

Reviewed by:	jhb
2002-06-26 00:31:44 +00:00
Matthew Dillon
070f64fe6f Part I of RLIMIT_VMEM implementation. Implement core functionality for
a new resource limit that covers a process's entire VM space, including
mmap()'d space.

(Part II will be additional code to check RLIMIT_VMEM during exec() but it
needs more fleshing out).

PR:		kern/18209
Submitted by:	Andrey Alekseyev <uitm@zenon.net>, Dmitry Kim <jason@nichego.net>
MFC after:	7 days
2002-06-26 00:29:28 +00:00
Andrew R. Reiter
4e77f68011 - Alleviate jail() from having the burden of acquiring Giant by simply
removing.  We can do this since we no longer need Giant to safely
  execute jail().

Reviewed by:	rwatson, jhb
2002-06-26 00:29:01 +00:00
Ian Dowse
6395da5437 Complete the initial set of VM changes required to support full
64-bit file sizes. This step simply addresses the remaining overflows,
and does attempt to optimise performance. The details are:

 o Use a 64-bit type for the vm_object `size' and the size argument
   to vm_object_allocate().
 o Use the correct type for index variables in dev_pager_getpages(),
   vm_object_page_clean() and vm_object_page_remove().
 o Avoid an overflow in the i386 pmap_object_init_pt().
2002-06-25 22:14:06 +00:00
Jeff Roberson
e78f35b33f Turn VM_ALLOC_ZERO into a flag.
Submitted by:	tegge
Reviewed by:	dillon
2002-06-25 22:01:12 +00:00
Jeff Roberson
5c0e403ba2 Reduce the amount of code that runs with the zone lock held in slab_zalloc().
This allows us to run the zone initialization functions without any locks held.
2002-06-25 21:04:50 +00:00
Alan Cox
366838ddfe o Eliminate vmspace::vm_minsaddr. It's initialized but never used.
o Replace stale comments in vmspace by "const until freed" annotations
   on some fields.
2002-06-25 18:14:38 +00:00
Thomas Moestl
358ad31d9a Don't assume that pointers are 4 bytes or sizeof(int) in size. This fixes
the indirection operator ('*') and address examination ('x/a') on
big-endian platoforms for which the above is not true, as well as on
little-endian platforms if the cut-off bits are not 0.
2002-06-25 15:59:24 +00:00
Jake Burkholder
218fd301cd pmap_kremove can no longer be used to remove the magic device mappings
installed with pmap_kenter_flags, since the physical addresses may not
have an associated vm_page.  Add a function to do this.

Tested by:	Tomi Vainio <Tomi.Vainio@Sun.COM>
2002-06-25 15:13:09 +00:00
KATO Takenori
79804ff975 MFi386: sys/i386/i386/machdep.c rev. 1.520. 2002-06-25 09:10:38 +00:00
Kirk McKusick
a7d50c22a6 Force the quota update to be done when an inode is released in
ufs_inactive. This avoid a panic when checking a NULL credential
in suser_cred().
2002-06-25 01:02:28 +00:00
Andrew R. Reiter
e4e93c612e - Remove UM_* user land memory macros since they are no longer used. 2002-06-24 22:31:17 +00:00
Mark Peek
44081f9b35 Add missing splx().
MFC after:	3 days
2002-06-24 22:28:42 +00:00
Jeffrey Hsu
6fd22caf91 Avoid unlocking the inp twice if badport_bandlim() returns -1.
Reported by:	jlemon
2002-06-24 22:25:00 +00:00
John Polstra
e255b776bc Work around what appears to be a chip bug in the BCM5701 that shows
up when operating in PCI-X mode.  For some received packets there is
data corruption in the first few bytes in that case.  Aligning the
packet buffer eliminates the corruption.  With this fix, the code
that offsets the packet buffer up by 2 bytes to align the payload is
disabled for BCM5701s operating in PCI-X mode.  On the i386, which
permits unaligned accesses, the payload is left unaligned.  On other
platforms, the packet is copied after reception to force alignment
of the payload.  Obviously, this work-around reduces performance in
those cases (BCM5701 plus PCI-X) where it is in effect.

MFC after:	3 days
2002-06-24 22:04:15 +00:00
Peter Wemm
417a86bac7 Compile in the cpu halt code even on SMP, instead just default the
sysctl (machdep.cpu_idle_hlt) to off in the SMP case.  This allows you to
turn it on if you wish and do not particularly care about the small window
where a cpu will remain halted even when a job is placed on the run queue
(until the next clock tick).
2002-06-24 21:31:57 +00:00
Doug Rabson
558685292a Add UMA_ZONE_VM flag to the zones which are used for pmap_enter(). 2002-06-24 18:31:49 +00:00
Jonathan Lemon
c86c4abf99 Prototype fixes (long newinum --> ino_t newinum). 2002-06-24 17:20:19 +00:00
Jeffrey Hsu
f14e4cfe33 Style bug: fix 4 space indentations that should have been tabs.
Submitted by:	jlemon
2002-06-24 16:47:02 +00:00
Mark Murray
f607758849 Fix a GCCism.
int foo[0];  // dodgy
int foo[];   // means the same, works the same and survives lint.

Tested by:	3 months of use on my laptop
2002-06-24 16:44:38 +00:00
Jake Burkholder
8ba3d077ff Add an MD callout like cpu_exit, but which is called after sched_lock is
obtained, when all other scheduling activity is suspended.  This is needed
on sparc64 to deactivate the vmspace of the exiting process on all cpus.
Otherwise if another unrelated process gets the exact same vmspace structure
allocated to it (same address), its address space will not be activated
properly.  This seems to fix some spontaneous signal 11 problems with smp
on sparc64.
2002-06-24 15:48:02 +00:00
Robert Drehmel
9ce4f54341 Enable mixer interrupts after the mixer is initialized,
otherwise we might get interrupts and are unable to
handle them properly, which results in a page fault.

PR:		kern/39549
Submitted by:	Gil Kloepfer <gil@arlut.utexas.edu>
2002-06-24 15:28:47 +00:00
Yoshihiro Takahashi
b8391d6a1a Merged from sys/dev/sio/sio.c revisions 1.376 and 1.377. 2002-06-24 15:24:42 +00:00
Maxime Henrion
097b91c0ad Oops, this should have been part of my previous commit.
Somehow, it hasn't.

Reviewed by:	phk
2002-06-24 14:18:39 +00:00
Maxime Henrion
0ae037eb45 Bring sys/kern/md5c.c in sync with the userland version.
Add a comment so that people don't forget to keep the
version in src/lib/libmd/md5c.c in sync with this one.
This fixes a warning on sparc64.

Reviewed by:	phk
2002-06-24 14:15:25 +00:00
Maxime Henrion
6569d6f3ec Yet another warning fix for 64 bits platforms.
Reviewed by:	phk
2002-06-24 12:07:02 +00:00
Bruce Evans
c894109f44 Include <sys/types.h> in the !_KERNEL case so that this file is
self-sufficient in that case (it needs dev_t).  This is normal pollution
for most headers that define ioctl numbers.
2002-06-24 11:45:45 +00:00
Bruce Evans
22f6ca8d0d Fixed some style bugs (mainly excessive indentation).
Not completely unapproved by:	julian
2002-06-24 11:37:56 +00:00
KATO Takenori
0fc8183905 MFi386: sys/i386/isa/clock.c revision 1.187. 2002-06-24 08:04:47 +00:00
Warner Losh
be5359fb85 On REASREQ packets, handled them earlier in processing the association
request.  We need to eat the MAC address of the packet before we go
looking at the SSID and such.  Doing do is sufficient to make Cisco
cards assocaite with prism II cards.

The submitter says that Linux does the same thing.

Submitted by: jhay
2002-06-24 07:50:41 +00:00
Kirk McKusick
d374764fd3 Use proper size in bzero of stat structure.
Submitted by:	Jake Burkholder <jake@locore.ca>
Sponsored by:	DARPA & NAI Labs.
2002-06-24 07:14:44 +00:00
Jonathan Mini
00676596e3 userout -> out. These two labels are now identical.
Approved by:	alfred
2002-06-24 06:23:41 +00:00
Jonathan Mini
01ad8a53db Remove unused diagnostic function cread_free_thread().
Approved by:	alfred
2002-06-24 06:22:00 +00:00
Andrew R. Reiter
9561b109ae - Remove DMA_* macros as only one, DMA_GET_ADDR, was used.
- Convert DMA_GET_ADDR() calls to vtophys() calls in order to finish
  removing the DMA_* macros.
2002-06-24 05:03:44 +00:00
Warner Losh
586fdde4bc Add kernel printf bits for WI_SUPPRATES and HOSTAP_FLAGS 2002-06-24 04:42:46 +00:00
Warner Losh
890565f00b Add RID to get the DBM adjustment factor 2002-06-24 04:41:34 +00:00
Warner Losh
039e0899d2 Add kernel print bits #define for the IEEE80211_CAPINFO bits. 2002-06-24 04:40:12 +00:00
Andrew R. Reiter
c3f9fb1a24 - Remove the definition for SCHED_ATM
- Change SCHED_ATM statements into schednetisr() calls.
2002-06-24 04:10:12 +00:00
Warner Losh
6b891daaa5 Partially back out the "make all interfaces standard" commit. There's
a small chance that it might have broken loading the miibus, so err on
the side of caution until I can figure out what is going on.  This
backs out all but the PCI, PCIB and ISA bus interfaces being
"standard," which have been well tested...
2002-06-24 01:53:26 +00:00
Matthew Dillon
727300861d I Noticed a defect in the way wakeup() scans the tailq. Tor noticed an
even worse defect in wakeup_one().  This patch cleans up both.

Submitted by:	tegge
MFC after:	3 days
2002-06-24 00:14:36 +00:00
Ian Dowse
2f384b348a Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid
overflows with the large file sizes that UFS2 permits.

Reviewed by:	dillon, alc, tegge
2002-06-23 21:57:19 +00:00
Maxime Henrion
584884ca0c Add a missing prototype to fix a warning. 2002-06-23 21:29:00 +00:00
Luigi Rizzo
f10e85d797 Slightly restructure the #ifdef INET6 sections to make the code
more readable.

Remove the six "register" attributes from variables tcp_output(), the
compiler surely knows well how to allocate them.
2002-06-23 21:25:36 +00:00
Luigi Rizzo
410bb1bfe2 Move two global variables to automatic variables within the
only function where they are used (they are used with TCPDEBUG only).
2002-06-23 21:22:56 +00:00
Luigi Rizzo
4d2e36928d Move some global variables in more appropriate places.
Add XXX comments to mark places which need to be taken care of
if we want to remove this part of the kernel from Giant.

Add a comment on a potential performance problem with ip_forward()
2002-06-23 20:48:26 +00:00
Maxime Henrion
53b3e91200 Split the declaration and the initialization of two variables.
This has the fortunate side effect of stopping GCC from
reporting warnings about unused variables on sparc64.

Reviewed by:	bde
2002-06-23 20:03:03 +00:00
Nick Hibma
befd9c61ce set siocnunit to the correct value. This fixes the freeze on boot for
alphas.

Submitted by:		 Bernd Walter <ticso@cicely5.cicely.de>
2002-06-23 18:57:53 +00:00
Maxime Henrion
0a84e7c8f7 More 64 bits platforms warning fixes.
Reviewed by:	rwatson
2002-06-23 18:32:39 +00:00
Maxime Henrion
cfbf0a4678 Warning fixes for 64 bits platforms. This eliminates all the
warnings I have had in the FFS code on sparc64.

Reviewed by:	mckusick
2002-06-23 18:17:27 +00:00
Alan Cox
848d14193d o Remove GIANT_REQUIRED from kmem_alloc_pageable(), kmem_alloc_nofault(),
and kmem_free().  (Annotate as MPSAFE.)
 o Remove incorrect casts from kmem_alloc_pageable() and kmem_alloc_nofault().
2002-06-23 18:07:40 +00:00