aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/include/asm/pgtable-2level.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-07 15:36:19 -0500
committerArnd Bergmann <arnd@arndb.de>2018-03-09 17:20:00 -0500
commit553b085c2075f6a4a2591108554f830fa61e881f (patch)
tree68d63911f2c12e0fb9fa23498df9300442a88f92 /arch/m32r/include/asm/pgtable-2level.h
parentfd8773f9f544955f6f47dc2ac3ab85ad64376b7f (diff)
arch: remove m32r port
The Mitsubishi/Renesas m32r architecture has been around for many years, but the Linux port has been obsolete for a very long time as well, with the last significant updates done for linux-2.6.14. While some m32r microcontrollers are still being marketed by Renesas, those are apparently no longer possible to support, mainly due to the lack of an external memory interface. Hirokazu Takata was the maintainer until the architecture got marked Orphaned in 2014. Link: http://www.linux-m32r.org/ Link: https://www.renesas.com/en-eu/products/microcontrollers-microprocessors/m32r.html Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m32r/include/asm/pgtable-2level.h')
-rw-r--r--arch/m32r/include/asm/pgtable-2level.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/m32r/include/asm/pgtable-2level.h b/arch/m32r/include/asm/pgtable-2level.h
deleted file mode 100644
index d7ab1e94e3cb..000000000000
--- a/arch/m32r/include/asm/pgtable-2level.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_M32R_PGTABLE_2LEVEL_H
3#define _ASM_M32R_PGTABLE_2LEVEL_H
4#ifdef __KERNEL__
5
6/*
7 * traditional M32R two-level paging structure:
8 */
9
10#define PGDIR_SHIFT 22
11#define PTRS_PER_PGD 1024
12
13/*
14 * the M32R is two-level, so we don't really have any
15 * PMD directory physically.
16 */
17#define __PAGETABLE_PMD_FOLDED
18#define PMD_SHIFT 22
19#define PTRS_PER_PMD 1
20
21#define PTRS_PER_PTE 1024
22
23#define pte_ERROR(e) \
24 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
25#define pmd_ERROR(e) \
26 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
27#define pgd_ERROR(e) \
28 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
29
30/*
31 * The "pgd_xxx()" functions here are trivial for a folded two-level
32 * setup: the pgd is never bad, and a pmd always exists (as it's folded
33 * into the pgd entry)
34 */
35static inline int pgd_none(pgd_t pgd) { return 0; }
36static inline int pgd_bad(pgd_t pgd) { return 0; }
37static inline int pgd_present(pgd_t pgd) { return 1; }
38#define pgd_clear(xp) do { } while (0)
39
40/*
41 * Certain architectures need to do special things when PTEs
42 * within a page table are directly modified. Thus, the following
43 * hook is made available.
44 */
45#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
46#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
47
48/*
49 * (pmds are folded into pgds so this doesn't get actually called,
50 * but the define is needed for a generic inline function.)
51 */
52#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
53#define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval)
54
55#define pgd_page_vaddr(pgd) \
56((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
57
58#ifndef CONFIG_DISCONTIGMEM
59#define pgd_page(pgd) (mem_map + ((pgd_val(pgd) >> PAGE_SHIFT) - PFN_BASE))
60#endif /* !CONFIG_DISCONTIGMEM */
61
62static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
63{
64 return (pmd_t *) dir;
65}
66
67#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0))
68#define pte_same(a, b) (pte_val(a) == pte_val(b))
69#define pte_page(x) pfn_to_page(pte_pfn(x))
70#define pte_none(x) (!pte_val(x))
71#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
72#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
73#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
74
75#endif /* __KERNEL__ */
76#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */