All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: levon@movementarian.org, linux-kernel@vger.kernel.org
Subject: Re: Switch APIC (+nmi, +oprofile) to driver model
Date: Tue, 11 Feb 2003 12:39:02 +0100	[thread overview]
Message-ID: <20030211113902.GA313@elf.ucw.cz> (raw)
In-Reply-To: <200302101905.UAA14874@kim.it.uu.se>

Hi!

> >> Also, apic_phys is (or should be) APIC_DEFAULT_PHYS_BASE, so
> >> you shouldn't need to make apic_phys global.
> >
> >Really?
> >
> >        /*
> >         * If no local APIC can be found then set up a fake all
> >         * zeroes page to simulate the local APIC and another
> >         * one for the IO-APIC.
> >         */
> >        if (!smp_found_config && detect_init_APIC()) {
> >                apic_phys = (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
> >                apic_phys = __pa(apic_phys);
> >        } else
> >                apic_phys = mp_lapic_addr;
> >
> >        set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
> >
> >So it seems to me it really is variable.
> 
> The original code has the property that apic_pm_state.active is
> true if and only if detect_init_APIC() was called and succeeded,
> which implies that apic_phys == mp_lapic_addr == APIC_DEFAULT_PHYS_BASE.
> You can also see that apic_pm_resume() writes APIC_DEFAULT_PHYS_BASE
> to MSR_IA32_APICBASE, which only makes sense in this situation.

Okay, I guess I do not rely on so complicated invariants...

> You moved the apic_pm_state.active = 1 assignment from detect_init_APIC(),
> which is specific to UP_APIC, to setup_local_APIC(), which is called
> also in the SMP case. Do you intend to do suspend and resume on SMP boxes
> as well? If this is intensional, shouldn't device_apic be per-cpu?

Eventually, I do want suspend working on SMP machines, but that's
still quite a long way to go: plan is to hot-unplug all but boot CPUs,
then do suspend, then hot-plug them back.

								Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

  reply	other threads:[~2003-02-11 12:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 19:05 Switch APIC (+nmi, +oprofile) to driver model Mikael Pettersson
2003-02-11 11:39 ` Pavel Machek [this message]
2003-02-11 11:53 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-02-16 12:43 Mikael Pettersson
2003-02-16 16:01 ` Pavel Machek
2003-02-26 21:59 ` Pavel Machek
2003-02-09 14:42 Mikael Pettersson
2003-02-09 14:07 Mikael Pettersson
2003-02-09 14:11 ` John Levon
2003-02-10 11:01 ` Pavel Machek
2003-02-10 11:50   ` John Levon
2003-02-10 20:06     ` Pavel Machek
2003-02-11 11:12       ` John Levon
2003-02-11 12:01         ` Pavel Machek
2003-02-13 13:39           ` Mikael Pettersson
2003-02-13 13:46             ` Pavel Machek
2003-02-14  9:08             ` Maciej W. Rozycki
2003-02-14 10:32               ` Mikael Pettersson
2003-02-14 10:54                 ` Maciej W. Rozycki
2003-02-14 11:25                   ` Mikael Pettersson
2003-02-14 11:32                     ` Maciej W. Rozycki
2003-02-16 12:05             ` Pavel Machek
2003-02-10 16:10 ` Pavel Machek
2003-02-11 11:43   ` Mikael Pettersson
2003-02-09 11:32 Pavel Machek
2003-02-09 11:54 ` John Levon
2003-02-09 12:03 ` John Levon

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=20030211113902.GA313@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.