Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2019424img; Wed, 27 Feb 2019 09:08:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IbILm9lolOJvx3Hp3pXrBZJY2u1aRVZ1g+wzeY+9bWbpLfgcov86/wVAkgVtCdLE0qGiDgq X-Received: by 2002:aa7:9152:: with SMTP id 18mr2568623pfi.215.1551287288105; Wed, 27 Feb 2019 09:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287288; cv=none; d=google.com; s=arc-20160816; b=BiwkNorz/cjIV32/TAy7CR4crUR0rlcy1aEnFBh0esbaXnyMUDFHv+I8UrbOXVwd1G IgZ/DoAJH+rhgWDelauO7uI0yhfrg0Tc6RlhfOUtl6lGJYVjjYRxJoCEC/ZSB4Ozzmw4 kEtu5J74iDXFX+yAQBBQ79+16PpV6F/ymgoj8m3vxR1AC+SqWGGW2pz1zsViiYjRmOmX 4aHhgs+tOzBW0mn0AMRrqcYwA/0d83yZPgzB6YOLMAM5Yhm4y8/zeTC3iJBhy/gdPBiV Bm7dVwjvmGeOhdhepia5y9JzCvQyBTPH+ZOhfo6ImrJrdNqulrB2Tp+69nxJkx0Taljg qYbQ== 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=o8V0Tzxsi6NTsG8lOFeqs8u+PtO84JGBEV7Wz4LTce4=; b=sur9fOn/RUiXtMvMVUwI3vWGBi7ygoNZ0I00VKUHcwxrU/TO2ZnXtWcIzuFIpZoYJw 97qnifrVQkTmESJJ5+g5gbFIqiGMKuuPblrbn0JMIV29R+uKrWeCFXZKE7wAb95ntZK7 7bnjI42jiISumCnrj/EPtDUQbL1WiZbixWMDHMWzj4V/K2c51sWUhuEqUfOZmiulk73J rX/3Og1doPHCJad4E2pmwk6fuIPUpOYfk3p5CGiq1RmLKxhq+7H+KmHu1f1e6/ZLsDlA TPUKlxfo7SluGMcYWTRos6qey5pAHsUGaA1QAnif3flFDL6kym486ZQPVun1MWYPA4Vv lWvg== 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 m20si13145411pgv.136.2019.02.27.09.07.50; Wed, 27 Feb 2019 09:08:08 -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 S1730189AbfB0RHE (ORCPT + 99 others); Wed, 27 Feb 2019 12:07:04 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730115AbfB0RHC (ORCPT ); Wed, 27 Feb 2019 12:07:02 -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 39D221684; Wed, 27 Feb 2019 09:07:02 -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 ABECA3F738; Wed, 27 Feb 2019 09:06:58 -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" , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org Subject: [PATCH v3 09/34] m68k: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:43 +0000 Message-Id: <20190227170608.27963-10-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 m68k, we don't support large pages, so add stubs returning 0 CC: Geert Uytterhoeven CC: linux-m68k@lists.linux-m68k.org Signed-off-by: Steven Price --- arch/m68k/include/asm/mcf_pgtable.h | 2 ++ arch/m68k/include/asm/motorola_pgtable.h | 2 ++ arch/m68k/include/asm/pgtable_no.h | 1 + arch/m68k/include/asm/sun3_pgtable.h | 2 ++ 4 files changed, 7 insertions(+) diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h index 5d5502cb2b2d..63827d28a017 100644 --- a/arch/m68k/include/asm/mcf_pgtable.h +++ b/arch/m68k/include/asm/mcf_pgtable.h @@ -196,11 +196,13 @@ static inline int pmd_none2(pmd_t *pmd) { return !pmd_val(*pmd); } static inline int pmd_bad2(pmd_t *pmd) { return 0; } #define pmd_bad(pmd) pmd_bad2(&(pmd)) #define pmd_present(pmd) (!pmd_none2(&(pmd))) +#define pmd_large(pmd) (0) static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = 0; } static inline int pgd_none(pgd_t pgd) { return 0; } static inline int pgd_bad(pgd_t pgd) { return 0; } static inline int pgd_present(pgd_t pgd) { return 1; } +static inline int pgd_large(pgd_t pgd) { return 0; } static inline void pgd_clear(pgd_t *pgdp) {} #define pte_ERROR(e) \ diff --git a/arch/m68k/include/asm/motorola_pgtable.h b/arch/m68k/include/asm/motorola_pgtable.h index 7f66a7bad7a5..a649eb8a91de 100644 --- a/arch/m68k/include/asm/motorola_pgtable.h +++ b/arch/m68k/include/asm/motorola_pgtable.h @@ -138,6 +138,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) #define pmd_none(pmd) (!pmd_val(pmd)) #define pmd_bad(pmd) ((pmd_val(pmd) & _DESCTYPE_MASK) != _PAGE_TABLE) #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE) +#define pmd_large(pmd) (0) #define pmd_clear(pmdp) ({ \ unsigned long *__ptr = pmdp->pmd; \ short __i = 16; \ @@ -150,6 +151,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) #define pgd_none(pgd) (!pgd_val(pgd)) #define pgd_bad(pgd) ((pgd_val(pgd) & _DESCTYPE_MASK) != _PAGE_TABLE) #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_TABLE) +#define pgd_large(pgd) (0) #define pgd_clear(pgdp) ({ pgd_val(*pgdp) = 0; }) #define pgd_page(pgd) (mem_map + ((unsigned long)(__va(pgd_val(pgd)) - PAGE_OFFSET) >> PAGE_SHIFT)) diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h index fc3a96c77bd8..eeef17b2eae8 100644 --- a/arch/m68k/include/asm/pgtable_no.h +++ b/arch/m68k/include/asm/pgtable_no.h @@ -17,6 +17,7 @@ * Trivial page table functions. */ #define pgd_present(pgd) (1) +#define pgd_large(pgd) (0) #define pgd_none(pgd) (0) #define pgd_bad(pgd) (0) #define pgd_clear(pgdp) diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h index c987d50866b4..eea72e3515db 100644 --- a/arch/m68k/include/asm/sun3_pgtable.h +++ b/arch/m68k/include/asm/sun3_pgtable.h @@ -143,6 +143,7 @@ static inline int pmd_bad2 (pmd_t *pmd) { return 0; } static inline int pmd_present2 (pmd_t *pmd) { return pmd_val (*pmd) & SUN3_PMD_VALID; } /* #define pmd_present(pmd) pmd_present2(&(pmd)) */ #define pmd_present(pmd) (!pmd_none2(&(pmd))) +#define pmd_large(pmd) (0) static inline void pmd_clear (pmd_t *pmdp) { pmd_val (*pmdp) = 0; } static inline int pgd_none (pgd_t pgd) { return 0; } @@ -150,6 +151,7 @@ static inline int pgd_bad (pgd_t pgd) { return 0; } static inline int pgd_present (pgd_t pgd) { return 1; } static inline void pgd_clear (pgd_t *pgdp) {} +static inline int pgd_large(pgd_t pgd) { return 0; } #define pte_ERROR(e) \ pr_err("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) -- 2.20.1