Commit Graph

69359 Commits

Author SHA1 Message Date
he 9730086e9d Copy code from iq80321 / ixp425:
Use __insn_barrier() to prevent the compiler reordering splx/splraise
relative to the code they're supposed to protect.
2004-01-13 23:18:54 +00:00
itojun 45e487aa97 secpolicy refcnt mistake (missing key_freesp). part of
http://sources.zabbadoz.net/freebsd/patchset/110-ipsec-netkey-key.diff
2004-01-13 23:02:40 +00:00
itojun 8dcc7f31aa typo.
http://sources.zabbadoz.net/freebsd/patchset/108-ipsec-spelling.diff
2004-01-13 23:02:00 +00:00
itojun 1101ef17d0 plug memory leak on failure.
http://sources.zabbadoz.net/freebsd/patchset/109-ipsec-memleak.diff
2004-01-13 23:01:08 +00:00
nathanw 6eea658635 Adjust the DEBUG check in PMAP_ISACTIVE() to special-case process
exit, since the invariant it checks no longer holds there after the
recent reaper changes.
2004-01-13 18:50:40 +00:00
kent 2adc11f1f3 remove/modify confusing error messsges. 2004-01-13 14:42:50 +00:00
sekiya 58a060c797 Assign memory controller-dependent watchdog reset functions to
platform.watchdog_reset.
2004-01-13 14:31:37 +00:00
sekiya 986c9703a5 Switch DMA sync function initializer to _bus_dmamap_sync_mips3 to keep things
aligned with previous MIPS1/MIPS3 differentiation.
2004-01-13 14:30:43 +00:00
sekiya 4598391267 The watchdog timer is a function of the memory controller on all SGI platforms.
Add to the machine struct.
2004-01-13 14:18:56 +00:00
augustss 9fc19b76bb Print the device description in the attach routine like all other drivers do. 2004-01-13 14:07:09 +00:00
soren 3e41a33af7 With large average filesizes, it was possible to overflow dirsize to zero,
causing a division by zero in ffs_dirpref().

From Barry Bouwsma of Tiengen.
2004-01-13 13:38:18 +00:00
sekiya ffc95bbe6e As the platform-specific bus reset routine varies based on the memory
controller used, set it in the memory controller driver rather than the
platform init code.
2004-01-13 13:05:17 +00:00
sekiya e5d4293223 Call sgimips_bus_dma_init() in mach_init to set up the proper MIPS1/MIPS3
bus_dma_sync() routine.
2004-01-13 12:57:24 +00:00
sekiya 9c531ea057 Add IP12 subtypes. From Steve Rumble. 2004-01-13 12:30:23 +00:00
itojun 3ffdb9507a avoid deref-after-free.
http://sources.zabbadoz.net/freebsd/patchset/106-ipsec-pcb-discon.diff
2004-01-13 06:17:14 +00:00
sekiya 8507d232d3 Add a call to ip1x_init(). 2004-01-13 05:51:07 +00:00
sekiya a72de90260 Implement bus routines for MIPS1 processors. Originally from Steve Rumble,
massaged by pooka@.
2004-01-13 05:47:09 +00:00
petrov 704586c08c Fix 32bit kernel build, pointed by Juergen Hannken-Illjes. 2004-01-12 21:16:01 +00:00
dbj 51134cc5dd change the updating note to say you may need fsck_ffs -b 32 -c 4' 2004-01-12 16:19:19 +00:00
jdolecek 0ee51a3dec finish previous (removal of 'reaper' kernel thread):
* move tss_free() call to the new cpu_lwp_free()
* g/c cpu_wait()

fixes PR kern/24067 by Nicolas Joly
2004-01-12 14:31:46 +00:00
sekiya 95e98b18f7 Back out hasty previous commit -- bitwise arithmetic does not always match
integer arithmetic, as demonstrated in this case.
2004-01-12 12:50:07 +00:00
sekiya 1c3c44683b Wrap more mips3_ operations in MIPS3 defines. 2004-01-12 12:32:00 +00:00
sekiya 67770bc1a4 Add pic attached at mainbus (for IP12). 2004-01-12 12:15:05 +00:00
sekiya e0c8a0088c mips3_* functions aren't available when MIPS3 is not defined, so provide
MIPS1 workalikes (which, for the _8 routines, discard the top 32 bits).
2004-01-12 12:12:24 +00:00
sekiya 09d9a0fb59 Add pic (memory controller for IP12) driver. Originally written by
Steve Rumble, with mostly stylistic changes by myself.
2004-01-12 12:07:06 +00:00
sekiya f04e7368ea Completely commit to bitwise operations. Instigated by simonb@ 2004-01-12 11:53:31 +00:00
sekiya a02b828c6e Change one more multiplication to a bit shift. Pointed out by pooka@. 2004-01-12 11:30:24 +00:00
scw dcb1b313f5 Use __insn_barrier() to prevent the compiler reordering splx/splraise
relative to the code they're supposed to protect.
2004-01-12 10:25:06 +00:00
dbj 6202d43b3b add checks for a couple of botched superblock upgrade cases
and report a warning with repair references.
2004-01-12 05:49:03 +00:00
sekiya 74e150c7b1 CRIME revision 1.1 has a bug that affects PIO operations to/from the MACE.
The recommended workaround is a 5-10ms delay before and after accesses.
Therefore, move the affected bus_space_* operations from bus.h to bus.c
and special-case MACE accesses.

CRIME accesses are not affected, so introduce SGIMIPS_BUS_SPACE_CRIME and
use it as the CRIME tag.

My ip32 seems a little bit happier with this change, and my ip22 didn't
notice the change.
2004-01-12 03:30:51 +00:00
sekiya bb9d36c069 ANSIfy, and change a multiplication operation to a bit-shift. 2004-01-12 03:26:08 +00:00
jdolecek 475a5858bf g/c process state SDEAD - it's not used anymore after 'reaper' removal 2004-01-11 19:39:48 +00:00
jdolecek 93cbc84a2f use P_ZOMBIE() macro instead of checking p_state direct 2004-01-11 19:18:41 +00:00
hannken 067a3b897d Update the file system snapshot driver:
- Document the kernel thread.
- Rename some functions and variables.
- Return EROFS where appropriate.
- Use shifts instead of 64-bit divide.
- Use a simple_lock to make it MP-safe.
- Add M_CANFAIL to malloc to avoid panic on large cluster size.
- Allow sparse file for backing store and use VOP_BALLOC() to allocate
  space. Default size of backing store is the size of the file system.
2004-01-11 19:05:26 +00:00
jdolecek a1090edbd2 fix assertion - non-alive processes are in SZOMB state now
fixes PR kern/24033 by Martin Husemann
2004-01-11 18:51:15 +00:00
yamt 0cad61498f sysctl_vm_updateminmax: fix swapped filemin and execmin.
the problem reported by Vesbula on current-users@.
2004-01-11 18:42:25 +00:00
jdolecek 98f080e284 ride 1.6ZH version bump - g/c some unused struct lwp and struct proc
fields (former reaper stuff)
2004-01-11 18:37:52 +00:00
martin 4641631823 Avoid ras_lookup call if compiling 32bit kernel (which does not have
__HAVE_RAS). Avoids a compile failure pointed out by Juergen Hannken-Illjes.
2004-01-11 15:56:28 +00:00
sekiya c7e23cc3fe Checkpoint if_mec work (just in case I get hit by a bus). This driver is still
not operational.  The MII code mostly works, DMA data structures are defined
and allocated, but tx/rx logic is missing.
2004-01-11 14:01:46 +00:00
cube 063960f68a Make it aware of the new ata configuration syntax. 2004-01-11 12:55:19 +00:00
cube 03549a0cc1 The limitation for TX/RX DMA of rev. 900B and 635 os the SiS chips also
applies to rev. 0x91 for 96x chipsets.  Needed to fix PR 24043, but more
stressing testing has to be performed before closing it.
2004-01-11 09:07:56 +00:00
sekiya 69911c67f2 Reinstate symbolic device names -- I completely forgot about their use.
Reminder courtesy soren@
2004-01-11 01:48:46 +00:00
bjh21 75080c1305 The VIDC20 data sheet doesn't define the polarity of the sign bit for
8-bit VIDC audio.  Both Richard Earnshaw and I had guessed that a set
bit was positive (the same as normal mu-law), but the AudioWorks
manual, and Sound_SoundLog on RISC OS, seem to disagree.  Change
MULAW_TO_VIDC to match Sound_SoundLog, since the latter is probably
definitive.
2004-01-10 22:33:24 +00:00
is 87374696f2 remove forgotten debug printf from development. 2004-01-10 21:38:32 +00:00
hannken ed68c4e34c Allow vfs_write_suspend() to wait if the file system is already
suspending.

Move vfs_write_suspend() and vfs_write_resume() from kern/vfs_vnops.c
to kern/vfs_subr.c.

Change vnode write gating in ufs/ffs/ffs_softdep.c (from FreeBSD).

When vnodes are throttled in softdep_trackbufs() check for
file system suspension every 10 msecs to avoid a deadlock.
2004-01-10 17:16:38 +00:00
oster 6297e36a60 Since the LOCK and UNLOCK flags are never used, no need in extracting them.
Collapse the related variables down to zero.  That means 'flags' is 0
as well.  Nuke the extraction macros, a bunch of the variables, and replace
'flags' as well.
2004-01-10 17:04:44 +00:00
hannken 8308a4868d Split out softdep_flushworklist() from softdep_flushfiles() so that
it can be used to clear the work queue.

Cleanup ffs_sync() which did not synchronously wait when MNT_WAIT
was specified. Clear the work queue when MNT_WAIT is specified.

Result is a clean on-disk file system after ffs_sync(.., MNT_WAIT, ..)

From FreeBSD.
2004-01-10 16:23:36 +00:00
yamt 5abccc6a0c comments in nfs_doio_write. 2004-01-10 14:52:53 +00:00
yamt a3b2d1879c add a new bufq strategy, BUFQ_PRIOCSCAN (per-priority CSCAN).
discussed on tech-kern@
2004-01-10 14:49:44 +00:00
yamt 72d1502598 bump to 1.6ZH. add b_prio to struct buf. 2004-01-10 14:46:24 +00:00
yamt 8c55727694 reset i/o priority in geteblk() as well. 2004-01-10 14:43:05 +00:00
yamt 7266a95907 store a i/o priority hint in struct buf for buffer queue discipline. 2004-01-10 14:39:50 +00:00
dyoung 55e0f7c6a4 Rounding to the nearest multiple of 2 with roundup(constant, 2) is
easier to read than `constant + 1'.
2004-01-10 07:54:55 +00:00
dyoung 0370da2a5d In atw_rf3000_tune, enable I/O with the modem and RF front-end
"just in time" instead of at the top of the function.
2004-01-10 07:51:16 +00:00
dyoung 348c2d9603 Do not set IEEE80211_F_IBSSON in hostap mode. Treat hostap-mode
when the link condition changes by returning.

Note that hostap mode still does not work in atw, and ADMtek has
told me that the hardware will not support it, but I remain hopeful.
2004-01-10 07:47:02 +00:00
dyoung 005d4641ca Report received-early interrupt with a debug printf.
Print the Serial EEPROM and the MAC address it contains when
atw_debug > 0, because atw_debug > 1 is a little too strict.
2004-01-10 07:41:18 +00:00
dyoung f38df7cae7 Misc. cosmetic changes.
Add a debug printf to the input path.
2004-01-10 07:03:28 +00:00
dyoung a94687e30c Use new docs provided by RFMD to give some meaning to
previously-undocumented registers and magic numbers on the RF3000
baseband.
2004-01-10 06:30:35 +00:00
dyoung bd26cc12f9 Get rid of empty #if 0/#endif stanza. 2004-01-10 06:02:32 +00:00
sekiya f3a4be9263 Bus-spacify ip2x core logic. Eliminate magic numbers.
co
2004-01-10 05:22:09 +00:00
sekiya aa7367bc4b Add register definitions for INT2 interrupt controller. 2004-01-10 05:16:57 +00:00
sekiya 280b50a365 Add watchdog and bus error handling functions (these features live in
IMC space, thus should be handled here rather than in ip2x.c)
2004-01-10 05:00:50 +00:00
sekiya 60573f92d1 Clean up console device selection logic. 2004-01-10 03:18:23 +00:00
sekiya 937db2de33 de-__P, sprinkle some KNF. 2004-01-10 02:55:54 +00:00
sekiya c370623a7a Add framework for gio card identification based on product ID. devlist2h.awk
was borrowed from sys/dev/pcmcia.
2004-01-10 02:26:44 +00:00
christos fad3a8725a don't include sys/param.h; the man page says that the application should
do that. per discussions in core.
2004-01-10 01:58:48 +00:00
oster 2e19186660 iCleanup the RF_CREATE_PARAM3(). Middle two "arguments" were nothing
but 0 in all cases.
2004-01-10 00:56:27 +00:00
oster 5b7e949cbf More lu_flags disappear into oblivion. 2004-01-10 00:53:08 +00:00
oster 7edb3013bb Nuke lu_flag and code associated with it being non-zero.
The compiler already knew that these chunks of code
could never be reached (since lu_flag was always 0), so it
already ignored them.
No functional changes.
2004-01-09 23:35:59 +00:00
oster ac6b86acbb [This file should have been committed with the other
rf_enableAtomicRMW changes.]

Cleanup rf_enableAtomicRMW and its use.  According to the comments, we
can't set this to anything other than zero anyway.  Shaves off another
900 bytes.  lu_flag's days are numbered now, as are the middle
parameters of RF_CREATE_PARAM3.
2004-01-09 23:31:37 +00:00
oster 35d7c1ee7e Cleanup rf_enableAtomicRMW and its use. According to the comments, we
can't set this to anything other than zero anyway.  Shaves off another
900 bytes.  lu_flag's days are numbered now, as are the middle
parameters of RF_CREATE_PARAM3.
2004-01-09 23:26:17 +00:00
dbj 01637061e3 never upgrade the superblock or set FS_FLAGS_UPDATED in fs_old_flags
add compatibility for filesystems created before FFSv2 integration
these patches are from pr port-macppc/23926 and should also fix
problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:10:22 +00:00
thorpej 4aeba6790d Initialize buffer pools with PR_IMMEDRELEASE. Don't use pool_reclaim()
on those pools; it is no longer necessary.
2004-01-09 19:01:01 +00:00
thorpej 7f125220f4 Add a new pool initialization flag, PR_IMMEDRELEASE. This flag causes
idle pool pages to be returned to the system immediately upon becoming
de-fragmented.

Also, in pool_do_put(), don't free back an idle page unless we are over
our minimum page claim.
2004-01-09 19:00:16 +00:00
perry 3682e63056 nuke trailing spaces. 2004-01-09 18:31:25 +00:00
fredb d5fb378200 Back out CVS fallout from last commit. Really make this build again. 2004-01-09 17:00:02 +00:00
chs 3c9eb7a6c4 in ehci_softintr() when looping over the active xfers, save the next pointer
before calling ehci_check_intr(), since that will free the xfer structure
if the xfer is complete.
2004-01-09 09:19:33 +00:00
chs e6d7ceae15 make sure we free the context for the pmap in pmap_destroy().
this usually isn't necessary since we freed it earlier in pmap_remove_all(),
but since uvmspace_free() is now called in the context of the exiting
process, a new context might be allocated if uvm_unmap_detach() decides
to sleep (since cpu_switch() will allocate a new context when it switches
back to the exiting process).
2004-01-09 08:49:42 +00:00
tls e4758a97ae Change BUFCACHE (default hard limit on physmem consumption by metadata
cache) from 30% to 20%.  This seems to significantly smooth the oscillation
between "almost no memory available" and "UVM free target available" caused
by the current sudden, heavy backpressure on the metadata cache.  We should
revisit this again once the backpressure mechanism is better tuned; ideally,
the hard limit should almost never come into play, because the metadata
cache should gradually give back pages as buffers hit the AGE list and as
the page cache demands them, rather than giving back a big slug of pages
all at once when UVM decides it's in a hurry and fires off the page daemon.

Just how well this adjustment works is likely to vary significantly from
machine to machine depending on I/O mix, filesystem frag size, and total
memory.  However, 20% seems to be quite a bit better than 30% on several
systems I've tested and is, coincidentally, more than enough to cache
the entire metadata working set of the AnonCVS server with 100 clients,
which is a useful worst-case stake in the ground...
2004-01-09 06:26:15 +00:00
tls 0d6723b09f Bump default size of vnode cache to 1% of physical memory, instead of
0.5%, based on some quick measurements on a number of workstations and
small fileservers (including my home fileserver running simultaneous
builds of the NetBSD source tree and several NetBSD kernels).  This
brings the hit rate on my machines from below 70% to above 90%.  We
should be able to tune this as we run, by tracking the hit rate and
increasing the size of the cache if memory permits.

Some systems will still require significantly larger cache sizes.  Some
ports -- notably the 64-bit ones -- probably should use more than 1% of
physmem as the default due to the larger size of struct vnode.
2004-01-09 00:04:53 +00:00
tls 28364b01be Add pool_reclaim() on pool to which we just pool_put() a buffer in
buf_mrelease().  Without this, though the pages are returned to the
relevant *pool*, they are never available for any other use in the
system.

Now the backpressure on the physical size of the buffer cache through
the buf_drain() call in the pagedaemon works correctly.  If anything,
it may be a bit more aggressive than intended.  On my 256MB system,
with vm.bufcache set to the default 30% of physmem, a kernel with this
fix can do 5 simultaneous config/makedep/builds of different NetBSD
kernels in 1313 seconds; with the "traditional" buffer cache code it
requires 1320 seconds.  Running "find / -type d -exec ls -l {}" while
the build is going demonstrates that the backpressure is working
correctly: free memory oscillates slowly between close to none and
the UVM target free, and vmstat -m shows a large number of releases
for the buffer pools.

For future work: how is "bufpl" memory returned to the system?  This
is not obvious to me (I must be looking in the wrong place).  Also,
buf_mrelease() is also called from brelse() in some cases.  Would it
be better to add a pool flag causing automatic release of full pages
as they become available (not fragmented)?  Jason Thorpe proposed this
and it seems more elegant than cleaning the _entire_ pool only upon
memory pressure.

Greg Oster did a lot of the work of figuring this out.  Jason proposed
the use of pool_reclaim as a way to fix it.
2004-01-08 23:41:14 +00:00
cube 3bf5e4c13b If ksyms have not been initialized, return ENXIO in ksymsopen instead of
ksymsread, because ksyms client test availability with open() and not
read().
2004-01-08 22:48:26 +00:00
nonaka bf6adc04cc implement bus_space_set_region_[124], bus_space_copy_region_[124]. 2004-01-08 15:29:20 +00:00
martin 10e9430c36 Minor cleanup 2004-01-08 13:34:04 +00:00
minoura 8f5ee5571c Include compat/hpux/files.hpux.
Untested.
2004-01-08 12:32:03 +00:00
thorpej 778161fb7f Initialize some importantant members of the drive info structure. (I have
no idea how this worked for me before, but I swear that it did...)

kern/24015.
2004-01-07 22:06:57 +00:00
thorpej cb9ba8776e Add a comment about some code that should be cleaned up. 2004-01-07 22:03:56 +00:00
bjh21 a33e671568 Regen. 2004-01-07 22:02:23 +00:00
bjh21 38cb9d0fe2 It looks like the isc PC netslot version of the Nexus interface uses the
same podule ID as the A3020/A4000 netslot version.  Update list to reflect
this.
2004-01-07 22:00:51 +00:00
atatat 0f4c4fc955 Add brief comments to the sysctlnode members that describe what they
are.

Cut SYSCTL_DEFSIZE in half, which results in roughly a 40% improvement
in memory usage by sysctlnodes (on my laptop), along with a dozen
extra calls to sysctl_realloc() during kernel bootstrap (which no one
should notice anyway).
2004-01-07 21:17:01 +00:00
martin b86d7b2c57 A __insn_barrier() is now available for all archs, remove the MD version
here. Suggested by Jason Thorpe.
2004-01-07 20:02:28 +00:00
martin 9532645db7 Add a __insn_barrier() macro to stop the optimizer from moving code
accross the barrier or assume liveness of register values.
Suggested by Jason Thorpe and Steve Woodford.
2004-01-07 19:38:10 +00:00
matt 9196bdd1f8 When accepting a peer's MSS, never let it drop below 256 (SLIP + TCP will
be the lowest MSS we should ever enounter).
2004-01-07 19:15:43 +00:00
thorpej d76fa360ef Back out >2 PT_LOAD changes from rev 1.96. They cause older GCC3-compiled
PowerPC binaries to fail.  The compiler has since been fixed, but
compatibility with older binaries needs to be maintained.

PR kern/23758.
2004-01-07 16:42:53 +00:00
cdi ceb721fd0b Pass some info from the boot loader to the kernel:
- Kernel image name
 - Symbol table
 - A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
2004-01-07 12:43:43 +00:00
yamt 4b651870d9 #if 0 out unused ubc_flush(). 2004-01-07 12:18:16 +00:00
yamt 59afac32fe - get pages to loan out in uvm_loanuobjpages() rather than
having caller (nfsd, in this case) do so.
- tweak locking so that nfs loaned READ works on layered filesystems.
2004-01-07 12:17:10 +00:00
jdolecek 26767eb2ae fix F_MAXFD fcntl - it returned the value as errno instead
of return value from the syscall
from mouss <usebsd at free dot fr>
2004-01-07 09:26:29 +00:00
jdolecek 6c869ee3b7 add list of known issues, from Lennart Augustsson and Michael van Elst 2004-01-07 09:17:47 +00:00
martin 1cfee605ee Implement restartable atomic sequences (RAS) for sparc64. 2004-01-06 21:35:18 +00:00
petrov d63b2431fa Some cleanup and move ddb_regs declaration to db_interface.c 2004-01-06 20:41:23 +00:00
matt 82c993fb44 Regen. 2004-01-06 19:44:38 +00:00
matt 5e5b78644d Add HP Tachyon TL and TS device IDs. 2004-01-06 19:44:17 +00:00
tsutsui 74ba66664f MD cpu_lwp_free() should have the second arg. 2004-01-06 19:30:38 +00:00
he 38d0807d97 Make these compile again after the latest adjustments. 2004-01-06 18:46:07 +00:00
briggs ad7a849c27 Change CPPFLAGS to -D${MACHINE}=${MACHINE} instead of just -D${MACHINE}
This makes it possible to define header files on the command line that
might include ${MACHINE} somewhere in the path.  This might be used in
evbppc, for example, when defining PPC_PCI_MACHDEP_IMPL as, for example:

PPC_PCI_MACHDEP_IMPL="<arch/evbppc/sandpoint/pci_machdep.h>"

which will be included as

#include PPC_PCI_MACHDEP_IMPL

Prior to this change, the compile would fail trying to include
<arch/evbppc/1/pci_machdep.h>
2004-01-06 18:44:57 +00:00
tsutsui 47c4c87d2c Fix bus error trap on X68030/25MHz on-board SPC, which may have some quirk.
Problem reported by Yasushi Oshima.
2004-01-06 18:07:17 +00:00
matt ecdec9d579 Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;
see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
2004-01-06 17:01:48 +00:00
chuck e5aceb8c63 the IBM thinkpad T40p's built-in wireless ath0 interface attaches
to pci, so add an entry for it so that the GENERIC_LAPTOP kernel
can use it.
2004-01-06 16:24:14 +00:00
chs 7662f44874 fix lock initialization in uvm_anon_add(). from PR 23831. 2004-01-06 15:56:49 +00:00
martin 4a0ea0eafd Cosmetics 2004-01-06 14:13:33 +00:00
atatat 5efc584023 Expose the buf_map symbol so that pmap(1) can find it.
Split the sysctl setup routine into two routines, one for each
"subtree".  Perhaps it's a little pedantic, but it's cleaner.  Also,
assert that the "kern" and "vm" nodes exist.
2004-01-06 13:51:09 +00:00
christos 6774ae7407 PR/23997: Love: <sys/siginfo.h> pollutes userland namespace with <sys/queue.h> 2004-01-06 12:41:43 +00:00
petrov e459d2a294 Spinup secondary cpus. Based on codes sent to me by Dennis Chernoivanov
and Chuck Silvers.
2004-01-06 09:38:19 +00:00
gson e11055d090 Abort the USB transfer on an endpoint when the last midi device
referencing it is closed.  Fixes kern/23987.
2004-01-06 05:42:47 +00:00
oster d9ff8342a0 Clean up a few comments, and improve code formatting somewhat.
Makes things a bit more readable.

No functional changes.
2004-01-06 03:27:13 +00:00
nathanw 97a491c111 Add a missing { to cpu_exit() so that it compiles.
(Alpha still doesn't boot with the new-reaper changes, though. First
process to exit kills the system).
2004-01-05 23:51:19 +00:00
hannken 39ce18659d Mapping of console device goes into the reserved tlb's.
Max. memory is 32M for console at fb and 48M for console on com.

If this becomes a problem TLB_NRESERVED needs to become variable.
2004-01-05 19:55:27 +00:00
matt 724f5b2c53 Regen. 2004-01-05 19:31:08 +00:00
matt f89c0bcfa9 Add Agilent Technologies vendor ID
Add Agilent Tachyon_DX2 product ID
Add HP Tachyon_XL2 product ID
2004-01-05 19:30:51 +00:00
hannken 036559b798 Implement fb_mmap(). From David P. Reese Jr. with PR #23985. 2004-01-05 16:05:14 +00:00
nonaka d382cc6c5a Use memset() for "Clear all of BSS".
If (edata-address & 3) != (end-address & 3), my own code cause infinity loop.
Fixed it.
2004-01-05 15:31:03 +00:00
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