From patchwork Tue Mar 17 06:30:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 6027431 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 CADAEBF910 for ; Tue, 17 Mar 2015 06:34:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02D9C20450 for ; Tue, 17 Mar 2015 06:34:37 +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 08A0820454 for ; Tue, 17 Mar 2015 06:34:36 +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 1YXl1z-0007xh-HZ; Tue, 17 Mar 2015 06:31:11 +0000 Received: from exprod5og117.obsmtp.com ([64.18.0.149] helo=mail-pd0-f181.google.com) by bombadil.infradead.org with smtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YXl1v-0007uG-Nt for linux-arm-kernel@lists.infradead.org; Tue, 17 Mar 2015 06:31:08 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) (using TLSv1) by exprod5ob117.postini.com ([64.18.4.12]) with SMTP ID DSNKVQfKFeCl4rx4l9GgUPQySruQx3u7AUYz@postini.com; Mon, 16 Mar 2015 23:31:07 PDT Received: by pdbcz9 with SMTP id cz9so432175pdb.3 for ; Mon, 16 Mar 2015 23:30:45 -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=PPLVuIg23aoMyXAS0OR+Uo7QZ8Jev0O9d/tVUrpRFXM=; b=Aq00j6MV1hkTcBKIdrtd7v5OyTcYqxbARHc7selFRJRi/7fDuonOy8oXKbfPedpGRE p/wKAX6wjUxEXoZoRZhQ61sAy6Bg62UWmat+ax6uY8PgazEJGWBSIFC9Y82+s3xJF8H6 vw1qRDd6qWZcPnH1MdkM5iADTgBdFnzC0fkcO5ZmCav1V3EZ3wdRP6k+7pVhBqRNP39j +KEfXHWAGy3wS+TYF9Fl5Lnm7q9toKH0pwjNTR+8HOKBpFzViF2SzKiQmfuwOcRAQ9iD wklzQrI2pb8rGgdYxd5YCcc90RbioEDjeNs/PzZXtp0kKEM9XxWSJP+YUiZ2ac36bAX4 F8rA== X-Gm-Message-State: ALoCoQmszxkNQloxPp3rZNkBgd2oj5ANJNwkxWanUSg3mD/j1gf+f00ERmqsB4qqAf/F/6ZRNmfU24Y+O/SwpaTXjqKhw1/Vj+mVquzCtsTa6cEBXOx9R1hWez3KhExnWaA2GZ0qxKO+nNggAZCKl7CrCyIbP2A3CbGU1Fp/N8HF/rGvkZhblQw= X-Received: by 10.70.89.195 with SMTP id bq3mr104333225pdb.138.1426573845350; Mon, 16 Mar 2015 23:30:45 -0700 (PDT) X-Received: by 10.70.89.195 with SMTP id bq3mr104333189pdb.138.1426573845153; Mon, 16 Mar 2015 23:30:45 -0700 (PDT) Received: from localhost ([198.137.200.11]) by mx.google.com with ESMTPSA id rd7sm20398592pdb.85.2015.03.16.23.30.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Mar 2015 23:30:44 -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 v6 1/5] arm64: Enable EDAC on ARM64 Date: Tue, 17 Mar 2015 00:30:17 -0600 Message-Id: <1426573821-1937-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: <1426573821-1937-1-git-send-email-lho@apm.com> References: <1426573821-1937-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150316_233107_813247_36FE297D X-CRM114-Status: GOOD ( 12.57 ) 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 -- 1.7.1 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e80cd74..d9c342a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -20,6 +20,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 +