From patchwork Mon Jul 21 20:47:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 372201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7245A14014F for ; Tue, 22 Jul 2014 06:49:30 +1000 (EST) 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 1X9KVE-0008T5-T7; Mon, 21 Jul 2014 20:48:08 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9KVC-0008OV-8w for linux-mtd@lists.infradead.org; Mon, 21 Jul 2014 20:48:06 +0000 Received: from localhost (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A2D3A280062; Mon, 21 Jul 2014 22:45:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-Virus-Scanned: at arrakis.dune.hu Received: from ixxyvirt.lan (dslb-088-073-029-079.pools.arcor-ip.net [88.73.29.79]) by arrakis.dune.hu (Postfix) with ESMTPSA id 46E1A284112; Mon, 21 Jul 2014 22:45:19 +0200 (CEST) From: Jonas Gorski To: linux-mtd@lists.infradead.org Subject: [PATCH 3/3] MIPS: BCM63XX: disable unaligned accesses for SMP Date: Mon, 21 Jul 2014 22:47:28 +0200 Message-Id: <1405975648-25375-4-git-send-email-jogo@openwrt.org> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1405975648-25375-1-git-send-email-jogo@openwrt.org> References: <1405975648-25375-1-git-send-email-jogo@openwrt.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_134806_495605_7D415518 X-CRM114-Status: GOOD ( 11.84 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Artem Bityutskiy , Kevin Cernekee , Gregory Fong , Maxime Bizon , Stefan Roese , David Woodhouse , Florian Fainelli X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Unaligned accesses to flash can cause random wrong reads when having both cores enabled. This is easily noticable with a jffs2 filesystem, as jffs2 reads its filenames into an unaligned bytebuffer. This can cause random boot failures when critical files have their read filenames corrupted. Signed-off-by: Jonas Gorski --- arch/mips/bcm63xx/dev-flash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/bcm63xx/dev-flash.c b/arch/mips/bcm63xx/dev-flash.c index 172dd83..f6a7116 100644 --- a/arch/mips/bcm63xx/dev-flash.c +++ b/arch/mips/bcm63xx/dev-flash.c @@ -36,6 +36,7 @@ static struct physmap_flash_data flash_data = { .width = 2, .parts = mtd_partitions, .part_probe_types = bcm63xx_part_types, + .no_unaligned_access = IS_ENABLED(CONFIG_SMP), }; static struct resource mtd_resources[] = {