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: 3203431 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 5A6C19F243 for ; Tue, 19 Nov 2013 17:38:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 440B620398 for ; Tue, 19 Nov 2013 17:38:05 +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 0C1A82030E for ; Tue, 19 Nov 2013 17:38:04 +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 1VipEL-0005u9-4a; Tue, 19 Nov 2013 17:36:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VipE1-0005fB-Rn; Tue, 19 Nov 2013 17:36:33 +0000 Received: from mail-we0-f182.google.com ([74.125.82.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VipDe-0005b4-Q0 for linux-arm-kernel@lists.infradead.org; Tue, 19 Nov 2013 17:36:12 +0000 Received: by mail-we0-f182.google.com with SMTP id q59so6110045wes.27 for ; Tue, 19 Nov 2013 09:35:46 -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=fszx+SACoH3E9cEPTTe5wwI7R0et5f/76raVBtnYZow=; b=FuI+U3/11js8qkJ5zgf1mnT7rHV74YfrWsh4mtOQJAea9fCKe4nunf52FuRBsdH8D6 2vwOf/KBSzZ3PVeAx0VZ8tvmZbWbcc/7ThOpNFEPAHqrvb/8Yu96SLXMALZCJ230oFoS NwV9q0e3fgvYD0tpVtl+bBSFookxHFrfEiygzDmD7gwIooDrOzQkdCgcXAqO7GFJIoc0 3wqxbs4g3RlqB9fGaWgV8rGUMTUEjCbM9RfY4cfxve+K6c418n6UDzWN9FzSK0hIOaPO heI+oWX6KnJmM+pnKp8otZzlBON1Blwb4t9pM/OXxW02abAbgU3DMX50lbqvoAh2LUiN 25CA== X-Gm-Message-State: ALoCoQneB3xj6eN1DnspowpMv4u95TQt4ikEUhd90RGsVty2nodjtumaJz6K0pSIUsq6fE1+mTZQ 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131119_123611_050654_017014F7 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. 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 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)