From patchwork Wed Feb 27 17:05:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 1049026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mYoqBr1+"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 448j104JtPz9s21 for ; Thu, 28 Feb 2019 04:12:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n5E3FPlaX/8MzM5TrMIAO+eaPl/OLS58Am5qZIivEZM=; b=mYoqBr1+STI4Ba 1M/S/VxDZb3sw88y0xpDHlc0+h/W+N5l9TK8yvfQo/xuxq7l6t9wTgM29OlDbNfEOCe3XdIkRq1zV AoZ7nqx6awKGk6rPqpr6BH5esT3J5y5/gh7OkXlNCA+tb2ONx5N1akDIRuTncFUUcyB6ncy0gZpTH HM5jWFSETJO0NVARrzg0BRAka1OylA6F4HaF1zUpu7DfgwtmcXY0sNhvD/bQ+Una/CwVDxUfxTbW+ eLR3cCkwtnhT5oX0UWI1sSWcqhM7NXmkLO/EoSDRc9rcnTZQ2AmWLV6LdfkzGkOsgM/cHIwvsx9eq Ffj4kTwk/x9i0zN1ki9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz2kz-0006wM-Md; Wed, 27 Feb 2019 17:12:33 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz2gP-0008V8-Ii; Wed, 27 Feb 2019 17:07:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 810B91684; Wed, 27 Feb 2019 09:07:49 -0800 (PST) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ABB0C3F738; Wed, 27 Feb 2019 09:07:45 -0800 (PST) From: Steven Price To: linux-mm@kvack.org Subject: [PATCH v3 21/34] um: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:55 +0000 Message-Id: <20190227170608.27963-22-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190227170608.27963-1-steven.price@arm.com> References: <20190227170608.27963-1-steven.price@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190227_090749_850965_5455D429 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Zijlstra , Catalin Marinas , Dave Hansen , Will Deacon , "H. Peter Anvin" , Anton Ivanov , Richard Weinberger , x86@kernel.org, Steven Price , Ingo Molnar , "Liang, Kan" , Arnd Bergmann , Jeff Dike , linux-um@lists.infradead.org, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_large() functions/macros. For um, we don't support large pages, so add stubs returning 0. CC: Jeff Dike CC: Richard Weinberger CC: Anton Ivanov CC: linux-um@lists.infradead.org Signed-off-by: Steven Price --- arch/um/include/asm/pgtable-3level.h | 1 + arch/um/include/asm/pgtable.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h index c4d876dfb9ac..2abf9aa5808e 100644 --- a/arch/um/include/asm/pgtable-3level.h +++ b/arch/um/include/asm/pgtable-3level.h @@ -57,6 +57,7 @@ #define pud_none(x) (!(pud_val(x) & ~_PAGE_NEWPAGE)) #define pud_bad(x) ((pud_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) #define pud_present(x) (pud_val(x) & _PAGE_PRESENT) +#define pud_large(x) (0) #define pud_populate(mm, pud, pmd) \ set_pud(pud, __pud(_PAGE_TABLE + __pa(pmd))) diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 9c04562310b3..d5fa4e118dcc 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h @@ -100,6 +100,7 @@ extern unsigned long end_iomem; #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) +#define pmd_large(x) (0) #define pmd_clear(xp) do { pmd_val(*(xp)) = _PAGE_NEWPAGE; } while (0) #define pmd_newpage(x) (pmd_val(x) & _PAGE_NEWPAGE)