From patchwork Wed Mar 19 17:35:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 3852161 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8976BF540 for ; Wed, 19 Mar 2014 17:36:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE57E203AF for ; Wed, 19 Mar 2014 17:36:44 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 F3A812017B for ; Wed, 19 Mar 2014 17:36:43 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQKPu-0005Ej-7a; Wed, 19 Mar 2014 17:36:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQKPr-0002Za-Qq; Wed, 19 Mar 2014 17:36:35 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQKPo-0002Xv-KS for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 17:36:33 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id EBD4413EF97; Wed, 19 Mar 2014 17:36:10 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id DD78113F05F; Wed, 19 Mar 2014 17:36:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 Received: from keeshans.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com [67.52.130.30]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cov@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EE22713EF97; Wed, 19 Mar 2014 17:36:09 +0000 (UTC) From: Christopher Covington To: Russell King Subject: [PATCH] ARM: Use 64-bit DMA addresses for LPAE+VirtIO-MMIO Date: Wed, 19 Mar 2014 13:35:19 -0400 Message-Id: <1395250522-30031-1-git-send-email-cov@codeaurora.org> X-Mailer: git-send-email 1.8.1.1 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_133632_739140_4AD88A1C X-CRM114-Status: GOOD ( 15.85 ) X-Spam-Score: -1.9 (-) Cc: Jonathan Austin , Nicolas Pitre , Catalin Marinas , linux-kernel@vger.kernel.org, Christopher Covington , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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-Virus-Scanned: ClamAV using ClamSMTP On an LPAE system, the physical addresses used by VirtIO-MMIO may be larger than 32 bits, even if the header and configuration space addresses fit into 32 bits. For example with the Versatile Express memory map using 4G memory, the following error occured when trying to use a VirtIO-MMIO block device. EXT2-fs (vda): error: ext2_check_page: bad entry in directory #2: : unaligned directory entry - offset=0, inode=3755990991, rec_len=57311, name_len=223 To fix this, select ARCH_DMA_ADDR_T_64BIT when both LPAE and VIRTIO_MMIO are selected. Signed-off-by: Christopher Covington --- arch/arm/mm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 1f8fed9..a62bcc9 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -617,6 +617,7 @@ config ARM_LPAE bool "Support for the Large Physical Address Extension" depends on MMU && CPU_32v7 && !CPU_32v6 && !CPU_32v5 && \ !CPU_32v4 && !CPU_32v3 + select ARCH_DMA_ADDR_T_64BIT if VIRTIO_MMIO help Say Y if you have an ARMv7 processor supporting the LPAE page table format and you would like to access memory beyond the