mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: davej@redhat.com
Cc: torvalds@transmeta.com, fxkuehl@gmx.de,
	linux-kernel@vger.kernel.org, willy@w.ods.org,
	marcelo@conectiva.com.br
Subject: Re: [PATCH] Disable APIC on reboot.
Date: Mon, 11 Aug 2003 18:29:21 +0200	[thread overview]
Message-ID: <16183.50273.723650.136532@gargle.gargle.HOWL> (raw)
In-Reply-To: <E19mCuO-0003dI-00@tetrachloride>

davej@redhat.com writes:
 > diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/reboot.c linux-2.5/arch/i386/kernel/reboot.c
 > --- bk-linus/arch/i386/kernel/reboot.c	2003-05-13 11:51:12.000000000 +0100
 > +++ linux-2.5/arch/i386/kernel/reboot.c	2003-07-16 02:54:29.000000000 +0100
 > @@ -8,6 +8,7 @@
 >  #include <linux/interrupt.h>
 >  #include <linux/mc146818rtc.h>
 >  #include <asm/uaccess.h>
 > +#include <asm/apic.h>
 >  #include "mach_reboot.h"
 >  
 >  /*
 > @@ -250,6 +251,19 @@ void machine_restart(char * __unused)
 >  	 */
 >  	smp_send_stop();
 >  	disable_IO_APIC();
 > +#else
 > +#ifdef CONFIG_X86_LOCAL_APIC
 > +	{
 > +	unsigned int l, h;
 > +
 > +	local_irq_disable();
 > +	disable_local_APIC();
 > +	rdmsr(MSR_IA32_APICBASE, l, h);
 > +	l &= ~MSR_IA32_APICBASE_ENABLE;
 > +	wrmsr(MSR_IA32_APICBASE, l, h);
 > +	local_irq_enable();
 > +}
 > +#endif

I agree we should probably disable the local APIC at reboot if we
enabled it previously, but this patch is broken. CONFIG_X86_LOCAL_APIC
doesn't imply that the CPU actually has one, and even if it does, the
access method may be different (e.g. P5 vs P6/K7/P4, and who knows how
the future C3 with local APIC will do it).

Only apic.c knows how the local APIC was initialised (if at all), so the
"disable it dammit" procedure needs to be in apic.c too.

Was the original bug report posted to LKML? I don't remember seeing it.

/Mikael

  parent reply	other threads:[~2003-08-11 16:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-11 13:40 davej
2003-08-11 15:33 ` [PATCH-2.4] " Willy Tarreau
2003-08-11 16:29 ` Mikael Pettersson [this message]
2003-08-11 16:38   ` [PATCH] " Dave Jones
2003-08-11 16:57     ` Mikael Pettersson
2003-08-11 23:33       ` [PATCH][2.6.0-test3] " Mikael Pettersson
2003-08-12 13:48         ` Maciej W. Rozycki
2003-08-12 13:57           ` Mikael Pettersson
2003-08-12 14:31             ` Maciej W. Rozycki
2003-08-11 23:33       ` [PATCH][2.4.22-rc2] " Mikael Pettersson
2003-08-12  6:09         ` Willy Tarreau
2003-08-15 19:22         ` Marc-Christian Petersen
2003-08-27  7:19         ` Luca Montecchiani

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=16183.50273.723650.136532@gargle.gargle.HOWL \
    --to=mikpe@csd.uu.se \
    --cc=davej@redhat.com \
    --cc=fxkuehl@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    --cc=willy@w.ods.org \
    /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®