Up to [cvs.netbsd.org] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.34.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:19 2011 UTC (11 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.34: +4 -4
lines
Diff to previous 1.34 (colored) next main 1.35 (colored)
Catchup with rmind-uvmplock merge.
Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:29 2011 UTC (11 months, 2 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.33.2.1: +2 -2
lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)
sync with head
Revision 1.33.4.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:30 2011 UTC (11 months, 2 weeks ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.33: +5 -4
lines
Diff to previous 1.33 (colored) next main 1.34 (colored)
Sync with HEAD.
Revision 1.35 / (download) - annotate - [select for diffs], Sun Jun 5 09:04:22 2011 UTC (11 months, 3 weeks ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
yamt-pagecache,
rmind-uvmplock-nbase,
rmind-uvmplock-base,
netbsd-6-base,
netbsd-6,
jmcneill-usbmp-pre-base2,
jmcneill-usbmp-base9,
jmcneill-usbmp-base8,
jmcneill-usbmp-base7,
jmcneill-usbmp-base6,
jmcneill-usbmp-base5,
jmcneill-usbmp-base4,
jmcneill-usbmp-base3,
jmcneill-usbmp-base2,
jmcneill-usbmp-base,
jmcneill-usbmp,
jmcneill-audiomp3-base,
jmcneill-audiomp3,
HEAD
Changes since 1.34: +4 -4
lines
Diff to previous 1.34 (colored)
Don't directly call sys_sync() from random bits of code, instead add do_sys_sync() that takes an 'lwp' (for l_cred) as an argument. Explicitly pass &lwp0 rather than NULL and expecting sys_sync to substitute some random lwp.
Revision 1.33.2.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (11 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.33: +3 -2
lines
Diff to previous 1.33 (colored)
sync with head
Revision 1.34 / (download) - annotate - [select for diffs], Wed Apr 27 00:36:47 2011 UTC (12 months, 4 weeks ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.33: +3 -2
lines
Diff to previous 1.33 (colored)
G/C M_EMULDATA
Revision 1.31.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:10 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.31: +57 -54
lines
Diff to previous 1.31 (colored) next main 1.32 (colored)
Sync with HEAD.
Revision 1.18.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.4.3: +447 -77
lines
Diff to previous 1.18.4.3 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)
sync with head
Revision 1.33 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:09 2010 UTC (2 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9,
yamt-nfs-mp-base11,
yamt-nfs-mp-base10,
uebayasi-xip-base4,
uebayasi-xip-base3,
uebayasi-xip-base2,
uebayasi-xip-base1,
matt-mips64-premerge-20101231,
jruoho-x86intr-base,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: rmind-uvmplock,
jruoho-x86intr
Changes since 1.32: +55 -54
lines
Diff to previous 1.32 (colored)
A pointer typedef entails trading too much flexibility to declare const and non-const types, and the kernel uses both const and non-const PMF qualifiers and device suspensors, so change the pmf_qual_t and device_suspensor_t typedefs from "pointers to const" to non-pointer, non-const types.
Revision 1.32 / (download) - annotate - [select for diffs], Wed Feb 17 00:15:24 2010 UTC (2 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.31: +4 -2
lines
Diff to previous 1.31 (colored)
Initialize the temporary pmf_qual_t in pmf_device_subtree_release() to avoid a failed ds != NULL assertion, later.
Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 8 20:07:14 2010 UTC (2 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.30: +44 -44
lines
Diff to previous 1.30 (colored)
Expand PMF_FN_* macros.
Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 27 02:55:07 2009 UTC (2 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: matt-premerge-20091211,
jym-xensuspend-nbase
Changes since 1.29: +10 -16
lines
Diff to previous 1.29 (colored)
- Use pool(9) for pmf_event_workitem_t, instead of pool_cache(9). Still, meta-data of this pool takes more space than the actual data.. - Reduce lowat/hiwat to 1..8, since intensity is very low. - Remove unused pew_next_free from pmf_event_workitem_t.
Revision 1.29 / (download) - annotate - [select for diffs], Wed Sep 16 16:34:50 2009 UTC (2 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.28: +410 -37
lines
Diff to previous 1.28 (colored)
In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together. Start solidifying some temporary API changes.
1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
#include it from <sys/pmf.h> instead of <sys/device.h> to break the
circular dependency between <sys/device.h> and <sys/pmf.h>.
2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
suspend/resume call. Start to replace instances of PMF_FN_PROTO,
PMF_FN_ARGS, et cetera, with a pmf_qual_t.
3. Introduce the notion of a "suspensor," an entity that holds a
device in suspension. More than one suspensor may hold a device
at once. A device stays suspended as long as at least one
suspensor holds it. A device resumes when the last suspensor
releases it.
Currently, the kernel defines three suspensors,
3a the system-suspensor: for system suspension, initiated
by 'sysctl -w machdep.sleep_state=3', by lid closure, by
power-button press, et cetera,
3b the drvctl-suspensor: for device suspension by /dev/drvctl
ioctl, e.g., drvctl -S sip0.
3c the system self-suspensor: for device drivers that suspend
themselves and their children. Several drivers for network
interfaces put the network device to sleep while it is not
administratively up, that is, after the kernel calls if_stop(,
1). The self-suspensor should not be used directly. See
the description of suspensor delegates, below.
A suspensor can have one or more "delegates". A suspensor can
release devices that its delegates hold suspended. Right now,
only the system self-suspensor has delegates. For each device
that a self-suspending driver attaches, it creates the device's
self-suspensor, a delegate of the system self-suspensor.
Suspensors stop a system-wide suspend/resume cycle from waking
devices that the operator put to sleep with drvctl before the cycle.
They also help self-suspension to work more simply, safely, and in
accord with expectations.
4. Add the notion of device activation level, devact_level_t,
and a routine for checking the current activation level,
device_activation(). Current activation levels are DEVACT_LEVEL_BUS,
DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
indicate that the device's bus is active, that the bus and device are
active, and that the bus, device, and the functions of the device's
class (network, audio) are active.
Suspend/resume calls can be qualified with a devact_level_t.
The power-management framework treats a devact_level_t that
qualifies a device suspension as the device's current activation
level; it only runs hooks to reduce the activation level from
the presumed current level to the fully suspended state. The
framework treats a devact_level_t qualifying device resumption
as the target activation level; it only runs hooks to raise the
activation level to the target.
5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
drivers.
6. Temporarily add an unused power-management workqueue that I will
remove or replace, soon.
Revision 1.21.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (2 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.21.2.1: +40 -67
lines
Diff to previous 1.21.2.1 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)
Sync with HEAD.
Revision 1.18.4.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:23 2009 UTC (2 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.4.2: +40 -67
lines
Diff to previous 1.18.4.2 (colored) to branchpoint 1.18 (colored)
sync with head.
Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 8 18:53:36 2009 UTC (2 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8,
yamt-nfs-mp-base7,
yamt-nfs-mp-base6,
jymxensuspend-base
Changes since 1.27: +34 -4
lines
Diff to previous 1.27 (colored)
pmf_event_inject(9) may be called from interrupt context, so we must not allocate a pmf_event_workitem_t using kmem_alloc(9). Use pool_cache(9), instead, because it is safe in interrupt context. Thanks, rmind@, for catching the problem and suggesting the solution.
Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 26 19:30:45 2009 UTC (2 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.26: +10 -67
lines
Diff to previous 1.26 (colored)
Switch to kmem(9). (void *)pew is one way to get a struct work *, but let's write&pew->pew_work, instead. It is more defensive and persuasive. Make miscellaneous changes in support of tearing down arbitrary stacks of filesystems and devices during shutdown: 1 Move struct shutdown_state, shutdown_first(), and shutdown_next(), from kern_pmf.c to subr_autoconf.c. Rename detach_all() to config_detach_all(), and move it from kern_pmf.c to subr_autoconf.c. Export all of those routines. 2 In pmf_system_shutdown(), do not suspend user process scheduling, and do not detach all devices: I am going to do that in cpu_reboot(), instead. (Soon I will do it in an MI cpu_reboot() routine.) Do still call PMF shutdown hooks. 3 In config_detach(), add a DIAGNOSTIC assertion: if we're exiting config_detach() at the bottom, alldevs_nwrite had better not be 0, because config_detach() is a writer of the device list. 4 In deviter_release(), check to see if we're iterating the device list for reading, *first*, and if so, decrease the number of readers. Used to be that if we happened to be reading during shutdown, we ran the shutdown branch. Thus the number of writers reached 0, the number of readers remained > 0, and no writer could iterate again. Under certain circumstances that would cause a hang during shutdown.
Revision 1.21.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (3 years ago) by jym
Branch: jym-xensuspend
Changes since 1.21: +51 -13
lines
Diff to previous 1.21 (colored)
Sync with HEAD. Commit is split, to avoid a "too many arguments" protocol error.
Revision 1.18.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.4.1: +62 -17
lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored)
sync with head.
Revision 1.20.4.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.20.4.1: +51 -13
lines
Diff to previous 1.20.4.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)
Sync with HEAD.
Revision 1.26 / (download) - annotate - [select for diffs], Fri Apr 17 20:45:09 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5,
yamt-nfs-mp-base4,
yamt-nfs-mp-base3,
nick-hppapmap-base4,
nick-hppapmap-base3,
nick-hppapmap-base,
jym-xensuspend-base
Changes since 1.25: +51 -16
lines
Diff to previous 1.25 (colored)
Do not interleave device detachment with device shutdown. Instead, try over and over to detach all of the devices. Stop when we cannot detach even a single device in a cycle. Call shutdown hooks on all of the devices that remain attached. This is another step toward the detach/unmount cycle that will help us tear down arbitrary stacks of filesystems, ccd(4), raid(4), and vnd(4).
Revision 1.25 / (download) - annotate - [select for diffs], Thu Apr 16 07:47:16 2009 UTC (3 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.24: +3 -3
lines
Diff to previous 1.24 (colored)
0 -> NULL
Revision 1.24 / (download) - annotate - [select for diffs], Tue Apr 7 18:16:28 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.23: +3 -4
lines
Diff to previous 1.23 (colored)
Cosmetic: join lines.
Revision 1.23 / (download) - annotate - [select for diffs], Thu Apr 2 22:19:48 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.22: +2 -4
lines
Diff to previous 1.22 (colored)
Take out a noisy debug statement that slipped in with device-detachment at shutdown.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Apr 2 00:09:34 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.21: +9 -3
lines
Diff to previous 1.21 (colored)
During shutdown, detach devices in an orderly fashion. Call the detach routine for every device in the device tree, starting with the leaves and moving toward the root, expecting that each (pseudo-)device driver will use the opportunity to gracefully commit outstandings transactions to the underlying (pseudo-)device and to relinquish control of the hardware to the system BIOS. Detaching devices is not suitable for every shutdown: in an emergency, or if the system state is inconsistent, we should resort to a fast, simple shutdown that uses only the pmf(9) shutdown hooks and the (deprecated) shutdownhooks. For now, if the flag RB_NOSYNC is set in boothowto, opt for the fast, simple shutdown. Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence that it is safe to detach a device during shutdown. Introduce macros CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf attachments with default device flags. Add DVF_DETACH_SHUTDOWN to configuration attachments for atabus(4), atw(4) at cardbus(4), cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4), elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4), pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4). Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the autoconf code and a device driver that the reason for detachment is system shutdown. Add a sysctl, kern.detachall, that tells the system to try to detach every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN flag. The default for kern.detachall is 0. SET IT TO 1, PLEASE, TO HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN. This is a work in progress. In future work, I aim to treat pseudo-devices more thoroughly, and to gracefully tear down a stack of (pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and raid(4) instances at shutdown. Also commit some changes that are not easily untangled from the rest: (1) begin to simplify device_t locking: rename struct pmf_private to device_lock, and incorporate device_lock into struct device. (2) #include <sys/device.h> in sys/pmf.h in order to get some definitions that it needs. Stop unnecessarily #including <sys/device.h> in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases building.
Revision 1.20.4.1 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:56 2009 UTC (3 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.20: +12 -6
lines
Diff to previous 1.20 (colored)
Sync with HEAD.
Revision 1.21 / (download) - annotate - [select for diffs], Fri Feb 6 01:19:33 2009 UTC (3 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.20: +12 -6
lines
Diff to previous 1.20 (colored)
Extract a subroutine pmf_device_resume_descendants() from pmf_device_resume_subtree(), for re-use later.
Revision 1.12.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (3 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.2: +1 -0
lines
Diff to previous 1.12.6.2 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)
Sync with HEAD.
Revision 1.19.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.19: +3 -2
lines
Diff to previous 1.19 (colored) next main 1.20 (colored)
Sync w/ -current. 34 merge conflicts to follow.
Revision 1.19.4.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (3 years, 11 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.19: +3 -2
lines
Diff to previous 1.19 (colored) next main 1.20 (colored)
Sync with head.
Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 17 16:17:21 2008 UTC (3 years, 11 months ago) by tsutsui
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
simonb-wapbl-nbase,
simonb-wapbl-base,
netbsd-5-base,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
mjf-devfs2-base,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-base2,
haad-nbase2,
haad-dm-base2,
haad-dm-base1,
haad-dm-base,
haad-dm,
ad-audiomp2-base,
ad-audiomp2
Branch point for: nick-hppapmap
Changes since 1.19: +3 -2
lines
Diff to previous 1.19 (colored)
Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.
Revision 1.12.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.1: +2 -7
lines
Diff to previous 1.12.6.1 (colored) to branchpoint 1.12 (colored)
Sync with HEAD.
Revision 1.18.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (4 years ago) by yamt
Branch: yamt-pf42
Changes since 1.18: +4 -9
lines
Diff to previous 1.18 (colored) next main 1.19 (colored)
sync with head.
Revision 1.18.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:25 2008 UTC (4 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18: +4 -9
lines
Diff to previous 1.18 (colored)
sync with head.
Revision 1.19 / (download) - annotate - [select for diffs], Mon May 5 00:15:57 2008 UTC (4 years ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-nfs-mp-base2,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa,
simonb-wapbl
Changes since 1.18: +4 -9
lines
Diff to previous 1.18 (colored)
Use 2-clause license.
Revision 1.12.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:02 2008 UTC (4 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.12: +203 -134
lines
Diff to previous 1.12 (colored)
Sync with HEAD.
Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 31 15:28:47 2008 UTC (4 years, 1 month ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base,
yamt-nfs-mp-base
Branch point for: yamt-pf42,
yamt-nfs-mp
Changes since 1.17: +2 -4
lines
Diff to previous 1.17 (colored)
Remove useless returns at the end of void functions.
Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (4 years, 2 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.12: +203 -132
lines
Diff to previous 1.12 (colored) next main 1.13 (colored)
sync with head.
Revision 1.10.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.10.2.2: +220 -133
lines
Diff to previous 1.10.2.2 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)
sync with HEAD
Revision 1.10.4.5 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.4: +203 -132
lines
Diff to previous 1.10.4.4 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)
sync with head.
Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 12 18:02:22 2008 UTC (4 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15,
yamt-lazymbuf-base14,
matt-armv6-nbase,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
ad-socklock-base1
Changes since 1.16: +23 -3
lines
Diff to previous 1.16 (colored)
Use device_t and its accessors throughout. Use aprint_*_dev().
Improve PMF-ability.
Add a 'flags' argument to suspend/resume handlers and
callers such as pmf_system_suspend().
Define a flag, PMF_F_SELF, which indicates to PMF that a
device is suspending/resuming itself. Add helper routines,
pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
that call pmf_device_suspend(dev, PMF_F_SELF) and
pmf_device_resume(dev, PMF_F_SELF), respectively. Use
PMF_F_SELF to suspend/resume self in ath(4), audio(4),
rtw(4), and sip(4).
In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
callbacks, provided by the bus front-end, with
self-suspension/resumption. Also, clean up the bus
front-ends. Make sure that the interrupt handler is
disestablished during suspension. Get rid of driver-private
flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
device_is_active()/device_has_power() calls, instead.
In the network-class suspend handler, call if_stop(, 0)
instead of if_stop(, 1), because the latter is superfluous
(bus- and driver-suspension hooks will 'disable' the NIC),
and it may cause recursion.
In the network-class resume handler, prevent infinite
recursion through if_init() by getting out early if we are
self-suspending (PMF_F_SELF).
rtw(4) improvements:
Destroy rtw(4) callouts when we detach it. Make rtw at
pci detachable. Print some more information with the "rx
frame too long" warning.
Remove activate() methods:
Get rid of rtw_activate() and ath_activate(). The device
activate() methods are not good for much these days.
Make ath at cardbus resume with crypto functions intact:
Introduce a boolean device property, "pmf-powerdown". If
pmf-powerdown is present and false, it indicates that a
bus back-end should not remove power from a device.
Honor this property in cardbus_child_suspend().
Set this property to 'false' in ath_attach(), since removing
power from an ath at cardbus seems to lobotomize the WPA
crypto engine. XXX Should the pmf-powerdown property
propagate toward the root of the device tree?
Miscellaneous ath(4) changes:
Warn if ath(4) tries to write crypto keys to suspended
hardware.
Reduce differences between FreeBSD and NetBSD in ath(4)
multicast filter setup.
Make ath_printrxbuf() print an rx descriptor's status &
key index, to help debug crypto errors.
Shorten a staircase in ath_ioctl(). Don't check for
ieee80211_ioctl() return code ERESTART, it never happens.
Revision 1.16 / (download) - annotate - [select for diffs], Fri Mar 7 07:03:06 2008 UTC (4 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.15: +40 -4
lines
Diff to previous 1.15 (colored)
PMF: synchronize device suspension and resumption.
Revision 1.15 / (download) - annotate - [select for diffs], Wed Mar 5 07:09:18 2008 UTC (4 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.14: +134 -128
lines
Diff to previous 1.14 (colored)
Synchronize readers and writers of the device tree. Add a device iterator object, deviter_t, and methods deviter_init(), deviter_first(), and deviter_next() for visiting each device in the device tree. Take care not to re-shutdown a device in the event that the machine panics during reboot and the operator types 'reboot' at the kernel debugger prompt. While I'm here, sprinkle PMF_FN_ARGS, PMF_FN_PROTO, et cetera.
Revision 1.14 / (download) - annotate - [select for diffs], Wed Mar 5 04:54:24 2008 UTC (4 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.13: +7 -5
lines
Diff to previous 1.13 (colored)
Introduce PMF_FN_{ARGS,PROTO}1, and use PMF_FN_{ARGS,PROTO} more
widely, further helping me to introduce PMF API changes piecemeal.
Revision 1.13 / (download) - annotate - [select for diffs], Thu Feb 28 14:25:12 2008 UTC (4 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.12: +15 -8
lines
Diff to previous 1.12 (colored)
Extend the pmf suspend/resume hooks by a shutdown method, so drivers can register a shutdown handler explicitely. Install a pci bus shutdown handler which disables bus master accesses for all childs, so the drivers don't need to care. This will hopefully be sufficient to replace the shutdownhooks (together with the powerhooks). (It has been suggested to use some general event notification framework for shutdown handlers, but there might be cases where shutdown handlers must be run in an order following the device hierarchy, which wouldn't be easy with event handlers not tied to drivers.) approved by David Young
Revision 1.10.4.4 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.3: +18 -2
lines
Diff to previous 1.10.4.3 (colored) to branchpoint 1.10 (colored)
sync with head.
Revision 1.12 / (download) - annotate - [select for diffs], Wed Feb 20 22:52:55 2008 UTC (4 years, 3 months ago) by drochner
Branch: MAIN
CVS Tags: nick-net80211-sync-base,
nick-net80211-sync,
hpcarm-cleanup-base
Branch point for: mjf-devfs2,
keiichi-mipv6
Changes since 1.11: +18 -2
lines
Diff to previous 1.11 (colored)
On system suspend, first get rid of the X server because it doesn't respect the kernel device tree. (It is arguably ugly to special-case wscons here, but as long as there is only one driver to be dealt with it is not worth to introduce another set of hooks.) Resume the X server at the end of resume, if everything went well. Acquire the big KERNEL_LOCK before the device tree is walked on suspend, until after the walk on resume. This is needed to avoid device accesses by secondary CPUs, and it effectively keeps user programs from interfering with the suspend process. This might be revisited when all drivers are using private locks for MP-safeness (but FreeBSD still does the same afaics). It should be unnecessary now to switch secondary CPUs offline in the powerd suspend script.
Revision 1.9.2.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9.2.1: +634 -0
lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)
Sync with HEAD.
Revision 1.10.4.3 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:13 2008 UTC (4 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.2: +3 -3
lines
Diff to previous 1.10.4.2 (colored) to branchpoint 1.10 (colored)
sync with head.
Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 30 00:50:17 2008 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: mjf-devfs-base
Changes since 1.10: +3 -3
lines
Diff to previous 1.10 (colored)
pmf_event_deregister was passing M_WAITOK to free instead of M_DEVBUF, pointed out by simonb
Revision 1.10.4.2 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:09 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.1: +634 -0
lines
Diff to previous 1.10.4.1 (colored) to branchpoint 1.10 (colored)
sync with head
Revision 1.10.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:06 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.10.2.1: +634 -0
lines
Diff to previous 1.10.2.1 (colored) to branchpoint 1.10 (colored)
sync with HEAD
Revision 1.2.2.2 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:55 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.2.2.1: +41 -4
lines
Diff to previous 1.2.2.1 (colored) next main 1.3 (colored)
Sync with HEAD
Revision 1.10.4.1, Thu Dec 27 16:03:10 2007 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10: +0 -634
lines
FILE REMOVED
file kern_pmf.c was added on branch yamt-lazymbuf on 2008-01-21 09:46:08 +0000
Revision 1.10.2.1, Thu Dec 27 16:03:10 2007 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.10: +0 -634
lines
FILE REMOVED
file kern_pmf.c was added on branch matt-armv6 on 2008-01-09 01:56:06 +0000
Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 27 16:03:10 2007 UTC (4 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: matt-armv6-base,
bouyer-xeni386-nbase,
bouyer-xeni386-base
Branch point for: yamt-lazymbuf,
matt-armv6
Changes since 1.9: +2 -5
lines
Diff to previous 1.9 (colored)
Don't call pmf_check_system_drivers on shutdown.
Revision 1.9.4.2 / (download) - annotate - [select for diffs], Wed Dec 26 19:17:22 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.9.4.1: +637 -0
lines
Diff to previous 1.9.4.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)
Sync with head.
Revision 1.9.4.1, Sun Dec 23 23:19:11 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.9: +0 -637
lines
FILE REMOVED
file kern_pmf.c was added on branch vmlocking2 on 2007-12-26 19:17:22 +0000
Revision 1.9.2.1, Sun Dec 23 23:19:11 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9: +0 -637
lines
FILE REMOVED
file kern_pmf.c was added on branch mjf-devfs on 2008-02-18 21:06:46 +0000
Revision 1.9 / (download) - annotate - [select for diffs], Sun Dec 23 23:19:11 2007 UTC (4 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: vmlocking2-base3
Branch point for: vmlocking2,
mjf-devfs
Changes since 1.8: +4 -4
lines
Diff to previous 1.8 (colored)
OK, I was using whisky.. Fix previous - use foreach, and just return after first found entry. The pmf_all_events list should not have duplicate entries (perhaps pmf(9) should document this point).
Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 23 22:09:39 2007 UTC (4 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.7: +4 -3
lines
Diff to previous 1.7 (colored)
pmf_event_deregister: fix use-after-free. Found by: CID 4754.
Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 21 23:49:55 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.6: +3 -3
lines
Diff to previous 1.6 (colored)
Fix handling of directed pmf events.
Revision 1.6 / (download) - annotate - [select for diffs], Fri Dec 14 01:29:29 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.5: +41 -2
lines
Diff to previous 1.5 (colored)
Introduce pmf_system_bus_resume. In the ACPI S3 resume path, use this to separate powering up devices from restoring their state. This is required on some machines where AcpiLeaveSleepState can fail due to an attempt to access a powered off device.
Revision 1.2.2.1 / (download) - annotate - [select for diffs], Thu Dec 13 21:56:53 2007 UTC (4 years, 5 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.2: +3 -6
lines
Diff to previous 1.2 (colored)
Sync with HEAD
Revision 1.1.4.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:44:12 2007 UTC (4 years, 5 months ago) by yamt
Branch: yamt-kmem
Changes since 1.1: +597 -0
lines
Diff to previous 1.1 (colored) next main 1.2 (colored)
sync with head.
Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 11 01:20:06 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3,
yamt-kmem-base2,
cube-autoconf-base,
cube-autoconf
Changes since 1.4: +3 -3
lines
Diff to previous 1.4 (colored)
Use PRI_NONE for the event workqueue.
Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 11 01:00:45 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.3: +6 -5
lines
Diff to previous 1.3 (colored)
Use malloc/free instead of kmem_alloc/kmem_free in pmf_event_inject, since the latter is not safe to use from a softint. Pointed out by rmind.
Revision 1.3 / (download) - annotate - [select for diffs], Mon Dec 10 23:50:25 2007 UTC (4 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.2: +2 -6
lines
Diff to previous 1.2 (colored)
Remove useless returns at the end of void functions.
Revision 1.2 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:43 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
Branch point for: bouyer-xeni386
Changes since 1.1: +600 -0
lines
Diff to previous 1.1 (colored)
Merge jmcneill-pm branch.
Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 16:21:39 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.1: +600 -0
lines
Diff to previous 1.1 (colored) next main 1.2 (colored)
Rename pnp(9) -> pmf(9), as requested by many.
Revision 1.1, Sat Dec 8 16:21:39 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base,
vmlocking2-base2,
reinoud-bufcleanup-nbase,
jmcneill-pm-base
Branch point for: yamt-kmem,
jmcneill-pm
FILE REMOVED
file kern_pmf.c was initially added on branch jmcneill-pm.