From patchwork Wed Feb 27 17:05:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10831947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 229C015AC for ; Wed, 27 Feb 2019 17:07:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B59F2E305 for ; Wed, 27 Feb 2019 17:07:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F23062E31F; Wed, 27 Feb 2019 17:07:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 619182E305 for ; Wed, 27 Feb 2019 17:07:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC8B08E0013; Wed, 27 Feb 2019 12:07:28 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D4F048E0001; Wed, 27 Feb 2019 12:07:28 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C404C8E0013; Wed, 27 Feb 2019 12:07:28 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by kanga.kvack.org (Postfix) with ESMTP id 663ED8E0001 for ; Wed, 27 Feb 2019 12:07:28 -0500 (EST) Received: by mail-ed1-f71.google.com with SMTP id j5so7174273edt.17 for ; Wed, 27 Feb 2019 09:07:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cpDv3mBvbD8hNAclYHZlrnWhwlRtUYmq/kJWE5bqZAU=; b=lzTvF9xqZHFg1zRAIRkMPxun0kNFQN9y+9FdVwPCv+TOLaugLg4cue9z4svU0FgYtj Iiud3+PRxxAOI76cFISyKUjdMbd1EYfUAID8GsYpgg112vzv6olH+pDw+w1KCw03d5Al H5mGR/xfSSjQMExvTXzOtvKiwHQxYz07CobdIbl0o5hViQ9NVcT2KmPhOdsDqtg/d4k5 8zqJCqxS6OheinnyZPEdkQVrOEoOxaOxjNNd70+vUiC0mRM8YT0oaW1488+lcv+oPd0n Nnw+wyXGOkQcym/4BH1VlYl2iF2hr6ezvTn/iQXst5tybUqnRCFFBWlWfKxCZVhYjdFf toKw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com X-Gm-Message-State: AHQUAuYh0loDrxwnTokBQEAaqM/dg8umgJkU14ykdBliPvQNALZkOuvx +KfvVgjjZTo3QveKAZ5higCwRvGkBLvTce8tFztQu9rjWzCUDsUOrlTkbGmbftXuzdRh3NxG2IX zRcAqLAks3xqChS+KdGtkKl/O8XMuhtO4YRUarGxSu5xDGsNutQEFpWIjpT6ECtUSCg== X-Received: by 2002:a50:87dc:: with SMTP id 28mr3116923edz.168.1551287247918; Wed, 27 Feb 2019 09:07:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IbsrV5f/Puav7WGgkksBLsniEWetIgIebu5OlDmCAIO6ZMMGL/tTA9Fxa4Nr1dBiG7ZObqp X-Received: by 2002:a50:87dc:: with SMTP id 28mr3116833edz.168.1551287246455; Wed, 27 Feb 2019 09:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287246; cv=none; d=google.com; s=arc-20160816; b=y/wG0xcwN/BVEPRrBzR+j1ADBCOk3Z/YZf0VAffD6uwnDoOxxqlhTZwEfiYao2bmzw g+ofsBZHk4PrHx7k2SE6l4yPqtUKhLGXgghAmGz4cVRyp0cetB8YgVVDCQXdeKyqBFaW 0S5ZvT8nry6BAE4R2ij+zFBhCJHS0ye4awG6/lBruQTpAdTu78wg8iEUgMgSsb2mBGiW zKdC49xxY23cW8HZ4wlOW30PjyVZxxToiz8aUx0RM2Y4p3fn1oLznLAnrhP+cAZzE6s+ jZyjGWJgtmjW6pUkU5lT8rFcecvrr4cwuarkcOuWGjell99Px/+dc8WWbvn75vYMpmxm +F2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=cpDv3mBvbD8hNAclYHZlrnWhwlRtUYmq/kJWE5bqZAU=; b=XefyUf0I1ptzBG+SeH18rilJEwFvmvYbb+vD0Vr4b1pQVVLHBBsH6/d5v3g1MurbWT oQQu6GAtpZb89Vpb79xlZDdyvHNeHzOe7znLK7qZfvpQaEdX5F42oWMl1laCzQQyK4F4 IdK1cgju46Y3tV7gSMbDNa/na2SY13OlKP3vjAI4unvBft2XC73Kw/raLohEFT2Nz7M1 py8y8mmJjezGWnpD7keqOgGUrw2C3NysT4KsF72Fdni0Fnq8rsD5Am+LaG9PxyQdZGyB kM23/2js2OSPQzdeYiuPPC2+jvpUhGIoAKX47wvmnKEl4MMKd7DHSddIJ4T71ws8fS1G DLSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id n21si2345155eja.150.2019.02.27.09.07.26 for ; Wed, 27 Feb 2019 09:07:26 -0800 (PST) Received-SPF: pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com 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 8FFCD1688; Wed, 27 Feb 2019 09:07:25 -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 DEAE63F738; Wed, 27 Feb 2019 09:07:21 -0800 (PST) From: Steven Price To: linux-mm@kvack.org Cc: Steven Price , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org Subject: [PATCH v3 15/34] parisc: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:49 +0000 Message-Id: <20190227170608.27963-16-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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 parisc, we don't support large pages, so add stubs returning 0. CC: "James E.J. Bottomley" CC: Helge Deller CC: linux-parisc@vger.kernel.org Signed-off-by: Steven Price Acked-by: Helge Deller # parisc --- arch/parisc/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index c7bb74e22436..1f38c85a9530 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -302,6 +302,7 @@ extern unsigned long *empty_zero_page; #endif #define pmd_bad(x) (!(pmd_flag(x) & PxD_FLAG_VALID)) #define pmd_present(x) (pmd_flag(x) & PxD_FLAG_PRESENT) +#define pmd_large(x) (0) static inline void pmd_clear(pmd_t *pmd) { #if CONFIG_PGTABLE_LEVELS == 3 if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) @@ -324,6 +325,7 @@ static inline void pmd_clear(pmd_t *pmd) { #define pgd_none(x) (!pgd_val(x)) #define pgd_bad(x) (!(pgd_flag(x) & PxD_FLAG_VALID)) #define pgd_present(x) (pgd_flag(x) & PxD_FLAG_PRESENT) +#define pgd_large(x) (0) static inline void pgd_clear(pgd_t *pgd) { #if CONFIG_PGTABLE_LEVELS == 3 if(pgd_flag(*pgd) & PxD_FLAG_ATTACHED) @@ -342,6 +344,7 @@ static inline void pgd_clear(pgd_t *pgd) { static inline int pgd_none(pgd_t pgd) { return 0; } static inline int pgd_bad(pgd_t pgd) { return 0; } static inline int pgd_present(pgd_t pgd) { return 1; } +static inline int pgd_large(pgd_t pgd) { return 0; } static inline void pgd_clear(pgd_t * pgdp) { } #endif