Commit graph

92644 commits

Author SHA1 Message Date
Dag-Erling Smørgrav f7f2eceb60 Make the experimental platforms tinderbox extra verbose. 2003-07-31 07:47:25 +00:00
Ruslan Ermilov 6d44eb567d From now on, Alpha releases will come with NO_FLOPPIES.
Approved by:	consensus on freebsd-alpha

A replacement (miniboot.iso) is currently under development.
2003-07-31 07:28:58 +00:00
Ruslan Ermilov eed31dc939 Revert last delta, sys/conf/kern.pre.mk,v 1.33 does the job.
OK'ed by:	scottl
2003-07-31 07:13:54 +00:00
David Schultz e02cc8e419 Cross-reference arc4random(3). 2003-07-31 06:18:34 +00:00
David Schultz 05e1bf3461 The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1. 2003-07-31 06:18:24 +00:00
Scott Long e8d4f10982 Allocate the S/G list in the tag, not on the stack. The enforces the rule
that while many maps can exist and be loaded per tag, bus_dmamap_load() and
friends can only be called on one map at a time from the tag.  This is
enforced via the mutex arguments in the tag.

Fixing this bug means that s/g lists can be arbitrarily long in length, and
also removes an ugly GNU-ism from the code.  No API or ABI change is
incurred.  Similar changes for other platforms is forthcoming.
2003-07-31 05:34:20 +00:00
Marcel Moolenaar 5ba809ff66 In set_mcontext(), store the (user) stack pointer and the thread
pointer in the PCB of the corresponding thread if it's not the
current thread.  This is needed for thr_create() to setup the
newly created thread from the context provided by the application.

This commit finalizes supporting libthr.
2003-07-31 05:27:00 +00:00
Bosko Milekic b053bc8407 Make sure that when the PV ENTRY zone is created in pmap, that it's
created not only with UMA_ZONE_VM but also with UMA_ZONE_NOFREE.  In
the i386 case in particular, the pmap code would hook a special
page allocation routine that allocated from kernel_map and not kmem_map,
and so when/if the pageout daemon drained the zones, it could actually
push out slabs from the PV ENTRY zone but call UMA's default page_free,
which resulted in pages allocated from kernel_map being freed to
kmem_map; bad.  kmem_free() ignores the return value of the
vm_map_delete and just returns.  I'm not sure what the exact
repercussions could be, but it doesn't look good.

In the PAE case on i386, we also set-up a zone in pmap, so be
conservative for now and make that zone also ZONE_NOFREE and
ZONE_VM.  Do this for the pmap zones for the other archs too,
although in some cases it may not be entirely necessarily.  We'd
rather be safe than sorry at this point.

Perhaps all UMA_ZONE_VM zones should by default be also
UMA_ZONE_NOFREE?

May fix some of silby's crashes on the PV ENTRY zone.
2003-07-31 03:39:51 +00:00
David Xu 01724ec53d Update manual for i386_set_ldt to reflect newly added features.
Submitted by: julian
2003-07-31 02:13:48 +00:00
David Xu dae8d52de5 Enhance i386_set_ldt to allow application to dynamic allocate
or free a LDT entry. The function has following prototype:
  int i386_set_ldt(int start_sel, union descriptor *descs, int num_sels);

Added Features:
o If start_sel is 0, num_sels is 1 and the descriptor pointed to by descs
  is legal, then i386_set_ldt() will allocate a descriptor and return its
  selector numbe

o If num_descs is 1, start_sels is valid, and descs is NULL, then
  i386_set_ldt() will free that descriptor (making it available to be real-
  located again later).

o If num_descs is 0, start_sels is 0 and descs is NULL then, as a special
  case, i386_set_ldt() will free all descriptors.

Reviewed by: julian
2003-07-31 02:11:04 +00:00
Alexander Kabaev 9cd4ad9c8f Bump __FreeBSD_version to indicate GCC 3.3.1-pre import.
Reminded by:	kris
2003-07-31 01:45:35 +00:00
Peter Wemm aeaead20b8 When ktracing context switches, make sure we record involuntary switches.
Otherwise, when we get a evicted from the cpu, there is no record of it.
This is not a default ktrace flag.
2003-07-31 01:36:24 +00:00
Peter Wemm ad7a226f9d Deal with 'options KSTACK_PAGES' being a global option. 2003-07-31 01:31:32 +00:00
Peter Wemm aac6412bcd Cosmetic: fix some disorder of #include "opt_...." files 2003-07-31 01:29:09 +00:00
Peter Wemm edc367db34 Remove leftover relic of pmap_new_thread() etc. 2003-07-31 01:28:41 +00:00
Peter Wemm 3950c40739 KSTACK_PAGES is a global option. 2003-07-31 01:27:18 +00:00
Peter Wemm 9fb1db7bc8 Cosmetic: fix disorder of opt_kstack_pages.h include. 2003-07-31 01:26:40 +00:00
Peter Wemm 15a7ad60fb Add #include "opt_kstack_pages.h" and "opt_kstack_max_pages.h" to remain
in sync with the backend machdep code.  When cpu_thread_init() does not
have the same idea of KSTACK_PAGES as the thing that created the kstack,
all hell breaks loose.

Bad alc! no cookie! :-)
2003-07-31 01:25:05 +00:00
Marcel Moolenaar 8b04492f2c In cpu_thread_setup(), set md_pcbpaddr to the physical address of
the pcb. We use the physical address for context switching.
While here, fix a nearby style(9) bug.
2003-07-31 01:05:34 +00:00
David Xu 1fc434dc9a Use correct signal when calling sigexit. 2003-07-30 23:11:37 +00:00
Pierre Beyssac ae9fcf4c66 Remove test in pipe_write() which causes write(2) to return EAGAIN
on a non-blocking pipe in cases where select(2) returns the file
descriptor as ready for write. This in turns causes libc_r, for
one, to busy wait in such cases.

Note: it is a quick performance fix, a more complex fix might be
required in case this turns out to have unexpected side effects.

Reviewed by:	silby
MFC after:	3 days
2003-07-30 22:50:37 +00:00
Scott Long cc2185305b Enforce -fno-strict-aliasing to override the converse that is implied by
-O2 and -Os.

Reviewed by:	peter
2003-07-30 22:11:36 +00:00
John Baldwin cb075651f8 Whitespace nit. 2003-07-30 20:59:36 +00:00
John Baldwin 47b722c1af When complaining about a sleeping thread owning a mutex, display the
thread's pid to make debugging easier for people who don't want to have to
use the intended tool for these panics (witness).

Indirectly prodded by:	kris
2003-07-30 20:42:15 +00:00
Bruce Evans 1734c95cec Fixed style bugs in rev.1.94 before MFCing it (for large C asm statements,
use "\n\" instead of "\" at the end of each source line, and don't use
semicolons).  Fixed some older style bugs on the same lines (mainly
English errors in comments).
2003-07-30 20:16:04 +00:00
Andrew Gallatin 4c672cfa18 Make this at least compile on 64 bit platforms. Its been breaking
the alpha tinderbox for far too long.
2003-07-30 20:09:22 +00:00
Mike Makonnen 770086e47b Apply some sort of order to the FILES list. 2003-07-30 20:05:20 +00:00
Mike Makonnen 81ad367d25 Add two files (early.sh and gbde) that previously were not
hooked up to the build.
2003-07-30 19:53:40 +00:00
Bosko Milekic d56368d779 Plug a race and a leak in UMA.
1) The race has to do with zone destruction.  From the zone destructor we
   would lock the zone, set the working set size to 0, then unlock the zone,
   drain it, and then free the structure.  Within the window following the
   working-set-size set to 0 and unlocking of the zone and the point where
   in zone_drain we re-acquire the zone lock, the uma timer routine could
   have fired off and changed the working set size to something non-zero,
   thereby potentially preventing us from completely freeing slabs before
   destroying the zone (and thus leaking them).

2) The leak has to do with zone destruction as well.  When destroying a
   zone we would take care to free all the buckets cached in the zone, but
   although we would drain the pcpu cache buckets, we would not free them.
   This resulted in leaking a couple of bucket structures (512 bytes each)
   per cpu on SMP during zone destruction.

While I'm here, also silence GCC warnings by turning uma_slab_alloc()
from inline to real function.  It's too big to be an inline.

Reviewed by: JeffR
2003-07-30 18:55:15 +00:00
Alan Cox 93b4c5b707 The introduction of vm object locking has caused witness to reveal
a long-standing mistake in the way a portion of a pipe's KVA is
allocated.  Specifically, kmem_alloc_pageable() is inappropriate
for use in the "direct" case because it allows a preceding vm map entry
and vm object to be extended to support the new KVA allocation.
However, the direct case KVA allocation should not have a backing
vm object.  This is corrected by using kmem_alloc_nofault().

Submitted by:	tegge (with the above explanation by me)
2003-07-30 18:55:04 +00:00
Mike Makonnen 7a34a70b8d tty whacking should occur early, but not so early that the
required commands are not on a mounted file system.

Noticed by: bde
2003-07-30 18:53:59 +00:00
Nate Lawson a7985e4feb Use ACPI_FLUSH_CPU_CACHE() instead of wbinvd(). Verified .o with md5.
Pointed out by:	Mark Santcroos <marks@ripe.net>
2003-07-30 17:20:33 +00:00
Thomas Moestl 416c84a212 Return 1 from pmap_protect_tte() instead of 0. When used with
tsb_foreach(), 0 signals to terminate the tsb traversal, so when
tsb_foreach() was used in pmap_protect() (which only happens when
the area to be protected is larger than PMAP_TSB_THRESH = 16MB), only
the first tsb entry in the specified range would be protected.

Reported by:	Andrew Belashov <bel@orel.ru>
2003-07-30 16:27:51 +00:00
Nate Lawson a329ebca91 Add and document the hw.acpi.ec.poll_timeout tunable. 2003-07-30 16:22:53 +00:00
Hartmut Brandt 16a81ac7aa Fix the code with respect to the assumption that sizeof(long) == 4. 2003-07-30 16:15:49 +00:00
Hartmut Brandt 82817dd82d Fix what was a common idiom in PDP-11 days: declare a local int and
use the address of that int for read(2). While this happens to work on
LE, it surely is wrong on BE.
2003-07-30 16:02:50 +00:00
Hartmut Brandt 9ecbee467c Make this compile with WARNS=6. 2003-07-30 15:58:08 +00:00
Bosko Milekic a40fdcb439 When generating the zone stats make sure to handle the master zone
("UMA Zone") carefully, because it does not have pcpu caches allocated
at all.  In the UP case, we did not catch this because one pcpu cache
is always allocated with the zone, but for the MP case, we were getting
bogus stats for this zone.

Tested by: Lukas Ertl <le@univie.ac.at>
2003-07-30 15:22:37 +00:00
Hartmut Brandt 81681144c2 Fix warnings: a variable that was unused, a variable that
was unused unless sun was defined and printing of u_longs
with %x.

PR:		bin/39818
Submitted by:	dan@obluda.cz
MFC after:	1 week
2003-07-30 14:56:25 +00:00
Ruslan Ermilov 74345a8f83 The -Os kernel build with GCC 3.3.1 also requires -fno-strict-aliasing
to survive.

Discussed with:	bde
Tested on:	i386 and pc98
2003-07-30 14:46:46 +00:00
Ruslan Ermilov 9b72ad91bf Initialize the FIXCRYPTO, BINMAKE and related variables (that use
the != operator) only when needed.

This change allows me to check out the current version of release/
makefiles only (co -l) to /tmp/release, and use that directory to
build a release (supplying the correct WORLDDIR).

Without this, attempt to "make release" caused an endless fork bomb
while trying to evaluate FIXCRYPTO, and the only way I could get
away from this on a remote box was to "kill -INT 1", thanks to
tcsh(1) and its internal "kill" command.
2003-07-30 14:33:32 +00:00
Hartmut Brandt 539f18e4a4 Rearrange the vcc structure so that the generic getvcc function
can be used and add per-VC statistics.
2003-07-30 14:20:00 +00:00
Daniel Eischen 24dc93d4c2 Don't forget to unlock the scheduler lock. Somehow this got removed
from one of my last commits.  This only affected priority ceiling
mutexes.

Pointy hat to:	deischen
2003-07-30 13:28:05 +00:00
Hartmut Brandt 6662c0c12e Rearrange the fields in the vcc table entry to fit to the requirements
of the generic getvcc function and used that function instead of the home
grown.
2003-07-30 11:32:42 +00:00
Boris Popov 177f5441d5 Release contrib/smbfs from the import-only mode. Now changes can be committed
directly without import process. The same about MFCs.

Put a note about nwfs.

Discussed with:	peter
2003-07-30 10:43:13 +00:00
Hiroki Sato dc9fea182f New release notes:
one-true-awk 29-Jul-2003 snapshot.
2003-07-30 08:36:16 +00:00
Hartmut Brandt 223e90573f Generate events when the carrier goes up or down.
Add two sysctl's that allow read-only access to the current
state of the utopia interface and to the carrier state.
2003-07-30 08:35:58 +00:00
Poul-Henning Kamp 7b4bd98ad5 Remove the disabling of buckets workaround.
Thanks to:	jeffr
2003-07-30 07:50:19 +00:00
Ruslan Ermilov f2eeb85de6 Embed a simplistic version of the dokern.sh script directly into
release/Makefile.

Reviewed by:	marcel

The original patch also removed ia64/dokern.sh, but this was OBE.
2003-07-30 07:40:45 +00:00
SUZUKI Shinsuke c41387f6b2 fixed wrong parameter descriptions
Obtained from: KAME
MFC after: 1 day
2003-07-30 07:33:10 +00:00