From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: David Miller <davem@davemloft.net>,
arekm@maven.pl, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: BUG: scheduling while atomic: ip/23212/0x00000102
Date: Mon, 4 Aug 2008 16:04:46 -0700 [thread overview]
Message-ID: <200808041604.47219.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200808050010.45615.rjw@sisk.pl>
On Monday, August 04, 2008 3:10 pm Rafael J. Wysocki wrote:
> > - pci_read_config_word(tp->pdev,
> > - pm + PCI_PM_CTRL,
> > - &power_control);
> > - power_control |= PCI_PM_CTRL_PME_STATUS;
> > - power_control &= ~(PCI_PM_CTRL_STATE_MASK);
> > switch (state) {
> > case PCI_D0:
> > - power_control |= 0;
> > - pci_write_config_word(tp->pdev,
> > - pm + PCI_PM_CTRL,
> > - power_control);
> > - udelay(100); /* Delay after power state change */
> > + pci_enable_wake(tp->pdev, state, false);
> > + pci_set_power_state(tp->pdev, PCI_D0);
>
> Still, I don't think drivers should access the standard PCI PM registers
> directly, so perhaps there should be a version of pci_set_power_state()
> using udelay() instead of msleep() or we can just replace the msleep()
> in pci_set_power_state() with udelay()?
I think we should get rid of the open coded PCI PM state management, since
otherwise platform related bugs like the Intel PCIe PM quirk that sets
pci_pm_d3_delay to 120ms would have to be duplicated around the tree.
That said, waiting for 120ms with a busy wait seems a bit absurd if we can
avoid it. Either we need to find a way to make drivers only change states
(which can be very slow) in non-atomic context or we'll need to add a busy
wait variant of the power state call...
Jesse
next prev parent reply other threads:[~2008-08-04 23:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-04 16:45 Arkadiusz Miskiewicz
2008-08-04 21:35 ` David Miller
2008-08-04 22:10 ` Rafael J. Wysocki
2008-08-04 22:40 ` Rafael J. Wysocki
2008-08-04 23:04 ` Jesse Barnes [this message]
2008-08-04 23:53 ` Rafael J. Wysocki
2008-08-05 0:05 ` Jesse Barnes
2008-08-05 9:17 ` Rafael J. Wysocki
2008-08-05 9:37 ` David Miller
2008-08-05 12:20 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808041604.47219.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=akpm@linux-foundation.org \
--cc=arekm@maven.pl \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome