Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbdFGQQ1 (ORCPT ); Wed, 7 Jun 2017 12:16:27 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:58470 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbdFGQQZ (ORCPT ); Wed, 7 Jun 2017 12:16:25 -0400 Subject: Re: [PATCH v2 11/11] ARC: [plat-eznps] Handle memory error as an exception To: Noam Camus , "linux-snps-arc@lists.infradead.org" CC: "linux-kernel@vger.kernel.org" , Elad Kanfi Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc References: <1495954328-28736-1-git-send-email-noamca@mellanox.com> <1495954328-28736-12-git-send-email-noamca@mellanox.com> From: Vineet Gupta Message-ID: Date: Wed, 7 Jun 2017 09:15:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.108] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 24 On 06/07/2017 04:14 AM, Noam Camus wrote: >>>> +config EZNPS_MEM_ERROR >>>> + bool "ARC-EZchip Memory error as an exception" >>>> + depends on ARC_PLAT_EZNPS >>>> + default n >>> So you set default to "n" - thus by default it works for the simulator not silicon ? >> Correct, this way I "align" Sim environment to react as close as possible to how it work with silicon. > Sorry, but It is not correct. > Default is for silicon where it is naturally emits machine check and unlike simulator do not need OS to redirect the ISR L2 to machine check handler. > Above motivation of "align" is true, but default is silicon and not sim, as I wrote in my original configuration help. > Please re-update this CONFIG help section. 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" 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() -Vineet