From: Peter Maydell <peter.maydell@linaro.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Marek Vasut <marex@denx.de>, Chris Wulff <crwulff@gmail.com>,
QEMU Trivial <qemu-trivial@nongnu.org>,
Wentong Wu <wentong.wu@intel.com>,
Richard Henderson <richard.henderson@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction
Date: Mon, 6 Jul 2020 09:55:29 +0100 [thread overview]
Message-ID: <CAFEAcA_nLDvPs-X-3krwC183f8hwm5kYYpxgz4f2r-Z4BKByQQ@mail.gmail.com> (raw)
In-Reply-To: <CAMo8Bf+Fk32dYH6GV6Z6OWLsnpJy4Sw_ny+8yviQc6MjGD+mRw@mail.gmail.com>
On Sun, 5 Jul 2020 at 21:54, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> On Sun, Jul 5, 2020 at 11:16 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
> > On Sun, Jul 5, 2020 at 10:09 AM Peter Maydell <peter.maydell@linaro.org> wrote:
> > > On Thu, 2 Jul 2020 at 19:53, Richard Henderson
> > > <richard.henderson@linaro.org> wrote:
> > > > This isn't right. Not so much the gen_io_start portion, but the entire
> > > > existence of helper_check_interrupt.
> > > I agree that it looks bogus (xtensa has a similar helper as well, incidentally),
> > I think there was a reason for it.
>
> ...and the reason is that this helper calls cpu_[re]set_interrupt
> to update CPU_INTERRUPT_HARD, which makes exit to the
> main CPU loop do something to handle IRQ.
> Maybe 'check_interrupt' is not a good name for that, but the
> action taken there seems right to me.
Usually I would expect that CPU_INTERRUPT_HARD would be
set by whatever was setting the interrupt (often a handler
for an inbound qemu_irq line to the CPU). Then the
cpu_exec_interrupt hook only actually does something if
both the INTERRUPT_HARD bit is set and the CPU register
says "and interrupts are unmasked". If you have a design
like that then "unmasking interrupts just means going out
to the main loop" will work.
thanks
-- PMM
next prev parent reply other threads:[~2020-07-06 8:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 16:05 [PATCH 1/3] target/nios2: add DISAS_NORETURN case for nothing more to generate Wentong Wu
2020-06-29 16:05 ` [PATCH 2/3] target/nios2: in line the semantics of DISAS_UPDATE with other targets Wentong Wu
2020-07-02 18:14 ` Richard Henderson
2020-07-02 18:25 ` Richard Henderson
2020-06-29 16:05 ` [PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction Wentong Wu
2020-07-01 13:26 ` Wu, Wentong
2020-07-02 18:53 ` Richard Henderson
2020-07-03 13:22 ` Wu, Wentong
2020-07-05 13:22 ` Wu, Wentong
2020-07-05 13:24 ` Wu, Wentong
2020-07-05 17:08 ` Peter Maydell
2020-07-05 18:16 ` Max Filippov
2020-07-05 20:53 ` Max Filippov
2020-07-06 8:55 ` Peter Maydell [this message]
2020-07-06 0:56 ` Wu, Wentong
2020-07-03 15:14 ` Wu, Wentong
2020-07-05 17:10 ` Peter Maydell
2020-07-06 0:30 ` Wu, Wentong
2020-07-07 2:41 ` Wu, Wentong
2020-07-02 18:12 ` [PATCH 1/3] target/nios2: add DISAS_NORETURN case for nothing more to generate Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2020-07-09 11:58 [PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction Wu, Wentong
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=CAFEAcA_nLDvPs-X-3krwC183f8hwm5kYYpxgz4f2r-Z4BKByQQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=crwulff@gmail.com \
--cc=jcmvbkbc@gmail.com \
--cc=marex@denx.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wentong.wu@intel.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).