Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp544224imm; Fri, 1 Jun 2018 05:40:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKInRIJ/D12Y5Pjg7lzx1D2ZP1BIvqdQlXonYrki4gRjC7br0KT1gVMZfpKIC0Vh1D5gZSJA X-Received: by 2002:a63:7d08:: with SMTP id y8-v6mr4077855pgc.417.1527856821153; Fri, 01 Jun 2018 05:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527856821; cv=none; d=google.com; s=arc-20160816; b=BgvG701G8hSUNfitNbDSurjpVmgpuYwc5etYJSoT7pvSY8QTKRX3ziqkC7yZLtFAP1 eZPmuH378nIimev0o9Q3qfvNTEpUrf+nBb+6cPx8jwUrNvj3WiCfyRuoiuLXytVhywJu jfAVg1hnzQdMY784JlMwiHBDHx4L71zpFXB9bIOOH5+juUCEPXdMBz0aLIHKwJwK8wF0 PuYpq/yNQk9xJwJ+B+H+SOnoGqR4/37n97ULGz1ddISJv0FS5xHwqvA5vbjc+w4Xef4u TRkY/K6c+bcJ3+9/WSHrwkuI9LeHXtVVD25ywth2KOmBTkcCPwWCdahP/d1bGp8dCuCQ 300Q== 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=HZZvuUojky8JMLVulG++oHy0/Pfrfxop6SMFfx/lUtc=; b=ZiNpHy+BQZLfATuQKfmK5iGlaGB3wwxqTAowSS3ldA+lidENlPnpqwKHj2g/aVmdU1 Xhf9uhj5o9YvFp3KvM1Y0gUxdZSCf3RYzgD7R6KdoowTWWxhI1Vc9YNm3haBz4OdQxoo tfcHEVZE2D8hE0LEU5YOf+a0hEFvI54YvhxTCWKxmEhAe89zyM8uRNtvVANxhXgM8kBI SCF9DLRZ1vg/MyVKW2kd7rz2pHvKHb+WLxLyQmSWxKQ6YNLU9IprvEqhD+esgEzpMYf7 tk2APTKXeSVoQTpd/GtxA7yqXTK904v+51HC/46L6GpENrxv+rPixPmjz6+ZrbW/7tZ5 r5jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=MPevE7ff; dkim=pass header.i=@codeaurora.org header.s=default header.b=RQLihv0p; 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 f66-v6si31326916pgc.391.2018.06.01.05.40.06; Fri, 01 Jun 2018 05:40:21 -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=MPevE7ff; dkim=pass header.i=@codeaurora.org header.s=default header.b=RQLihv0p; 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 S1751942AbeFAMjf (ORCPT + 99 others); Fri, 1 Jun 2018 08:39:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49800 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbeFAMjb (ORCPT ); Fri, 1 Jun 2018 08:39:31 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 65B56606DD; Fri, 1 Jun 2018 12:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856771; bh=IltNItNWkeeIw5BdYrBnS5rtZWqCFTkwIclRLquvUF8=; h=From:To:Cc:Subject:Date:From; b=MPevE7ff+Lr/XS3UQ5Z5A8RyeoX/WGN2xpaflrd5b9Wri4GOtWLLtXGOQeJAMSDuM wJ0JxAd02N81jJ+kGutt9tq+iBIpcqF7YEUwCfUSdjmOcdZ/xe/MFmQxnkgq8Ug7cp ewXTZoWUCPqZjxjr9CmrjUqaeINXdqEgpuWJdt/k= 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 9169660249; Fri, 1 Jun 2018 12:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856770; bh=IltNItNWkeeIw5BdYrBnS5rtZWqCFTkwIclRLquvUF8=; h=From:To:Cc:Subject:Date:From; b=RQLihv0pKT44CZazimFETnbRCTQQx7n+2NSdgarBDDLR3EDqJiJ32qpz3jFTJRz/e 3i4ihJiia+UZ9j3oaEzj+8k8LUWjitwEu4KieBYmM9fzIojw3RXCftLIoHwWWOTuVb QYRp9lKF2ZwHkEKYtXfC8xmmgYeTC2SC8+rU3hbo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9169660249 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, akpm@linux-foundation.org Cc: toshi.kani@hpe.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chintan Pandya Subject: [PATCH v12 0/5] Fix issues with huge mapping in ioremap for ARM64 Date: Fri, 1 Jun 2018 18:09:13 +0530 Message-Id: <1527856758-27169-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. These 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 1G 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 V11->V12: - Introduced p*d_page_vaddr helper macros and using them - Rebased over current tip From V10->V11: - Updated pud_free_pmd_page & pmd_free_pte_page to use consistent conding style - Fixed few bugs by using pmd_page_paddr & pud_page_paddr 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 (5): ioremap: Update pgtable free interfaces with addr arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable arm64: pgtable: Add p*d_page_vaddr helper macros arm64: Implement page table free interfaces arm64: Re-enable huge io mappings arch/arm64/include/asm/pgtable.h | 3 +++ arch/arm64/include/asm/tlbflush.h | 7 +++++ arch/arm64/mm/mmu.c | 56 +++++++++++++++++++++++++-------------- arch/x86/mm/pgtable.c | 8 +++--- include/asm-generic/pgtable.h | 8 +++--- lib/ioremap.c | 4 +-- 6 files changed, 57 insertions(+), 29 deletions(-) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project