Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4622756imm; Mon, 14 May 2018 10:06:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoi5ex0FUoD3J/8+C0EIOoc/4W7HbehQWVpO8Uosj6fB32CfzCv5V+ydbfUCkD4E1Tg3owz X-Received: by 2002:a62:a89:: with SMTP id 9-v6mr11223838pfk.112.1526317609315; Mon, 14 May 2018 10:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526317609; cv=none; d=google.com; s=arc-20160816; b=sSie/jhhsNIeRAZ4NYxe+J+5CeWzt8nw6vTt79hY+ReWwVWNUYTxroX7ucgW+frkVB 942Q6KvynWWbE2SQJcqnZldEn9t1UpzfDpVpFSkDQmMlKSVYTafA9YA01Dbm2Rm420k2 n5X7doLCmU8fnzwJTEFGbiaBnGfcXaC+W/u0F0BAgSqx24kmG8drqoQNts8LJyzTKlZ9 k24SKj0Ezje+0SOXAtX5AxdTMRzokE+cU3MnC3vMjF9EaN75DUZ6MSoypkm3aJmQdvon 2/Zyz6hPktdAOTibUroG+jd8cQyPWyoGO6+NkcYOoqVBgICGyuqGUyEIEN7FxyCBthwQ bkZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=TWBnskY1MZQUijArXRHAIXBtRMV1r8UfW72cKbatCDM=; b=rRzhv26OIBDxqsQM+3BrixOoaaTqmQmfdw9a9W+murrkhBi2rIWR6F4I4lsV/FM41L CTBWcEk+XTNdgNEmbU1MNR6nqMx2Ni9+BMgG2mhVuG33tLdESJIOtAXtYofPj5/yVsZx E3WIFV8aWgAkkYSh7OT+DkhMUO6fXGolsxWljRO7qKRyPbxrDuFqI+PTyaBc0eMcE0RI puS5pDAer2wPAycjOQs1wR45Rwl9lkd/cjJ1S37f2VC7hFmVcCOGMTRiMfRWnF9oTaas 7bmDPe2MbcYixC5nSZ9HJ3MdVDwyeLccQl9SX/ZaMLyVFEEqDmdWxJH/9EFsvsx7AKN0 dGeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TMn9Vb3t; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y26-v6si7912204pgv.202.2018.05.14.10.06.34; Mon, 14 May 2018 10:06:49 -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=@gmail.com header.s=20161025 header.b=TMn9Vb3t; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbeENO7w (ORCPT + 99 others); Mon, 14 May 2018 10:59:52 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:54337 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953AbeENO7s (ORCPT ); Mon, 14 May 2018 10:59:48 -0400 Received: by mail-it0-f65.google.com with SMTP id z6-v6so10957145iti.4; Mon, 14 May 2018 07:59:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TWBnskY1MZQUijArXRHAIXBtRMV1r8UfW72cKbatCDM=; b=TMn9Vb3tulAnTbMnbkPKJS1hmJjUXL9qW8MlUY/JwzYTlgcvFN1RrqffD8CKTJypsj H4ufg6QRVDaPj0KwhAjRBfWtXHJiHzLeD3t3vkGrA8h6PNRlQSX6hc7yMS746GiEknp8 n1cpPu597oEVuWZpMHD57Jz/nmPAW2I2LZP1Nl9FBg23daPfxkfAbP9kBll8/YSKToUF jRw0Os+0VboGiKwqOIzS6Wg6jJ6k5mCBqpQeS5s8Am1+xCqD8lY097GkGGnZsaeaqMVq 4g671iBg8XX2GijJ/cHhWLOglH7TS0IU+aZV3vtKi5uP3NYr8VLVSaIQlZ7GGpapwiW4 EYGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TWBnskY1MZQUijArXRHAIXBtRMV1r8UfW72cKbatCDM=; b=XYwp6GCMt6g5VKxUCk7KGInjK8gmjXFqrYAEGx/NuarCfcTjcmXevcylY8PEGoMvU7 QM/+clMA8ELF28yUQSe2ZjMDzl8PyWVi5hLw/FqaYAcuGZWaNmmDqCd48U1hmHrwG9Ty /SfMPjMAGvVoX0nvGwGeFW7qsckSY4HbNqyum8fI6L/YRdnW9F6+9YrB9VYWWvXyqkR3 eGLlkhlrZ72Z2SbPTKnYsjXvNwNctDSdEode450eV9Y4ET90C0JhTig1Q+a4zsWXWoeR /TwIFFf3xncumJ3kd0MLu3Fz9KV/jDywBsMFqjurSC5CvEeQruk7VBbgL84NJNMLQwzv kCTA== X-Gm-Message-State: ALKqPwdWi38rOMyCzPrZjftrnJknMl5g/7qjaSRZB0iOmwbki8n5MdnG Mbjik0JhoKo2oxbFpNcvF4E= X-Received: by 2002:a24:82c3:: with SMTP id t186-v6mr9952138itd.13.1526309987582; Mon, 14 May 2018 07:59:47 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-201-114-184.hsd1.tx.comcast.net. [98.201.114.184]) by smtp.gmail.com with ESMTPSA id y14-v6sm4653715ioc.52.2018.05.14.07.59.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 07:59:47 -0700 (PDT) From: Alexandru Gagniuc To: bp@alien8.de Cc: alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Alexandru Gagniuc , "Rafael J. Wysocki" , Len Brown , Tony Luck , Tyler Baicar , Will Deacon , James Morse , Shiju Jose , "Jonathan (Zhixiong) Zhang" , Dongjiu Geng , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/2] acpi: apei: Improve PCIe error handling with FFS Date: Mon, 14 May 2018 09:59:27 -0500 Message-Id: <20180514145933.10291-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180430212836.7807-1-mr.nuke.me@gmail.com> References: <20180430212836.7807-1-mr.nuke.me@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of these changes is to see if we can safely de-escalate the situation and notify the appropriate error handler. Since FFS reports errors through NMIs or other non-standard mechanism, we have to be just a little more careful with reporting the error. We're concerned with things, such as being able to cross the NMI/IRQ boundary, or being able to safely schedule work and notify the appropriate subsystem. Once the notification is sent, our job is done. I'm explicitly _NOT_ concerned with whether the error is handled or not, especially since such concern reduces to a call to __ghes_panic(). There are rare cases that prevent us from de-escalating to lesser contexts, such as uncorrectable memory errors in kernel. In these sort of cases, trying to leave the NMI might cause a triple fault. James Morse explained this very well when discussing v1 of this series. In and only in such cases, we are justified to panic(). Once the error is safely sent its merry way, it's really up to the error handler to panic() or continue. For example, aer_recover_queue() might for ungodly reasons fail. However, it's up to the AER code to decide whether failing to queue an error for handling is panic worthy. Changes since v4: - Fix Freudian slip and use GHES_ instead of CPER_ enum - Rephrased comments to clarify what we don't care about Changes since v3: - Renamed ghes_severity to something more concrete - Reorganized code to make it look like more than just a rename - Remembered to remove last patch in the series Changes since v2: - Due to popular request, simple is chosen over flexible - Removed splitting of handlers into irq safe portion. - Change behavior only for PCIe errors Changes since v1: - Due to popular request, the panic() is left in the NMI handler - GHES AER handler is split into NMI and non-NMI portions - ghes_notify_nmi() does not panic on deferrable errors - The handlers are put in a mapping and given a common call signature Alexandru Gagniuc (2): acpi: apei: Rename ghes_severity() to ghes_cper_severity() acpi: apei: Do not panic() on PCIe errors reported through GHES drivers/acpi/apei/ghes.c | 63 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 11 deletions(-) -- 2.14.3