Commit Graph

25309 Commits

Author SHA1 Message Date
leo e325a47307 Fix "unused variable `c'" warning. (From Julian Coleman) 1998-09-14 11:50:59 +00:00
pk 0a46abfd42 Collect redundant code into cpu_setup(). 1998-09-14 10:37:12 +00:00
pk b1b69e4195 Fix cache bit confusion in pmap_alloc_cpu(). 1998-09-14 09:46:11 +00:00
jonathan 0b09668693 Fix typos in signal rework (sc.regs -> sc-regs, rege -> regs). 1998-09-14 07:04:06 +00:00
thorpej a4a356f9a6 Need 83 longs for a jmp_buf now. 1998-09-14 06:07:29 +00:00
scottr 0af57c2461 Correct a serious problem that affects at least front ends that can only
use PIO (or equivalent) code to do asynchronous transfers:  In
ncr5380_scsi_cmd(), test to see if the request has been completed after
the call to ncr5380_sched(), and return COMPLETE if so.  This avoids
going into an infinite loop in scsipi_execute_xs() while waiting for an
interrupt to trigger completion of the transfer... which, of course,
never happens, since it's already done.
1998-09-14 05:56:14 +00:00
scottr f2c6836685 Fix a problem uncovered when we started to use the pool allocator to manage
scsipi_xfer structures.

When scsipi_execute_xs() calls the driver's scsi_cmd function, it assumes
that it can still dereference a pointer to the scsipi_xfer struct.  Since
scsipi_done() has already been called, which in turn has called
scsipi_free_xs(), the struct has already been returned the structure to
the pool!  In other words, xs->flags has been compromised, but we are still
testing it.

These changes resolve the problem by doing the following:

- In scsipi_execute_xs(), if the hardware driver's scsi_cmd function
  returns SUCCESSFULLY_QUEUED, set a new flag (SCSI_ASYNCREQ) in xs->flags.
  Since the request will be handled asynchronously, we will need the
  scsipi_xfer struct to be freed in scsipi_done().

  If the hardware driver's scsi_cmd function returns COMPLETE, we now
  simply return any actual errors, or 0 if none occurred.  (Previously,
  we may have returned EJUSTRETURN, of which the sole effect was to
  avoid freeing the scsipi_xfer struct in our caller.)

- In scsipi_done(), only free the scsipi_xfer struct for async requests.
  The contents of the struct will otherwise remain valid until the
  function that initiated the transfer frees it.

With this change, responsibility for freeing the struct now lies in two
places, depending on the type of the request:

- For synchronous requests, the routine calling scsipi_execute_xs()
  must clean up.

- For asynchronous requests, scsipi_done() cleans up (as it always has).

[Note:  this change also corrects a problem with sddump():  scsipi_done()
was attempting to return a static scsipi_xfer struct to the pool!  Since
dumps are performed synchronously, we now handle this correctly.]

This solution was provided by Jason Thorpe, after I got him to look at
some related (but insufficient) attempts of my own.
1998-09-14 05:49:21 +00:00
scottr 10640f1bfc Fix a problem uncovered when we started to use the pool allocator to manage
scsipi_xfer structures.

When scsipi_execute_xs() calls the driver's scsi_cmd function, it assumes
that it can still dereference a pointer to the scsipi_xfer struct.  Since
scsipi_done() has already been called, which in turn has called
scsipi_free_xs(), the struct has already been returned to the pool!  In
other words, xs->flags has been compromised, but we are still testing it.

These changes resolve the problem by doing the following:

- In scsipi_execute_xs(), if the lower-level driver's scsi_cmd function
  returns SUCCESSFULLY_QUEUED and SCSI_NOSLEEP is set in xs->flags, set a
  new flag (SCSI_ASYNCREQ).  This indicates that scsipi_done() should free
  the scsipi_xfer struct.

  If the lower-level driver's scsi_cmd function returns SUCCESSFULLY_QUEUED
  but SCSI_NOSLEEP is not set, we wait (via tsleep()) for the request to
  complete, then fall through to the COMPLETE case.

  If the lower-level driver's scsi_cmd function returns COMPLETE, we now
  simply return any actual errors, or 0 if none occurred.  (Previously,
  we may have returned EJUSTRETURN, of which the sole effect was to
  avoid freeing the scsipi_xfer struct in our caller.  No code seems
  to depend on this behavior, however.)

- In scsipi_done(), only free the scsipi_xfer struct for async requests.
  The contents of the struct will otherwise remain valid until the
  function that initiated the transfer frees it.

With this change, responsibility for freeing the struct now lies in two
places, depending on the type of the request:

- For synchronous requests, the routine calling scsipi_execute_xs()
  must clean up.

- For asynchronous requests, scsipi_done() cleans up (as it always has).

[Note:  this change also corrects a problem with sddump():  scsipi_done()
was attempting to return a static scsipi_xfer struct to the pool!  Since
dumps are performed synchronously, we now handle this correctly.]

This solution was provided by Jason Thorpe, after I got him to look at
some related (but insufficient) attempts of my own.
1998-09-14 05:49:20 +00:00
thorpej 27f3588d7b oops, missed one. 1998-09-14 02:50:12 +00:00
thorpej cbfc257eda sigset13_t -> int. 1998-09-14 02:48:33 +00:00
tv 058853ee30 Use WARNS=1 to get -Wall, and properly disable -Wmain on gcc 2.8 1998-09-14 00:50:22 +00:00
perry 5d0722b723 Note that kernel Makefile support for tags is totally broken. 1998-09-13 23:50:39 +00:00
tron 7010f82942 Sync with "GENERIC". 1998-09-13 23:15:46 +00:00
pk 9949f7d556 regen. 1998-09-13 22:29:06 +00:00
pk c7971c960e Signal compat: sunos sigset_t conversions;
new sunos_sigvec() & sunos_sigpending()
1998-09-13 22:28:16 +00:00
hwr 6831c842f3 The post 1.3.2 world is actually ready for this. 1998-09-13 21:39:49 +00:00
pk 459204606f Everyone uses sunos_sendsig(). 1998-09-13 21:05:35 +00:00
hwr 43c45ee409 Enable gre(4) device 1998-09-13 21:02:02 +00:00
pk ff383dc20d Add compat_13_machdep.c 1998-09-13 20:34:34 +00:00
pk 190e4c429d Move compat_13 sigreturn() into its own file. 1998-09-13 20:33:33 +00:00
hwr 366b9c4515 Add a gre tunnel pseudo network device. Gre = generic route encapsulation.
This device shows up like any other network interface and can be used to
tunnel L3 protocols as e.g. IP over IP.
1998-09-13 20:27:47 +00:00
pk 82d2ea3a70 Remove left-over SUNOS_COMPAT line. 1998-09-13 20:24:15 +00:00
pk 06612cb9f8 Since the last signal restructuring the sparc also has an sunos_sendsig(). 1998-09-13 20:20:48 +00:00
pk 9658554e18 Replace previous by something more complete. 1998-09-13 20:17:54 +00:00
pk 9d9f22fa79 Signal handling changes: sunos compat gets its own sendsig(); sunos
sigreturn() == compat_13_sigreturn().
1998-09-13 20:07:54 +00:00
eeh 52cbf86859 Looks like something else changed in signal land. 1998-09-13 16:45:43 +00:00
christos 8dfbc827ea Fix copyright mess:
- remove trailing spaces.
	- make copyrights consistent (put the date before the name).
1998-09-13 16:21:16 +00:00
eeh 49af63b22b Fixup signal changes (hopefully). However SUN_COMPAT is likely broken by
this and I don't know how to fix it.

We can now exec a 64-bit init through a really ugly hack (don't ask.)
1998-09-13 16:02:47 +00:00
christos 66dd35d72c Fix copyright spacing and 'Van' -> 'van' for consistency. 1998-09-13 15:45:40 +00:00
christos 3d10f9ca2b Fix ' ' -> '\t' 1998-09-13 15:24:39 +00:00
christos dd6e9d3e5a fix comment and copyright spacing. 1998-09-13 15:21:32 +00:00
christos 47c0716246 Fix rcsid's 1998-09-13 15:19:12 +00:00
christos 361a71f864 Fix copyright '\t' -> ' ' 1998-09-13 15:14:40 +00:00
christos 67dbe5ed36 Fix copyright typos... 1998-09-13 14:46:23 +00:00
christos f35a4d311a Regen 1998-09-13 14:45:22 +00:00
christos 34cb71bf00 Quote the backquotes in the double-quoted shell string, otherwise they
disappear and you get AS IS'' instead of ``AS IS'' in the generated files.
1998-09-13 14:44:34 +00:00
christos d758aee3a9 Fix copyright spacing. 1998-09-13 13:49:29 +00:00
christos 45935a4c8d Make copyrights consistent; remove extra trailing spaces, change reformatted
copyrights to original format, change ' ' to '\t'.
1998-09-13 13:21:37 +00:00
mycroft 06fb1b6d67 Fix pasto. 1998-09-13 12:24:18 +00:00
mycroft 4e4f120db9 Update these for signal handling changes.
XXX Not tested yet.
1998-09-13 12:13:49 +00:00
mycroft 7b15b3b56d Minor change. 1998-09-13 12:01:41 +00:00
mycroft fa31b94af9 Fix omission in previous; remember to record that we're on the signal stack. 1998-09-13 11:57:58 +00:00
pk 90054fd502 New sigcontext. 1998-09-13 11:41:02 +00:00
pk ba67f63901 Sync function prototypes; remove unsed variables. 1998-09-13 11:34:04 +00:00
mycroft ef7c8ebbe7 Oops; forgot to commit this. 1998-09-13 11:26:58 +00:00
pk b8de221a1e Pull in <sys/syscall.h> directly into locore.s 1998-09-13 11:12:36 +00:00
thorpej 4a797b8f45 Make signal delivery work again. 1998-09-13 10:29:02 +00:00
thorpej c7d391b23c Make signal delivery work again. 1998-09-13 09:15:51 +00:00
thorpej 1a5b3601cb Make signal delivery work again. 1998-09-13 08:19:49 +00:00
mycroft 38aa357963 Make sure the buffers are synchronized on open. 1998-09-13 06:30:25 +00:00