From patchwork Mon Dec 5 16:00:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xie XiuQi X-Patchwork-Id: 13064711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2818C4332F for ; Mon, 5 Dec 2022 15:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=D3dsUmxhjGmToEOKHriRf6MbPW4bXKufx/fRqWS3i4Q=; b=JuBqMvcBdGHkf+ J/MxBtU7Rjh1tPphWauOgfcywadjfwcfvu2wK/c8RPCNze5lE+BZ9dt7lbUQzEEe+3fVJaU7iuuH5 7G0F6g9x5RovqiyuAAXrPoFv38W5kUucz3T0d4ZCr5bO6JU7/X/j9hr7/P3q6AFHc2Szc7teidnw9 ZNWTByVHlga9kifXedf1xWssM0LQffQ+BLxMaCglRFYKNMsKOKgMhMSF8PqvEBtEqCNvBM7nLPff1 SB/deNsxlEAWtK8YmKIciv9IiiuJddDt+wyGHb6WWPSihPXalY/gFalfnqGJvWzAa5uCZ7MaliA4B UTnCbiuFYLJfB0CQLS0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2DdF-0059ez-Fi; Mon, 05 Dec 2022 15:43:49 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2Dd4-00593y-6j for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2022 15:43:40 +0000 Received: from canpemm500001.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NQnmZ61PtzJnfJ; Mon, 5 Dec 2022 23:39:58 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by canpemm500001.china.huawei.com (7.192.104.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 5 Dec 2022 23:43:27 +0800 From: Xie XiuQi To: , , , , , , , , , , CC: , , , , Subject: [PATCH v3 0/4] arm64: improve handle synchronous External Data Abort Date: Tue, 6 Dec 2022 00:00:39 +0800 Message-ID: <20221205160043.57465-1-xiexiuqi@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500001.china.huawei.com (7.192.104.163) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221205_074338_462365_FD52F53C X-CRM114-Status: UNSURE ( 7.23 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series fix some issue for arm64 synchronous External Data Abort. 1. fix unhandled processor error According to the RAS documentation, if we cannot determine the impact of the error based on the details of the error when an SEA occurs, the process cannot safely continue to run. Therefore, for unhandled error, we should signal the system and terminate the process immediately. 2. improve for handling memory errors If error happened in current execution context, we need pass MF_ACTION_REQUIRED flag to memory_failure(), and if memory_failure() recovery failed, we must handle this case, other than ignore it. --- v3: add improve for handing memory errors v2: fix compile warning reported by kernel test robot. Xie XiuQi (4): ACPI: APEI: include missing acpi/apei.h arm64: ghes: fix error unhandling in synchronous External Data Abort arm64: ghes: handle the case when memory_failure recovery failed arm64: ghes: pass MF_ACTION_REQUIRED to memory_failure when sea arch/arm64/kernel/acpi.c | 6 ++++++ drivers/acpi/apei/apei-base.c | 5 +++++ drivers/acpi/apei/ghes.c | 31 ++++++++++++++++++++++++------- include/acpi/apei.h | 1 + include/linux/mm.h | 2 +- mm/memory-failure.c | 24 +++++++++++++++++------- 6 files changed, 54 insertions(+), 15 deletions(-)