[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090709232239.GG1469@ucw.cz>
Date: Fri, 10 Jul 2009 01:22:40 +0200
From: Pavel Machek <pavel@....cz>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Alan Stern <stern@...land.harvard.edu>,
Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
Greg KH <gregkh@...e.de>, LKML <linux-kernel@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: [RFC][PATCH] PM: Introduce core framework for run-time PM of
I/O devices (rev. 8)
hi!
> +/**
> + * Device run-time power management request types.
> + *
> + * RPM_REQ_NONE Do nothing.
> + *
> + * RPM_REQ_IDLE Run the device bus type's ->runtime_idle() callback
> + *
> + * RPM_REQ_SUSPEND Run the device bus type's ->runtime_suspend() callback
> + *
> + * RPM_REQ_RESUME Run the device bus type's ->runtime_resume() callback
> + */
> +
> +enum rpm_request {
> + RPM_REQ_NONE = 0,
> + RPM_REQ_IDLE,
> + RPM_REQ_SUSPEND,
> + RPM_REQ_RESUME,
> +};
> +
> struct dev_pm_info {
> pm_message_t power_state;
> - unsigned can_wakeup:1;
> - unsigned should_wakeup:1;
> + unsigned int can_wakeup:1;
> + unsigned int should_wakeup:1;
> enum dpm_state status; /* Owned by the PM core */
> -#ifdef CONFIG_PM_SLEEP
> +#ifdef CONFIG_PM_SLEEP
> struct list_head entry;
> #endif
> +#ifdef CONFIG_PM_RUNTIME
> + struct timer_list suspend_timer;
> + unsigned long timer_expires;
> + struct work_struct work;
> + wait_queue_head_t wait_queue;
> + spinlock_t lock;
> + atomic_t usage_count;
> + atomic_t child_count;
> + unsigned int ignore_children:1;
> + unsigned int runtime_disabled:1;
> + unsigned int runtime_failure:1;
> + unsigned int idle_notification:1;
> + unsigned int request_pending:1;
> + unsigned int deferred_resume:1;
> + enum rpm_request request;
> + enum rpm_status runtime_status;
runtime_status seems to be accessed outside spinlocks. Should it be of
type atomic_t?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists