Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2020258img; Wed, 27 Feb 2019 09:08:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IapLZbBFtYaZFnAjyniALtUvstmS3qO6ipy3sNUkNWxGPiOmZFkxbiUAHzqxfzv0pBiCmQh X-Received: by 2002:a17:902:8e82:: with SMTP id bg2mr3159492plb.217.1551287329486; Wed, 27 Feb 2019 09:08:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287329; cv=none; d=google.com; s=arc-20160816; b=xukAPQPbgn/cG5BMAl/qp225Qlv304W7FseTnkV9cppgWNvZG3cHw2r/tKNkkQjSU+ wWgu7bBvbnRid9cM1jovK8M+Z75nHdr+xKD1Ls00Svpc6rCfZBIDmQZv7OEQWWUIrg3F C03R1aLVtHyIIjXHzKQbxVCwDc9M3j1/o3hNkVI84co1KUAULmhcwdipQDgE1dC107Qw YEO+np7Au79yDMCxhNVKdXdvu5D56RByR+ZE702U2603jMK8P0ZItSfOI246G+CWkAuT P916rq5WO5UgTuyGm9aqe3tz7JPOQIy+XXvE8bnjgSpZzPD7N09uvcZ0iReEASyfPh+j gHxQ== 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=N4WRLTZt28lkUemP8bmvX63q6AU2uYVq26PdhSIkK84=; b=HaSDSU9wLH7IFMBdtrBug8gfjnNe8Njb0/3H257mkIT7NcYKrx4Zbqn+kBMNfUFv5H TdNPKlBygGMX2MZE6kGWx3qIb9l6PDLZGDaQPp6JvHZftAICgSy0IDarsyxaLaCCzKV3 6ix1YPi31vOLaQfH5Ney8jyzyRJ2+sCQWACnuNChF6VVfvpp8DfdwOPEE+Gdfn4oa1GI G/M21zXeY/XuLj/VAm6zEWJch6iWe3hKOwd46flMY+71/pdq1Q7NcjzngfftIdUilHJK lGEufmWpmNwYpdC2ijBZZlsxQcXe6WVXLuQ1B3zoTiHHQJAMopArGA6CtDzRMqDedUxl N8zg== 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 u27si15401752pgk.555.2019.02.27.09.08.35; Wed, 27 Feb 2019 09:08:49 -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 S1730437AbfB0RHo (ORCPT + 99 others); Wed, 27 Feb 2019 12:07:44 -0500 Received: from foss.arm.com ([217.140.101.70]:36416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730409AbfB0RHm (ORCPT ); Wed, 27 Feb 2019 12:07:42 -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 9E822174E; Wed, 27 Feb 2019 09:07:41 -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 ED5CD3F738; Wed, 27 Feb 2019 09:07:37 -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" , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH v3 19/34] sh: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:53 +0000 Message-Id: <20190227170608.27963-20-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 sh, we don't support large pages, so add stubs returning 0. CC: Yoshinori Sato CC: Rich Felker CC: linux-sh@vger.kernel.org Signed-off-by: Steven Price --- arch/sh/include/asm/pgtable-3level.h | 1 + arch/sh/include/asm/pgtable_32.h | 1 + arch/sh/include/asm/pgtable_64.h | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h index 7d8587eb65ff..9d8b2b002582 100644 --- a/arch/sh/include/asm/pgtable-3level.h +++ b/arch/sh/include/asm/pgtable-3level.h @@ -48,6 +48,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) #define pud_present(x) (pud_val(x)) #define pud_clear(xp) do { set_pud(xp, __pud(0)); } while (0) #define pud_bad(x) (pud_val(x) & ~PAGE_MASK) +#define pud_large(x) (0) /* * (puds are folded into pgds so this doesn't get actually called, diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 29274f0e428e..61186aa11021 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h @@ -329,6 +329,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) #define pmd_present(x) (pmd_val(x)) #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) +#define pmd_large(x) (0) #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) #define pte_page(x) pfn_to_page(pte_pfn(x)) diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h index 1778bc5971e7..80fe9264babf 100644 --- a/arch/sh/include/asm/pgtable_64.h +++ b/arch/sh/include/asm/pgtable_64.h @@ -64,6 +64,7 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) #define pmd_clear(pmd_entry_p) (set_pmd((pmd_entry_p), __pmd(_PMD_EMPTY))) #define pmd_none(pmd_entry) (pmd_val((pmd_entry)) == _PMD_EMPTY) #define pmd_bad(pmd_entry) ((pmd_val(pmd_entry) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) +#define pmd_large(pmd_entry) (0) #define pmd_page_vaddr(pmd_entry) \ ((unsigned long) __va(pmd_val(pmd_entry) & PAGE_MASK)) -- 2.20.1