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: 8003311 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C712B9F32E for ; Mon, 11 Jan 2016 13:21:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0BB0202E9 for ; Mon, 11 Jan 2016 13:21:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 225DA200FE for ; Mon, 11 Jan 2016 13:21:57 +0000 (UTC) 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-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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 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 Reviewed-by: Mark Rutland --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) 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