linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>,
	Arnd Bergmann <arnd@kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"funaho@jurai.org" <funaho@jurai.org>,
	"philb@gnu.org" <philb@gnu.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"linux-m68k@lists.linux-m68k.org"
	<linux-m68k@lists.linux-m68k.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform
Date: Mon, 15 Feb 2021 15:06:10 +0200	[thread overview]
Message-ID: <CAHp75VeTKfSAnLUiwJ_SO-r4hUn7aQVTquG0j=k95QO_gk+c1g@mail.gmail.com> (raw)
In-Reply-To: <5fcea94e-6fc9-c340-d7d2-4ae8b69890b8@telegraphics.com.au>

On Sun, Feb 14, 2021 at 7:12 AM Finn Thain <fthain@telegraphics.com.au> wrote:
> On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote:
> > So what is really confusing and a pain to me is that:
> > For years people like me have been writing device drivers
> > with the idea that irq handlers run with interrupts
> > disabled after those commits in genirq. So I don't need
> > to care about if some other IRQs on the same cpu will
> > jump out to access the data the current IRQ handler
> > is accessing.
> >
> > but it turns out the assumption is not true on some platform.
> > So should I start to program devices driver with the new idea
> > interrupts can actually come while irqhandler is running?
> >
> > That's the question which really bothers me.
> >
>
> That scenario seems a little contrived to me (drivers for two or more
> devices sharing state through their interrupt handlers). Is it real?
> I suppose every platform has its quirks. The irq lock in sonic_interrupt()
> is only there because of a platform quirk (the same device can trigger
> either of two IRQs). Anyway, no-one expects all drivers to work on all
> platforms; I don't know why it bothers you so much when platforms differ.

Isn't it any IRQ chip driver which may get IRQ on one or more lines
simultaneously?
The question here is can the handler be re-entrant on the same CPU in that case?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2021-02-15 13:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  1:18 [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform Song Bao Hua (Barry Song)
2021-02-12 22:34 ` Arnd Bergmann
2021-02-12 23:00   ` Song Bao Hua (Barry Song)
2021-02-12 23:05     ` Arnd Bergmann
2021-02-12 23:46       ` Song Bao Hua (Barry Song)
2021-02-13 16:32         ` Arnd Bergmann
2021-02-13 22:18           ` Song Bao Hua (Barry Song)
2021-02-13 23:18           ` Song Bao Hua (Barry Song)
2021-02-14  5:10             ` Finn Thain
2021-02-15 13:06               ` Andy Shevchenko [this message]
2021-02-15 22:22                 ` Finn Thain
2021-02-17 22:41               ` Song Bao Hua (Barry Song)
2021-02-18  5:30                 ` Finn Thain
2021-02-18 11:19                   ` Arnd Bergmann
2021-02-18 12:30                     ` Geert Uytterhoeven
2021-02-18 13:59                       ` Arnd Bergmann
2021-02-18 15:38                         ` Geert Uytterhoeven
2021-02-18 22:11                     ` Michael Schmitz
2021-02-19  8:10                       ` Geert Uytterhoeven
2021-02-19 22:30                         ` Brad Boyer
2021-02-20  6:32                     ` Finn Thain
2021-02-20  7:08                       ` Brad Boyer

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='CAHp75VeTKfSAnLUiwJ_SO-r4hUn7aQVTquG0j=k95QO_gk+c1g@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=corbet@lwn.net \
    --cc=fthain@telegraphics.com.au \
    --cc=funaho@jurai.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=mingo@redhat.com \
    --cc=philb@gnu.org \
    --cc=song.bao.hua@hisilicon.com \
    --cc=tglx@linutronix.de \
    /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).