Commit Graph

140 Commits

Author SHA1 Message Date
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger cf417aad7e use aprint_*_dev and device_xname 2008-04-08 20:08:49 +00:00
perry b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
garbled 86d671713a Add three new MI functions taken from macppc/autoconf.c:
of_getnode_byname(): Finds a node named X
of_to_uint32_prop(): sets an uint32_t prop_t from an OFW property
of_to_dataprop(): sets a data prop_t from an OFW property

These looked more generally useful, and seemed like something other
OFW-capable machines might want to take advantage of.
2007-11-07 19:26:45 +00:00
garbled fb3ebfc3c0 Add a new convenience function, of_find_firstchild_byname(), and apply
some minor KNF to this ofw_subr.c.
2007-10-25 16:59:38 +00:00
joerg d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +00:00
he b68a467e51 Correct the order of the arguments to disk_init(). 2007-10-17 17:57:11 +00:00
ad 2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
ad b5a9ff06f1 Replace some uses of lockmgr(). 2007-07-21 19:51:47 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
matt 2a18c897d3 Fix more caddr_t -> void * lossage 2007-03-08 20:52:21 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
macallan 57fb2c65f9 enable ioctl(OFIOCSET) so eeprom can actually change PROM settings on
OpenFirmware machines
2007-02-28 20:33:50 +00:00
hubertf eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
he ceeb812c89 Unify the declaration of OF_interpret() between sparc{,64} and macppc
by adding the "nargs" argument to the macppc version, and fix the macppc
ports uses of OF_interpret() accordingly.

Also move the declaration of OF_interpt() from macppc's autoconf.h to
ofw/openfirm.h.  This fixes the build of the macppc port.

Approved by macallan@.
2007-01-20 21:42:12 +00:00
macallan 6eb39c5682 pull in ofw_subr.c with openfirm so we can use stuff like of_compatible()
without ofbus
2007-01-08 06:43:09 +00:00
elad bdc51baebb Adapt MD code to KAUTH_DEVICE_TTY_OPEN, batch #2 from Matt Fleming, thanks!
Also, add forgotten splx() calls in some places.
2006-10-01 19:28:43 +00:00
gdamore cf407be292 Convert shark and ofppc to new common ofrtc and MI todr code. Tested
on shark.  Ok christos@, martin@.
2006-09-13 07:14:35 +00:00
ad 3029ac48c7 - Use the LWP cached credentials where sane.
- Minor cosmetic changes.
2006-07-21 16:48:45 +00:00
uwe 2931d193fd G/c struct ofbus_softc. Last use (in sys/arch/powerpc/powerpc/ofw_machdep.c)
has perished long ago along with vestiges of dk_establish.
2006-06-14 19:42:34 +00:00
yamt 52da04717a - include kauth.h for kauth_authorize_generic.
- whitespace.
2006-05-15 12:39:05 +00:00
elad 2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
thorpej 838ee1e0d9 Use device_private(). 2006-03-29 06:51:47 +00:00
thorpej 39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he 3ee7e97fcc Now that OF_read and OF_write have different signatures, we need to
cast one of them before assigning to a common function pointer.
Yes, this breaks strict type checking, but is needed to compile with
-Wcast-qual turned on.
2005-06-09 12:23:23 +00:00
christos 8bbce26c81 sprinkle const. 2005-05-31 00:47:05 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
thorpej 22044e51d1 Eliminate use of M_HASFCS. Use a buffer large enough to receive a
full-length Ethernet frame.
2005-01-30 19:24:05 +00:00
thorpej 281037afd6 Add support for wedges to the OpenFirmware disk driver. 2004-09-25 05:21:03 +00:00
itojun 804f709531 use safer string manipulation function 2004-04-23 21:01:02 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
mjl e959b27d7f Typo in comment. From OpenBSD. 2003-10-22 09:04:39 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 257443876f 'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built 2003-06-29 11:02:21 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
bouyer 847cb1fa0d Zero out the buffer when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN 2003-01-15 22:01:57 +00:00
wiz c053751628 compatibility, not compatiblity. 2003-01-06 13:26:24 +00:00
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +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
chs cb1254e9a1 in ofnet_read(), interpret returns of either -2 or 0 from OF_read() as
meaning that there is no packet available.  the OF spec reportedly
says that it's supposed to return 0 in this case, but my Firepower box
uses -2, so this is probably another of those FIRMWORKSBUGS things.
we'll accept both values in any case.
2002-10-22 06:28:50 +00:00
chs cdd13585e9 add missing protos. 2002-10-05 17:01:51 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 674c37a017 Use CFATTACH_DECL(). 2002-10-02 02:16:10 +00:00