mirror of https://lore.kernel.org/lkml/
 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: Mon, 10 Feb 2003 17:10:31 +0100	[thread overview]
Message-ID: <20030210161031.GA443@elf.ucw.cz> (raw)
In-Reply-To: <200302091407.PAA14076@kim.it.uu.se>

Hi!

> >+	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);		/* FIXME: this is needed for S3 resume, but why? */
> 
> This is horrible! The only reason this might be needed is if
> the page tables weren't restored properly at resume, and that
> indicates a bug somewhere else.

Pagetables should be restored okay, I do not know what is going on.

> >+static int __init init_apic_devicefs(void)
> > {
> >+	driver_register(&apic_driver);
> > 	if (apic_pm_state.active)
> >-		pm_register(PM_SYS_DEV, 0, apic_pm_callback);
> >+		return sys_device_register(&device_apic);
> >+	return 0;
> ...
> >+device_initcall(init_apic_devicefs);
> 
> init_apic_devicefs() registers apic_driver even if active is false.
> This probably breaks any machine where cpu_has_apic is false, since
> apic_suspend/resume will access non-existent APIC registers & MSRs.
> 
> I don't like the idea of registering apic_driver when !cpu_has_apic,
> but it might be needed for the local-APIC NMI watchdog. A fix could
> be to guard apic_suspend/resume with "if(!cpu_has_apic)return;".

cpu_has_apic test seems wrong: AFAICS, there are CPUs that have apic
but linux does not know how to use it.

> > 		nmi_watchdog = nmi;
> 
> You just killed NMI_LOCAL_APIC support on Intel.

Fixed.

> >+device_initcall(init_nmi_devicefs);
> 
> Doesn't this require that init_apic_devicefs() has been done?
> Can you guarantee that?

Moved to late_initcall().

> > 
> >+#define __pminit
> > #endif	/* CONFIG_PM */
> 
> __pminit is no longer defined when !CONFIG_PM, which will
> cause compile errors. Possibly the remaining uses of __pminit
> should be removed.

Fixed.
								Pavel

-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?

  parent reply	other threads:[~2003-02-11 10:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2003-02-11 11:43   ` Mikael Pettersson
  -- 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-10 19:05 Mikael Pettersson
2003-02-11 11:39 ` Pavel Machek
2003-02-11 11:53 ` Pavel Machek
2003-02-09 14:42 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=20030210161031.GA443@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 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®