Received: by 10.192.165.148 with SMTP id m20csp3489727imm; Mon, 30 Apr 2018 00:42:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrkg0Z7CMFCFWdBhF89MKUVwWOp96UPrAertiwfQ1GBIuhkjXQyaOhHr3BUUgNumD9ygvnI X-Received: by 2002:a17:902:9898:: with SMTP id s24-v6mr11457299plp.51.1525074150939; Mon, 30 Apr 2018 00:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525074150; cv=none; d=google.com; s=arc-20160816; b=Uj0x7mUFx4yVeGcVhglnFPWdzHMNg6NqXOIQu7kK1gHi11Je95omTjNQUCpRgR1C2F Vat9Z8MwKfDumdUAyImaDWpWZny76PJpxHGA5S2DNMPmNNJv/l23ysXACBjnuChC7P+t rlrWzgrUfXnlwPOd/e/Z5Q+mAhOTNlQS1my2pmEESJCOJ0L1UT4kQlLjoxTtzpK/uC5+ gaYMADQfY9jRFFTXO5lduFB7HOhgfBWV4dHZxOzaNhDcWdGmUh42VvckfWlriGT6koRQ hEEsCqhxqzSV18ZCchymghvhENFIreIrKYU01oRWbt3agBeiRYNjcpq8mqAnL8KB54jh Lk+g== 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=zC7wYI53Msp17k6C+Oni/3sEJikOTcLB1dOkbARmy6o=; b=o0WyalOKU49qSmTJc7SgzEqHGsAxIoxf+HAHK1zZcqEaARF0fDN9ivrzS4oCiVbylC VmvjBTsmmPIZQaFWArKRiTmzKGBreytcEl/X6vuONkAN5lIyy9T6SqVlF2FgdSBRXi+/ +p6m5cOLxjR/LrwZvAVJDLJ5Lrgl6jsV6T9uXhEd+ToUzTKuEQC8Y8wyqPbquUY3J3QS iCanYpUrO5UQpGlVF8VLG68nLkQUIhXTfAD4Rx+b3I6B39WpoO90aTeaj0jAM6wcwwKg PejdCq3rFCnMiq8I/2bGpGNwdnZ/0B6slQeHhuae0NVhbP9aVSuDQ4jmShIaG8YXo737 41QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WbjzD99z; dkim=pass header.i=@codeaurora.org header.s=default header.b=JN3rJjSn; 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 e1-v6si6912087pld.69.2018.04.30.00.42.17; Mon, 30 Apr 2018 00:42:30 -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=WbjzD99z; dkim=pass header.i=@codeaurora.org header.s=default header.b=JN3rJjSn; 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 S1752611AbeD3Hlz (ORCPT + 99 others); Mon, 30 Apr 2018 03:41:55 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45622 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbeD3Hlx (ORCPT ); Mon, 30 Apr 2018 03:41:53 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 058ED60C54; Mon, 30 Apr 2018 07:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525074113; bh=1HU3k4ody2dLx3CtHMRzwgEtAbDmrXcweBH4EUfgQfE=; h=From:To:Cc:Subject:Date:From; b=WbjzD99zoVZ4q0Sm+Ir2jQurvAIilYYb96PLrg+GwN1pZQdkHLVTy+16/XM/RPrvO ONKHQyyi/ne0lp1BIcODrLlyPcVxjag3X7wyDakIokAtM4SrYk6svWRoZgh+19IV4F E/8yY4uX+VofHV9NGndvhQGfqLvr/wuRH0N1Qrv4= 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 7DEB360271; Mon, 30 Apr 2018 07:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525074111; bh=1HU3k4ody2dLx3CtHMRzwgEtAbDmrXcweBH4EUfgQfE=; h=From:To:Cc:Subject:Date:From; b=JN3rJjSnfQtmpQRqqTatOgVUcx0/F5GXgQh3B85VSkZ0FE37ejWoxKl7/NEEpHFpd 7nrgTFbYfHQN7GuIgSOE1HuHx4huA72LzhwSfpUYS6fWn4/O7spNvP2IYgN8QSpWS9 X2SRrbbO0H6teDhqkqBIUwq9xM7cUTO4eBSc8mTk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7DEB360271 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 , Arnd Bergmann , Mark Rutland , Ard Biesheuvel , Marc Zyngier , Andrew Morton Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Philip Elcan , James Morse , Kristina Martsenko , Toshi Kani , Dave Hansen , Vitaly Kuznetsov , Joerg Roedel , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Chintan Pandya Subject: [PATCH v9 0/4] Fix issues with huge mapping in ioremap for ARM64 Date: Mon, 30 Apr 2018 13:11:30 +0530 Message-Id: <1525074094-25839-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 takes Toshi Kani 's patches ("fix memory leak/panic in ioremap huge pages") as base and re-bring huge_vmap back for arm64. This series of 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 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 | 6 ++++++ arch/arm64/mm/mmu.c | 37 +++++++++++++++++++++++++------------ arch/x86/mm/pgtable.c | 8 +++++--- include/asm-generic/pgtable.h | 8 ++++---- lib/ioremap.c | 4 ++-- 5 files changed, 42 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