Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2834912imm; Thu, 24 May 2018 17:11:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpvg5k5ayFaeGmA7We/xfNBK03Ya+McQ8HYYjykdWYwpIG0oceCErNNjIvCa2inZUtMwZ/l X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr157834pld.103.1527207101275; Thu, 24 May 2018 17:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527207101; cv=none; d=google.com; s=arc-20160816; b=IjgUM6IssYCkeS5rARK0wLGElu+a0wST8uXo7YOe2B6iMgD9KldJDyRBzYzwU3H+xa QIFYhp5M82W8FPWvteW+1RDFFUjtsRkKRUqZ/ZqW9IZIZaxk7USWJqr0vnRdFRtqc3o2 NBu/2cAxX6xXXeJiViLsR/8ZZ/BDR0SJJd0+C7nJ8ZvXn6vdMarBKcwX7/MiS2Ve9tWG JYbayAru3KMA99+3+z61c3ot/Z89GsLSpzw1gI30HhDUW0ArnEHqc828getdGZ+1KADs tODfBuWjtfT3479qgM4d/vs/A+TK/NlMaGozcUJFPERHnwiIigjWoHQdP5PXtcIAo6Nq R7fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=zhe1+fIxAi/tJsqFpwogByfZDrTN5tgiZDnYXQ4cwOE=; b=fWXUaCAPZf6pC7wxnBdnYxAWTf/NqP5CugP5gJueg30NLZOKWZ6s37gQr6Nj+0Fiz6 nuskonx52ZN35cFEGceyU8jOXUSEagg5NhiKJIeoSbloAuAeJAjXSWAqZH6wpsPmrzaM azY0WbdXp3UjNb1YXqaEwAWYPtEPohf5+J4x9tuIU04xjAt/CfFAzY80Eq8L51SBZBK2 z4tOn2u2zU8eNT0oQWfMjsMeNsSPAtaO3mtFBf/+jFJ8twmvd5kRdbA0Aq4F/lhPAflj ZWtYjozgmtES0r8Equ1f/frshZyDRLp2/SBqATM4nardToSgxbVUb0rAubFBcrbSi8w+ ZcmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=kAGE9+IB; dkim=pass header.i=@codeaurora.org header.s=default header.b=U+m5KHbs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12-v6si22331378plo.442.2018.05.24.17.11.26; Thu, 24 May 2018 17:11:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=kAGE9+IB; dkim=pass header.i=@codeaurora.org header.s=default header.b=U+m5KHbs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970156AbeEXN5t (ORCPT + 99 others); Thu, 24 May 2018 09:57:49 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37870 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970146AbeEXN5n (ORCPT ); Thu, 24 May 2018 09:57:43 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F2343602BC; Thu, 24 May 2018 13:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527170263; bh=TZa9Uvmw/9Apkspm3FSQtCq8qPKy5+dTOljIewK0HNU=; h=From:To:Cc:Subject:Date:From; b=kAGE9+IBFtzqiIIoUaFW79wLKEjG+nokvw20lZc754R4E4yDbQM7oQ2l0kXfCIK6L Kn+oWjh031+fPpoJBoVpfVN3tdCFtHxuQi8KRhWanhpFmnDoqtN5ouXbcjB+Zk2b1m fVDtyKe+6ekqY8NNSTCrgwATjUO4QvCgDQcSCNjI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from cpandya-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8F090602BC; Thu, 24 May 2018 13:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527170262; bh=TZa9Uvmw/9Apkspm3FSQtCq8qPKy5+dTOljIewK0HNU=; h=From:To:Cc:Subject:Date:From; b=U+m5KHbs4wKvCuEd0/Ff7UDgygNOdVbVn6NYnYtfDzJ6M7ln0ozZ3MPibDMo9+Vqa aWi/26qvzFnUJQ9w2th+vs5Ga/sEhd0pF1lpIqDpADaD8ZNpqP0a9hD5R6iQ4EBVnn x0g4afMH7csHqSSiDLLYRrAoe6BKjeHocS0FLkSY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8F090602BC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org From: Chintan Pandya To: will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, labbott@redhat.com, akpm@linux-foundation.org Cc: toshi.kani@hpe.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chintan Pandya Subject: [PATCH v10 0/4] Fix issues with huge mapping in ioremap for ARM64 Date: Thu, 24 May 2018 19:27:26 +0530 Message-Id: <1527170250-5291-1-git-send-email-cpandya@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series of patches re-bring huge vmap back for arm64. Patch 1/4 has been taken by Toshi in his series of patches by name "[PATCH v3 0/3] fix free pmd/pte page handlings on x86" to avoid merge conflict with this series. Patch 4/4 may conflict with Laura's patch "[PATCHv2] arm64: Make sure permission updates happen for pmd/pud". It looks to me that, problem addressed by this patch will also get resolved by below series of patches. There could be multiple ways to resolve this. I would let maintainer suggest the best approach, and I will do the needful. This patches are tested on 4.16 kernel with Cortex-A75 based SoC. The test used for verifying these patches is a stress test on ioremap/unmap which tries to re-use same io-address but changes size of mapping randomly i.e. 4K to 2M to 16K etc. The same test used to reproduce 3rd level translation fault without these fixes (and also of course with Revert "arm64: Enforce BBM for huge IO/VMAP mappings" being part of the tree). These patches can also go into '-stable' branch (if accepted) for 4.6 onwards. From V9->V10: - Updated commit log for patch 1/4 by Toshi - Addressed review comments by Will on patch 3/4 From V8->V9: - Used __TLBI_VADDR macros in new TLB flush API From V7->V8: - Properly fixed compilation issue in x86 file From V6->V7: - Fixed compilation issue in x86 case - V6 patches were not properly enumarated From V5->V6: - Use __flush_tlb_kernel_pgtable() for both PUD and PMD. Remove "bool tlb_inv" based variance as it is not need now - Re-naming for consistency From V4->V5: - Add new API __flush_tlb_kernel_pgtable(unsigned long addr) for kernel addresses From V3->V4: - Add header for 'addr' in x86 implementation - Re-order pmd/pud clear and table free - Avoid redundant TLB invalidatation in one perticular case From V2->V3: - Use the exisiting page table free interface to do arm64 specific things From V1->V2: - Rebased my patches on top of "[PATCH v2 1/2] mm/vmalloc: Add interfaces to free unmapped page table" - Honored BBM for ARM64 Chintan Pandya (4): ioremap: Update pgtable free interfaces with addr arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable arm64: Implement page table free interfaces Revert "arm64: Enforce BBM for huge IO/VMAP mappings" arch/arm64/include/asm/tlbflush.h | 7 +++++++ arch/arm64/mm/mmu.c | 42 ++++++++++++++++++++++++++++----------- arch/x86/mm/pgtable.c | 8 +++++--- include/asm-generic/pgtable.h | 8 ++++---- lib/ioremap.c | 4 ++-- 5 files changed, 48 insertions(+), 21 deletions(-) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project