From patchwork Thu Feb 6 14:16:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 24259 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8616320143 for ; Thu, 6 Feb 2014 14:18:31 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf4699344yho.0 for ; Thu, 06 Feb 2014 06:18:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=nIHLcIZOUjruMa7wHKa8BAVozRn9v5T8HvL0Q/xMP6s=; b=I+fFWY1NNnRjgIv7I6dVQLCJMgOuK2VXh/0h+jOfmEptzRK5nxuoOgNEHxb9u0GcKT MkTKArbVqFcgBiL6C48NIfqOLVm+zgr8zXhya6M2qzvrDcc5vYZjtpu7GJsxU4bNr024 VE/IuN2efCOiCFOpKbnW/BmDKlLyb2T/XsH7YrqBSsJ1d/wrZErmba7L4L5LvdS3R59o 2EskfvFFlC3LL+VBz0Y8+aDvj3LdrYPO/R+aYarftNT6YigmLWbtpkEHOIYHWLCfGyKe KnUX3NOV/4Z5300CpH2MiQEY4VWbqDT3z/i32o/5fOivTg2srv/R5arOfZFJdiMyiLA9 XwIg== X-Gm-Message-State: ALoCoQmSvrNDVlhe+nYHMpI1aajqph2y9qw3eP1pFOMXnWUtJhfvS4alKqnK8smfDjdbBJc8aSJm X-Received: by 10.224.163.71 with SMTP id z7mr3449369qax.5.1391696310666; Thu, 06 Feb 2014 06:18:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.142 with SMTP id u14ls573682qga.35.gmail; Thu, 06 Feb 2014 06:18:30 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr5938040vcn.21.1391696310442; Thu, 06 Feb 2014 06:18:30 -0800 (PST) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id cy15si281817veb.68.2014.02.06.06.18.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 06:18:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id p6so1433640vbe.6 for ; Thu, 06 Feb 2014 06:18:30 -0800 (PST) X-Received: by 10.58.188.78 with SMTP id fy14mr6048739vec.23.1391696310283; Thu, 06 Feb 2014 06:18:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp16212vcz; Thu, 6 Feb 2014 06:18:29 -0800 (PST) X-Received: by 10.180.7.130 with SMTP id j2mr19265726wia.25.1391696309356; Thu, 06 Feb 2014 06:18:29 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id gi5si626456wjd.171.2014.02.06.06.18.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2014 06:18:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBPlL-0008N8-L5; Thu, 06 Feb 2014 14:17:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBPlH-0008WI-0n; Thu, 06 Feb 2014 14:17:03 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBPl5-0008UK-Hv for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 14:16:52 +0000 Received: by mail-we0-f174.google.com with SMTP id x55so1325898wes.19 for ; Thu, 06 Feb 2014 06:16:22 -0800 (PST) X-Received: by 10.194.21.193 with SMTP id x1mr5903019wje.33.1391696182675; Thu, 06 Feb 2014 06:16:22 -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.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2014 06:16:22 -0800 (PST) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] arm64: mm: Remove PMD_BIT_FUNC macro Date: Thu, 6 Feb 2014 14:16:09 +0000 Message-Id: <1391696171-8922-2-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_684706_E5481B32 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.174 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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+patch=linaro.org@lists.infradead.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.212.47 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Expand out the pmd thp manipulation functions. This makes our life easier when using things like tags and cscope. Signed-off-by: Steve Capper --- arch/arm64/include/asm/pgtable.h | 51 ++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index b524dcd..a3fb1e4 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -247,16 +247,47 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, #define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING) #endif -#define PMD_BIT_FUNC(fn,op) \ -static inline pmd_t pmd_##fn(pmd_t pmd) { pmd_val(pmd) op; return pmd; } - -PMD_BIT_FUNC(wrprotect, |= PMD_SECT_RDONLY); -PMD_BIT_FUNC(mkold, &= ~PMD_SECT_AF); -PMD_BIT_FUNC(mksplitting, |= PMD_SECT_SPLITTING); -PMD_BIT_FUNC(mkwrite, &= ~PMD_SECT_RDONLY); -PMD_BIT_FUNC(mkdirty, |= PMD_SECT_DIRTY); -PMD_BIT_FUNC(mkyoung, |= PMD_SECT_AF); -PMD_BIT_FUNC(mknotpresent, &= ~PMD_TYPE_MASK); +static inline pmd_t pmd_wrprotect(pmd_t pmd) +{ + pmd_val(pmd) |= PMD_SECT_RDONLY; + return pmd; +} + +static inline pmd_t pmd_mkold(pmd_t pmd) +{ + pmd_val(pmd) &= ~PMD_SECT_AF; + return pmd; +} + +static inline pmd_t pmd_mksplitting(pmd_t pmd) +{ + pmd_val(pmd) |= PMD_SECT_SPLITTING; + return pmd; +} + +static inline pmd_t pmd_mkwrite(pmd_t pmd) +{ + pmd_val(pmd) &= ~PMD_SECT_RDONLY; + return pmd; +} + +static inline pmd_t pmd_mkdirty(pmd_t pmd) +{ + pmd_val(pmd) |= PMD_SECT_DIRTY; + return pmd; +} + +static inline pmd_t pmd_mkyoung(pmd_t pmd) +{ + pmd_val(pmd) |= PMD_SECT_AF; + return pmd; +} + +static inline pmd_t pmd_mknotpresent(pmd_t pmd) +{ + pmd_val(pmd) &= ~PMD_TYPE_MASK; + return pmd; +} #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT))