Commit Graph

108 Commits

Author SHA1 Message Date
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
he c45fa09365 Suppress apparently-bogus -Wunitialized warnings, the compiler does
not detect that set / use occur under equal conditions in following
if() statements.
2003-11-07 18:29:30 +00:00
scw f77bf2bb0c Enable/Restore alignment fault state on interrupt handler entry/exit. 2003-11-05 21:10:59 +00:00
reinoud 4e923603f1 Fix for PR # 23264 thanks to Mike Pumford; it is only attatching clock once
now.
2003-11-01 23:37:54 +00:00
jdolecek 85204ef973 fix NULL vs. 0 usage 2003-10-26 11:45:46 +00:00
chris ceb06608ed Don't pass NULL as an integer. 2003-10-24 23:03:50 +00:00
thorpej 2c0d381bd7 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
2003-10-06 16:11:19 +00:00
matt b9d20d131e Fix GCC 3.3.1 nits 2003-09-21 15:12:16 +00:00
lukem 08716eae82 __KERNEL_RCSID() 2003-07-15 00:24:37 +00:00
lukem de043b8788 use __KERNEL_RCSID(0, instead of RCSID( in the kernel 2003-07-14 15:17:13 +00:00
reinoud 733594dd05 Some entries were missing so i'd better add them for completion. 2003-05-06 00:29:57 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
thorpej 95281cabad Use PAGE_SIZE rather than NBPG. 2003-04-01 23:19:08 +00:00
thorpej d071d9a8d0 Use PAGE_SIZE rather than NBPG. 2003-04-01 15:02:05 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
wiz 5e442fbbdd specified, not specifed. 2003-01-06 12:38:47 +00:00
thorpej 359ed65495 Use aprint_normal() for cfprint routines. 2003-01-01 00:46:13 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
jdolecek e0c1e1cffb g/c kbdpoll(), it was replaced with nopoll() 2002-10-22 20:20:35 +00:00
bjh21 d599df9587 Continue the " - . - 8" purge. Specifically:
add	rd, pc, #foo - . - 8		->	adr	rd, foo
ldr	rd, [pc, #foo - . - 8]		->	ldr	rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
2002-10-14 22:32:50 +00:00
bjh21 bd4a91a822 Rework (#ifdef'ed out) code to print I/O timings so as to give more
information (I was curious).
2002-10-13 12:20:44 +00:00
jdolecek e72c35e47e tag the cdevsw as tty with D_TTY 2002-10-08 08:57:52 +00:00
chs ecdf1b4084 add missing protos, clean up includes. 2002-10-05 17:16:33 +00:00
chs 65c08c58b4 copy over some stuff from the shark version of this file.
(how did this compile before?)
add missing protos.
2002-10-05 17:04:44 +00:00
thorpej bd5bb4652b Add trailing ; to CFATTACH_DECL 2002-10-02 15:45:10 +00:00
bjh21 b585e1d57a Remove a spurious ']' from the CFATTACH_DECL invokation. 2002-10-01 22:11:14 +00:00
reinoud 4d64d47a1f Remove old unused cruft 2002-10-01 21:16:15 +00:00
reinoud 7ba11c51fd Fix some small range checks and why weren't we writing the palette in when
we're asked to set the VIDC in a given state! :-D ahum... these are fixed
now. The top palette entry wasn't set.
2002-10-01 12:09:49 +00:00
thorpej f59e5352f2 Use CFATTACH_DECL(). 2002-10-01 04:21:32 +00:00
thorpej d1c37db940 Use CFATTACH_DECL(). 2002-10-01 03:10:12 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
itojun e5b5171ab5 integer overflow. from silvio@qualys.com 2002-08-06 22:46:11 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
bjh21 7fa10fa259 Rather than explicitly masking and sign-extending 16-bit integers, use
u_int16_t and int16_t for the X and Y count registers.  GCC produces better
code this way.
2002-06-20 19:33:36 +00:00
bjh21 c62bc841d0 Rather than explicitly masking and sign-extending 16-bit integers, use
u_int16_t and int16_t for the X and Y count registers.  GCC produces better
code this way.

Also, initialise the stored state in wsqms_enable(), so that the mouse doesn't
warp to a random position on open.
2002-06-20 19:33:20 +00:00
bjh21 4244560bbc More wsqms cleanups:
sc_flags was never read.  G/C it.
wsqms_attach() took two arguments that pointed to the same structure.  G/C one
  of them
Since wsqms controls the same device as qms, have it match the same attach
  args.
2002-06-19 23:49:14 +00:00
bjh21 cccb2d97a7 ANSIfy, un-__P, clean comments a little. 2002-06-19 23:12:14 +00:00
bjh21 26f6ad6038 Un-__P. Clean up comments. 2002-06-19 23:05:07 +00:00
bjh21 f793a16211 Substantial overhaul of the wsqms driver:
Use a callout rather than hanging off the VSYNC interrupt.
Don't emit WSMOUSE_INPUT_ABSOLUTE events, since this isn't an absolute device.
Handle counter wrap-around sensibly, rather than limiting counts.
Don't gratuitously copy sc->sc_dev onto itself at attach time.
2002-06-19 23:02:58 +00:00
bjh21 a7f527777e Move over to using a 6:5:5 R:G:B palette in 16-bit display modes, and abstract
the palette generation to work with arbitrary numbers of bits.
This allows X to work after a fashion, since it tries to put the VIDC into
a 6:5:5 mode itself (which we ignore).  Anything that actually tries to take
advantage of the DirectColor visual it offers will still be screwed, but I
hope such applications are rare.
2002-06-19 22:42:02 +00:00
bjh21 1dda0b462c Kill off vidcvideo_textpalette() again, but better.
This time, vidcvideo_stdpalette() uses vidcvideo_write(), as it should, and
correctly initialises the paletter in 16bpp and (I hope) 32 bpp modes.
This fixes the colours on the text console in 16bpp modes.  32bpp seems to be
generally broken anyway.
2002-06-17 21:00:13 +00:00
bjh21 f4de492459 Parenthesise arguments to VIDC_BLUE and VIDC_GREEN correctly. 2002-06-16 14:53:24 +00:00
bjh21 0501229019 Revert last. vidcvideo_textpalette() and vidcvideo_stdpalette set the palette
by different means.
2002-06-16 14:02:04 +00:00
bjh21 fe2313a380 vidcvideo_stdpalette() and vidcvideo_textpalette() do precisely the same thing.
G/C the latter and change its only caller to use the former.
2002-06-16 13:38:12 +00:00