Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8652050imu; Thu, 15 Nov 2018 15:17:15 -0800 (PST) X-Google-Smtp-Source: AJdET5fyj2VAVvZiMpeSmqn3gzpBl68x7E6uDK15yzTZWQsogW1n2mfaNsKUiyIYDJVSi6XHBxTP X-Received: by 2002:a17:902:8f82:: with SMTP id z2-v6mr8159917plo.175.1542323835901; Thu, 15 Nov 2018 15:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542323835; cv=none; d=google.com; s=arc-20160816; b=V9P3QN6ADzI8Sdy8vaw7+p45tJQlvc2mour9HCzR7mBhomLlSR900FFL5KhHkwJvqU xIrulNgBD1dj0UnM3ENd79C/5TAZKbzlcoO5pZHhWf9rpHYTAd9Y1umUAYUZYUb5yams 4kDfdG5KfpGHnJPi3jIjyIV1Ejcy6tIbfwSXfUvkXolB+gFJmr3EKJKFU//PnO/wG4rQ BuoVy84qkpqvBfIKyRw1dTKu+XbKGuvwWQdoyYIk8AqkTyCuTv3jENx6eQVkUveXJl2O EAyTiSuc2vVmM/WYPuQJuvms1pXGEk17wwGVlaq3agsv8BJbSSmuqiPrzqjPNUdwuBx3 8MCw== 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; bh=Endo/rnyrZtQzjl63XIlDlk+0dMOEvUstgeXnyJyS2g=; b=aXdpiEHjgj6w9tskvzD25a2WhYef0ouRcLCDo51R5zoVW/JarzLWGwvCEYCTRmbTJu 2kIZwI4+SRu8TqEuhvKtrHEu2KKyCVll9iKc0yRxgpWwoTI+auU8aTue7HEtN3peRXw1 gvauBGrhsCV8viINYqCzRjHZ8dyRstaQVGYU5Hp918NHHbqYNcFTBM27E7V2Vl8/jlIU ELHieB1zau3xkyUN1HRA6KGjIXCi7ha06IT99YiUibLBz2+Z5BWTzIqkXIsBURDvZ8yu atOpSzmyGwBmlOKRQL3nfb1T4b7+OCUSRcs7Rt50MXoX/MECOw+seGHiBIv13L5swMcf 7y7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KsamsSTG; 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 n17-v6si27246422pgk.501.2018.11.15.15.17.00; Thu, 15 Nov 2018 15:17:15 -0800 (PST) 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=KsamsSTG; 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 S2388831AbeKPJ0J (ORCPT + 99 others); Fri, 16 Nov 2018 04:26:09 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:38415 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbeKPJ0J (ORCPT ); Fri, 16 Nov 2018 04:26:09 -0500 Received: by mail-ot1-f66.google.com with SMTP id u3so14542222ota.5; Thu, 15 Nov 2018 15:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Endo/rnyrZtQzjl63XIlDlk+0dMOEvUstgeXnyJyS2g=; b=KsamsSTGaj7EBVUbAIZgS9T7QGovy1ECRb9FIS9XU9sUYyBGhXoNh1Dxv+3p9Vb+MC rBge74EsJgxU7dSbXROotH6geTkJ8i/KZyLd3HwVJonemqEDH1Ziqo+AU/h6Zm0vrxph RGu/QdFcCc1SZwwYyNe80U3qp+gnfzF74r6n4yfrtwob7Wwep+SvBwBID8N+meev7cUK NskWGA+n2lJQgl3rgu0ky2Vk1x3UmPO5s5yzC6uPNYnAeSE+27jgCl0erJwC8bIZgO5k VjLuY1jTSF94wyopm5l0Tlxu76snt9z4RT5ZRK3DpuWe2USlEDYlqdLJdWo4D2LCrIy0 MW+A== 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=Endo/rnyrZtQzjl63XIlDlk+0dMOEvUstgeXnyJyS2g=; b=BJorB97ht5wJXG8GG6AFBjLJVuLVHJGxpAIWV0ve7cgcO68DKId8ckXZzoPjAc5fQd NPzoCygoHwDlLnc7Fvm07gwLjk4mP/DgrEb3dSaIiGZJ8grDU7vjbDJqZrFNwZN9bmdK w6kBUa4teSpJ178wmDj44tI2U4+9UthkCr04Ykrp3r8+RKTZzcVD6wEUMM8oAJQmHOez xgmS4V++qjB1IKNPRuEKFfLZGcf8LioulnEaz+OF1L+KwAkn4w+hS+SvNd3kfZ0/148v +3gjTy0iUmzyplhyLzkRBIwDQzk3snGnGe1+UjPJD85lU2tmF5kl17qd7RcJtv9u7mby P52w== X-Gm-Message-State: AGRZ1gImhMW76zuXNaq8A7m0ztRs7uEBoKNtZFOKTXibSMctaw/g3/OG UjO+KxiEFkLOfB2MUtZrXzA= X-Received: by 2002:a9d:2aea:: with SMTP id e97mr5094109otb.206.1542323775740; Thu, 15 Nov 2018 15:16:15 -0800 (PST) Received: from nuclearis2-1.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id o81-v6sm8680267oif.1.2018.11.15.15.16.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Nov 2018 15:16:15 -0800 (PST) From: Alexandru Gagniuc To: helgaas@google.com Cc: austin_bolen@dell.com, alex_gagniuc@dellteam.com, keith.busch@intel.com, Shyam_Iyer@Dell.com, lukas@wunner.de, Alexandru Gagniuc , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , Russell Currey , Sam Bobroff , "Oliver O'Halloran" , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER Date: Thu, 15 Nov 2018 17:16:01 -0600 Message-Id: <20181115231605.24352-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks to Keith for pointing out that it doesn't make sense to disable AER services when only one device has a FIRMWARE_FIRST HEST. AER ownership is an interesting issue brought in by FFS (firmware-first) model. In a nutshell if FFS handles AER, then OS should not touch any of the AER bits. FW might set things up so that it receives AER notifications via SMI. It's theoretically possible to receive SCIs, but the exact mechanism is platform-dependent. OS touching AER bits when firmware owns them may interfere with these notifications. The ACPI mechanism for negotiating control of AER is _OSC, and is described in detail in ACPI 6.2 Ch. 6.2.11.3. _OSC is negotiated at the root bus level. Any root port, switch, or endpoint under the bus would have its AER ownership negotiated in one _OSC call. Then there is HEST, which is part of ACPI Platform Error Interfaces (APEI). HEST tables describe the errors that FW may report to the OS. A types 6,7 and 7 HEST tables describe AER errors from PCIe devices. As part of this description, we're told if the error source is FFS. Information in HEST seems to be redundant, as each error reported by FW will have a CPER table that describes it in detail. Because HEST describes an error source as firmware-first or not, we've taken this to mean ownership of AER. Because AER ownership and error reporting are coupled, _OSC and HEST usually agree on the matter of ownership. However, that doesn't seem to be required by ACPI. I've asked around a few people at Dell and they unanimously agree that _OSC is the correct way to determine ownership of AER. In linux, we use the result of _OSC to enable AER services, but we use HEST to determine AER ownership. That's inconsistent. This series drops the use of HEST in favor of _OSC. [1] https://lkml.org/lkml/2018/11/15/62 Alexandru Gagniuc (2): PCI/AER: Do not use APEI/HEST to disable AER services globally PCI/AER: Determine AER ownership based on _OSC instead of HEST drivers/acpi/pci_root.c | 9 +---- drivers/pci/pcie/aer.c | 82 ++-------------------------------------- include/linux/pci-acpi.h | 6 --- 3 files changed, 5 insertions(+), 92 deletions(-) -- 2.17.1