From patchwork Thu Feb 6 14:16:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 3596281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B698EC02DC for ; Thu, 6 Feb 2014 14:17:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0AA92016C for ; Thu, 6 Feb 2014 14:17:02 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB3562010B for ; Thu, 6 Feb 2014 14:17:01 +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 1WBPlA-0008HF-5R; Thu, 06 Feb 2014 14:16:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBPl7-0008VQ-Qg; Thu, 06 Feb 2014 14:16:53 +0000 Received: from mail-wg0-f52.google.com ([74.125.82.52]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBPl5-0008UL-MN for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 14:16:52 +0000 Received: by mail-wg0-f52.google.com with SMTP id b13so1299375wgh.31 for ; Thu, 06 Feb 2014 06:16:25 -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=lB5y9P4C24WMgnW9TNvQ20jzs7VeoHNDSL2BKdzaoXI=; b=Ckzu2QOkGUdtkVOlapSeER0Ca/VayyCD/b4T6X5siiXbDKRxYjaOwJgCSm1O+JfiNR nB2D5J3J9qtruTnwj8KRsCdSAedmLES39xON4s4akqr31CzhT4tGCOJahhm21wm+AOBw bs7r4UQANwFLMA1RvaJFKrIfKpewdDOgi+5BycXG5DmbcX5JL2P1k50uGvvk/vWyc9yV 9AAr9Vimd6LmpjeI+ga13o2SxDOR/5khrIBqEyS7ZtvyYwI1GBpdaJZrnqFScLgM3ssA ebi3q2W4g5bl7o8hJJHQDE3a7EwR623/iGpPZq55zH5Xc8Z4uXJomEIqXpsANqB6/fNv /B/A== X-Gm-Message-State: ALoCoQlMzPVCz9emlpvd2dTsvkca4o+l1bIa03ctP2DXW2ItJClKWWaF7f0m4HSaItkzTe9g0z1m X-Received: by 10.194.185.237 with SMTP id ff13mr1683666wjc.64.1391696185262; Thu, 06 Feb 2014 06:16:25 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id ci4sm2719045wjc.21.2014.02.06.06.16.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2014 06:16:24 -0800 (PST) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] arm64: mm: Correct definition of pmd_mknotpresent Date: Thu, 6 Feb 2014 14:16:11 +0000 Message-Id: <1391696171-8922-4-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391696171-8922-1-git-send-email-steve.capper@linaro.org> References: <1391696171-8922-1-git-send-email-steve.capper@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140206_091651_836642_B142DBC2 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: catalin.marinas@arm.com, will.deacon@arm.com, Steve Capper , linux@arm.linux.org.uk 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 pmd_mknotpresent currently creates a faulting pmd by clearing the valid bit. Unfortunately pmd_present(.) will report such pmds as being present! This patch re-defines pmd_mknotpresent such that __pmd(0) is returned instead. Signed-off-by: Steve Capper --- arch/arm64/include/asm/pgtable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index a5d5832..5d266e4 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -291,8 +291,7 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd) static inline pmd_t pmd_mknotpresent(pmd_t pmd) { - pmd_val(pmd) &= ~PMD_TYPE_MASK; - return pmd; + return __pmd(0); } #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT))