Commit Graph

69019 Commits

Author SHA1 Message Date
aymeric f45c23b807 fix an obvious typo which prevented the machdep.cacheinfo table from being
published.
This generated the following warning message at boot time:
sysctl_createv: sysctl_create(cacheinfo) returned 17
2004-01-03 00:09:15 +00:00
oster 24b034a69e Fix the "We panic if we can't create a DAG" problem that's existed
~forever.  This requires a number of things:

1) If we can't create a DAG, set desc->numStripes to 0 in
rf_SelectAlgorithm.  This will ensure that we don't attempt to free
any dagArray[] elements in rf_StateCleanup.

2) Modify rf_State_CreateDAG() to not panic in the event of a DAG
failure.  Instead, set the bp->b_flags and bp->b_error, and set things
up to skip to rf_State_Cleanup().

3) Need to mark desc->status as "bad" so that we actually stop looking
for a different DAG.  (which we won't find... no matter how many times
we try).

4) rf_State_LastState() will then do the biodone(), and return EIO for
the IO in question.

5) Remove some " || 1 "'s from ProcessNode().  These were for
debugging, and we don't need the failure notices spewing
over and over again as the failing DAGs are processed.

6) Needed to change

       if (asmap->numDataFailed + asmap->numParityFailed > 1)

to

        if ((asmap->numDataFailed + asmap->numParityFailed > 1) ||
            (raidPtr->numFailures > 1)){

in rf_raid5.c so that it doesn't try to return
rf_CreateNonRedundantWriteDAG as the creation function.

7) Note that we can't apply the above change to the RAID 1 code as
with the silly "fake 2-D" RAID 1 sets, it is possible to have 2 failed
components in the RAID 1 set, and that would stop them from working.
(I really don't know why/how those "fake 2-D" RAID 1 sets even work
with all the "single-fault" assumptions present in the rest of the
code.)

8) Needed to protect rf_RAID0DagSelect() in a similar way -- it should
return NULL as the createFunc.

9) No point printing out "Multiple disks failed..." a zillion times.
2004-01-02 21:41:08 +00:00
itojun 4fc59b19d5 no need for tmp = arc4randomid here 2004-01-02 20:51:51 +00:00
martin bbd16f6828 Don't set ksi_errno - other archs don't bother, so avoid being different.
OK'd by Christos. This makes sparc64 pass the siginfo regression tests.
2004-01-02 20:49:18 +00:00
cl d5645dec8e regen 2004-01-02 18:53:45 +00:00
cl e7045955c7 kernel part of no-syscall upcall stack return: libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register.  The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed.  The kernel compares the
two counters to decide if a stack is free or in use.

- add struct sa_stackinfo_t with sasi_stackgen to count stack use in
  userland
- add sast_gen to struct sastack to count stack use in kernel
- add SA_FLAG_STACKINFO to enable the stackinfo_offset argument in the
  sa_register syscall
- add sa_stackinfo_offset to struct sadata for offset between ss_sp
  and struct sa_stackinfo_t
- add ssize_t stackinfo_offset argument to sa_register, initialize
  struct sadata's sa_stackinfo_offset from it if SA_FLAG_STACKINFO is
  set
- add sa_getstack, sa_getstack0, sa_stackused and sa_setstackfree
  functions to find/use/free upcall stacks and use these where
  appropriate
- don't record stack for upcall in sa_upcall0
- pass sau to sa_switchcall instead of l2 (l2 = curlwp in sa_switchcall)
- add sa_vp_blocker to struct sadata to pass recently blocked lwp to
  sa_switchcall
- delay finding a stack for blocked upcalls to sa_switchcall
- add sa_stacknext to struct sadata pointing to next most likely free
  upcall stack; also g/c sa_stackslist in struct sadata and sast_list
  in struct sastack
- add L_SA_WOKEN flag: LWP is on sa_woken queue
- add L_SA_RECYCLE flag: LWP should be recycled in sa_setwoken
- replace l_upcallstack with L_SA_WOKEN/L_SA_RECYCLE/L_SA_BLOCKING
  flags
- g/c now unused sast_blocker in struct sastack
- make sa_switchcall, sa_upcall0 and sa_upcall_getstate static in
  kern_sa.c
- call sa_upcall_userret only once in userret
- split sa_makeupcalls out of sa_upcall_userret and use to process
  the sa_upcalls queue
- on process exit: mark LWPs sleeping in saunblock interruptible; also
  there are no LWPs sleeping on l->l_upcallstack anymore; also clear
  sa_wokenq_head to prevent unblocked upcalls

additional changes:
- cleanup timerupcall sa_vp == curlwp check
- add check in sa_yield if we didn't block on our way here and we
  wouldn't any longer be the LWP on the VP
- invalidate sa_vp_ofaultaddr after resolving pagefault
2004-01-02 18:52:17 +00:00
itojun 7cddb2827b whitespace 2004-01-02 15:51:45 +00:00
itojun 344b08b44b some corrections from markus@openbsd;
- callout_ack() was called with wrong argument
2004-01-02 15:51:04 +00:00
uwe 9f2e9e23a0 Update the root window after showing the 'Last chance...' dialog. 2004-01-02 12:13:36 +00:00
itojun 5377ace199 some corrections from markus@openbsd;
- callout_ack() was called with wrong argument
- no need for xor with timestamp as we are using arc4random()
- minor typo/cleanup
2004-01-02 12:01:39 +00:00
hannken 897a1fc008 Remove "row" from DEBUG statements. 2004-01-02 11:52:15 +00:00
dbj ca5ad5d61f explicitly pad struct appleufslabel and use __attribute__((__packed__))
since apple put the 64 bit uuid field on a 4 byte boundary
2004-01-02 06:57:46 +00:00
dbj 23d4eb34b2 add uuid field to apple ufs volume label 2004-01-02 05:08:57 +00:00
dsainty d3a5c746ab Correct a conditional masking error conditions 2004-01-02 02:36:25 +00:00
manu 29638672ea off-by-one error in ary subscript. 2004-01-02 02:09:52 +00:00
sekiya a1f8b0618b Wire down zsc/zstty mapping and add commented-out entries for
IP20 keyboard/mouse.
2004-01-02 01:39:25 +00:00
sekiya aa9d797070 IP20 has two z8530 chips -- one at 0xd00 for keyboard/mouse, one at 0xd10
for serial ports.  Attach the former as zs1 to keep serial console goo as
simple as possible.
2004-01-02 01:04:46 +00:00
sekiya f2bccdeea4 Add trailing newline. Noticed by Steve Rumble. 2004-01-02 00:41:23 +00:00
oster 5b70d1d979 Cleanup some unused desc->flags:
RF_DAG_RETURN_DAG
RF_DAG_RETURN_ASM
RF_DAG_TEST_ACCESS
and the code that goes with them.  A couple more of these
can probably go too, but I might need them in a bit.
2004-01-01 23:35:08 +00:00
manu 996e659ce6 Try to do a better job at Mach port refcount. That's not perfect, though. 2004-01-01 22:48:54 +00:00
thorpej 50d7e2cb8b Tidy this file up. 2004-01-01 21:57:42 +00:00
thorpej 181abd742b Tidy this file up a little. 2004-01-01 21:18:28 +00:00
oster f025a0425c Finally cleanup RF_BZERO. Turns out that 'bp' was only used to obtain
bp->b_proc for mapping userspace buffers to kernelspace in the
original rf_kintf.c.  That means bp isn't of any use in RF_BZERO()
for us, and the macro can be replaced with just the memset().

No functional changes.
2004-01-01 20:39:58 +00:00
thorpej 9bc0bf3f15 Prepend "wdc_" to wait_for_drq, wait_for_unbusy, and wait_for_ready. 2004-01-01 20:25:22 +00:00
thorpej 763657a529 Tidy up this file somewhat. 2004-01-01 20:18:33 +00:00
oster da4ed88ce1 Tidy up the #includes a bit. 2004-01-01 19:37:17 +00:00
oster f2512ce061 Nuke a few more 'row'-related bits that were missed in the row-removal. 2004-01-01 19:32:55 +00:00
oster d3aa064253 Nuke a bunch of unused variables:
- node_queue_cond
 - quiescent_cond
 - eq_cond
 - desc->cond
 - desc->head
 - diskqueue->numWaiting

Nuke rf_print_unable_to_init_cond().
Nuke rf_TerminateDiskQueues prototype from rf_diskqueue.h.
2004-01-01 19:27:35 +00:00
bjh21 2becc547c7 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days.  Let the CVS history be its only memorial.
2004-01-01 19:12:13 +00:00
thorpej 77eb53d196 Update for opencrypto changes. 2004-01-01 18:46:14 +00:00
bjh21 cc4e11e8e4 No need to #include "vidcaudio.h" here, so don't do it. 2004-01-01 18:07:58 +00:00
chris 8261a721cc Correct the usage of the 4th arg to mainbus_bs_map. It's a flags arg, so
test for the CACHEABLE bit, rather than assuming a non-zero means cacheable
2004-01-01 18:07:27 +00:00
bjh21 7ef29ca465 Rather than calling pmap_extract() from an IPL_AUDIO interrupt handler (which
is naughty even if it does work), find out the complete list of physical pages
we'll have to DMA from in vidcaudio_trigger_output() and save it for use by
the interrupt handler.
2004-01-01 17:52:19 +00:00
thorpej 527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +00:00
bjh21 48a569efe8 Restore a call to vidcaudio_ctrl() that I accidentally deleted. 2004-01-01 16:42:36 +00:00
bjh21 bd6ca18b7e Tidy up debugging printfs to use a single #ifdef and a DPRINTF() macro,
rather than #ifdefs scattered all over the code.
2004-01-01 16:35:35 +00:00
bjh21 ef9b97ce8a Add possibly-useful support for 16-bit sound on VIDC20 systems, using
RISC OS's "*Configure SoundSystem" setting to decide whether to use 16-bit
mode.  Loosely based on parts of Richard Earnshaw's "sound16" patch.
2004-01-01 16:23:15 +00:00
dsainty 275cfd33b4 Correctly initialise ALL of the attach argument block. Fixes panic on
device open (previously avoided by compiler-dependent luck :)
2004-01-01 16:10:13 +00:00
chris 0415feb0e4 Correct entries for IRQ_NEVENT1 and IRQ_NEVENT2. They were both out by one.
This now means a disk is detected on my RiscStation board.
2004-01-01 15:51:48 +00:00
pk c6ac21f702 Enable reset of a process's alternative signal stack flag. 2004-01-01 15:02:31 +00:00
sekiya f8c37f800f Don't panic when attempting to share interrupts on ip2x -- just print an
informative message and gracefully return.
2004-01-01 13:32:30 +00:00
sekiya 93f0e8c8a0 It's important to use good quality cables when working with SGI serial ports.
Enable zs console for IP20.
2004-01-01 13:29:08 +00:00
mycroft a9866938b5 Welcome to 2004! 2004-01-01 00:00:05 +00:00
oster 2c490b5588 Remove 3 unused debugging options:
RF_DBG_OPTION(accessTraceBufSize, 0)
RF_DBG_OPTION(disableAsyncAccs, 0)
RF_DBG_OPTION(suppressTraceDelays, 0)
2003-12-31 22:25:38 +00:00
bjh21 45feca04f6 When returning our actual sample rate to audio(4) in 16-bit mode, use the right
base clock rate.
2003-12-31 21:24:47 +00:00
dbj 65a136e22d remove incorrect XXX comments I introduced a couple of days ago 2003-12-31 19:33:13 +00:00
dbj ba5b25c952 remove unused cs_numclusters field from struct csum_total
this avoids a potential future bug if it is ever used.
before this fix, fsck_ffs would check and fix this field to be zero
2003-12-31 19:19:39 +00:00
dbj c0000df464 update explanatory comment about NOCSPTRS to reflect that fs_active
is now within that region.
no functional change
2003-12-31 18:53:45 +00:00
bjh21 8ed8ec9577 Add a little comment explaining how to convert between RISC OS and hardware
CMOS addresses, since the old one's been lost.
2003-12-31 18:49:00 +00:00
dbj 82a1a92247 reorder ffs_sb_swap to reflect actual order in superblock
add comments regarding historical field overlap
no functional change
2003-12-31 18:40:23 +00:00