Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@dsl2.external.hp.com>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] rp2470 hang...getting closer
Date: Sun, 20 Oct 2002 18:57:16 -0600	[thread overview]
Message-ID: <20021021005716.B27384829@dsl2.external.hp.com> (raw)
In-Reply-To: Message from grundler@dsl2.external.hp.com (Grant Grundler) of "Sat, 12 Oct 2002 22:40:33 MDT." <20021013044033.88A544829@dsl2.external.hp.com>

Grant Grundler wrote:
> I'm getting closer to figuring out why rp2470 (a500-6x) hangs at boot time.

had some ideas to think about/work on.

> Here's the sequence I see so far:
> o scsi_register_host() acquires io_request_lock (tpnt->use_new_eh_code is tru
>   e)
> o scsi_register_host() calls tpnt->detect(tpnt)
> o detect() points to sym53c8xx_detect()
> o sym53c8xx_detect() calls sym_attach() 
> o sym_attach() initializes s.timer to point at sym53c8xx_timer but
>   directly calls sym_timer() to kick off the self-arming timer.
>   timer will pop in 0.5 seconds.

sym_attach() also calls request_irq().
request_irq() *enables* the IRQ for that line.
I suspect this might unmask the timer interrupt as well.
I'll add some debug code and test this out.

And after looking at arch/parisc/kernel/irq.c, I think we have a
race condition in our cpu_irq_ops. ie the eiem value read could be
different if we take an interupt at the wrong moment. ie need to
save_flags/local_irq_disable()/restore around touching the eiem.
If someone seconds that opinion, I'll add/test that.

Lastly, use of IPI to set_eiem() on all CPUs can probably go away.
In 2.5, I was under the impression we no longer require globally
disabling of interrupts - only on the local CPU.  For both 2.4
and 2.5, parisc only needs to mask/unmask the EIEM bit on the CPU
that is the target of that IRQ, not all CPUs. ie if the IPI
is needed, it should just target the same CPU which will handle the
specific external intr.

> o other interfaces are detected/initialized.
> o timer_interrupt() calls timer_bh() and invokes sym53c8xx_timer().
> o sym53c8xx_timer() attempts to reacquire the io_request_lock.  checkmate.

grant

  parent reply	other threads:[~2002-10-21  0:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-13  4:40 [parisc-linux] rp2470 hang...getting closer Grant Grundler
2002-10-13 13:56 ` Thibaut VARENE
2002-10-21  0:57 ` Grant Grundler [this message]
2002-10-21  2:21   ` Matthew Wilcox
2002-10-21  3:33     ` Grant Grundler
2002-10-21 14:59 ` Matthew Wilcox
2002-10-21 15:26   ` Matthew Wilcox
2002-10-21 21:58     ` Grant Grundler
  -- strict thread matches above, loose matches on Subject: below --
2002-10-22  0:41 John Marvin
2002-10-23  1:19 ` Grant Grundler

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=20021021005716.B27384829@dsl2.external.hp.com \
    --to=grundler@dsl2.external.hp.com \
    --cc=parisc-linux@lists.parisc-linux.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