From patchwork Fri Feb 15 17:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10815467 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 1DC601390 for ; Fri, 15 Feb 2019 17:03:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C7D72FC08 for ; Fri, 15 Feb 2019 17:03:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2D442FC2F; Fri, 15 Feb 2019 17:03:20 +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 87DA52FC08 for ; Fri, 15 Feb 2019 17:03:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DF4E8E0006; Fri, 15 Feb 2019 12:03:18 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 88CB58E0001; Fri, 15 Feb 2019 12:03:18 -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 7A44E8E0006; Fri, 15 Feb 2019 12:03:18 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 25AAE8E0001 for ; Fri, 15 Feb 2019 12:03:18 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id x15so4251183edd.2 for ; Fri, 15 Feb 2019 09:03:18 -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=cgmVGKBRQKtEZdJyjA1gIFBtbXN/G8O1rrSlP5LxrbQ=; b=TVKs8Pd0nui+pmydpOMLMV5MWc6HUaxw814MBEuGGb1rdPwd261eCijcNom+86yH3t NEN2TJiWfaggMXSZPi1hqljHM/rENec43BRcwAT4FiJ0XFW9RHN3X032sxMfw+2sCp6R b4ErV2vD4hJr8ROfWvpd8/boeBRelE+9nPAZd/fG+brQZrqN8W32st0GtPSlC7zR6tcZ SU586ezxJ6FUaH8CWtIy0TsDk0KZTPDeK60ec7oe8FkYU6iLxdPPG7NSv609hWjZfZwQ 7PJGgdxZ31AF+z2+DPhcZk9CTYBbFhOdt5mPeQURv/Aj5iep6KxTmspNyXwLKBuC1uwj 8b8w== 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: AHQUAuYGdgAlhojg7AdqUUIjMx0U2TPPEelHXlNJkuD3fBuHAoMo4aB6 TBk4T/O8+/hFH2W5q/mckxRkVwwqEFN1xFc3t14NwAh3UVeK4vAyAsaf+lPLt7v3MlzNh7dd4+x 7METoiA3sBgETJfC+Od6sw7pLt1TemgiyADSY4g3G4STUb3A8onMJeXS8dYBMxbkQmg== X-Received: by 2002:a17:906:a3c3:: with SMTP id ca3mr7345751ejb.25.1550250197649; Fri, 15 Feb 2019 09:03:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IaLag4HHIUgW/LTxlTrWys+if6hbmvRKCsMQCK8hAJXySe3xpHkDtGmiPVrcdn+YYK/qVD0 X-Received: by 2002:a17:906:a3c3:: with SMTP id ca3mr7345681ejb.25.1550250196408; Fri, 15 Feb 2019 09:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550250196; cv=none; d=google.com; s=arc-20160816; b=CjsfsvxQrLzDxo8fXitoXJpIFPsPIwXDiIMO/LeQlvc/Qd2YftWimAvcHbaoVonJAI f+PwQQYJjWUbZUZkjTirF8lwj90Y0XuMRgcQEzuuvSfPTKDhbQ+qjv9vbY4L4wNLQ46X bQMDxCbqN4AEaldiFrUzW9kuLzNaAd8sW4epcOUMNosNOuB3zd1iO+B9R15HghG7OlH7 X+USfystK5jKthhnaTQs42lX1XQLHUXPYHju1G7u434shL9JRg3nA3Z52tdlaTTk+h1T fZTjJxIeNgR8DzkXtbObIv6qxnVPqXfsLfVhtvdjon0wgHDQQh1gy7YgSLL7b49GfJ81 aqhA== 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=cgmVGKBRQKtEZdJyjA1gIFBtbXN/G8O1rrSlP5LxrbQ=; b=eWf011aQJMS3iydDesn0idKd7TQQnCOjvyq+bB24jM3MQmn7B4HViU+WvbEVnPcr1k VuwyISsQ1VJZJc/h6DAjUl7PCWe6fcY8q5LJ9Zlc8Z8HpLltvOHzDepF6CJDNCdt/j5/ TjuC6N35vliRxTZ3c8N0Pb+LZ3M7UXyWDi3FqN8nZx0HAZvUxDCjZV+GIVGaKnR4aBOO fg1DABmUYIYuA08eckO/NSfU60kbjkr+xxtxnHJAZx+mIIG3XHnVFyztZeAL6s4U+Fve HXASyE+D2hP5K+MJ4fKsEzQu3EwFjkU+PeqNDYIHDgX36zDY7f5RPApqz9XcWYudmqXp dJZg== 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 (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id p22si410809ejr.147.2019.02.15.09.03.16 for ; Fri, 15 Feb 2019 09:03:16 -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 71631EBD; Fri, 15 Feb 2019 09:03:15 -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 7D4693F557; Fri, 15 Feb 2019 09:03:12 -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 Subject: [PATCH 03/13] mm: Add generic p?d_large() macros Date: Fri, 15 Feb 2019 17:02:24 +0000 Message-Id: <20190215170235.23360-4-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190215170235.23360-1-steven.price@arm.com> References: <20190215170235.23360-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 From: James Morse Exposing the pud/pgd levels of the page tables to walk_page_range() means we may come across the exotic large mappings that come with large areas of contiguous memory (such as the kernel's linear map). For architectures that don't provide p?d_large() macros, provided a does nothing default. Signed-off-by: James Morse Signed-off-by: Steven Price --- include/asm-generic/pgtable.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 05e61e6c843f..7630d663cd51 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -1186,4 +1186,14 @@ static inline bool arch_has_pfn_modify_check(void) #define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED) #endif +#ifndef pgd_large +#define pgd_large(x) 0 +#endif +#ifndef pud_large +#define pud_large(x) 0 +#endif +#ifndef pmd_large +#define pmd_large(x) 0 +#endif + #endif /* _ASM_GENERIC_PGTABLE_H */