From patchwork Mon Jan 18 05:48:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 8052821 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A65379F6FA for ; Mon, 18 Jan 2016 05:46:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EFBF2021A for ; Mon, 18 Jan 2016 05:46:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6782E20218 for ; Mon, 18 Jan 2016 05:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750836AbcARFqK (ORCPT ); Mon, 18 Jan 2016 00:46:10 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35410 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbcARFqJ (ORCPT ); Mon, 18 Jan 2016 00:46:09 -0500 Received: by mail-pa0-f45.google.com with SMTP id ho8so167376180pac.2 for ; Sun, 17 Jan 2016 21:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=Q9Xh8tPlYY9E3GF6dNAkWOi3efbnZVv8Y3cdzUKLSA8=; b=iWv+22B8/Bo+ASX7i342Ehl+NpBW9cMcfE68jAcDdC0iI+sE0/0BifXd0vog+AMDQK zRIfVMwf1B26ROznwDVjjIPh4O7RNv8zloM+j45hgW8x4el2ZcInaHCWXtmLcISOXeBU TGKTLVuWp//TYIsmFuDVxZvIV0HdTXxtI+3gCrtrTqTbAwN98/g/VvbJBYlyS3/6aZuA 5GNdza41kWTSkyYFzZxAksEr4FzHxXXg5GTEKU9JXMAxvYgaJNmHiNYaIVeXiJBdeBBK e2oGtuaEccCO7nZmpxh6FH6Sp0xExr/5kr0hcxZtBtjQkvhLVRHLkqah1ooejzFUhtg6 fX7w== 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:date:message-id:in-reply-to :references:subject; bh=Q9Xh8tPlYY9E3GF6dNAkWOi3efbnZVv8Y3cdzUKLSA8=; b=EOFjIYM63Pk0zuoMEf/1s4kTg0sG0HNNSp4ApjWTeTDPZ3V/lv4AUxqzxzwFRH9Xf/ H+c4wInm+bgSVJoqa1cPTcPZlEQq3AXkQzQ6jsv8Mqw3STpc2SDuiLo/b8rWNZ6oS0AB Ky9BrByfENspfwzj3IQrMvKWKvqu0ascI8IZ0oRh8zDliyDctxXvzXVpzYAdKHhgQtp2 WyyAsYS2HebELSwMW442MxK50VtEvAtPcescjB8tu4ILmbbM+zTzwh2cODUJj6IdRSvM Lm7HqC+ydLqj5+xRq/XEnMBil7uRkoPTO5+3ies6YME5RRzVit1Oq1Rnnhj37ORn03VJ Alyw== X-Gm-Message-State: ALoCoQmMyHNvU1I18maov3cSGs2wDKOXluj9A4uJVVdOgQAxw6MHNrS92GrNeXAtoeJIUrvDOcSEBQ8AdCNdw3uuEh1p2tDg3g== X-Received: by 10.66.177.193 with SMTP id cs1mr34122326pac.132.1453095968913; Sun, 17 Jan 2016 21:46:08 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id ty5sm30644017pac.48.2016.01.17.21.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jan 2016 21:46:07 -0800 (PST) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: horms+renesas@verge.net.au, Magnus Damm , laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be Date: Mon, 18 Jan 2016 14:48:26 +0900 Message-Id: <20160118054826.22156.70507.sendpatchset@little-apple> In-Reply-To: <20160118054817.22156.6531.sendpatchset@little-apple> References: <20160118054817.22156.6531.sendpatchset@little-apple> Subject: [PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm The IPMMU hardware is able to use page tables from anywhere in the memory, so set masks to 64-bits. Required to be able to use the IPMMU driver with 4 GiB of memory. Without this patch with 4 GiB enabled the following error message is spit out on the console during boot: ipmmu-vmsa e67b0000.mmu: Cannot accommodate DMA translation for IOMMU page tables Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 2 ++ 1 file changed, 2 insertions(+) --- 0001/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2016-01-18 14:22:22.730513000 +0900 @@ -1043,6 +1043,8 @@ static int ipmmu_probe(struct platform_d return -ENOMEM; } + dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); + mmu->dev = &pdev->dev; mmu->num_utlbs = 32; bitmap_zero(mmu->ctx, IPMMU_CTX_MAX);