From patchwork Tue Nov 19 17:35:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 21631 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 715F823A4E for ; Tue, 19 Nov 2013 17:35:51 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at1sf2128340iec.3 for ; Tue, 19 Nov 2013 09:35:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=5ZHCKces0OBFBw34q5vi8LP15pwWmiAvlRQWU8/SWrQ=; b=PQvCxQdfMxscCuquBxuJAope/jSotR8DORxVruvg/kpfzflEo8H+nlH03kGeR06Ukn gt9Zem4+zl0e/dT0gH8/ypY1VBgca4xVg4KZs1b5SSoDjLuWPv7ZEg8QBs35pLDlDPZL wr2EFl7Q2smGu6IZIAUKlcbRyiTmFYI8nP8O0T/K4+1UWz751aMNiu2ooS4eSeKkFJX3 H1RvZVnCGtz6+Jf9jjWQCWnjMmy1k1zNHyDEhEGLr7+D8e34e2sD7e5/tT6Jl32yWvG5 ciDXwT3KH0VDPuzU9X+y8Lt9lVVXqqRS7WOHP+4GdxPfWRDtcGUtzzP6nD/QEiYPQs9m iasQ== X-Gm-Message-State: ALoCoQlF315404QZxTiADgRJt5GeDQlWYMLUPVrQoyx03uCa15EAfn+mKe+aA6jSUm2w/HHpYttX X-Received: by 10.182.138.39 with SMTP id qn7mr10253158obb.37.1384882551098; Tue, 19 Nov 2013 09:35:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.18 with SMTP id d18ls2024281qej.14.gmail; Tue, 19 Nov 2013 09:35:50 -0800 (PST) X-Received: by 10.220.199.5 with SMTP id eq5mr22028911vcb.16.1384882550945; Tue, 19 Nov 2013 09:35:50 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id v5si8285531ves.4.2013.11.19.09.35.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:35:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so5097565vcb.9 for ; Tue, 19 Nov 2013 09:35:50 -0800 (PST) X-Received: by 10.220.86.69 with SMTP id r5mr21976189vcl.9.1384882550873; Tue, 19 Nov 2013 09:35:50 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp295035vcz; Tue, 19 Nov 2013 09:35:50 -0800 (PST) X-Received: by 10.180.182.47 with SMTP id eb15mr21954288wic.51.1384882550035; Tue, 19 Nov 2013 09:35:50 -0800 (PST) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id lq4si8048851wjb.143.2013.11.19.09.35.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:35:50 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=74.125.82.178; Received: by mail-we0-f178.google.com with SMTP id u56so787080wes.9 for ; Tue, 19 Nov 2013 09:35:49 -0800 (PST) X-Received: by 10.180.103.130 with SMTP id fw2mr12416825wib.34.1384882549611; Tue, 19 Nov 2013 09:35:49 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id s2sm7529862wiy.7.2013.11.19.09.35.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 09:35:49 -0800 (PST) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Cc: linux@arm.linux.org.uk, will.deacon@arm.com, catalin.marinas@arm.com, christoffer.dall@linaro.org, patches@linaro.org, Steve Capper Subject: [PATCH 3/3] Revert "ARM: mm: correct pte_same behaviour for LPAE." Date: Tue, 19 Nov 2013 17:35:29 +0000 Message-Id: <1384882529-28104-4-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1384882529-28104-1-git-send-email-steve.capper@linaro.org> References: <1384882529-28104-1-git-send-email-steve.capper@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This reverts commit dde1b65110353517816bcbc58539463396202244. We no longer need to override pte_same for LPAE, as we set the NG bit on huge pte creation. Signed-off-by: Steve Capper --- arch/arm/include/asm/pgtable-3level.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index d1318e1..7f3fa99 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -179,23 +179,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) clean_pmd_entry(pmdp); \ } while (0) -/* - * For 3 levels of paging the PTE_EXT_NG bit will be set for user address ptes - * that are written to a page table but not for ptes created with mk_pte. - * - * In hugetlb_no_page, a new huge pte (new_pte) is generated and passed to - * hugetlb_cow, where it is compared with an entry in a page table. - * This comparison test fails erroneously leading ultimately to a memory leak. - * - * To correct this behaviour, we mask off PTE_EXT_NG for any pte that is - * present before running the comparison. - */ -#define __HAVE_ARCH_PTE_SAME -#define pte_same(pte_a,pte_b) ((pte_present(pte_a) ? pte_val(pte_a) & ~PTE_EXT_NG \ - : pte_val(pte_a)) \ - == (pte_present(pte_b) ? pte_val(pte_b) & ~PTE_EXT_NG \ - : pte_val(pte_b))) - #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext))) #define pte_huge(pte) (pte_val(pte) && !(pte_val(pte) & PTE_TABLE_BIT))