Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3543378imm; Fri, 25 May 2018 07:30:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrNDc3jQsOIuzdsYiOwPaFIRYAFkSx785nrdTeD9BEfpoknEmrh6KVy3Xiq0D21Iu8Ex7DC X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr2890519plg.206.1527258604663; Fri, 25 May 2018 07:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527258604; cv=none; d=google.com; s=arc-20160816; b=fm5+mdZNbsSB65dPO58B1SUJd6IKqWi0VHOEkoeedrZ3vngPxBpnIaNCyDChFJ9IpJ eK4nTNd/cvWcmfU/wUe3R5dPmXt5TdH0+6wMk95PqQRKTtnFWleKrMM4wXQtfWIIuG4e acj3tyLB2mWEJNx0xOdYmw9LxEeSqXHmM94xAU7Jkq654GDOpn9HoU8K/1GUu1iaDuFD M9RIOI+h3glHIEe3epo5qaeD/P2IbyoQaWDcOBEp3DvhSx8VPAGmN4vOywWSLrxjzeFx UbHSUsObikq4GvhlgnoVoDJKgHJoJ1BOFv+QZ1CnwporZv/nLCxH1CjfAAn/IPqDtdPp AT+A== 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=NHGEz5woYj969bjiZLR0lccAYbSW8Y/bL1T8L0p24V8=; b=UZueu2pFWdvbx1bXoeTiZZjPl23DzrmnSZhY/5YwVNWMMQFRLR6zkvneDT82170/9P xOkk4xI9jT/XzybnYu3jSxhfanYQDvb0oENgJEo6Y5zxoXQ1VwLB6L60CxO9xhNxsmlz DGGB7EMT+w65ba1Gq1Eoceu1q4PUUgyH9zxK34o359LNn092t6oCleVqRhEb0xaRPjx5 PZlYCcpCSr0eZTIHf354+BQTIL+0nV/r8YxkfpmFjuVrBsS6y1oKgtihqko4orbRBZrz bAF/o0oMf/BHAEFmuytD7AGwoJr09RYYoypBXD+z4+TKhp3PX6rKw/yOX596vXZ1kYPZ +fZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=eHWhH2aq; dkim=pass header.i=@codeaurora.org header.s=default header.b=POQ6Ito7; 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 v7-v6si6952867pgn.595.2018.05.25.07.29.49; Fri, 25 May 2018 07:30:04 -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=eHWhH2aq; dkim=pass header.i=@codeaurora.org header.s=default header.b=POQ6Ito7; 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 S936154AbeEYO2Y (ORCPT + 99 others); Fri, 25 May 2018 10:28:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53932 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935826AbeEYO2X (ORCPT ); Fri, 25 May 2018 10:28:23 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8D315605A2; Fri, 25 May 2018 14:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527258502; bh=I8TjLHPExKQS4JT/iKjOjklBwRhwSP5ORNdn/HozSdA=; h=From:To:Cc:Subject:Date:From; b=eHWhH2aqHAUjQU8tfU9e0qDgEycti04M9JdAyWCzE/eTtv7UIGzJtPNFIW4xEzD2E co10jGl8+WmAZyv8T/uEzr6F5tA1XlBDx7mVgFaKnvJIXw1UW74y9TWmwlf92/VBgC aEzob0YkNLXF0706Yni/mS+CaXtzc7P+a7ww5tmk= 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 D2E1260117; Fri, 25 May 2018 14:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527258501; bh=I8TjLHPExKQS4JT/iKjOjklBwRhwSP5ORNdn/HozSdA=; h=From:To:Cc:Subject:Date:From; b=POQ6Ito7NCgMX77HsMloHOsJCngKcSXRzLobddIh94yqcRKTdvHbt2Nd30LrULAfW Qq/5rTgM4MnebJoBZR+sUhn1MvIRntHAx/OH7gM1dLZy+gdyC9pQyoq1sk9t/X7Btw 24HdboUgX/CE8EG+d41T2l6OMkiEFawk1due4BCM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D2E1260117 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 v11 0/4] Fix issues with huge mapping in ioremap for ARM64 Date: Fri, 25 May 2018 19:58:05 +0530 Message-Id: <1527258489-30473-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. 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 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 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 (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 | 46 +++++++++++++++++++++++++++++---------- arch/x86/mm/pgtable.c | 8 ++++--- include/asm-generic/pgtable.h | 8 +++---- lib/ioremap.c | 4 ++-- 5 files changed, 52 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