public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mingo@chiara.elte.hu, torvalds@transmeta.com
Subject: Re: test13-pre3
Date: Mon, 18 Dec 2000 17:35:09 MET-1	[thread overview]
Message-ID: <100841C16F12@vcnet.vc.cvut.cz> (raw)

On 18 Dec 00 at 13:58, Maciej W. Rozycki wrote:

>  What is this change about?
> 
> diff -u --recursive --new-file v2.4.0-test12/linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
> --- v2.4.0-test12/linux/arch/i386/kernel/smpboot.c      Mon Dec 11 17:59:43 2000
> +++ linux/arch/i386/kernel/smpboot.c    Thu Dec 14 14:54:40 2000
> @@ -694,6 +694,11 @@
>         apic_write_around(APIC_ICR, APIC_DM_STARTUP
>                     | (start_eip >> 12));
>  
> +       /*
> +        * Give the other CPU some time to accept the IPI.
> +        */
> +       udelay(300);
> +
>         Dprintk("Startup point 1.\n");
>  
>         Dprintk("Waiting for send to finish...\n");
> 
> There is the following code is just after it, making the above change
> just useless garbage:

No. Without udelay() before first printk() it just does not boot on my
motherboard. There were two choices: either remove all printk() from
these loops (define Dprintk to null), or add udelay(x), where x >= 200,
before first printk. I sent patch twice to linux-kernel, and to 
mingo@redhat.com, and nobody said anything against it.
 
>         timeout = 0;
>         do {
>             Dprintk("+");
>             udelay(100);
>             send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
>         } while (send_status && (timeout++ < 1000));
> 
>         /*
>          * Give the other CPU some time to accept the IPI.
>          */
>         udelay(200);
> 
> If we need 600usecs of delay for certain systems, then why not just make
> it like below?

No. If there is no udelay() before first printk(), on my GA-6VXD7 board
(SMP VIA 694X) only 'Startup point 1.' is printed, but no 'Waiting
for send to finish...'. So maybe we do not need udelay(200) below loop,
but for sure we need udelay() before first printk(). (my board works
without ANY udelay() in smpboot.c, except one I added... This one is 
required.) If somebody lives in Prague, and wants to come with logical
analyzer (or if I should come with motherboard), I'm willing to continue
testing. But current idea is that inb/outb done by cursor positioning
code is incompatible with something else done in secondary CPU startup.
(it boots also without any kernel change with 'console=ttyS0,9600', but 
it may be caused by slow serial line)

Without delay() both CPU die, and board does not react to anything except
hard reset anymore (and sometime it does not react even to hard reset; lookup
for my messages during last week).
                                    Best regards,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2000-12-18 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-18 17:35 Petr Vandrovec [this message]
2000-12-18 17:18 ` test13-pre3 Maciej W. Rozycki
2000-12-18 18:48   ` Problem with UDMA 4 - deadlocking machine Zdenek Kabelac
  -- strict thread matches above, loose matches on Subject: below --
2000-12-19  0:58 test13-pre3 Dieter Nützel
2000-12-17 21:55 test13-pre3 Linus Torvalds
2000-12-17 23:43 ` test13-pre3 Albert Cranford
2000-12-18  6:00   ` test13-pre3 Peter Samuelson
2000-12-18 12:58 ` test13-pre3 Maciej W. Rozycki
2000-12-18 14:34 ` test13-pre3 Christoph Rohland
2000-12-18 19:24   ` test13-pre3 Christoph Rohland

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=100841C16F12@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@ds2.pg.gda.pl \
    --cc=mingo@chiara.elte.hu \
    --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