Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2840085ybh; Mon, 5 Aug 2019 07:40:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxj/hh0BYzlt761zTQjfXUXerhBT0czYrOdMwWoCJXZBTd2fVeiURkvBf9RPuFri95Az/MF X-Received: by 2002:a62:ab18:: with SMTP id p24mr73701081pff.113.1565016034779; Mon, 05 Aug 2019 07:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565016034; cv=none; d=google.com; s=arc-20160816; b=fLgg4P5JF8lQ0jU8kivRKVNpELLoVLfaWt20igcIjXV0iLRODd2fWcSPbvmMPBwCOf XoWcA9S7aVZUVQHnScRfBmpgvL/CVQMXkiEuJqOJtr5pr4Dg1aUOx4hvuo0kQiz3s0tF zNlUK2akuNcZVJNWsrnyn6clHNgp4yWiqkM4YkNCNilrIBc8pgCHki76qkvsfvK8ltvA uYcsrD8fK/9utq+WxR0k6x6NrODTCs9sXB4o2Az4uHkEoLdOgOnHmbnTaRmZX2FH8bYr wnEs/QgZlh7mc+urYxPfmY1VRKsrrjNaYVPPvVugu8S8k2BmDysJCthk+ntNKqtWVhzb KQ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=PjUvu54jPktsncSuy4evUoV6hUaQZpbCooGfSdcFC2c=; b=kk8prQ6qCYWIkOBcUzwtTCUpTXPqLSXfd8O+vbx0OTerCvnrBl2SHDQ/NzRqZcfZmE XSDpkZ5Z843Th8BvdVlcJoybaoFUbsAqszrqg0ta9DBffTrt74HV1rTOuY4VNqqkmtYw ct+oGbSU1OnlO/pjvM0XHgLifWJhcNIJftpFPuOGbH749GXfFebnv0an39JSnXieGwZO BCezFU5Qg7pro79GhnxTA3sGb5QM8MY1u9qPkaBLlASoal8QJR+4hRY/WWJa3yuYiTnJ AQtOiBO7yx2yQDabho2rBeCw+gEy2dLBLe5Gb8JHTi+2PMxyETDG5Jqi/pbNBlZtQqZ9 2klg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=h3QJQUw7; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si42934210pgv.530.2019.08.05.07.40.18; Mon, 05 Aug 2019 07:40:34 -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=@amazon.com header.s=amazon201209 header.b=h3QJQUw7; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729322AbfHEOjn (ORCPT + 99 others); Mon, 5 Aug 2019 10:39:43 -0400 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:18954 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbfHEOjm (ORCPT ); Mon, 5 Aug 2019 10:39:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1565015981; x=1596551981; h=from:to:cc:subject:date:message-id:mime-version; bh=PjUvu54jPktsncSuy4evUoV6hUaQZpbCooGfSdcFC2c=; b=h3QJQUw7399+BrWPZ3KGT8a2j6WD3RU0WdTkTMYGrTnj/5zE9ZCWebcL oTk/+a7y3ksiN3tHFNGKeF81EWu28nhUvmqdUAIndsQqoyxF3KxUPanBS qq8Yupx8Ur/SxeigwWdhoSW7khHWG+mvUkXEpFE883BhpCTSqvaYhnXSS c=; X-IronPort-AV: E=Sophos;i="5.64,350,1559520000"; d="scan'208";a="777792833" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-27fb8269.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 05 Aug 2019 14:39:39 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-27fb8269.us-east-1.amazon.com (Postfix) with ESMTPS id DA9F1A1C18; Mon, 5 Aug 2019 14:39:35 +0000 (UTC) Received: from EX13D19EUB003.ant.amazon.com (10.43.166.69) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 5 Aug 2019 14:39:35 +0000 Received: from ua9e4f3715fbc5f.ant.amazon.com (10.43.162.137) by EX13D19EUB003.ant.amazon.com (10.43.166.69) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 5 Aug 2019 14:39:25 +0000 From: Hanna Hawa To: , , , , , , , , , , CC: , , , , , , , , , Subject: [PATCH v5 0/4] Add support for Amazon's Annapurna Labs EDAC for L1/L2 Date: Mon, 5 Aug 2019 15:39:07 +0100 Message-ID: <20190805143911.12185-1-hhhawa@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.137] X-ClientProxiedBy: EX13D03UWA001.ant.amazon.com (10.43.160.141) To EX13D19EUB003.ant.amazon.com (10.43.166.69) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds L1 and L2 caches support for error detection and correction for Amazon's Annapurna Labs SoCs. Alpine SoCs supports L1 and L2 single bit correction and two bits detection capability based on ARM implementation. Changes since v4: ----------------- - Added include for cpumask.h in al_l2_edac.c - Fix RAMID error print according to ARM TRM - Use for_each_possible_cpu() to parse information for DT. - Add missing of_node_put() call. Changes since v3: ----------------- - Added include for smp.h sysreg.h - Use scnprintf instead of snprintf - Move write_sysreg_s after valid check to minimize the window between read/write. - Use IS_ERR_OR_NULL instead of IS_ERR, because edac_device_alloc_ctl_info may return NULL. Changes since v2: ----------------- - Use BIT for single bit instead of GENMASK - Use BIT_ULL and GENMASK_ULL for 64bit vector - Fix the mod_name/ctrl_name. Changes since v1: ----------------- - Split into two drivers - Get cpu-mask according to l2-cache handler from devicetree - Remove parameter casting - Use GENMASK() in bit mask - Use FIELD_GET() - Update define description PLRU_RAM -> PF_RAM - Use sys_reg() and read_sysreg_s() - Remove all write/read wrappers - Check fatal field to set if the error correctable or not - Remove un-relevant information from error prints. - Update smp_call_function_single() call function to wait - remove usage of get_online_cpus/put_online_cpus - Use on_each_cpu() and smp_call_function_any() instead of loop with for_each_cpu. - use buffer for error prints and pass to edac API - Remove edac_op_state set - Add for loop to report on repeated errors of the same type - Fix error name of the TLB to be L2_TLB as written in ARM TRM - Minor change in Kconfig - Minor changes in commit message Hanna Hawa (4): dt-bindings: EDAC: Add Amazon's Annapurna Labs L1 EDAC edac: Add support for Amazon's Annapurna Labs L1 EDAC dt-bindings: EDAC: Add Amazon's Annapurna Labs L2 EDAC edac: Add support for Amazon's Annapurna Labs L2 EDAC .../bindings/edac/amazon,al-l1-edac.txt | 14 ++ .../bindings/edac/amazon,al-l2-edac.txt | 20 ++ MAINTAINERS | 12 ++ drivers/edac/Kconfig | 16 ++ drivers/edac/Makefile | 2 + drivers/edac/al_l1_edac.c | 158 ++++++++++++++ drivers/edac/al_l2_edac.c | 192 ++++++++++++++++++ 7 files changed, 414 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/amazon,al-l1-edac.txt create mode 100644 Documentation/devicetree/bindings/edac/amazon,al-l2-edac.txt create mode 100644 drivers/edac/al_l1_edac.c create mode 100644 drivers/edac/al_l2_edac.c -- 2.17.1