public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Tigran Aivazian <tigran@veritas.com>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: booting SMP P6 kernel on P4 hangs.
Date: Wed, 1 Aug 2001 16:00:07 MET-1	[thread overview]
Message-ID: <A4CAD66334E@vcnet.vc.cvut.cz> (raw)

On  1 Aug 01 at 10:47, Tigran Aivazian wrote:
> On Wed, 1 Aug 2001, Arjan van de Ven wrote:
> > Now all Linux installers that decide to install a SMP kernel if they
> > encounter
> > a MPTABLE already have a "except if it's a P4" exception nowadays..
> 
> that assumes that the installer itself has to be a UP kernel, which means
> the installation cannot itself serve as a "demo" of the final product in
> the fullest possible capacity... Not good, can't we workaround that
> somehow during parsing of the mp table?

MPTABLE is not what kills us. What kills us is stupid code
in setup_APIC_clocks(), which calls setup_APIC_timer even if 
calibrate_APIC_clock() finds that '...host bus clock speed is 0.0000 MHz'
But setup_APIC_timer does not handle this condition at all
and ends in endless loop waiting for internal APIC timer to decrement.
But for some unknown reason (either Intel braindamage or motherboard
vendor braindamage) most of (all?) P4 have just non-counting timer
in its APIC.

As I do not have P4 here, I do not know whether correct solution
is to disable APIC on P4 at all because of it does not work, or
whether only timer portion of APIC is broken on P4.

UNTESTED change could look like (btw it also fixes APIC aware Linux
kernel not booting in VMware on machine which has APIC):

void __int setup_APIC_clocks (void) {
      __cli();
      calibration_result = calibrate_APIC_clock();
      /*
       * Now set up the timer for real.
       */
      if (calibration_result) {
         using_apic_timer = 1;
         setup_APIC_timer((void*)calibration_result);
         __sti();
         printk("Using local APIC timer interrupts.\n");
         smp_call_function(setup_APIC_timer, (void*)calibration_result, 1, 1);
      } else {
         __sti();
         printk("Local APIC timer unusable.\n");
      }
}

                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

             reply	other threads:[~2001-08-01 14:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-01 16:00 Petr Vandrovec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-31 10:45 booting SMP P6 kernel on P4 hangs Mikael Pettersson
2001-07-31  6:10 Tigran Aivazian
2001-07-31 17:57 ` Linus Torvalds
2001-08-01  9:39   ` Arjan van de Ven
2001-08-01  9:47     ` Tigran Aivazian
2001-08-01 11:49     ` Maciej W. Rozycki
2001-08-02 12:30       ` Alan Cox
2001-08-02 14:00         ` john slee
2001-08-02 14:50           ` Alan Cox
2001-08-03  9:10             ` Chris Wedgwood
2001-08-03  8:50           ` Steffen Persvold
2001-08-01 16:18     ` Linus Torvalds
2001-08-02  0:51       ` Alan Cox
2001-08-03 10:48   ` Mark Hemment
2001-08-06 14:48     ` Maciej W. Rozycki
2001-08-06 15:08       ` Mark Hemment

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=A4CAD66334E@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@veritas.com \
    --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