From patchwork Tue Jun 7 03:39:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 9159779 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 98BD560572 for ; Tue, 7 Jun 2016 03:50:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A9CB265F9 for ; Tue, 7 Jun 2016 03:50:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F7EC2834A; Tue, 7 Jun 2016 03:50:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E385265F9 for ; Tue, 7 Jun 2016 03:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbcFGDt7 (ORCPT ); Mon, 6 Jun 2016 23:49:59 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35411 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbcFGDt5 (ORCPT ); Mon, 6 Jun 2016 23:49:57 -0400 Received: by mail-pa0-f68.google.com with SMTP id gp3so13117988pac.2; Mon, 06 Jun 2016 20:49:57 -0700 (PDT) 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=YlbN5hZPxknllJZmxcFhvBjI0PHRPfX4qlc8/Tai5ww=; b=dlmVFQb6hFo7mfm9gUaIhYFYH1uK8eRaAQJSXePGh11fcnj7Cl0tDfX0rw+cq7/vHG nazxCrfJcYmQRc13qTyu4vHUJ/crRxzMrgu6MEiyVyXOKmRt7EG69oglpnGm3HYWEtFs izmYUw61TfS+VUuR5oO39dWl0PgeIFuSPHy9ofrhAOsOFrRsUE7l6l3ais7/3vAlII+o WDeOQ8Yj+DpqDaWbjl+s+3FEZ9EKdaxdgsQh/lrwjFrbATd9mBk2ln3utVklHNLIKe3n mLNU6J1vcf1QhhVm4ZeIF3H7gKJ0snY1qj/YO3IAgSf/IrucuVTODeNQXHv4iNvghsDq pdbg== 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=YlbN5hZPxknllJZmxcFhvBjI0PHRPfX4qlc8/Tai5ww=; b=TMp2ulHPthonA3MEv6ZDj2DgIpPDRuqX4MhiWH1QDjix3yZ42fF9EkGs3WPmwNKUzx L45ZsyubbJ+yZJoscA8EPnr436Yq0KKgTsksduLoMS8FSZPE7WO9iDK3kVc3gm+c2x6a FOxCZ5GYsWqvymQ9zTCN81BePJmPsVDkQX3/Bns1n2pYTjYhRprvvdpKom59ddjg5DMG I1ix8Tc+MOvW3YibcdZIXUibJxXvlXzPylsgLnQHg0OyjuihURM6alWy5/RFlDwlgWAP zfoImo8v66EMUqgRz1O3VSF49rirNb0nfTIenwAJaVnkVWglxqzRdR37VfpLfTS4Pgr/ 19EA== X-Gm-Message-State: ALyK8tIUFGEgYI2Fa+JDlB4dE0HtN48mGdftAw7d1kNTbz4Hg1WXcKJtMMkFOvG33ny4qg== X-Received: by 10.66.65.133 with SMTP id x5mr28635510pas.108.1465271396403; Mon, 06 Jun 2016 20:49:56 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id a17sm30911225pfa.70.2016.06.06.20.49.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2016 20:49:55 -0700 (PDT) From: Magnus Damm To: iommu@lists.linux-foundation.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, joro@8bytes.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, horms+renesas@verge.net.au, Magnus Damm Date: Tue, 07 Jun 2016 12:39:36 +0900 Message-Id: <20160607033936.28687.78365.sendpatchset@little-apple> In-Reply-To: <20160607033918.28687.98260.sendpatchset@little-apple> References: <20160607033918.28687.98260.sendpatchset@little-apple> Subject: [PATCH 2/3] iommu/ipmmu-vmsa: Increase maximum micro-TLBS to 48 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Bump up the maximum numbers of micro-TLBS to 48. Each IPMMU device instance get micro-TLB assignment via the "iommus" property in DT. Older SoCs tend to use a maximum number of 32 micro-TLBd per IPMMU instance however newer SoCs such as r8a7796 make use of up to 48 micro-TLBs. At this point no SoC specific handling is done to validate the maximum number of micro-TLBs, and because of that the DT information is assumed to be within correct range for each particular SoC. If needed in the future SoC specific feature flags can be added to handle the maximum number of micro-TLBs without requiring DT changes, however at this point this does not seem necessary. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 0029/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2016-06-06 11:17:33.230607110 +0900 @@ -1115,7 +1115,7 @@ static int ipmmu_probe(struct platform_d } mmu->dev = &pdev->dev; - mmu->num_utlbs = 32; + mmu->num_utlbs = 48; spin_lock_init(&mmu->lock); bitmap_zero(mmu->ctx, IPMMU_CTX_MAX); mmu->features = match->data;