From: Pavel Machek <pavel@suse.cz>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: ak@suse.de, linux-kernel@vger.kernel.org, pavel@suse.cz,
torvalds@transmeta.com
Subject: Re: Switch APIC to driver model (and make S3 sleep with APIC on)
Date: Tue, 28 Jan 2003 10:26:09 +0100 [thread overview]
Message-ID: <20030128092609.GA8191@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <200301280121.CAA13798@harpo.it.uu.se>
Hi!
> >This switches apic code to driver model, cleans code up a lot, and
> >makes S3 while apic is used work. Please apply,
>
> Please don't apply this. It breaks stuff:
>
> 1. apic_suspend() unconditionally calls disable_apic_nmi_watchdog()
> apic_resume() unconditionally calls setup_apic_nmi_watchdog()
> apic_pm_state.perfctr_pmdev removed
>
> - You're calling local-APIC NMI watchdog procedures even if
> the local-APIC NMI watchdog isn't active. Bad.
Fixed.
> - You're hardcoding that the local-APIC NMI watchdog is the
> only possible sub-client of the local APIC. Not true.
> - perfctr_pmdev exists precisely to handle both these cases
> in a clean way.
While being as ugly as night, which is even noted in sources:
- /* 'perfctr_pmdev' is here because the current (2.4.1) PM
- callback system doesn't handle hierarchical dependencies */
Nothing prevents more clients from registering as subtrees to APIC. I
did not do that for NMI watchdog because it is hardcoded in Makefile,
anyway.
> 2. You unconditionally register apic_driver with its suspend/resume
> methods through a device_initcall().
>
> This breaks if a UP_APIC or SMP kernel runs on a CPU with no or
> an unusable local APIC. apic_pm_init2() does a runtime check
> for successful init before doing a pm_register().
Fixed.
> 3. You severed the link between the PM API and the local APIC.
>
> This breaks APM suspend when the local APIC is enabled. The
> machine will hang (or immediately resume). I tested this, and
> the driver model "stuff" simply doesn't do the right thing yet.
I'll fix APM to call device model methods.
> I you just want SOFTWARE_SUSPEND to work, why not simply post the
> appropriate PM_SUSPEND and PM_RESUME events?
> That should work without any changes to apic.c or nmi.c.
Because PM_SUSPEND/PM_RESUME is ugly and can not be made to work
(devices are hierarchical, and PM_SUSPEND/PM_RESUME system does not
honour that).
Pavel
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
next prev parent reply other threads:[~2003-01-28 9:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 1:21 Mikael Pettersson
2003-01-28 9:26 ` Pavel Machek [this message]
2003-02-02 12:42 ` Pavel Machek
2003-02-03 10:32 ` John Levon
2003-02-03 15:40 ` Pavel Machek
2003-02-03 20:20 ` John Levon
2003-02-03 21:18 ` Pavel Machek
2003-02-03 23:43 ` John Levon
2003-02-05 21:39 ` Pavel Machek
2003-02-07 11:18 ` John Levon
2003-02-03 12:02 ` Zwane Mwaikambo
2003-02-04 22:55 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2003-01-28 12:19 Mikael Pettersson
2003-01-29 20:18 ` Pavel Machek
2003-01-29 22:42 ` John Levon
2003-01-29 22:51 ` Pavel Machek
2003-01-20 22:25 Pavel Machek
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=20030128092609.GA8191@atrey.karlin.mff.cuni.cz \
--to=pavel@suse.cz \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®