From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Noam Camus <noamca@mellanox.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Elad Kanfi <eladkan@mellanox.com>
Subject: Re: [PATCH v2 11/11] ARC: [plat-eznps] Handle memory error as an exception
Date: Thu, 8 Jun 2017 09:38:57 -0700 [thread overview]
Message-ID: <15ef64f3-3b5b-a362-c520-e5316121d3d6@synopsys.com> (raw)
In-Reply-To: <AM5PR0502MB2996FBD57D8591A42ED4A84CAAC90@AM5PR0502MB2996.eurprd05.prod.outlook.com>
On 06/07/2017 08:29 PM, Noam Camus wrote:
> *From:* Noam Camus
> *Sent:* Wednesday, June 7, 2017 8:06:17 PM
> *To:* Vineet Gupta; linux-snps-arc@lists.infradead.org
> *Cc:* linux-kernel@vger.kernel.org; Elad Kanfi
> *Subject:* Re: [PATCH v2 11/11] ARC: [plat-eznps] Handle memory error as an
> exception
>
> *> From:*Vineet Gupta <Vineet.Gupta1@synopsys.com>
>
> *> Sent:* Wednesday, June 7, 2017 7:15 PM...
>
> > So NPS *hardware* generates exception, jumps to vector mem_service(), which you
> > redirect to the machine check handler - which simply panics.
> > But this redirection is under EZNPS_MEM_ERROR, which you have defaulted to
> "n". So
> > how is the default working for hardware ? Doesn't it need to be "y"
>
> The NPS400 architects changed userspace bus error behavior to be machine check
> instead of Interrupt level 2.
> The reason was that since we are dealing with imprecise exception.
> So memory request result will be back to core long time after bad instruction
> was executed.
> In the meantime core be able to do HW schedule between threads and result may
> hit another thread.
> The core do not keep information on each such bus transaction so it just
> interfere current thread without knowing if it was the initiator of this bus
> transaction.
> In such case we prefer to create machine check and end with PANIC.
Ok this make sense !
>
> With simulator we just turn this configuration on, so we redirect the Legacy
> Synopsys L2 ISR from nSIM into machine check.
> This way we end up just like with silicon 😊
This doesn't make sense :-)
In simulation (where L2 interrupt is asserted), you need to handle it as such -
say reading out the banked regs for L2 interrupt. What you are doing here is
handling it like an exception which won't work . I really don't see the point of
this "alignment" - hardware and simulation are different. simulation semantics are
already supported by generic ARC code. And for silicon case, the existing vector
woudl MachineCheck would work for both K and U. So I'm not sure what we are trying
to achieve here !
>
>
> >BTW it seems your patch is wrong otherwise too. So the userspace bus error will go
> >to machine check handler which currently just panic's. You really want to kill the
> >user space process and continue, thus need to call do_memory_error()
> So I believe that we do correct thing here, when we deal with multi thread cores.
Sure, the imprecise handling of bus error is an issue - but we should atleat try
to recover. By just panic'ing unconditionally, you are enabling a one liner user
program to panic the system (granted in simulation only)
-Vineet
next prev parent reply other threads:[~2017-06-08 16:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 6:51 [PATCH v2 00/11] ARC plat-eznps upstream cont Noam Camus
2017-05-28 6:51 ` [PATCH v2 01/11] ARC: set level of log per CPU during boot to be debug level Noam Camus
2017-05-28 6:51 ` [PATCH v2 02/11] ARC: send ipi to all cpus sharing task mm in case of page fault Noam Camus
2017-05-30 16:40 ` Vineet Gupta
2017-05-28 6:52 ` [PATCH v2 03/11] ARC: typo fix in mm/fault.c Noam Camus
2017-05-28 6:52 ` [PATCH v2 04/11] ARC: typos fix in kernel/entry-compact.S Noam Camus
2017-05-28 6:52 ` [PATCH v2 05/11] ARC: [plat-eznps] typo fix at Kconfig Noam Camus
2017-05-28 6:52 ` [PATCH v2 06/11] ARC: [plat-eznps] Fix TLB Errata Noam Camus
2017-05-28 6:52 ` [PATCH v2 07/11] ARC: [plat-eznps] disabled stall counter due to a HW bug Noam Camus
2017-05-29 15:15 ` Alexey Brodkin
2017-05-28 6:52 ` [PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM Noam Camus
2017-06-02 18:36 ` Vineet Gupta
2017-06-04 6:11 ` Noam Camus
2017-05-28 6:52 ` [PATCH v2 09/11] ARC: [plat-eznps] use schd.wft instruction instead of sleep at idle task Noam Camus
2017-05-28 6:52 ` [PATCH v2 10/11] ARC: enable platform specific mem_service implementation Noam Camus
2017-05-28 6:52 ` [PATCH v2 11/11] ARC: [plat-eznps] Handle memory error as an exception Noam Camus
2017-06-02 19:04 ` Vineet Gupta
2017-06-04 6:10 ` Noam Camus
2017-06-06 22:10 ` Vineet Gupta
2017-06-07 6:07 ` Noam Camus
2017-06-07 11:14 ` Noam Camus
2017-06-07 16:15 ` Vineet Gupta
[not found] ` <AM5PR0502MB2996A1F4CFE1FE6AEB433A7DAAC80@AM5PR0502MB2996.eurprd05.prod.outlook.com>
[not found] ` <AM5PR0502MB2996FBD57D8591A42ED4A84CAAC90@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-08 16:38 ` Vineet Gupta [this message]
[not found] ` <AM5PR0502MB299646D52F2A0AF3764CEC4BAAC90@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-08 19:00 ` Vineet Gupta
[not found] ` <AM5PR0502MB2996B6DA5530C4B37A7B1AF0AACE0@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-12 17:40 ` Vineet Gupta
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=15ef64f3-3b5b-a362-c520-e5316121d3d6@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=eladkan@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=noamca@mellanox.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
Powered by JetHome