Commit Graph

23271 Commits

Author SHA1 Message Date
Alexander Langer
8c529b3777 Remove unneeded include of <pci.h>
Approved by:	groudier
2000-12-07 20:58:16 +00:00
Mitsuru IWASAKI
b52617dc0e Create a pmtimer device instance for GENERIC and NEWCARD kernels by default.
Submitted by:	Masayuki FUKUI <fukui@sonic.nm.fujitsu.co.jp>
2000-12-07 14:27:02 +00:00
Roger Hardiman
2c097d3332 Add Isochronus transfer mode support required by
USB WebCams, using a patch from Peter Housel.

With this change ugen, and with Peter's 'vid' program
in ports/graphics/vid, we can capture single images from USB Cameras
using the OmniVision OV511 chipset (including some models of the
Creative WebCam 3)

NetBSD merged in Peter's patch to their ugen.c file
several months ago, so this brings us back in line.

Submitted by:	Peter Housel <housel@acm.org>
		http://members.home.com/housel/
Approved by:	Nick Hibma
2000-12-07 10:28:25 +00:00
Roger Hardiman
5f41c13187 Non functional change.
Change a few indentations to tabs.
Change the functions to use ANSI sytle parameters.

This lowers the diffs between our copy of ugen.c and NetBSD's copy

Approved by:	Nick Hibma
2000-12-07 10:13:18 +00:00
Warner Losh
98b2dbaaa2 Add support for compiling ray driver. 2000-12-07 03:16:21 +00:00
John Baldwin
a423d0122b Fix broken register restraints that needlessly clobbered registers %ecx
and %edx resulting in gcc not having enough registers left to work with.
2000-12-07 02:23:16 +00:00
Archie Cobbs
3a50ed55e2 Convert from spl -> mutex. 2000-12-07 02:09:39 +00:00
Andrew Gallatin
313231657d Partially re-write T2 chipset support based on Tru64 platform support
files which Compaq open-sourced (with a BSD license).

This commit adds support for proper PCI interrupt mapping and much
better support for swizzling between "standard" isa IRQs and the stdio
irqs used by the t2.  This also adds enabling/disabling/eoi support
for AlphaServer 2100A machines.  The 2100A (or lynx) interrupt
hardware is is very different (and much nicer) than the 2100.
Previously, only AS2100 and AS2000 machines worked.

This commits also lays the groundwork for supporting ExtIO modules.
These modules are essentially a second hose.  This work is left
unfinished pending testing on real hardware.  Wilko tells me that
ExtIO modules are quite rare, and may not actually exist in the wild.

Obtained from: Tru64
Tested by: wilko
2000-12-07 01:06:19 +00:00
Alfred Perlstein
b5861b3450 Really fix phys_pager:
Backout the previous delta (rev 1.4), it didn't make any difference.

If the requested handle is NULL then don't add it to the list of
objects, to be found by handle.

The problem is that when asking for a NULL handle you are implying
you want a new object.  Because objects with NULL handles were
being added to the list, any further requests for phys backed
objects with NULL handles would return a reference to the initial
NULL handle object after finding it on the list.

Basically one couldn't have more than one phys backed object without
a handle in the entire system without this fix.  If you did more
than one shared memory allocation using the phys pager it would
give you your initial allocation again.
2000-12-06 21:52:23 +00:00
Matthew Dillon
9440653d07 Add necessary bwillwrite() in writev() entry point.
Deal with excessive dirty buffers when msync() syncs non-contiguous
dirty buffers by checking for the case in UFS *before* checking for
clusterability.
2000-12-06 20:55:09 +00:00
Peter Wemm
138e514cb5 Untangle vfsinit() a bit. Use seperate sysinit functions rather than
having a super-function calling bits all over the place.
2000-12-06 07:09:08 +00:00
Peter Wemm
7ca7bbb36b Simplify this a bit so that it doesn't have to generate silly redundant
__P() prototypes when an ansi-style static inline is a prototype already.
Since vnode_if.[ch] are generated on the fly, there are no CVS diffs to
mess up.
2000-12-06 06:59:38 +00:00
Peter Wemm
4366ac52ad This is kind of a nasty hack, but it appears to solve the Compaq DL360
SMP problem.  Compaq, in their infinite wisdom, forgot to put the IO apic
intpin #0 connection to the 8259 PIC into the mptable.  This hack is to
look and see if intpin #0 has *no* table entry and adds a fake ExtInt
entry for the remap routines to use.  isa/clock.c will still test the
interrupts.  This entry is only ever used on an already broken system.
2000-12-06 03:47:14 +00:00
John Baldwin
960d3c68ed Pass RFSTOPPED to fork1() in kthread_create() to avoid a race condition
where fork1() could put the process on the run queue where it could be
snatched up by another CPU before kthread_create() had set the proper
fork handler.  Instead, we put the new kthread on the runqueue after its
fork handler has been sent.

Noticed by:	jake
Looked over by:	peter
2000-12-06 03:45:15 +00:00
John Baldwin
495c2d2085 - Add in PROC_LOCK() and PROC_UNLOCK() macros. For now these do simple
mutex operations.  In the future they may call functions that verify
  correct locking order between processes in the INVARIANTS case.
- Lock the process in PHOLD() and PREL().
2000-12-06 02:01:56 +00:00
John Baldwin
f3a16450d0 Protect accesses to member of struct proc with the proc lock. 2000-12-06 01:45:20 +00:00
Peter Wemm
a263238c86 Move io_apic_{read,write} from apic_ipl.s (where they do not belong) into
mpapic.c.  This gives us the benefit of C type checking.  These functions
are not called in any critical paths and are not used by the interrupt
routines.
2000-12-06 01:04:02 +00:00
Matt Jacob
61e1a8f478 Restore a sense of cleanly supporting multiple platforms. That is,
place the LOCKing macros within the areas within if_wxvar.h that
is set aside for them. Put any platform specific data also in those
areas.

For ease of maintenance purposes, merge in the OpenBSD version codebase here.
2000-12-06 00:52:28 +00:00
Matt Jacob
5c43d35fd7 Move $FreeBSD id up to top of file for multi-OS ease of support reasons. 2000-12-06 00:50:53 +00:00
Peter Wemm
9a18987b73 GC unused assembler function apic_eoi() 2000-12-06 00:38:04 +00:00
John Baldwin
7b29322c25 Add in #include of <sys/lock.h> since it was axed from <sys/proc.h>.
Noticed by:	Wesley Morgan <morganw@chemikals.org>
Pointy hat to:	me
2000-12-06 00:33:58 +00:00
Alfred Perlstein
89b54bffe9 Add forgotten SYSCALL_MODULE_HELPER() for msgsys() syscall.
Discovered by: Valentin Chopov <valentin@valcho.net>
2000-12-05 23:05:45 +00:00
Alfred Perlstein
54019b0afe need to adjust allocation size to properly deal with non PAGE_SIZE
allocations, specifically with allocations < PAGE_SIZE when the code
doesn't work properly
2000-12-05 22:22:24 +00:00
John Baldwin
b77e9a8b88 1. Several style cleanups:
- Whitespace fixes.
   - Comment fixes (mostly capitalization and trailing periods).
   - Reorderings to put variables all in the same place, function prototypes
     sorted alphabetically, etc.
2. Removed unused and #ifdef'd out members from struct ithd.
3. Changed ESTCPULIM() to use an explicit (PRIO_MAX - PRIO_MIN) rather than
   PRIO_TOTAL.
4. Remove <sys/lock.h> #include and resort #include's.

Submitted by:	bde (1, 3, 4)
2000-12-05 20:23:43 +00:00
Jonathan Lemon
76345c37d5 Move the wakeup/signaling of the reader side of the tun device into
a tunstart function, which is called when a packet is sucessfully
placed on the queue.  This allows us to properly do output byte accounting
within the handoff routine.
2000-12-05 16:21:00 +00:00
KATO Takenori
84af0d0cd2 Merged from sys/i386/isa/clock.c revision 1.164. 2000-12-05 09:35:54 +00:00
KATO Takenori
86a86b1be0 Merged from sys/i386/i386/machdep.c revision 1.424. 2000-12-05 09:33:11 +00:00
KATO Takenori
d71d320569 Merged from files.i386 revision 1.339. 2000-12-05 09:28:49 +00:00
KATO Takenori
bdba98714f Merged from files.i386 revisions 1.337 and 1.338. 2000-12-05 09:27:42 +00:00
Marcel Moolenaar
a333d53268 Add support for COMPAT_LINUX and DEBUG_LINUX. Make the OSF1
files dependent on 'compat_linux' as well as the Linuxulator
depends on the osfulator.
2000-12-05 09:10:50 +00:00
Marcel Moolenaar
e5f2ced1ee Minor cleanups:
o  remove unused prototypes,
o  remove unused extern declarations,
o  move prototypes up.
2000-12-05 09:06:41 +00:00
Marcel Moolenaar
ec79304f0f Make osendsig global. It's used by the Linuxulator. 2000-12-05 09:04:25 +00:00
Takanori Watanabe
d55a2811f5 Update Makefile to follow acpica-1115 import. 2000-12-05 08:47:41 +00:00
Matt Jacob
4081cc88c9 Only call ISP_UNLOCK/ISP_LOCK if isp->isp_osinfo.intsok in USEC_SLEEP.
Add a test against isp->isp_osinfo.islocked prior to trying to see
whether --isp->isp_osinfo.islocked is zero to cause us to unlock
(non-SMPLOCK case).
2000-12-05 07:41:53 +00:00
Matt Jacob
bfbab17021 Replace some more printfs with isp_prt's. Use isp_prt/ISP_LOGDEBUG0
for rate setting/getting printouts.
2000-12-05 07:39:54 +00:00
Matt Jacob
f7dddf8a54 Remove more printfs and use either isp_prt or device_printf. Remember
to set ISP_LOGINFO if bootverbose is set.
2000-12-05 07:38:41 +00:00
Marcel Moolenaar
7ec9743293 Remove call to bzero after MALLOC and instead add M_ZERO
to MALLOC.
2000-12-05 06:44:22 +00:00
Warner Losh
05f80a57a7 Start to make code more generic so it can be used by the pccbb driver
in the future:
o Remove pcic_softc from pcic_handle and replace it with a void *
o Reduce dependence on accessing softc via a pcic_handle
Minor cleanups:
o Define a macro to count the size of an array and use it.
o Minor whitespace alignment
o make no slots found a printf not a panic.
2000-12-05 04:49:26 +00:00
Jake Burkholder
1eb44f0270 Remove the last of the MD netisr code. It is now all MI. Remove
spending, which was unused now that all software interrupts have
their own thread.  Make the legacy schednetisr use an atomic op
for setting bits in the netisr mask.

Reviewed by:	jhb
2000-12-05 00:36:00 +00:00
Mike Smith
4d3329891c ACPI HID's aren't limited to 7 characters. Don't check the length of the
HID passed in as an argument at all; callers are typically going to be
sending us static strings anyway.

Submitted by:	Munehiro Matsuda <haro@tk.kubota.co.jp>
2000-12-05 00:19:10 +00:00
Bill Paul
031fc810ab Initialize/grab the mutex earlier in the attach phase, so that
bailing out to the fail: label where we release/destroy the mutex
will work without exploding.
2000-12-04 22:46:50 +00:00
Peter Wemm
5ee171d264 Cleanup some leftover lint from the old interrupt system.
Also, while here, run up to 32 interrupt sources on APIC systems.
Normalize INTREN/INTRDIS so they are the same on both UP and SMP systems
rather than sometimes a macro, and sometimes a function.

Reviewed by:  jhb, jakeb
2000-12-04 21:15:14 +00:00
Joerg Wunsch
50088f2089 Turn off the load_eject bit in cdstartunit(). It causes an `Invalid
field in CDB' error when attempting to start a caddy-type CD drive,
since those drives apparently in general refuse to load a medium.  Since
we never advertised the feature to load the medium upon calling
cdstartunit() (i. e. upon receipt of a CDIOCSTART ioctl command), nobody
should have relied on it.  Besides, nobody noticed so far at all that
this command is failing for caddy-type drives...  Only few applications
seem to use it at all (among them is workman, which made me notice it).

Reviewed by:	ken
2000-12-04 20:16:06 +00:00
Matt Jacob
b741a1c581 Fix for vanilla PC164 systems to use a slightly different PALcode magic
tweak to enable/disable interrupt sources. Seems to work. It is unclear
how many of the PC164 models actually might needs this, and whether or
not there are other hidden issues.

Obtained from:Bernd Walter <ticso@cicely8.cicely.de>
2000-12-04 17:21:46 +00:00
Jake Burkholder
f315dbdbd4 (1) Allow a stray lock prefix to be compiled out with the
MPLOCKED macro
(2)	Use decimal 12 rather than hex 0xc in an addl
(3)	Implement MTX_ENTER for the I386_CPU case
(4)	Use semi-colons between instructions to allow MTX_ENTER
	and MTX_ENTER_WITH_RECURSION to be assembled
(5)	Use incl instead of incw to increment the recusion count
(6)	10 is not a valid label, use 7, 8 and 9 rather than 8, 9 and 10
(7)	Sort numeric labels

Submitted by:	bde (2, 4, and 5)
2000-12-04 12:38:03 +00:00
Jake Burkholder
8dd431fcf7 Whitespace. Fix indentation, align comments. 2000-12-04 10:23:29 +00:00
Jake Burkholder
f6a6e37a2c Whitespace. Fix an overly long line. 2000-12-04 09:52:39 +00:00
Jake Burkholder
85b039fe64 Remove if defined(tahoe) cobwebs. 2000-12-04 09:49:34 +00:00
Alfred Perlstein
7a8671e9b7 remove struct mount from useland visibility 2000-12-04 09:21:05 +00:00
Matt Jacob
bd1c746647 Comment out debug printfs about enable/disable ints.
Current now appears to work at least fitfully on one Rawhide.
2000-12-04 01:33:44 +00:00