Commit Graph

69137 Commits

Author SHA1 Message Date
nonaka 62610dfbb2 reduce program size. 2004-01-05 15:17:54 +00:00
nonaka 227a19589a Use 32bit daddr_t. 2004-01-05 15:15:26 +00:00
augustss 2be4a9297b One more device. From OpenBSD. 2004-01-05 13:49:40 +00:00
augustss 35b09dafaa Regen. 2004-01-05 13:46:43 +00:00
augustss 150753278e Add a number of devices. From OpenBSD. 2004-01-05 13:46:20 +00:00
augustss 8bcf98def6 Add an HP adapter. From FreeBSD. 2004-01-05 13:36:24 +00:00
augustss 7cdc2658bb Try harder to get initial descriptor. Do a port reset now and then
in the retry loop.
2004-01-05 13:32:23 +00:00
augustss 4d6e985752 Fix bug in error path. From OpenBSD. 2004-01-05 13:30:45 +00:00
augustss 5f31dab3df Add more scanners. 2004-01-05 13:29:49 +00:00
augustss cfbab17b08 Add another device. 2004-01-05 13:29:27 +00:00
augustss 9622982931 Get rid of a vnode.h include. 2004-01-05 13:29:08 +00:00
augustss 770f7ef656 Get rid of some vnode.h includes. 2004-01-05 13:28:18 +00:00
augustss 60846c1584 Regen. 2004-01-05 13:05:39 +00:00
augustss e3d816149f Add lots of devices. From FreeBSD. 2004-01-05 13:05:16 +00:00
jdolecek d0210c07a4 update to recent changes - exit2() doesn't exist anymore and the
exit path always calls lwp_exit2()
pointed out Martin Husemann, change reviewed by Chuck Silvers

also update comment with switch_exit() prototype while here
2004-01-05 08:59:55 +00:00
lukem 7bb9d6c875 Store the copyright text in conf/copyright, and use conf/newvers.sh
to generate the appropriate  const char copyright[] = "...";
statement instead of hard coding it into kern/init_main.c.
Idea from Simon Burge.
2004-01-05 03:33:06 +00:00
chs 7e6508e29e add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
2004-01-05 02:25:32 +00:00
schmonz 113854bb28 Add Compaq "iPaq" HNE-200 USB Ethernet adapter. 2004-01-05 01:52:03 +00:00
schmonz b7319ca85e Regen (Compaq "iPaq" HNE-200 USB Ethernet adapter). 2004-01-05 01:51:34 +00:00
schmonz f3d2103991 Add Compaq "iPaq" HNE-200 USB Ethernet adapter. 2004-01-05 01:50:00 +00:00
oster 181f2eebee remove terminate_disk_queues from RF_Raid_s. The hist_diskreq[]
stuff is only used for the CHAINDECLUSTERING, so hide it with an #if.
2004-01-05 01:19:07 +00:00
christos b76a454b90 Ad F_CLOSEM, F_MAXFD from Matt Thomas. 2004-01-05 00:36:49 +00:00
christos dee210d770 Add F_CLOSEM, F_MAXFD. 2004-01-05 00:35:53 +00:00
gendalia 710460b874 Apply http://bugme.osdl.org/attachment.cgi?id=1777&action=view from
http://bugme.osdl.org/show_bug.cgi?id=1766

makes acpi work on my Dell Latitude D600, and should fix PR i386/23868.

Approved by gimpy, thanks to soren for finding it.
2004-01-04 22:03:34 +00:00
oster 290ef1fca7 raidPtr->reconControl->percentCompleted only gets used in one
debugging printf, and in rf_netbsdkintf.c.  We can do the calculations
inside of RF_DEBUG_RECON for the one debugging printf, and only
perform the percentCompleted calculation "on demand" in the
rf_netbsdkintf.c case.  Shaves a few more bytes off an i386 GENERIC
kernel, and ever-so-slightly decreases the amount of work performed
during a reconstruct.
2004-01-04 21:06:04 +00:00
jdolecek a00e4cf6db update to recent changes - exit2() doesn't exist anymore and the
exit path always calls lwp_exit2()
pointed out Martin Husemann
XXX this code seems to not be lwpified
2004-01-04 20:19:15 +00:00
jdolecek 3547ab4b48 update to recent changes - exit2() doesn't exist anymore and the
exit path always calls lwp_exit2()
pointed out Martin Husemann
2004-01-04 19:37:01 +00:00
jandberg e478eb702e Keymap updates.
- us/de keymaps based on ite keymaps, converted by Gunther Nikl
  (with slight adjustments by me)
- es/fr/sv keymaps similarly based on ite keymaps
- removed the commented out keymaps
- some small fixes to the rest of the existing keymaps
2004-01-04 19:20:43 +00:00
wiz a5bf3b3c4c Spell controller with two ls. Inspired by miod@openbsd. 2004-01-04 16:19:43 +00:00
pk 90cc172b86 bufpool_page_free: pass `buf_map' to uvm_km_free(). 2004-01-04 16:17:13 +00:00
chris fc4ee7d742 Tidy up a few things:
Get rid of the static bus tag, instead move it into the softc.
Update to ThorpeJ's recent variable renaming for ATA things.
De-__P and KNF prototypes, also make attach and probe static.
Add RCSID.
Add a copyright for myself.
2004-01-04 13:49:49 +00:00
kleink 1b16e3f0a3 ; may be a comment character in assembly, use \n as a separator instead. 2004-01-04 13:27:53 +00:00
martin d30d9b04d0 Attach message formating nit, adapt to recent pcic (et al) changes. 2004-01-04 12:41:46 +00:00
jdolecek c3bb9cd5a4 Process and lwp exit path always executes lwp_exit2() now and cpu_exit()
is empty besides calling switch_exit(). So, rename switch_exit() to
cpu_exit() and modify the routine to call lwp_exit2() direct.
This saves couple cycles on the exit path.
2004-01-04 11:44:52 +00:00
jdolecek 089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
augustss 3c5939dc02 Cosmetic changes. 2004-01-04 11:11:56 +00:00
jdolecek 482ad5b141 make uhid_graphire*_report_descr[] const 2004-01-04 08:35:52 +00:00
dbj e3b3654ebb attempt to make these compile again after recent wdc changes. 2004-01-04 07:08:13 +00:00
oster 87e6ffb752 As noted by Thierry Deval in a posting to misc/at/openbsd.org,
rf_DecrAccessesCountState wasn't in the correct spot in
RF_AccessState_e.  Following up on that has resulted in one other
correction.  Changing orderings of these states is tricky, and
shouldn't be attempted without some thorough analysis.  For the
changes committed, the following analysis is offerred:

1) RAIDframe uses a little state machine to take care of building,
executing, and processing the DAGs used to direct IO.

2) The rf_DecrAccessesCountState state is handled by the function
rf_State_DecrAccessCount().  The purpose of this state is to
decrement the number of "accesses-in-flight".

3) rf_Cleanup_State is handled by rf_State_Cleanup().  Its job is to
do general cleanup of DAG arrays and any stripe locks.

4) DefaultStates[] in rf_layout.c indicates that the right spot
for rf_DecrAccessesCountState is just before rf_Cleanup_State.
Analysis of code for both states indicates that the order doesn't
matter too much, although rf_State_DecrAccessCount() should probably
take place *after* rf_State_Cleanup() to be more correct.

5) Comments in rf_State_ProcessDAG() indicates that the next state
should be rf_Cleanup_State.  However: it attempts to get there by using

 desc->state++;

which actually takes it to just rf_DecrAccessesCountState! This turned
out to be OK before, since rf_Cleanup_State would follow right after,
and all would be taken careof (albeit in arguably the "less correct"
order).

6) With the current ordering, if we head directly to rf_Cleanup_State
(as we do, for example, if multiple components fail in a RAID 5 set),
then we'll actually miss going trough rf_DecrAccessesCountState), and
could end up never being able to reach quiescence!  Perhaps not too
big of a deal, given that the RAID set is pretty much toast by that
point at which such a drastic state change happens, but might as well
have this correct.

The changes made are:
1) Since having rf_State_DecrAccessCount() come after
rf_State_Cleanup() is just fine, change rf_layout.c to reflect that
rf_DecrAccessesCountState comes after rf_Cleanup_State (i.e. they swap
positions in the state list).  This means that going to
rf_Cleanup_State after bailing on a failed DAG access will do all the
right things -- the state will get cleaned up, and then the access
counts will get decremented properly.  The comment in
rf_State_ProcessDAG() is now actually correct -- the next state *will*
be rf_Cleanup_State.

2) Move rf_DecrAccessesCountState in RF_AccessState_e to just after
rf_CleanupState.  This puts RF_AccessState_e in sync with
DefaultStates[].  Fortunately, these states are rarely referred to by
name, and so this change ends up being mostly cosmetic -- it really
only fixes cleanup behaviour for the recent "Failed to create a DAG"
changes.
2004-01-04 06:37:16 +00:00
dsainty 232d108953 Kill the flow control interface. Bluetooth devices are not equipped to deal
with flow control being applied.  It is simpler and no more problematic to
accept the data and drop it if we hit a resource limit than to expect the
Bluetooth device to do anything about it (which it won't).
2004-01-04 05:47:43 +00:00
dsainty ea1feca1de Don't (ab)use the device driver flow control interface to prevent incoming
data.  We should be prepared to buffer that data here (though we currently
don't do that either).
2004-01-04 05:39:35 +00:00
dsainty 68c4826bcf Correct buffer selection in uhidev_set_report for non-zero report IDs (rare!)
Spotted by Dave Huang, noted in tech-kern.
2004-01-04 02:13:11 +00:00
augustss 956a88bd1e Support Graphire 4x5. From Dave Huang in kern/23965. 2004-01-04 01:29:11 +00:00
augustss 0daa8ba196 Regen. 2004-01-04 01:27:38 +00:00
augustss 2da03fdec4 Add Wacom Graphire3 4x5. From Dave Huang. 2004-01-04 01:26:23 +00:00
thorpej 197f2f50da More structure member namespace cleanup: thread -> ch_thread 2004-01-03 23:59:58 +00:00
tron be00b34e3a Include "sys/param.h" to fix build problems in applications which include
this header file.
2004-01-03 23:29:42 +00:00
thorpej a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
tron 784a553ad1 Remove extra tokens at end of #undef directive. 2004-01-03 22:34:38 +00:00
jdolecek 6ea538748e constify a bit 2004-01-03 20:10:01 +00:00
jdolecek 1d86b1f39f fix some comments, use NULL instead of 0 for pointer comparison 2004-01-03 19:43:55 +00:00
thorpej 3fb652250b More comment/whitespace tidy-up. 2004-01-03 19:31:09 +00:00
dbj d7fdf500a8 reintroduce compatbility defines for
fs_headswitch, fs_trkseek, fs_csmask, fs_csshift
fs_postbl, fs_rotbl, cg_blktot, cg_blks, cbtocylno, cbtorpos
2004-01-03 19:18:17 +00:00
chris 300943f949 Tidy up the code, add a copyright block for myself. Sprinkle a few
comments, de-_P things.
2004-01-03 16:37:41 +00:00
chris 190f92bccf Currently the eb7500atx doesn't have a cmos_read function, however it also
won't use the RPC600_IOMD_ID code path, so disable that code path for the
eb7500atx.
2004-01-03 14:53:16 +00:00
chris 637bdaa1f9 Add a kernel for eb7500atx board. 2004-01-03 14:50:03 +00:00
chris 48afc0a2fc Add conf framework support for riscstation. Add a rsbus as this allows
acccesses with addresses shifted by the amount specified in the cookie.

Also make the inclusion of the wscons file the resposibility of whoever
includes files.iomd.  (found while attempting to checking riscstation
support into evbarm)
2004-01-03 14:46:17 +00:00
chris d69e128c9d On a riscstation leave the iobase as requested, don't add IO_CONF_BASE to
it.
2004-01-03 14:42:12 +00:00
chris 31513e4110 First part of support for the eb7500atx board from simtec:
http://www.simtec.co.uk/products/EB7500ATX/

also available with RISC-OS as a RiscStation:
http://www.riscstation.co.uk/html/products.html

This is basic bootstrap with support for ide and networking, currently only
tested with booting from ABLE, and not RISC-OS.

I would have placed it into evbarm, but iomd doesn't appear to use the same
interrupt files as evbarm.  I'll check it into here for now, until iomd
uses the common interrupt code.
2004-01-03 14:31:28 +00:00
soren 51e7baecd8 Regen. 2004-01-03 14:16:45 +00:00
soren fd87fe0125 Add Motorola A920. 2004-01-03 14:12:57 +00:00
soren 04fd7f9383 Only report codec readiness if DEBUG to avoid printing it on every resume. 2004-01-03 14:11:36 +00:00
chris 078c5853f3 When adding a new interrupt handler to the iomd, turn off interrupts so
we don't run the risk of an interrupt happening while things are being
updated.
2004-01-03 13:11:47 +00:00
sekiya b8166ca397 bootinfo is problematic on ip2x under certain circumstances. Disable for now. 2004-01-03 10:29:37 +00:00
sekiya 5b343c479b Streamline bootinfo logic. 2004-01-03 10:28:18 +00:00
lonewolf d6fda0fcbb Rework the memory detection routine to handle cases where kernel doesn't
fit inside one memory chunk.
Leave 1 page before kernel untouched as that's where our initial kernel
stack before we switch to proc0 stack is (fixes boot problems on my Indy
with small kernels).
2004-01-03 04:26:34 +00:00
thorpej 5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej f61ad169ec callout_init() after memset(). 2004-01-03 01:48:38 +00:00
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