Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp334731imm; Mon, 21 May 2018 06:51:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqqw5W/bNT0JrIP/niGiqzpL5p9QiaxPe3DLwrUdNO3ddTtPGvnMKqLsZbCYV+6RoAQaQ4K X-Received: by 2002:a17:902:125:: with SMTP id 34-v6mr21099072plb.42.1526910715251; Mon, 21 May 2018 06:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526910715; cv=none; d=google.com; s=arc-20160816; b=Pnuvx0CVvrd6kltxyRmLwaXJVZ2UuQALD2LxcwZc9Yrmf4Cnk73vh2fbMYs/PZJ5Cj BS4iKvBPwdcAL8ykoWFYPAAWV16X9q178kTV3qIkaTu/HM8K8AlQwkxANPuQudN3I64R CZgdZ96kAO8EqYHh74aixwt/5KeinB9asQzYIqu23Ov/Rm7gtY0om1/XS3q6HLAL8WG3 AOaXiu996J17aF/rU5/Hs7ai7LZa9FKmqo++RtvhUuYwg7wtr+T910dJemLalvjyRXkt mf2HwupmAqkRLmozuIwSUSAqzI+VruuqlZJwc+Y3Y8UeKIY0zl4cVvZY3bx6Zap+jOqO D5aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=BqI2jRnZVvn/5QIZ6R0n52rhcdPmq0FmNUQC2xOuKkY=; b=Dfa62MmeQTtIhn7nLkgMRAcKNkTAt8GsU1PwnMAH7sa9uuu1tgnDoPx7usPSqKBCtu 67rsIE2chNBT0MpxsF4QjoEpN2OZaWU7gUwrzgqVM+GfRjGFFS7GFWuqzPiIBihEPu0s Jj3BL1PWvEwgYuZokMQqCjZz3hK/t/vj/ofpJQ5b6yb414BPR8RFZINn8wvPAoFQntng 7HJwy2PBopHAlpLHvJDLZcJhSajM1WOjqn10ztwlbWfqTJF6IQhAGmA0Xn1lalqrdyRY A3qCZ93lVnEzgO4Q8Ub3iSk0a+MCxvNhohZ2snd7syfEHu/gLPZ6Ubeuux0CknQSN0D4 FHMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aKR8Mg0c; 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 x25-v6si14825899pfj.347.2018.05.21.06.51.40; Mon, 21 May 2018 06:51:55 -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=aKR8Mg0c; 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 S1752828AbeEUNuS (ORCPT + 99 others); Mon, 21 May 2018 09:50:18 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:53922 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbeEUNuP (ORCPT ); Mon, 21 May 2018 09:50:15 -0400 Received: by mail-it0-f67.google.com with SMTP id n64-v6so21098991itb.3; Mon, 21 May 2018 06:50:14 -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; bh=BqI2jRnZVvn/5QIZ6R0n52rhcdPmq0FmNUQC2xOuKkY=; b=aKR8Mg0cuuO9D4fcNeD5Uqavk522FivTLRxjRYM6yfiSmjRje7CV+tgHSYVimIW99W ntkBY6kEdjegEWtyZ/OAgkQZWtjay2Zj0xpSlqwrWR4Nh2OYtSc+F/EyvVG2ZJgFJa/r zNrJmfYbLxVaaggnEM5lwtKR0zR+Bo/V70QgK7bIsxodMKBJsHA6eIqMiVYri+0doNax ApEOxvZRf/BmD5j7Nh5u+xcbAnVFZkP3Sn5jNHys5+R3Q/WYN4iM6amn4Wpskpr4eUna bDPXg4fyirV57bnUE88LgAFG5Vs77uHA3RXlWPdGA8K9Qe5bNy4J+m4Ixo3aqGf6cs5j nohg== 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; bh=BqI2jRnZVvn/5QIZ6R0n52rhcdPmq0FmNUQC2xOuKkY=; b=Bj1+1G1l6qust+WxiB8VZythjMXc/VK01gAjn2YuNv8I8MZG85D/wkaACEoQbSexcd wpg/KpgmORNGxlurf5T7RU5wAFhqETMagSuj7j24vgIZ8LvPemFhy7XdkPJfh5QzYrU7 xh/GxuNINsfyl/2ir/3dcHZUJ9jI9issnLeU/ejxrpdakoiYukU4rEWdPYmQYlOha5e0 /w17NiOp+WCYlPin7RB2m7nMH2fAWxmrHFwP0MtdzG1ot+E2LpOsmv0wUy8PJDeZXOMw gs8o24bXHCsahS0FiOV9B3UleZ/qcSxDySAecL1bwi1Z8i1HU+q9vprQZuVjyZi5ru/b p21w== X-Gm-Message-State: ALKqPwewVl5TSfMhka2X83DBLpTcN0exSmAApJ7+P1cWikapKQ4g3py+ VB1lUVYR4t9Fc6KCxr1NDpI= X-Received: by 2002:a24:79d6:: with SMTP id z205-v6mr17106223itc.91.1526910614486; Mon, 21 May 2018 06:50:14 -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 f4-v6sm8432212itf.22.2018.05.21.06.50.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 May 2018 06:50:13 -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 v6 0/2] acpi: apei: Improve PCIe error handling with FFS Date: Mon, 21 May 2018 08:49:57 -0500 Message-Id: <20180521135003.32459-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 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 v5: - Removed zoological references from commit message 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