Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2018786img; Wed, 27 Feb 2019 09:07:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IacKGApIl81+PDFzLaBe2a3NdwZ+jZe1bVVDP0DrHdR80ywR/3eh6OHOXZ1dEcQ0iu5lmnV X-Received: by 2002:a17:902:2903:: with SMTP id g3mr3131945plb.222.1551287261194; Wed, 27 Feb 2019 09:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287261; cv=none; d=google.com; s=arc-20160816; b=q80zNB6zexK02p9/MbGJo13L4/Zyca1xUU/NQVRGmx+ajga9fmxVQNzA8KQxc7MHzm qBoAECsUE9gK3Kf3H2WFRNOu0RcKMbgDXWCj6+xxov/+540U5+TcNXX5WSFIktza9MZg SJZVeL1ynZbPVO6dvjBlJpupHicRb4u4t2ipltIAO77cnqpdNO3Ierw01v0xs6OKDWtY MlBjRv56J28nw56ShS96l+xVmCSbMrulLKizvdZTi6vnsjWEnfiy8YckQiuNiCW0VOW4 TZfmKUu7ZqAgfvwbJjSErZbJZhvmLO1V6DdUjIttW8wAyp8xnZuuzoUu0ghJQ1dswjAY lP6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0Y7UWc/BL+I5JF6to7BpP8ad3m37Zc7N8zd7C9Ufk2E=; b=D7N/IKzre9xON4l5sPmF5X/IX1VZcrOhLuj5hT3XTbPdeeMPqVNLj8isL4nx7l8SaQ kHEpDQ4KC6Gjgr5gt5XF46SF95uYB6bc2OdliVTXp4Ie8L/cjBHr1MfSmQAkje2JWI3l y8XQPZB2VePZA7diZYw1P+9ZNZP1qFmt+O7YYNKRDHMK0xA47dV+q2qZLa4YNlO0tRBT Sp7loRPBJbuobPw5HM0JRYKWMhCMsAjRw40c/cJF8ju4UPnE96RIuxSQnabUNl5opvJA zWX6RAsu16OIeWDtTsPd7Sk5dsp3jvMl2D5kihNu2QEmtYC5gcNdbCgCAdU5uRbLsA8i cbig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61si13401091plb.49.2019.02.27.09.07.12; Wed, 27 Feb 2019 09:07:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729825AbfB0RGk (ORCPT + 99 others); Wed, 27 Feb 2019 12:06:40 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35834 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfB0RGk (ORCPT ); Wed, 27 Feb 2019 12:06:40 -0500 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 9A01B16A3; Wed, 27 Feb 2019 09:06:39 -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 3AE843F738; Wed, 27 Feb 2019 09:06:36 -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?q?J=C3=A9r=C3=B4me=20Glisse?= , 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" , Russell King Subject: [PATCH v3 03/34] arm: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:37 +0000 Message-Id: <20190227170608.27963-4-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 will be provided by the p?d_large() functions/macros. For arm, we already provide most p?d_large() macros. Add a stub for PUD as we don't have huge pages at that level. CC: Russell King Signed-off-by: Steven Price --- arch/arm/include/asm/pgtable-2level.h | 1 + arch/arm/include/asm/pgtable-3level.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h index 12659ce5c1f3..adcef1306892 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h @@ -183,6 +183,7 @@ #define pud_none(pud) (0) #define pud_bad(pud) (0) #define pud_present(pud) (1) +#define pud_large(pud) (0) #define pud_clear(pudp) do { } while (0) #define set_pud(pud,pudp) do { } while (0) diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 6d50a11d7793..9f63a4b89f45 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -141,6 +141,7 @@ #define pud_none(pud) (!pud_val(pud)) #define pud_bad(pud) (!(pud_val(pud) & 2)) #define pud_present(pud) (pud_val(pud)) +#define pud_large(pud) (0) #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ PMD_TYPE_TABLE) #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ -- 2.20.1