Commit Graph

23390 Commits

Author SHA1 Message Date
Warner Losh
727928f866 Remove unnecessary includes found by phk's script. I've been building
these locally for ages.
2000-12-13 06:28:37 +00:00
Warner Losh
3a68d6087a Fix problem with ax88190 based cards trying to probe further after
matching the ax88190.
2000-12-13 06:27:23 +00:00
Warner Losh
b76f687a7e Remove unnecessary includes found by phk's script a long time ago. 2000-12-13 06:25:22 +00:00
Warner Losh
641d2fddd3 Add aic and ray modules. I've been building these for a while now on
i386.
2000-12-13 05:54:26 +00:00
Warner Losh
598364a003 Module for aic
Submitted by:	Michael Reifenberger
2000-12-13 05:50:02 +00:00
Warner Losh
b66fd62112 Add module dependencies on CAM module.
Submitted by:	Michael Reifenberger
2000-12-13 05:46:23 +00:00
Bosko Milekic
988cb8dfd9 Eliminate a race in MEXTFREE(). The reference counter decrement and test
was not atomic. We now make sure that we free the ext buf if the reference
count is about to reach 0 but also make sure that nobody else has done it
before us.

While I'm here, change refcnt to u_int (from long). This fixes a compiler
warning regarding use of atomic_cmpset_long on i386.

Submitted by: jasone
Reviewed by: jlemon, jake
2000-12-13 05:13:02 +00:00
Robert Watson
f6a99e61c5 o Tighten restrictions on use of /proc/pid/ctl and move access checks
in ctl to using centralized p_can() inter-process access control
  interface.

Reviewed by:	sef
2000-12-13 04:28:24 +00:00
Mike Smith
70b5f189c9 Remove a redundant prototype. 2000-12-13 04:22:04 +00:00
Mike Smith
3742d6ca91 Don't try to free the now-nonexistent hdrspec field. This one snuck by
me in the previous round of patches.  Oops.
2000-12-13 02:45:03 +00:00
Warner Losh
6763347475 Add isa support:
o write isa driver routines.
o factor detach routine in sn_detach.
2000-12-13 01:47:19 +00:00
Mike Smith
84c6b37d74 Updates to match changes elsewhere in the PCI subsystem:
- Remove redundant header-type-specific support in the cardbus pcibus
   clone.  The bridges don't need this anymore.
 - Use pcib_get_bus instead of the deprecated pci_get_secondarybus.
 - Implement read/write ivar support for the pccbb, and teach it how
   to report its secondary bus number.  Save the subsidiary bus number
   as well, although we don't use it yet.
2000-12-13 01:28:00 +00:00
Mike Smith
8983cfbf27 Next round of PCI subsystem updates:
- Break out the /dev/pci driver into a separate file.
 - Kill the COMPAT_OLDPCI support.
 - Make the EISA bridge attach a bit more like the old code; explicitly
   check for the existence of eisa0/isa0 and only attach if they don't
   already exist.  Only make one bus_generic_attach() pass over the
   bridge, once both busses are attached.  Note that the stupid Intel
   bridge's class is entirely unpredictable.
 - Add prototypes and re-layout the core PCI modules in line with
   current coding standards (not a major whitespace change, just moving
   the module data to the top of the file).
 - Remove redundant type-2 bridge support from the core PCI code; the
   PCI-CardBus code does this itself internally.  Remove the now
   entirely redundant header-class-specific support, as well as the
   secondary and subordinate bus number fields.  These are bridge
   attributes now.
 - Add support for PCI Extended Capabilities.
 - Add support for PCI Power Management.  The interface currently
   allows a driver to query and set the power state of a device.
 - Add helper functions to allow drivers to enable/disable busmastering
   and the decoding of I/O and memory ranges.
 - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some
   places.
 - Make the PCI-PCI bridge code a little more paranoid about valid
   I/O and memory decodes.
 - Add some more PCI register definitions for the command and status
   registers.  Correct another bogus definition for type-1 bridges.
2000-12-13 01:25:11 +00:00
Mike Smith
e8d5a72218 Remove the COMPAT_OLDPCI option, it's going away.
Turn 'lnc' off in GENERIC for the moment, pending its update to newbus.
2000-12-13 01:11:34 +00:00
Mike Smith
01282c87e3 Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
Kirk McKusick
0bf3b91d8a Use proper mutex locking when calling setrunnable from speedup_syncer().
Submitted by:	Tor.Egge@fast.no
2000-12-13 01:06:53 +00:00
Jake Burkholder
c0c2557090 - Change the allproc_lock to use a macro, ALLPROC_LOCK(how), instead
of explicit calls to lockmgr.  Also provides macros for the flags
  pased to specify shared, exclusive or release which map to the
  lockmgr flags.  This is so that the use of lockmgr can be easily
  replaced with optimized reader-writer locks.
- Add some locking that I missed the first time.
2000-12-13 00:17:05 +00:00
Julian Elischer
1b3335af6a Another mismatch found by Gcc:
This is what happenss when you let the patches pile up too long without
committing them.. brain rot..
2000-12-12 23:56:16 +00:00
Julian Elischer
ca976de62f Change initialiser to match new structure layout.
forgotten by: Me
Found by: GCC
2000-12-12 23:52:43 +00:00
Julian Elischer
c4e30752ba remove unused variable 2000-12-12 23:50:51 +00:00
Mike Smith
5aea03b06b It's possible for an ISA bus to be hung off an EISA bridge, so we need to
reflect that here.
2000-12-12 23:33:29 +00:00
Archie Cobbs
eb1fc88909 Fix bug in parse type for struct ng_one2many_config.
Reported by:	Yian Zhu <Yian.Zhu@qobra.com>
2000-12-12 23:12:22 +00:00
Julian Elischer
d00a91423d I always forget this file. It's netgraph, but not one of mine..... 2000-12-12 23:05:19 +00:00
Julian Elischer
7600241b05 I have no idea at all why this file was not included in the last commit. 2000-12-12 22:35:36 +00:00
Dag-Erling Smørgrav
96e37d17e6 Point #includes at compat/linprocfs instead of i386/linux/linprocfs. 2000-12-12 22:06:05 +00:00
Dag-Erling Smørgrav
c094d916c4 Remove after repo-copy to sys/compat/linprocfs. 2000-12-12 22:01:59 +00:00
Dag-Erling Smørgrav
190a3b2513 The linprocfs sources have moved to sys/compat/linprocfs. 2000-12-12 22:00:05 +00:00
Matt Jacob
1426b70df8 only include sys/proc.h once 2000-12-12 21:20:48 +00:00
David E. O'Brien
184265fd42 Include sys/proc.h so this compiles [on the Alpha]. 2000-12-12 21:18:13 +00:00
Matt Jacob
093d32e535 We reference curproc, ergo need <sys/proc.h> 2000-12-12 21:14:29 +00:00
John Baldwin
1639f08b45 Add a missing include of <sys/proc.h>. 2000-12-12 20:24:36 +00:00
Bill Paul
34da0ef197 Grrrrr. That last commit was supposed to be to the head, not to -stable
(even though I want the fixes in -stable anyway). I'm sure I'm going
to get flamed now for committing to -stable and -current too quickly.
*sigh*
2000-12-12 19:31:14 +00:00
Julian Elischer
453b556583 oops that commit included a local hack... take it out.. 2000-12-12 18:59:09 +00:00
Julian Elischer
859a4d166c Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.

This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.

This is running on my test machine with no new problems :-)
2000-12-12 18:52:14 +00:00
Robert Nordier
1ec5afb81e Add a magic number, for easier identification of boot0. At present,
this is used only by libdisk.
2000-12-12 17:27:35 +00:00
John Baldwin
5057d21069 Add in symbols needed in the WITNESS_ENTER and WITNESS_EXIT macros in
i386/include/mutex.h.
2000-12-12 16:40:20 +00:00
Dag-Erling Smørgrav
2b3d269b8b Temporarily disconnect linprocfs from the build, until I fix it so it builds
with Kirk's big proc patch.
2000-12-12 16:03:17 +00:00
Mitsuru IWASAKI
b2c9c0dab2 Catch up with the recent conversion the per-eventhandler list mutex to
a lockmgr lock.
2000-12-12 14:20:27 +00:00
Mike Smith
4fa59183f1 - We have access to our own device_t here, so use pci_read_config
rather than finding our parent pcib and using its PCI_READ_CONFIG
   method.

 - Fix the defines for the 32-bit I/O decode registers, and properly
   process the 16-bit versions.  Now we will correctly check that I/O
   resources behind the bridge are going to be decoded.

 - Bring the quirk for the Orion PCI:PCI bridge in here (since it
   seems to want to set the secondary/supplementary bus numbers).

 - Use PCI_SLOTMAX rather than a magic number.
2000-12-12 13:20:35 +00:00
Mike Smith
52daea05c5 Don't try to fix up the Orion here; the interface we use is wrong for the
new code (and about to disappear too).
2000-12-12 13:11:42 +00:00
Nick Hibma
040639a0aa make sure we tear down the devnodes for the endpoints 1 and above
when switching configuration.
2000-12-12 10:19:19 +00:00
Mike Smith
6bcd295b8d Always build the ISA and EISA bridge code. This is slightly unintiuitive,
but serves to work around some uncleanliness whereby the ISA bus is not
found on Alpha systems with PCI:EISA bridges due to the lack of EISA code
for the Alpha.
2000-12-12 08:23:50 +00:00
Kirk McKusick
1f7d250182 Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
2000-12-12 07:25:57 +00:00
John Baldwin
06592dd188 - Convert the per-eventhandler list mutex to a lockmgr lock so that it can
be safely held across an eventhandler function call.
- Fix an instance of the head of an eventhandler list being read without
  the lock being held.
- Break down and use a SYSINIT at the new SI_SUB_EVENTHANDLER to initialize
  the eventhandler global mutex and the eventhandler list of lists rather
  than using a non-MP safe initialization during the first call to
  eventhandler_register().
- Add in a KASSERT() to eventhandler_register() to ensure that we don't try
  to register an eventhandler before things have been initialized.
2000-12-12 04:01:35 +00:00
John Baldwin
18f619abce Fix the assembly mutex macros to call the appropriate witness functions if
the witness code is compiled in.  Without this, the witness code doesn't
notice that sched_lock is released by fork_trampoline() and thus gets all
confused about spin lock order later on.
2000-12-12 03:49:58 +00:00
John Baldwin
61d68d6cb8 Since _mtx_enter() and friends are static inline functions now instead of
macros, the mutex KTR log entries don't actually have the useful filename
and line numbers in the KTR_EXTEND case, so remove a comment claiming this
and go back to one set of KTR strings.
2000-12-12 03:48:40 +00:00
Mike Smith
fed8edf563 - Don't return early from the PCI:EISA bridge attachment, or we will lose
the ISA bus.
 - Don't expect that a PCI:ISA bridge will have a correct class value;
   if we're checking PCI IDs, only depend on these.

This should fix the loss of ISA on machines with PCI:EISA bridges like the
AS4100.
2000-12-12 03:33:02 +00:00
Andrew Gallatin
be5182cc4d enable the proper cascade irq on as1000a
tested by: wilko
2000-12-12 01:39:17 +00:00
Andrew Gallatin
f4aea0e88a fix AS1000/AS1000A support. It turns out the that iobus depends on the
CPU version (apecs:ev4::cia:ev5) and the irq hardware depends on the systype
previously, only ev4 AS1000s and ev5 AS1000a's would have worked.

tested by: wilko (in its -stable form)
noticed by: daniel
2000-12-12 01:36:26 +00:00
Andrew Gallatin
1b771c9281 fix various compiler warnings generated by previous commit 2000-12-12 01:32:36 +00:00