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: 3203441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 966489F243 for ; Tue, 19 Nov 2013 17:38:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8552C20398 for ; Tue, 19 Nov 2013 17:38:39 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56CA72030E for ; Tue, 19 Nov 2013 17:38:38 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VipEa-00063E-Ln; Tue, 19 Nov 2013 17:37:09 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VipEC-0005fm-Fs; Tue, 19 Nov 2013 17:36:44 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VipDf-0005b6-Ax for linux-arm-kernel@lists.infradead.org; Tue, 19 Nov 2013 17:36:13 +0000 Received: by mail-wi0-f172.google.com with SMTP id en1so3961245wid.5 for ; Tue, 19 Nov 2013 09:35:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5ZHCKces0OBFBw34q5vi8LP15pwWmiAvlRQWU8/SWrQ=; b=OoNzll/xb19bfsmfIg/g1BhnufllXyyAjnuRqGK09j2GOCsta18/UkH/iMs51D2DKC /+ETP3M3E70G+QGqgVn24w6JMaZg9EdXyTLBz5sMZX+1KSV2Ot0Aed2C610jB87b/wuj LcEm+rBMADiC6DONLiExNvwR5KR0aYqCAF0xlJZu+8uCdV8OJpQpqtm5adCwPYZ00nHb VYgqRI/q/APk8MT3M2AfGUvSXPt4LFjlP36p0u4SyTkCBjWvZSqkK+yd5kvmeJESjuOu yMVpETdtBHVm8VuxC42yZHXqEHzYFdKeXxZqBjmH2LDCjz9TWm74BIOvpNDggWVYWIOl 6Fhg== X-Gm-Message-State: ALoCoQlwv2tFDg2FXioc2HcnvoM9Yq/jhZHPTH4E8C4qt+jsmUkKyZLY2OHu+SYVzaPTh5PgfSZI 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131119_123611_536973_67A0C59C X-CRM114-Status: GOOD ( 11.43 ) X-Spam-Score: -2.6 (--) Cc: Steve Capper , patches@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux@arm.linux.org.uk, christoffer.dall@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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))