linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "M.L.PrasannaK.R." <mlpkr@yahoo.com>
To: mingo@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: balance_irq()'s move() hang in machine_restart()
Date: Tue, 1 Jul 2003 15:38:29 -0700 (PDT)	[thread overview]
Message-ID: <20030701223829.45433.qmail@web13808.mail.yahoo.com> (raw)


Ingo,

The method suggested at the following link does not work.
   http://www.ussg.iu.edu/hypermail/linux/kernel/0304.1/0558.html

smp_call-function(stop_this_cpu, NULL, 1, 1) will never return from
the for loop.

Source from http://lxr.linux.no/source/arch/i386/kernel/smp.c#L569
569 static void stop_this_cpu (void * dummy)
570 {
571         /*
572          * Remove this CPU:
573          */
574         clear_bit(smp_processor_id(), &cpu_online_map);
575         __cli();
576         disable_local_APIC();
577         if (cpu_data[smp_processor_id()].hlt_works_ok)
578                 for(;;) __asm__("hlt");
579         for(;;)      
580}

The following fix seemed to break this infinite loop. Is this proper?

---linux.saved/arch/i386/kernel/io_apic.c Thu Jun 26 05:37:25 2003
+++ linux/arch/i386/kernel/io_apic.c    Thu Jun 26 05:39:15 2003
@@ -228,6 +228,10 @@
                if (unlikely(cpu == curr_cpu))
                        search_idle = 0;
 inside:
+               if (unlikely(smp_num_cpus == 1)) {
+                       return curr_cpu;
+               }
+
                if (direction == 1) {
                        cpu++;
                        if (cpu >= smp_num_cpus)


Thanks,
Prasanna.


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

                 reply	other threads:[~2003-07-01 22:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030701223829.45433.qmail@web13808.mail.yahoo.com \
    --to=mlpkr@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).