Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp457767imm; Wed, 6 Jun 2018 00:02:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKnbsI/I9ktJJHjULsoCJ9ePTBY0nPaMTkjjwYNo84WmuY3jitjYo5JXE4buyEsLW/Mh1yK X-Received: by 2002:a62:a30e:: with SMTP id s14-v6mr1298700pfe.168.1528268541828; Wed, 06 Jun 2018 00:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528268541; cv=none; d=google.com; s=arc-20160816; b=gmyn0ehgszMVfhdm/Aw5DpcaFkIUxookpYn3SMiNSKAGC0e4WJ8y0qe4BklXweVhg7 bB2VDHR3cC/VY8Ju/uQit/eOVyPv7v4fbfCltNdAbNeJsJPpoIKt8t24HhzEprZBfN8A 1AZMMQqpoXEmXxsCeVwSESriBC+ntNI/+H7+9S5BCDgMt2o0uPIHZCLWUEvafKFBf/yZ E2ifL6+LHx2FMcsDB99ecQ8UApr5TYMvRoX693YVZbogCHgGrr/5ULgRprwFNMaSdTEG TnSfWH2qciSObtgCeQFLSLhny8Uvh852zSGXKfIVsjwzlc3Z6Zz3ivcq1hw9ZTT2rboe qMgw== 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=8QcAxincePfZw9zePZXLXs6cLmDM7u7rAOqlvqXdMWE=; b=nTPkQ84DkKW8F4v4XML8W7n0Z6HVsJM7Q7ko0HlUDBvLdfLZDxqdC8Le0Rme8RtLg0 neeHMAYCF49cxQ9uhgjksGlr8Bf7fPs2krn8N0OQ1RkLzcEHdyImWE79ZrnSVPNqpOja GR7MoqR3RK9PoJMVrqS+pmJuCoFZEKrqjtJB+ajWQy1XarjAtyN8YP+ZpWFBoLoqoQHi CjNjd6f5fEfKR2q7zH4yr9WJVOjXlqtZJaw4EbVg/4WOcn5pQ/nEddd75e0HZVKoDxEz 1zJK+vYwxPKChxiMumWPwx+FBqhtocSY0dKI9UTzovBkvzbithJjBZFRvOcsSTq/qlwv Mzhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=RD5wN7oG; dkim=pass header.i=@codeaurora.org header.s=default header.b=COFvXnXk; 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 n1-v6si12807744pge.263.2018.06.06.00.02.07; Wed, 06 Jun 2018 00:02: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=RD5wN7oG; dkim=pass header.i=@codeaurora.org header.s=default header.b=COFvXnXk; 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 S932197AbeFFHBe (ORCPT + 99 others); Wed, 6 Jun 2018 03:01:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55584 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932113AbeFFHBd (ORCPT ); Wed, 6 Jun 2018 03:01:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0BDAC607F1; Wed, 6 Jun 2018 07:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528268493; bh=62fniWJDHl+kSS8BSQNbjbTBCK0j4w7HxmVpGnENcSI=; h=From:To:Cc:Subject:Date:From; b=RD5wN7oG9CA+IfKy6/IIViBDfmlcT+V3Hh92Ked2dqYVnmfzsEFDy/Gr4Or0Oslrc BhMAMK0WeK7ab3T+RfMVKMc2moh9yLp5InxlVaEF/mxNA+GlBzeEy6a2Zu4A6VeO1d ekLYMLftCJ1tZRssiNqmqNu4AerJq8yd5G4FEN2c= 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 DFC7960263; Wed, 6 Jun 2018 07:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528268492; bh=62fniWJDHl+kSS8BSQNbjbTBCK0j4w7HxmVpGnENcSI=; h=From:To:Cc:Subject:Date:From; b=COFvXnXk6BearOGhE+dKMqlHTVjHa281m9XLxrOSrsyWwlUBFsw6qnLtksfj1ebGu fVr6NHt6iLG/ZO08tOolZwmXcXZqIXvplCqIcJ/VhNXSvG1V4rdWbPoJK5OXfB3ygY qR35iSrnHzaWFmMX5wRI2LI3quNi/TPE2I73AFV8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DFC7960263 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 v13 0/3] Fix issues with huge mapping in ioremap for ARM64 Date: Wed, 6 Jun 2018 12:31:18 +0530 Message-Id: <1528268481-19299-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/3 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 V12->V13: - Dropped v12 3/5 and v12 5/5 - Using existing APIs like pte_offset_kernel and pmd_offset instead of pmd_page_vaddr & pud_page_vaddr - Updated commit log message for 3/3 - Some other cosmetic corrections in 3/3 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 (3): ioremap: Update pgtable free interfaces with addr arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable arm64: Implement page table free interfaces arch/arm64/include/asm/tlbflush.h | 7 ++++++ arch/arm64/mm/mmu.c | 48 +++++++++++++++++++++++++++++++++++---- arch/x86/mm/pgtable.c | 8 ++++--- include/asm-generic/pgtable.h | 8 +++---- lib/ioremap.c | 4 ++-- 5 files changed, 62 insertions(+), 13 deletions(-) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project