Commit Graph

520 Commits

Author SHA1 Message Date
phk
0c8bfb6d00 OK, I messed up /dev/console with what I had hoped would be compat
code.  Convert remaining console drivers and hope for the best.
2003-09-26 19:35:50 +00:00
phk
df8b28032a Typo in last commit: missing ')' 2003-09-26 12:13:35 +00:00
phk
30f60296f2 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
nyan
1087d47522 Merged from sys/isa/fd.c revisions 1.259 and 1.260. 2003-09-18 09:49:08 +00:00
nyan
2edddd40ef Merged from sys/isa/fd.c revision 1.258. 2003-09-13 12:56:05 +00:00
nyan
66714cf37a MFi386: revision 1.204. 2003-09-11 14:05:06 +00:00
nyan
65e872ed0b Merged from sys/isa/fd.c revisions 1.252, 1.253, 1.254, 1.255 and 1.257. 2003-09-11 13:35:35 +00:00
nyan
66f7142c64 Merged from sys/dev/sio/sio.c revisions 1.403 and 1.404. 2003-08-28 11:20:54 +00:00
nyan
ce8950904e MFi386: revisions 1.202 and 1.203. 2003-08-23 06:06:55 +00:00
imp
3765cbdfd1 bandaide to make this build again 2003-08-16 17:22:54 +00:00
nyan
f2c692be93 MFi386: revision 1.201. 2003-08-08 12:45:42 +00:00
nyan
545a2236ae Merged from sys/dev/sio/sio.c revision 1.400. 2003-08-02 09:41:31 +00:00
nyan
10c63974c2 Merged from sys/dev/ppc/ppc.c revision 1.42. 2003-08-02 09:25:25 +00:00
nyan
ab4ffb5053 Supported the gdc_clear function.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2003-07-21 13:00:09 +00:00
jhb
17958a749f - Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
  see if the device is disabled in the identify routine instead of in the
  probe routine.  This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled".  If this is a big problem, resource_disabled() can always be
changed to honor both names.
2003-07-02 16:09:02 +00:00
phk
35bf27413a Replace evil abuse of geteblk() with malloc(9). 2003-06-16 07:41:47 +00:00
nyan
606016928a MFi386: revision 1.199 2003-06-01 04:51:07 +00:00
nyan
6a8f274032 Merged from sys/isa/ppc.c revision 1.40. 2003-06-01 04:48:34 +00:00
nyan
85061b76b7 Merged from sys/isa/fd.c revision 1.250. 2003-06-01 04:46:30 +00:00
nyan
d773af8769 Merged from sys/dev/sio/sio.c revision 1.399. 2003-06-01 04:44:43 +00:00
kan
9468fdaf14 Deprecate machine/limits.h in favor of new sys/limits.h.
Change all in-tree consumers to include <sys/limits.h>

Discussed on:	standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-04-29 13:36:06 +00:00
phk
c235e25328 Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.
2003-04-01 15:06:26 +00:00
jake
783ae539c3 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
mdodd
c4e5f92f95 PC98 systems don't need to worry about the MCA bus. 2003-03-24 19:10:33 +00:00
phk
e059b79437 Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
phk
ea79e06601 Fix malloc() without legal mode flag. 2003-03-17 07:28:01 +00:00
phk
d41f2cb2dc Call devstat_start_transaction_bio() instead of devstat_start_transaction() 2003-03-15 10:50:44 +00:00
nyan
223a21c6b4 Merged from sys/dev/sio/sio.c revisions 1.387 and 1.388. 2003-03-09 10:15:11 +00:00
phk
caaeebfffc Allocate the devstat structure with devstat_new_entry(). 2003-03-08 21:44:46 +00:00
phk
b67232b68c Make nokqfilter() return the correct return value.
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
2003-03-03 16:24:47 +00:00
phk
0ae911eb0e Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
des
2756b6c964 More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
mux
a46ff80dc4 Convert one more d_mmap_t consumer I missed in my previous commit. 2003-02-25 13:30:50 +00:00
mux
541937cf73 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
nyan
ae2c0d1ce2 Fix compile error with FB_INSTALL_CDEV option. 2003-02-23 13:28:44 +00:00
phk
72688ad7fe Change the console interface to pass a "struct consdev *" instead of a
dev_t to the method functions.

The dev_t can still be found at struct consdev *->cn_dev.

Add a void *cn_arg element to struct consdev which the drivers can use
for retrieving their softc.
2003-02-20 20:54:45 +00:00
imp
cf874b345d Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
phk
5d80f8f84b Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDB
will not have a dev_t.
2003-02-16 19:22:21 +00:00
phk
4bfb37f22e Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
phk
1f1f90bcdb Switch to use the TSC code i386/i386/tsc.c 2003-02-11 11:43:58 +00:00
nyan
6307b39fe9 Merged from sys/dev/sio/sio.c revision 1.383. 2003-02-07 10:16:35 +00:00
phk
025e374110 Reduce diff to i386/isa/clock.c by unifdef -DPC98 2003-02-05 10:16:43 +00:00
phk
8ad27b1211 Typo in last commit 2003-02-05 09:35:02 +00:00
phk
4612101b47 MFi386: write the correct weekday back to the RTC. 2003-02-05 09:33:57 +00:00
phk
3692879cc8 Split the global timezone structure into two integer fields to
prevent the compiler from optimizing assignments into byte-copy
operations which might make access to the individual fields non-atomic.

Use the individual fields throughout, and don't bother locking them with
Giant: it is no longer needed.

Inspired by:    tjr
2003-02-03 19:49:35 +00:00
jake
6b3763a173 Split statclock into statclock and profclock, and made the method for driving
statclock based on profhz when profiling is enabled MD, since most platforms
don't use this anyway.  This removes the need for statclock_process, whose
only purpose was to subdivide profhz, and gets the profiling clock running
outside of sched_lock on platforms that implement suswintr.
Also changed the interface for starting and stopping the profiling clock to
do just that, instead of changing the rate of statclock, since they can now
be separate.

Reviewed by:	jhb, tmm
Tested on:	i386, sparc64
2003-02-03 17:53:15 +00:00
nyan
9d632b189a MFi386: revision 1.192. 2003-01-30 13:23:18 +00:00
phk
224d4fa701 Make tsc_freq a 64bit on PC98 also. 2003-01-29 18:08:26 +00:00
alfred
bf8e8a6e8f Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
nyan
4743c6079e Merged from sys/isa/syscons_isa.c revision 1.21. 2003-01-15 13:12:12 +00:00