From patchwork Tue Nov 19 17:35:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 21630 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B5BCA23A4E for ; Tue, 19 Nov 2013 17:35:48 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id vb8sf10734403obc.1 for ; Tue, 19 Nov 2013 09:35:48 -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=fszx+SACoH3E9cEPTTe5wwI7R0et5f/76raVBtnYZow=; b=mJVcmX68iAEVMSioYbIxUNJeVzxF6rGu9Pi7kU6Lzd7zgqHIj7Y1kPwiX7PCpRcX6Q aF7S6G8YpqYJ3BFknj7faHrmM6w4wbS5GjGuZL6+IJM5PR0KKUFnRUualwtybLGUhYSt qn3EkwQqt45NFzpGhwnPsHwzqGjxAUrhEUxcFVlkXAsTwqikPn5DXGpdDQzrBjP28ddp XCPS5LF9TYx1YWTZ9RrrdLdaHyuS+87GJ1CgR5aBgn7C0drTRE/7yGmWV429TKtQrfy4 cDHbHtRNeo8B8wHW5fOzSYMfrLJh16qTJCuTFLN2AglfVAphxuhg2nSKU0QfJdt+M5Da 6gtw== X-Gm-Message-State: ALoCoQkd4kkwtRcwNNF3sR6pKBmsCPtE/g++eg2+c2diZ5fF4YHQpXPgaKLwQgRsgUJQSohoY55J X-Received: by 10.182.74.226 with SMTP id x2mr2715019obv.1.1384882548076; Tue, 19 Nov 2013 09:35:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.162 with SMTP id on2ls689786qeb.73.gmail; Tue, 19 Nov 2013 09:35:48 -0800 (PST) X-Received: by 10.220.196.66 with SMTP id ef2mr22441864vcb.7.1384882547993; Tue, 19 Nov 2013 09:35:47 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id dl10si8259168veb.95.2013.11.19.09.35.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:35:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id ld13so2665170vcb.34 for ; Tue, 19 Nov 2013 09:35:47 -0800 (PST) X-Received: by 10.220.64.69 with SMTP id d5mr22348138vci.11.1384882547647; Tue, 19 Nov 2013 09:35:47 -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 u4csp295031vcz; Tue, 19 Nov 2013 09:35:47 -0800 (PST) X-Received: by 10.180.107.168 with SMTP id hd8mr249240wib.32.1384882546842; Tue, 19 Nov 2013 09:35:46 -0800 (PST) Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx.google.com with ESMTPS id p13si1161223wie.81.2013.11.19.09.35.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:35:46 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.52 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=74.125.82.52; Received: by mail-wg0-f52.google.com with SMTP id z12so7975899wgg.31 for ; Tue, 19 Nov 2013 09:35:46 -0800 (PST) X-Received: by 10.194.185.73 with SMTP id fa9mr22146252wjc.29.1384882546433; Tue, 19 Nov 2013 09:35:46 -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.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 09:35:45 -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 2/3] ARM: mm: Make LPAE huge page ptes NG by default Date: Tue, 19 Nov 2013 17:35:28 +0000 Message-Id: <1384882529-28104-3-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.175 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: , We now don't set the NG bit as we write the huge page entry, so set it on huge page entry creation. This simplifies code, and obviates the need for us to override pte_same. Signed-off-by: Steve Capper --- arch/arm/include/asm/pgtable-3level.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 5689c18..d1318e1 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -199,7 +199,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) #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)) -#define pte_mkhuge(pte) (__pte(pte_val(pte) & ~PTE_TABLE_BIT)) +#define pte_mkhuge(pte) (__pte((pte_val(pte) & ~PTE_TABLE_BIT) | PTE_EXT_NG)) #define pmd_young(pmd) (pmd_val(pmd) & PMD_SECT_AF)