From patchwork Tue Apr 28 22:10:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 6292431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 44369BEEE1 for ; Tue, 28 Apr 2015 22:14:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76C9E202B8 for ; Tue, 28 Apr 2015 22:14:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A51AE2024C for ; Tue, 28 Apr 2015 22:14:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnDjE-0003qL-6N; Tue, 28 Apr 2015 22:11:44 +0000 Received: from exprod5og112.obsmtp.com ([64.18.0.24] helo=mail-pa0-f41.google.com) by bombadil.infradead.org with smtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnDj7-0003n7-1l for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2015 22:11:38 +0000 Received: from mail-pa0-f41.google.com ([209.85.220.41]) (using TLSv1) by exprod5ob112.postini.com ([64.18.4.12]) with SMTP ID DSNKVUAFhDXUB/DYJjbVltEI+Vj5QQ5Kw65+@postini.com; Tue, 28 Apr 2015 15:11:36 PDT Received: by pabtp1 with SMTP id tp1so8232032pab.2 for ; Tue, 28 Apr 2015 15:11:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5qzBC5YYBf7R/Qt2ZxBqRCcOVFpE5qjt3C+QYBTVlek=; b=YFKbU1Vor/pF+wvtpxYM47Lh3ePd6rAGULOugx0Vz2IZoiSG1pzwyZTvA028NvwGK9 t9bGiBbDAFHLPzhV3OmKaaxpyVU5kcVWaXnVzN4CyGjGsJSW+E3GnGs6/3CPUYxMYZRo +xmE4MNMeX36GNb/vt7aP2QOa7JgXnAyB2eT51uVWH2O+4mInpHLyVwTbSZJem3Lswb8 B19JoDqKr3wpPx+yNPwwchT81rLhKbSYwIqVtg7NQA03J1Mh3aIHbdrCTrR8fUOKyzR0 peW9a1SgmmGmQDCxWp5Q5R6Jg4z7lWiZWmGeNONFTim7GCxmc1UX3VgicLMMp5YPH1Qy 28Gw== X-Gm-Message-State: ALoCoQkdA4pTEG75+wZ6DUHtVwmGOVVqjA3QbxERTsKxoYNYsMIdk9Yw4VoF1twFNSZF207AXrU5LyZdqHBR6TjXU90azzucbTrEwbMgjyWHajUtHtI6HNxUEpx8aNQ4K5M/mWcDpUuR+KttfQ5Kqzf6mW+AjPW0tkrvKhG9kwPaxYdsLxAU1Z4= X-Received: by 10.66.141.9 with SMTP id rk9mr24949361pab.113.1430259075659; Tue, 28 Apr 2015 15:11:15 -0700 (PDT) X-Received: by 10.66.141.9 with SMTP id rk9mr24949332pab.113.1430259075440; Tue, 28 Apr 2015 15:11:15 -0700 (PDT) Received: from localhost ([198.137.200.11]) by mx.google.com with ESMTPSA id eh4sm23294866pbd.69.2015.04.28.15.11.13 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 28 Apr 2015 15:11:14 -0700 (PDT) From: Loc Ho To: dougthompson@xmission.com, bp@alien8.de, mchehab@osg.samsung.com, robh+dt@kernel.org, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk Subject: [PATCH v7 1/5] arm64: Enable EDAC on ARM64 Date: Tue, 28 Apr 2015 16:10:41 -0600 Message-Id: <1430259045-19012-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: <1430259045-19012-1-git-send-email-lho@apm.com> References: <1430259045-19012-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150428_151137_215306_6FE8395B X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -2.3 (--) Cc: devicetree@vger.kernel.org, jcm@redhat.com, patches@apm.com, Loc Ho , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add an stub atomic_scrub and enable EDAC for arm64. Signed-off-by: Loc Ho --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/edac.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 arch/arm64/include/asm/edac.h diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4269dba..577078f 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -22,6 +22,7 @@ config ARM64 select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK + select EDAC_SUPPORT select CPU_PM if (SUSPEND || CPU_IDLE) select DCACHE_WORD_ACCESS select GENERIC_ALLOCATOR diff --git a/arch/arm64/include/asm/edac.h b/arch/arm64/include/asm/edac.h new file mode 100644 index 0000000..1cedba6 --- /dev/null +++ b/arch/arm64/include/asm/edac.h @@ -0,0 +1,31 @@ +/* + * ARM64 EDAC Header File + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#ifndef ASM_EDAC_H +#define ASM_EDAC_H + +/* + * ECC atomic, DMA, SMP and interrupt safe scrub function. + * Implements the per arch atomic_scrub() that EDAC use for software + * ECC scrubbing. It reads memory and then writes back the original + * value, allowing the hardware to detect and correct memory errors. + */ +static inline void atomic_scrub(void *va, u32 size) +{ + /* Stub function for now until an ARM64 HW has a way to test it. */ +} + +#endif +