18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _H8300_PGTABLE_H 38c2ecf20Sopenharmony_ci#define _H8300_PGTABLE_H 48c2ecf20Sopenharmony_ci#include <asm-generic/pgtable-nopud.h> 58c2ecf20Sopenharmony_ciextern void paging_init(void); 68c2ecf20Sopenharmony_ci#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */ 78c2ecf20Sopenharmony_ci#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */ 88c2ecf20Sopenharmony_ci#define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */ 98c2ecf20Sopenharmony_ci#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */ 108c2ecf20Sopenharmony_ci#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */ 118c2ecf20Sopenharmony_ci#define __swp_type(x) (0) 128c2ecf20Sopenharmony_ci#define __swp_offset(x) (0) 138c2ecf20Sopenharmony_ci#define __swp_entry(typ, off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) 148c2ecf20Sopenharmony_ci#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 158c2ecf20Sopenharmony_ci#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 168c2ecf20Sopenharmony_ci#define kern_addr_valid(addr) (1) 178c2ecf20Sopenharmony_ci#define pgprot_writecombine(prot) (prot) 188c2ecf20Sopenharmony_ci#define pgprot_noncached pgprot_writecombine 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistatic inline int pte_file(pte_t pte) { return 0; } 218c2ecf20Sopenharmony_ci#define swapper_pg_dir ((pgd_t *) 0) 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * ZERO_PAGE is a global shared page that is always zero: used 248c2ecf20Sopenharmony_ci * for zero-mapped memory areas etc.. 258c2ecf20Sopenharmony_ci */ 268c2ecf20Sopenharmony_ci#define ZERO_PAGE(vaddr) (virt_to_page(0)) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* 298c2ecf20Sopenharmony_ci * These would be in other places but having them here reduces the diffs. 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_ciextern unsigned int kobjsize(const void *objp); 328c2ecf20Sopenharmony_ciextern int is_in_rom(unsigned long); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* 358c2ecf20Sopenharmony_ci * All 32bit addresses are effectively valid for vmalloc... 368c2ecf20Sopenharmony_ci * Sort of meaningless for non-VM targets. 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci#define VMALLOC_START 0 398c2ecf20Sopenharmony_ci#define VMALLOC_END 0xffffffff 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#define arch_enter_lazy_cpu_mode() do {} while (0) 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#endif /* _H8300_PGTABLE_H */ 44