From patchwork Mon Jan 11 13:18:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 59479 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2105300lbb; Mon, 11 Jan 2016 05:21:35 -0800 (PST) X-Received: by 10.66.102.106 with SMTP id fn10mr114636059pab.60.1452518495166; Mon, 11 Jan 2016 05:21:35 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id o5si28567883pfa.151.2016.01.11.05.21.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2016 05:21:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aIcOY-00040M-MD; Mon, 11 Jan 2016 13:20:26 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aIcO9-0002in-Du for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2016 13:20:02 +0000 Received: by mail-wm0-x232.google.com with SMTP id f206so211182031wmf.0 for ; Mon, 11 Jan 2016 05:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KkSesoXQ5PpWrx5+JDBilNUoye+DMXx2v28qSjwFFTQ=; b=cystsjBQd+fnZflg8vjNzzVNH+/Jm6P6JCo7sE/BVYYYBgzadmftnOITviL/rhSAzQ gVG/JE8oaG+K9PoLVTJjhtX+TxjtKKxP2oniC9BufCPeiW+MhEW+7V6ohJpsrCXO0vaW OGw16YDcILJJywJ5l6XibFRBgJ5xRWEVd/Eoo= 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=KkSesoXQ5PpWrx5+JDBilNUoye+DMXx2v28qSjwFFTQ=; b=ElnTLLSU3OV3cBZvrAkb305qbvWl4zh6+xAJ42gN5LtiwsWxkLuVg/WWThLPtHmCS3 +U6yzsQSAVEV/+4/Z1jGWq9TreBKTL7fTrkgK4L8+zhtW+BgwPSxeMfDTeChWysdkepW sVj+NPzlX9UVF7DaghRbIRLFxHSBKJblIIgK+eC4QpLOEGcRSp7W2Hz0lZl0Jjn0WNlz 28+d5y7L2L3QqlzqMufUHxQRw0NUMdpi0PrKoxvltnEHbWteDLvw79kDyYDKKDxQlZwM tC/PbKwy3ilSv+vx3Ytk8MzAqkeAytAUVxbRosgw2BLQ8+v8ZxcBn+wIE4JLJBahYrtZ wKjA== X-Gm-Message-State: ALoCoQlCpYtbzV1Uz3tirp5tkJD227gJkkyLICaKm7nksVzLEsQ0AEiQLbHm/SuDV55k1hLi9+pvD/xQWwYc683NETcnDRzzLw== X-Received: by 10.28.46.87 with SMTP id u84mr14483969wmu.102.1452518381833; Mon, 11 Jan 2016 05:19:41 -0800 (PST) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by smtp.gmail.com with ESMTPSA id c15sm12766055wmd.19.2016.01.11.05.19.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 05:19:41 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com, will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, leif.lindholm@linaro.org, keescook@chromium.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions Date: Mon, 11 Jan 2016 14:18:56 +0100 Message-Id: <1452518355-4606-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> References: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160111_052001_725531_974A1A36 X-CRM114-Status: GOOD ( 10.16 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:232 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, Ard Biesheuvel , bhupesh.sharma@freescale.com, stuart.yoder@freescale.com, marc.zyngier@arm.com, christoffer.dall@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Add definitions of pud_index() and pmd_index() for configurations with fewer than 4 resp. 3 translation levels. This makes it easier to keep the users (e.g., the fixmap init code) generic. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index fe9bf47db5d3..6129f6755081 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -495,6 +495,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud) #else #define pud_page_paddr(pud) ({ BUILD_BUG(); 0; }) +#define pmd_index(addr) ({ BUILD_BUG(); 0; }) /* Match pmd_offset folding in */ #define pmd_set_fixmap(addr) NULL @@ -542,6 +543,7 @@ static inline phys_addr_t pgd_page_paddr(pgd_t pgd) #else #define pgd_page_paddr(pgd) ({ BUILD_BUG(); 0;}) +#define pud_index(addr) ({ BUILD_BUG(); 0;}) /* Match pud_offset folding in */ #define pud_set_fixmap(addr) NULL