Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp537921imm; Mon, 21 May 2018 10:01:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpHRl3K9yEKeU+Jl5lpEofkqC+I6vv9LEfGGuUKHQevnKJyvQ1xDtyJJP2odYiwhV+bYu0V X-Received: by 2002:a17:902:8a91:: with SMTP id p17-v6mr6264523plo.18.1526922064144; Mon, 21 May 2018 10:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526922064; cv=none; d=google.com; s=arc-20160816; b=DugaMxOJdM4lKwk3cF/po024UlVXCJSiIybbKdJeiOu9tWQmPW9mMQ5XoJXBbrxy8J cb/Zn/hw+6NE/S4ZOddb7hDviKUQIb+zAx1pu0C1EAY9JXZVuPH0jFiOIrJiywgWQ8HV PARtaqW3FPzrGdKnycWgUmRRJuz4HixtgBmH/lnCWJ7eef+hecy7ZgPA2bGOMYWZ/grY /2ojj3l4NKJ6HRmGLtaEmllKOtxYjZrs5sTGEjhkm0VGm2hy/Dk6h25JLDDlqyI9Jkwe 279RFVAjqpxOADL+OKhxi8hhzq4WLR/ySkaFgeRpQPZSQoUTDVtKve3ae5eP32L6RqyA WftA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=GKjM0TiFFy/wLnhmwjyLiq1iWw6owqd3JT8Z2wtxkes=; b=YocA0qnRBPsi8f9ch1dievncGChRAAZO0b0TNSpLVtoGaLNMIvI1i1Y71TIJZD8QSw gnGDck2+gaDhtHijdGNJ8NdzTxvhecNOA8BIZSL84rZxjf6BuOrzQInJBup8mlgWwwfT js1Ejd2YdoQXS3N1zI0Mj6frzGKJYiS7Qr+M3l/N9DkGe66Ozobr8aYMuSGk7DyRF4b1 u7lAXJeZ38I4ZdqvHrRbHoX/hFCwDuHNzCOptH2HncKGt+7G+kIkvTZOKoITwYgmB5TF ZUyI9cKrvMM1eUP/WqIBCBXFPMxN8W/4xDR7uhS63rUw/Rb9sFr60Ug5U0bqmy37ZLpb 0lpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=KdcE8XQG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si14244636pld.46.2018.05.21.10.00.49; Mon, 21 May 2018 10:01:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=KdcE8XQG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096AbeEUQ72 (ORCPT + 99 others); Mon, 21 May 2018 12:59:28 -0400 Received: from smtprelay.synopsys.com ([198.182.37.59]:45113 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809AbeEUQ71 (ORCPT ); Mon, 21 May 2018 12:59:27 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 1E4DD1E05E0 for ; Mon, 21 May 2018 18:59:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1526921966; bh=guTiL9PJAy9nMbat180cxg9MZSe68BLHvJyEuRY4z1Y=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=KdcE8XQG8zXtC4o3FQmLheyympqvmWbgbvRW1uNbinCZtEADZr5q/HnbNdQ/jNIhY 0MeSSM2qER3b6EU7ZBP3ZkjzsvAvXmxf6qafXYnZb3Ba1sQle7YSW8URyG1e3O16PD FmhM/JApa7uxwk4sQ64cL7+yVAAWwgZYMnTk1qLOnta2KHrDtZ+MPnfi2VdPBV0eGV 0c1V21NAvp6o23cNhDPmrDHV6qwjF+fw80wqplOSUauftb+tI/w6KDPEleNhnxM62L 0HYCCzT5xKCE2egX6ouS/D0D/YtWqgOWXc5z1hZbnfNYwHMR5yJ8yWcOfrP4UhbmlM jbbNnAXQicxvQ== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id 54631377D; Mon, 21 May 2018 09:59:25 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 21 May 2018 09:59:23 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 21 May 2018 22:29:21 +0530 Received: from [10.10.161.52] (10.10.161.52) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 21 May 2018 22:29:20 +0530 Subject: Re: ARC compact700 NPS platform - EZ_MachineCheck exception handler To: "Ofer Levi(SW)" CC: "linux-kernel@vger.kernel.org" , "Meir Lichtinger" , arcml References: From: Vineet Gupta Message-ID: <0c84cd14-19dc-a22c-271c-11cbd18ded3a@synopsys.com> Date: Mon, 21 May 2018 09:59:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.10.161.52] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/21/2018 07:14 AM, Ofer Levi(SW) wrote: > Resending, due to typo in LKML mail address. Also please CC linux-snps-arc@lists.infradead.org for any ARC Linux related posts. > > The EV_MachineCheck exception handler is halting the core for exceptions > which are not tlb_overlap_fault. > Since for the NPS platform each core is running a single thread in ZOL (Zero > Overhead Linux) isolation mode, we feel that most of the time it is safe to > resume execution instead of halting the core. Most of the time is not good enough when dealing with OS code :-( A Machine check excepting implies something went terribly wrong. Some of those cases can be handled gracefully (such as duplicate TLB entry), but others can't so continuing despite it is recipe for disaster. Perhaps your chip has some spurious Machine check exceptions ? > I would appreciate it if you could review the change below Next time please send a real patch so I know right away what was changed. > and let me know > what you think, if this change is valid or if we missed or overlooked > something. > We are not looking to push this change upstream, but will be used on some > systems. Hmm, but you have to explain why those machine checks are fine ! > > Please see below our implementation after label 1. > > Thanks > Ofer > > ENTRY(EV_MachineCheck) > > EXCEPTION_PROLOGUE > > ... > brne r3, ECR_C_MCHK_DUP_TLB, 1f > > bl do_tlb_overlap_fault > b ret_from_exception > > 1: > FAKE_RET_FROM_EXCPN You don't need this. > bl do_machine_check ; using DO_ERROR_INFO macro We don't have above function in code. There's do_machine_check_fault() which calls die() -> flag 1 - so it would halt the kernel and would never return here. So your patch is broken in implementation as well. > b ret_from_exception > > END(EV_MachineCheck) > >