From patchwork Wed Feb 27 17:05:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10831943 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 0A9121390 for ; Wed, 27 Feb 2019 17:07:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7B452E305 for ; Wed, 27 Feb 2019 17:07:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBFC52E31F; Wed, 27 Feb 2019 17:07:22 +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 5F0392E305 for ; Wed, 27 Feb 2019 17:07:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 674558E0011; Wed, 27 Feb 2019 12:07:20 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5D9358E0001; Wed, 27 Feb 2019 12:07:20 -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 4778B8E0011; Wed, 27 Feb 2019 12:07:20 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id E46918E0001 for ; Wed, 27 Feb 2019 12:07:19 -0500 (EST) Received: by mail-ed1-f70.google.com with SMTP id u25so7229048edd.15 for ; Wed, 27 Feb 2019 09:07:19 -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=8hX07yhBmDg+UJCmPXqdceXMzT4L50HzWM5i97rNZtY=; b=PatxfNIrUr+1/tFiS9nbKL91w8mBQuhgot0dqRsvXR5dFWCGtBL8tY4a3LB3szFOYJ Nq7tjbnzpK4GNKXAUFWdEaGg3A9pLmA7xVW4tx05CTycUF0z7SuZ7Pmp7X237RCpz1+W DCSOXgWyvwLNq8q8xKK19vqhsQhjB0dEYr/j+DjQqO6zX9+Au4mat7PWnpL1xjosn5WE kiaDEBUitDLulQVNbP1kTk6YnN4vTjmjveMmIRwKB1WHoaX92b58QdIPMys4djUL5wyL SRxSAHAwrGVEo/BlQoDb/PpOXGMvv7o2Hj299KdSsPcLdHAXANNei84Xktdc9W0pipTF 55qg== 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: AHQUAuZ97LN2jTCQZ3cts0UnWqshwVuByOTg88xGyay3MUcbiJjJqjlZ fvmRVC/PCK30ObYgawkEKP1Ab+Jg966qj5JFXTjXjirEQm4PWCosffUNAEJFzdyG2lkKm/sHB5+ pb4bVX2tfx4sQ2jZA0PFHq1nhAThSNGGuYB6HYSmx50I8tOadbU1TtiennF54/NIeOA== X-Received: by 2002:a50:b574:: with SMTP id z49mr3136984edd.283.1551287239452; Wed, 27 Feb 2019 09:07:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IYK5IADUlSvEffssp5Q0q8t3pLvzl2z17gt5m9FvwW1jvTCA2hmBIREr4x2jejSM6aCqx+P X-Received: by 2002:a50:b574:: with SMTP id z49mr3136926edd.283.1551287238557; Wed, 27 Feb 2019 09:07:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287238; cv=none; d=google.com; s=arc-20160816; b=sjo/+EZ7ewEfNs4G1bQEFHcfKM5H5eeJqiYLBEUQzkvdmyoo49yhUby+SbJ8C4DJAl oXE+vmQ47HRd0oiBHE2xsaLTcdEdtUh/6hk+6SNKaqFuMMtdMXYXFeennB5tHRttY5Ro W+gcEgxgNtRbXDktt8YxLxOTK9CReWAXsIJsZEfGUrR/9T13ZU+vVrBkeyOi4Jn2GWk3 JFw7O7nOc1DxUC/qwhDi1IOBq/KLyOx36BHngXwiz5RHheCjjYwIKWxcnr2LcjfFIrWU lQAtiyNCBY1gzNguqCpcPQk2WC3pqoWbUc1jYka1Ok0tQnBr3J2Mfnb8YRx8OkuDWdJv UEKg== 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=8hX07yhBmDg+UJCmPXqdceXMzT4L50HzWM5i97rNZtY=; b=aIOtqdNyBhbJxb/euwa+BdSr1opjeTjlkE6IpeSuEIKgNapOcnOqjMSHEg/u4FMIcY oDNbwAegxedNL2KKcIqSSbTTgxETRUpTpFPHdAcM5wUgQlUCJn4wJ9/oa89wZEHQ/rRF 37BdbN+9ksAmnBWxd3WyCxjnVl5hqekkdseEWPpt1y50EfUzE/U44e3pqtgZpxX2jKn0 fg7r2mcXU2AHspnWkqqiLM1bFtzDTqbHBib+ac/tWKnZH6XhE9YmnHOfrgyoXUi1F2gk nTkDGDwmTF6W9nw7aNI/QqjiD2ZVGOAO72gVPjAZ6MhRXuzkjvhcspgwEUdJKiVerifO IoLw== 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 h43si2531142edb.278.2019.02.27.09.07.18 for ; Wed, 27 Feb 2019 09:07:18 -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 8AA0B1715; Wed, 27 Feb 2019 09:07:17 -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 0842D3F738; Wed, 27 Feb 2019 09:07:13 -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" , Ley Foon Tan , nios2-dev@lists.rocketboards.org Subject: [PATCH v3 13/34] nios2: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:47 +0000 Message-Id: <20190227170608.27963-14-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 nios2, we don't support large pages, so add a stub returning 0. CC: Ley Foon Tan CC: nios2-dev@lists.rocketboards.org Signed-off-by: Steven Price --- arch/nios2/include/asm/pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index db4f7d179220..b6ee0c205279 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h @@ -190,6 +190,11 @@ static inline int pmd_present(pmd_t pmd) && (pmd_val(pmd) != 0UL); } +static inline int pmd_large(pmd_t pmd) +{ + return 0; +} + static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = (unsigned long) invalid_pte_table;