Commit Graph

185470 Commits

Author SHA1 Message Date
dyoung
8d5198657e Simplify activation hooks. (sc_dying must die!) 2009-11-12 19:51:44 +00:00
dyoung
43acd4eaa8 Simplify activation hook. (sc_dying must die!)
s/device_ptr_t/device_t/.
2009-11-12 19:50:01 +00:00
dyoung
ed1618c692 Simplify activation hook. (sc_dying must die!)
unifdef -D__NetBSD__ -U__FreeBSD__ -U__OpenBSD__.
2009-11-12 19:49:03 +00:00
dyoung
8488e3e07c Simplify activation hook.
(sc_dying must die!)
2009-11-12 19:46:01 +00:00
dyoung
acb06354f1 Remove superfluous activation hooks. 2009-11-12 19:44:17 +00:00
dyoung
240fa6310f Remove superfluous activation hook. 2009-11-12 19:39:26 +00:00
dyoung
b5d9476c14 Simplify activation hook. 2009-11-12 19:38:35 +00:00
dyoung
04b4cf9e54 Remove superfluous activation hook. 2009-11-12 19:37:17 +00:00
dyoung
d061cb2faa Simplify activation hook. 2009-11-12 19:35:59 +00:00
dyoung
3e567daf68 Simplify activation hook. Replace each use of sc_invalid by either
calling config_deactivate(9) or device_is_active(9).
2009-11-12 19:32:14 +00:00
dyoung
a6c5930eb6 Simplify activation hook. 2009-11-12 19:30:49 +00:00
dyoung
91901a7869 Simplify activation hook. Replace each use of sc_invalid by either
calling config_deactivate(9) or device_is_active(9).
2009-11-12 19:28:59 +00:00
dyoung
e33ae76976 Remove superfluous activation hook. 2009-11-12 19:25:08 +00:00
dyoung
f4ac73e2da Don't use the superfluous activation hook.
Cosmetic: while I'm here, join two lines.
2009-11-12 19:24:06 +00:00
dyoung
171b2851cf Simplify activation hook. 2009-11-12 19:22:08 +00:00
dyoung
310df30dc7 Remove superfluous activation hook. 2009-11-12 19:20:08 +00:00
dyoung
e4fd5e4f38 Simplify activation hook. 2009-11-12 19:18:55 +00:00
dyoung
972989f5e3 Move a device-deactivation pattern that is replicated throughout
the system into config_deactivate(dev): deactivate dev and all of
its descendants.  Block all interrupts while calling each device's
activation hook, ca_activate.  Now it is possible to simplify or
to delete several device-activation hooks throughout the system.

Do not deactivate a driver while detaching it!  If the driver was
already deactivated (because of accidental/emergency removal), let
the driver cope with the knowledge that DVF_ACTIVE has been cleared.
Otherwise, let the driver access the underlying hardware (so that
it can flush caches, restore original register settings, et cetera)
until it exits its device-detachment hook.

Let multiple readers and writers simultaneously access the system's
device_t list, alldevs, from either interrupt or thread context:
postpone changing alldevs linkages and freeing autoconf device
structures until a garbage-collection phase that runs after all
readers & writers have left the list.

Give device iterators (deviter(9)) a consistent view of alldevs no
matter whether device_t's are added and deleted during iteration:
keep a global alldevs generation number.  When an iterator enters
alldevs, record the current generation number in the iterator and
increase the global number.  When a device_t is created, label it
with the current global generation number.  When a device_t is
deleted, add a second label, the current global generation number.
During iteration, compare a device_t's added- and deleted-generation
with the iterator's generation and skip a device_t that was deleted
before the iterator entered the list or added after the iterator
entered the list.

The alldevs generation number is never 0.  The garbage collector
reaps device_t's whose delete-generation number is non-zero.

Make alldevs private to sys/kern/subr_autoconf.c.  Use deviter(9)
to access it.
2009-11-12 19:10:30 +00:00
snj
b839469ef3 igsfb needs videomode. 2009-11-12 18:37:10 +00:00
tron
6ff18287ac Turn on Stack Smash Protection (SSP) for the "ALL" kernel to get at least
compile time coverage during a full release build.

Suggested by Mindaugas Rasiukevicius.
2009-11-12 14:58:09 +00:00
tron
c3b1e69a6b Remove "USE_SSP_DEFAULT". 2009-11-12 14:46:37 +00:00
tron
d6e33297fb Revert SSP changes because at least rmind@, pooka@ and haad@ consider
5% more performance more important than the gain in security.
2009-11-12 14:30:34 +00:00
tron
559872b175 Invent a new flag "USE_SSP_DEFAULT" which defines whether we want to use
SSP for building the whole source tree. Set this to "yes" for
NetBSD/amd64 and NetBSD/i386. It is now possible to get the old
behavior (build libs and certain programs with SSP) by setting
"USE_SSP_DEFAULT" to "no".
2009-11-12 13:22:34 +00:00
nakayama
29ed10d349 Use proper tag ".man" for man files. 2009-11-12 13:17:46 +00:00
tron
87a288ba6f Don't assume that "id_t", "gid_t" and "uid_t" use the same underlying type
and use the appropriate types instead. Tested under NetBSD 5.99.22
and Darwin 10.2.0.

This should fix one of the cross-builds under FreeBSD as reported by
Rhialto on the "current-users" mailing list.
2009-11-12 10:10:49 +00:00
uebayasi
49fdab3079 Comment & whitespace. 2009-11-12 08:54:00 +00:00
tron
47db09157e Fix broken conditional to get manual builds (not using "build.sh")
working again.
2009-11-12 08:51:50 +00:00
uebayasi
024d1252f2 Style. 2009-11-12 08:41:49 +00:00
uebayasi
4a2c3ae0e4 Whitespace & style. 2009-11-12 08:32:57 +00:00
uebayasi
4633367fa2 usbd_do_request_flags(..., 0, 0, USBD_CONFIG_TIMEOUT) is equivalent to
usbd_do_request(...).  Remove an unneeded cast.  No functional changes.
2009-11-12 08:28:31 +00:00
uebayasi
f3b7685602 Indent. 2009-11-12 08:16:50 +00:00
uebayasi
0ee2b2ae9b Typo in a debug printf. 2009-11-12 07:58:32 +00:00
joerg
2ec9715635 Do not use \." for comments, always use .\". Discussed with uwe@. 2009-11-12 00:43:52 +00:00
haad
dd6f356cec Reert change which was not meant to be comitted. 2009-11-11 23:59:36 +00:00
haad
14ad4d5b1e Build kernel modules with -mno-red-zone like kernel is build. This fixes
frequent panics in amd64 zfs module. This should also fix problem reported
by Nicolas Joly in:

http://mail-index.netbsd.org/port-amd64/2008/12/09/msg000646.html

Thanks to cube@ for his help with this.
2009-11-11 23:53:38 +00:00
joerg
1a57a79dcb Clear cksum flags before any further processing like ip_forward does.
Many drivers set the UDP/TCP v4 flags even for v6 traffic and if the
packet is encapsulated with gif, the IPv6 header would get corrupted by
ip_output. Patch suggested by bad@
2009-11-11 22:19:22 +00:00
tron
b99b4b6003 Revert most of revision 1.73:
We cannot user_from_uid(3) or group_from_gid(3) unless the system
also supports pwcache_userdb(3) and pwcache_groupdb(3). The build will
use the hosts password and user database otherwise. Switch back to the
old behaviour to only the native functions if they are all present.
This fixes cross builds under Mac OS X and FreeBSD.

Fix based on problem analysis provided by Akihiko Hayashi.
2009-11-11 21:53:46 +00:00
joerg
62bcbea33d Add the -iremap option to gcc(1) and cpp(1). This option specifies a
prefix transformation rule for __FILE__ and can be used to avoid
hard-coding the location of the source tree in the resulting binary.
2009-11-11 19:03:52 +00:00
cegger
e72026cf1f update comment: we use PMAP_NOCACHE for both pmap_enter and pmap_kenter_pa 2009-11-11 17:08:16 +00:00
macallan
2cd1fea625 Look for a Sun-like video mode specifier in output-device, if there is one
pass it on to igsfb. With this you can
setenv output-device=screen:r1280x1024x60
and igsfb will use that mode. The mode specified must be listed in
dev/videomode/modelines.
2009-11-11 17:05:11 +00:00
macallan
d0b2c36849 add modeseting support. Now if there's a mode string in igsfb_devconfig the
driver will try to use it if at all possible, otherwise fall back to the old
hardcoded 1024x768x60 mode.
2009-11-11 17:01:17 +00:00
macallan
7599b5aef4 add another convenience function - of_get_mode_string() to extract a Sun-like
video mode specifier from output-device
2009-11-11 16:56:52 +00:00
pooka
53e3c13474 set return value properly 2009-11-11 16:50:17 +00:00
pooka
9359f96adb support timeouts in tsleep 2009-11-11 16:47:50 +00:00
pooka
ee4c8e1012 Make rumpuser_cv_timedwait take two int64's instead timespec to
uncouple it from the timespec layout.  Also, change return value
to zero for "timeout didn't expire" and non-zero for "timeout
expired".  This decouples the interface from errno assignments.
2009-11-11 16:46:50 +00:00
tron
840a46601a Enable Stack Smash Protection (SSP) by default for NetBSD/amd64 and
NetBSD/i386 as previously discussed on the "port-amd64" and
"port-i386" mailing lists. No objections from the core team.

Thanks a lot to Tobias Nygren for helping me with the benchmarking
and to Christos Zoulas for fixing SSP problems in cgd(4).
2009-11-11 16:35:45 +00:00
skrll
1070b74721 Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE. 2009-11-11 16:08:31 +00:00
pooka
db8264b1d5 be a little more verbose in DIAGNOSTIC printf 2009-11-11 15:49:05 +00:00
plunky
d6f8e00fe6 update libevent version information 2009-11-11 15:35:57 +00:00
he
c90853c4da Make this actually build, as part of the sgimips GENERIC32_IP2x kernel. 2009-11-11 15:34:37 +00:00