Commit graph

2047 commits

Author SHA1 Message Date
Poul-Henning Kamp 9a6dc4b647 Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
Poul-Henning Kamp 2140d01b27 Machine generated patch which changes linedisc calls from accessing
linesw[] directly to using the ttyld...() functions

The ttyld...() functions ar inline so there is no performance hit.
2004-06-04 16:02:56 +00:00
John Baldwin 8ba9fe960e Regenerate. 2004-06-04 13:52:51 +00:00
John Baldwin 1e9dd22617 Mark linux_wait4() as MP Safe as it is so and holding Giant across all of
kern_wait() trips an assert that Giant is not held in thread_wait().

PR:		67538
Submitted by:	Nikos Ntarmos ntarmos at ceid dot upatras dot gr
2004-06-04 13:52:23 +00:00
Tim J. Robbins cc05397ffc Remove checks for curthread == NULL - it can't happen. 2004-06-03 10:22:47 +00:00
Poul-Henning Kamp fd360128ff Add missing <sys/module.h> instances which were shadowed by the nested
include in <sys/kernel.h>
2004-06-03 05:58:30 +00:00
Tim J. Robbins fa2a4d0595 Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().

Reviewed by:	jhb
2004-06-03 01:47:37 +00:00
Poul-Henning Kamp 138fbf675a Gainfully employ the new ttyioctl in the trivial cases. 2004-06-01 13:49:28 +00:00
Thomas Moestl 65e29c4822 Retire cpu_sched_exit(); it is not used any more. 2004-05-26 12:09:39 +00:00
Bruce Evans b2321e7cdb Moved most of the "MI" definitions and declarations from <machine/profile.h>
to <sys/gmon.h>.  Cleaned them up a little by not attempting to ifdef
for incomplete and out of date support for GUPROF in userland, as in
the sparc64 version.
2004-05-19 15:41:26 +00:00
Stefan Farfeleder b1aa0ba527 <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is
defined.  Otherwise first including <wchar.h> and then <stdint.h> leads to no
WINT_M{AX,IN} at all.

PR:		64956
Approved by:	das (mentor)
2004-05-18 16:04:57 +00:00
Peter Wemm e8855d4f97 Make a small revision to the api between the elf linker core and the
elf_reloc() backends for two reasons.  First, to support the possibility
of there being two elf linkers in the kernel (eg: amd64), and second, to
pass the relocbase explicitly (for relocating .o format kld files).
2004-05-16 20:00:28 +00:00
David Schultz fe0fa6c02b When a denormal underflows to zero, raise an underflow exception.
Thanks to marcel for helping me test this.
2004-05-06 09:36:11 +00:00
David Schultz 88ddd9e832 Don't clear the exception flags after we finish emulating a
floating-point instruction in the kernel.  The flags are
supposed to be cumulative.

Thanks to marcel for helping me test this.
2004-05-06 09:35:57 +00:00
Marcel Moolenaar d1d9feac7c Add option GEOM_GPT. This brings the ability to have a large number of
partitions on a single disk.
2004-05-02 20:40:19 +00:00
David E. O'Brien 4e744b5e7f Spell Ethernet correctly. 2004-05-02 18:57:29 +00:00
Andrew Gallatin 69e956d0a7 MFamd64: implement the PG_UNMANAGED flag on vm_pages.
Alan noticed that alpha ignored PG_UNMANAGED when we were looking into
pmap_emulate_reference() panics.  Perhaps this will help.

Reviewed by: alc
2004-04-26 17:49:05 +00:00
Alan Cox d429eede9f Since pmap_pinit() wants a prezeroed page, change it to ask for one. (Note
that vm_page_grab(), unlike vm_page_alloc(), always returns a prezeroed
page if VM_ALLOC_ZERO is specified.  So, checking is unnecessary.)
2004-04-26 17:22:07 +00:00
David Schultz be3930682a Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilation
environments.

PR:		63935
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-25 02:36:29 +00:00
Alan Cox 7ef6ba5d27 Push down the responsibility for zeroing a physical page from the
caller to vm_page_grab().  Although this gives VM_ALLOC_ZERO a
different meaning for vm_page_grab() than for vm_page_alloc(), I feel
such change is necessary to accomplish other goals.  Specifically, I
want to make the PG_ZERO flag immutable between the time it is
allocated by vm_page_alloc() and freed by vm_page_free() or
vm_page_free_zero() to avoid locking overheads.  Once we gave up on
the ability to automatically recognize a zeroed page upon entry to
vm_page_free(), the ability to mutate the PG_ZERO flag became useless.
Instead, I would like to say that "Once a page becomes valid, its
PG_ZERO flag must be ignored."
2004-04-24 20:53:55 +00:00
Alan Cox c9b7c6e802 MFamd64
Simplify the sf_buf implementation.  In short, make it a veneer
 over the direct virtual-to-physical mapping.
2004-04-18 06:24:51 +00:00
John Baldwin d0a83b0ba6 Whitespace fix. 2004-04-16 20:09:53 +00:00
Alan Cox bf5a327d5e Remove avail_end. It is not used. 2004-04-11 05:08:26 +00:00
Alan Cox b14d6acced - pmap_kenter_temporary() is unused by machine-independent code. Therefore,
move its declaration to the machine-dependent header file on those
   machines that use it.  In principle, only i386 should have it.
   Alpha and AMD64 should use their direct virtual-to-physical mapping.
 - Remove pmap_kenter_temporary() from ia64.  It is unused.  Approved
   by: marcel@
2004-04-10 22:41:46 +00:00
Warner Losh f36cfd49ad Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 20:46:16 +00:00
Warner Losh 3501fd399e Remove the advertsing clause, per the Regent's letter dated July 22, 1999.
Approved by: core
2004-04-05 21:00:51 +00:00
Alan Cox c8607538c8 Remove avail_start on those platforms that no longer use it. (Only amd64
does anything with it beyond simple initialization.)
2004-04-05 04:08:00 +00:00
Alan Cox bdb93eb248 Remove unused arguments from pmap_init(). 2004-04-05 00:37:50 +00:00
Alan Cox 9132f23442 Remove CADDR1 and CMAP1. They are unused. 2004-04-03 21:38:20 +00:00
Alan Cox 121230a40d In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
should not.  Add a new parameter so that the caller can specify which is
the case.

Reported by:	dillon
2004-04-03 09:16:27 +00:00
John Baldwin e43257aa7d Finish fixing up Alpha to work with an MP safe ptrace():
- ptrace_single_step() is no longer called with the proc lock held, so
  don't try to unlock it and then relock it.
- Push Giant down into proc_rwmem() instead of forcing all the consumers
  (including Alpha breakpoint support) to explicitly wrap calls to
  proc_rwmem() with Giant.

Tested by:	kensmith
2004-04-01 20:56:44 +00:00
Bruce M Simpson d25901b5da MFi386: Use the BSD madvise() syscall implementation for Linux binary
emulation, instead of treating it as an unimplemented syscall.

Requested by:	marcel
2004-03-29 02:19:43 +00:00
Ken Smith 24b5b08280 MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now
that it's unused.

Note: If anyone's toes got stepped on by me doing this let me know
privately please.

Approved by:	rwatson (mentor)
2004-03-29 02:01:42 +00:00
John Baldwin fafb7a586b Enable interrupt preemption on Alpha. Previously, flipping this switch on
caused hangs on SMP systems under load.  My theory was that an interrupted
thread was migrating and returning to PAL on a different CPU and that that
caused the hangs.  To prevent this, I used the recently added sched_pin()
API to pin the interrupted thread to the CPU that received the interrupt
across ithread_schedule() to prevent migration.  This seems to have fixed
the hangs based on tests by several folks on the alpha@ list.

Tested by:	wilko, tisco, several others on alpha@
2004-03-23 22:28:16 +00:00
Alan Cox 1af1ebb84e - Add uiomove_fromphys() implementations to alpha and ia64. These only
differ trivially from amd64.
 - Correct a spelling error in a comment.
2004-03-20 21:06:20 +00:00
Marcel Moolenaar a36bdc0606 Introduce the cpumask_t type. The purpose of the type is to create a
level of abstraction for any and all CPU mask and CPU bitmap variables
so that platforms have the ability to break free from the hard limit
of 32 CPUs, simply because we don't have more bits in an u_int. Note
that the type is not supposed to solve massive parallelism, where
the number of CPUs can be larger than the width of the widest integral
type. As such, cpumask_t is not supposed to be a compound type. If
such would be necessary in the future, we can deal with the issues
then and there. For now, it can be assumed that the type is integral
and unsigned.

With this commit, all MD definitions start off as u_int. This allows
us to phase-in cpumask_t at our leasure without breaking anything.
Once cpumask_t is used consistently, platforms can switch to wider
(or smaller) types if such would be beneficial (or not; whatever :-)

Compile-tested on: i386
2004-03-20 20:41:40 +00:00
John-Mark Gurney 4de27366d1 sync comment with i386's isa.c.. This removes a comment that is YEARS
old...
2004-03-17 21:45:55 +00:00
John Baldwin b7e23e826c - Replace wait1() with a kern_wait() function that accepts the pid,
options, status pointer and rusage pointer as arguments.  It is up to
  the caller to copyout the status and rusage to userland if needed.  This
  lets us axe the 'compat' argument and hide all that functionality in
  owait(), by the way.  This also cleans up some locking in kern_wait()
  since it no longer has to drop locks around copyout() since all the
  copyout()'s are deferred.
- Convert owait(), wait4(), and the various ABI compat wait() syscalls to
  use kern_wait() rather than wait1() or wait4().  This removes a bit
  more stackgap usage.

Tested on:	i386
Compiled on:	i386, alpha, amd64
2004-03-17 20:00:00 +00:00
Alan Cox 90ecfebd82 Refactor the existing machine-dependent sf_buf_free() into a machine-
dependent function by the same name and a machine-independent function,
sf_buf_mext().  Aside from the virtue of making more of the code machine-
independent, this change also makes the interface more logical.  Before,
sf_buf_free() did more than simply undo an sf_buf_alloc(); it also
unwired and if necessary freed the page.  That is now the purpose of
sf_buf_mext().  Thus, sf_buf_alloc() and sf_buf_free() can now be used
as a general-purpose emphemeral map cache.
2004-03-16 19:04:28 +00:00
John Baldwin e5592f4dd9 Regenerate. 2004-03-15 22:44:35 +00:00
John Baldwin 216db4ad00 - Mark ABI syscalls that call wait4() MP safe as recent changes to
the kernel wait4() made these all panic() implementations otherwise.
- The i386 linux_ptrace() syscall is MP safe.  Alpha was already marked
  MP safe.
2004-03-15 22:43:49 +00:00
Scott Long 11d905ecd8 Now that contigfree() does not require Giant, don't grab it in busdma. 2004-03-13 15:42:59 +00:00
Alan Cox fcffa790e9 Retire pmap_pinit2(). Alpha was the last platform that used it. However,
ever since alpha/alpha/pmap.c revision 1.81 introduced the list allpmaps,
there has been no reason for having this function on Alpha.  Briefly,
when pmap_growkernel() relied upon the list of all processes to find and
update the various pmaps to reflect a growth in the kernel's valid
address space, pmap_init2() served to avoid a race between pmap
initialization and pmap_growkernel().  Specifically, pmap_pinit2() was
responsible for initializing the kernel portions of the pmap and
pmap_pinit2() was called after the process structure contained a pointer
to the new pmap for use by pmap_growkernel().  Thus, an update to the
kernel's address space might be applied to the new pmap unnecessarily,
but an update would never be lost.
2004-03-07 21:06:48 +00:00
Alan Cox 925d2fedf5 Remove unused declarations. (Some time ago, these variables became fields
of vm/vm.h's struct kva_md_info.)
2004-03-07 07:13:15 +00:00
Lukas Ertl 1bcf24ee9d Fix syntax errors and wrong function prototypes in several MD header
files when using non-GNUC compilers.

PR:             kern/58515
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
Approved by:    grog (mentor), obrien
2004-03-05 09:19:59 +00:00
Ken Smith ea753400f0 The previous commit fixed -current on alpha for machines with
serial console connections but not graphical consoles.  This fixes the
graphical console machines.  It leaves the initial promcons console
driver in place until a bit later in the boot sequence, delaying the
switch to the device drivers more appropriate for the machine's real
console setup.  Note we still need the delayed make_dev() for promcons,
it does not have a proper bus interface so unlike other console drivers
it will not be found later during normal device discovery.

Tested by:			sepotvin <at> videotron <dot> ca
Root cause explained by:	grehan (-current)
Approved by:			rwatson (mentor)
2004-03-01 19:19:15 +00:00
Ken Smith 653700758e Previous commit mistakenly delayed cnadd() as well as make_dev().
Testing on cluster ref machine with just delaying make_dev() seems
to work, and results in printf() output appearing sooner in boot
cycle instead of going to /dev/null.

Caught by:	bde
Pointy hat:	kensmith
Approved by:	rwatson (mentor)
2004-02-28 16:36:14 +00:00
Ken Smith 44bacdd9bc Fix -current builds on alpha. Recent changes in device handling caused
subtle problems with how alpha was handling the promcons device.  This
moves the call to make_dev() for the promcons device to a later point of
the boot-up sequence than where promcons initially gets attached, make_dev()
called during the first attach crashes due to kernel stack issues.

Reviewed by:	gallatin, marcel, phk
Discussed on:	-current@, -alpha@
Approved by:	rwatson (mentor)
2004-02-27 19:30:46 +00:00
Poul-Henning Kamp dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Poul-Henning Kamp 8e1f1df080 Device megapatch 3/6:
Add missing D_TTY flags to various drivers.

Complete asserts that dev_t's passed to ttyread(), ttywrite(),
ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty
pointer.

Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default
cdevsw methods for D_TTY drivers and remove the explicit initializations
in various drivers cdevsw structures.
2004-02-21 20:41:11 +00:00