blob: ea833a5d8bcf9b834cdc92882d7a6cb0cf130af5 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _H8300_PGTABLE_H
3#define _H8300_PGTABLE_H
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004#include <asm-generic/pgtable-nopud.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00005extern void paging_init(void);
6#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
7#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
8#define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
9#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
10#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
11#define __swp_type(x) (0)
12#define __swp_offset(x) (0)
13#define __swp_entry(typ, off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
14#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
15#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
16#define kern_addr_valid(addr) (1)
17#define pgprot_writecombine(prot) (prot)
18#define pgprot_noncached pgprot_writecombine
19
20static inline int pte_file(pte_t pte) { return 0; }
21#define swapper_pg_dir ((pgd_t *) 0)
22/*
23 * ZERO_PAGE is a global shared page that is always zero: used
24 * for zero-mapped memory areas etc..
25 */
26#define ZERO_PAGE(vaddr) (virt_to_page(0))
27
28/*
29 * These would be in other places but having them here reduces the diffs.
30 */
31extern unsigned int kobjsize(const void *objp);
32extern int is_in_rom(unsigned long);
33
34/*
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000035 * All 32bit addresses are effectively valid for vmalloc...
36 * Sort of meaningless for non-VM targets.
37 */
38#define VMALLOC_START 0
39#define VMALLOC_END 0xffffffff
40
41#define arch_enter_lazy_cpu_mode() do {} while (0)
42
43#endif /* _H8300_PGTABLE_H */