linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* balance_irq()'s move() hang in machine_restart()
@ 2003-07-01 22:38 M.L.PrasannaK.R.
  0 siblings, 0 replies; only message in thread
From: M.L.PrasannaK.R. @ 2003-07-01 22:38 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-01 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-01 22:38 balance_irq()'s move() hang in machine_restart() M.L.PrasannaK.R.

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).