Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2022036img; Wed, 27 Feb 2019 09:10:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IZgu47kS96vvHHq2k06WY8Wf9BwgREplE0fPk/Dq2o0ubSlnhJvVVKbeQ9Y42jFez0qpXV9 X-Received: by 2002:a17:902:241:: with SMTP id 59mr3135688plc.72.1551287410631; Wed, 27 Feb 2019 09:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287410; cv=none; d=google.com; s=arc-20160816; b=fZXQib1JbEs/BbCg62ZyBfA+w15lsVhH58PI57UP2Ortnch3zq14hoYwNBktRmheyj PPKTpb9TETSccu1g82/BclE/iZfOCqi4PvA2utfLuqB3p5PurwarzIfbZHYHFTaELgMN T+6Hn43EW3gI8kqJMNwQ9D1oj0rl8jrPXBZ2wKTTJJIzQZmhoI0ovO6S4gXlSR5aBgfU IYVXM+WOaPPA5T0kjVk8XMTsNCvimmDGatWh3DcujBikT1To4K+kHpmFZaB8R2pgx6he /MKaW+dOjj8nblAMBlvy0JPBSMpMLtgiSf81wtBbFhYJtbOgyAXqavKAarep81dn0YSt cc8A== 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=89tEVK8Z5Z1WJ+pAu/rmRwRDTPZdRvQi0xHgmC99Gas=; b=eNFlbA5/Gvtxq2UFyED0M9fL1o7S5Igy4+ft05IlSXo1UTcqgr2h/Eab2vXm1m9yNB CVtq1eteQPpffBjGYOslss8GkIlJmjIFyIy8bMOltVFZSSFwuo+fU8FxDJF4mGJL8jJq rmPJ5sRxpMpVvtQ2fvvorGEW1NDzCd79vviFP9W4Apl8quy4yttC348gFJviiCgk+e+L LvWl5AVLtwqY9vqMgbbp9boHITnw/gX4nj0dB0MovoNa0Ts9ms92RIZQNfKvquvSXhXD fMgol5HqTuWrz9I7lvEAnxEi+IPDOJ8Rp9epm96vWoYELGK1n8BRBKUZ9IkG0aPDhZqO YMKg== 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 b9si16564031plb.350.2019.02.27.09.09.56; Wed, 27 Feb 2019 09:10:10 -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 S1730489AbfB0RHv (ORCPT + 99 others); Wed, 27 Feb 2019 12:07:51 -0500 Received: from foss.arm.com ([217.140.101.70]:36484 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730448AbfB0RHt (ORCPT ); Wed, 27 Feb 2019 12:07:49 -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 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 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" , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.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 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 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) -- 2.20.1