From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling
Date: Fri, 12 Feb 2016 21:08:35 +0100 [thread overview]
Message-ID: <56BE3BC3.2020209@mail.uni-paderborn.de> (raw)
In-Reply-To: <56BE2A89.6050905@twiddle.net>
On 02/12/2016 07:55 PM, Richard Henderson wrote:
> On 02/12/2016 10:12 PM, Bastian Koppelmann wrote:
>> On 02/12/2016 03:39 AM, Richard Henderson wrote:
>>
>> What do you mean by "pre-interrupt state"? The register context is saved
>> by generate_trap() calls.
>
> Because do_interrupt is normally for handling asynchronous interrupts.
> Stuff that isn't related at all to the instruction stream. Which
> therefore could not have saved anything at all.
>
Ah, I see. This makes a lot of sense now. I didn't know that
do_interrupt() is only for asynchronous interrupts.
> It does get (ab)used on some targets for synchronous events, because the
> method by which kernel entry is made is the same and the author wanted
> to share code.
>
> But if you have no external hardware devices, no timer interrupt or
> anything, let's not start by passing synchronous events through this
> function. It sounds like the code here in do_interrupt more properly
> belongs at the end of generate_trap.
>
> Err.. the generate_trap in op_helper I mean. It's confusing that you
> have two (static) functions of the same name in different files.
Fair enough. I guess it makes sense to always use the helper for
generate_trap, since a helper call is necessary anyways.
>
> I do wonder if these two functions ought to share more code. For
> instance, op_helper.c places TIN into a_15, whereas translate.c places
> TIN into d_15.
Woops... good catch :).
Thanks for the review.
Cheers,
Bastian
next prev parent reply other threads:[~2016-02-12 20:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 16:01 [Qemu-devel] [PATCH 0/5] TriCore exception patches Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling Bastian Koppelmann
2016-02-12 2:39 ` Richard Henderson
2016-02-12 11:12 ` Bastian Koppelmann
2016-02-12 18:55 ` Richard Henderson
2016-02-12 20:08 ` Bastian Koppelmann [this message]
2016-02-12 2:44 ` Richard Henderson
2016-02-11 16:01 ` [Qemu-devel] [PATCH 2/5] target-tricore: Save the pc before CSA operations for exceptions Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 3/5] target-tricore: add context managment trap generation Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 4/5] target-tricore: add illegal opcode " Bastian Koppelmann
2016-02-11 16:02 ` [Qemu-devel] [PATCH 5/5] target-tricore: add opd " Bastian Koppelmann
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=56BE3BC3.2020209@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.