page.h (9ec3f4cb35bc8278f0582fed9f9229c9315c2ffb) | page.h (9e953cda5cdf1c230a3c9b7fc4d5e94f15885a9b) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (C) 2009 Chen Liqin <liqin.chen@sunplusct.com> 4 * Copyright (C) 2012 Regents of the University of California 5 * Copyright (C) 2017 SiFive 6 * Copyright (C) 2017 XiaojingZhu <zhuxiaoj@ict.ac.cn> 7 */ 8 9#ifndef _ASM_RISCV_PAGE_H 10#define _ASM_RISCV_PAGE_H 11 12#include <linux/pfn.h> 13#include <linux/const.h> 14 15#define PAGE_SHIFT (12) 16#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 17#define PAGE_MASK (~(PAGE_SIZE - 1)) 18 | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (C) 2009 Chen Liqin <liqin.chen@sunplusct.com> 4 * Copyright (C) 2012 Regents of the University of California 5 * Copyright (C) 2017 SiFive 6 * Copyright (C) 2017 XiaojingZhu <zhuxiaoj@ict.ac.cn> 7 */ 8 9#ifndef _ASM_RISCV_PAGE_H 10#define _ASM_RISCV_PAGE_H 11 12#include <linux/pfn.h> 13#include <linux/const.h> 14 15#define PAGE_SHIFT (12) 16#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 17#define PAGE_MASK (~(PAGE_SIZE - 1)) 18 |
19#ifdef CONFIG_64BIT 20#define HUGE_MAX_HSTATE 2 21#else 22#define HUGE_MAX_HSTATE 1 23#endif 24#define HPAGE_SHIFT PMD_SHIFT 25#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT) 26#define HPAGE_MASK (~(HPAGE_SIZE - 1)) 27#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) 28 |
|
19/* 20 * PAGE_OFFSET -- the first address of the first page of memory. 21 * When not using MMU this corresponds to the first free page in 22 * physical memory (aligned on a page boundary). 23 */ 24#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 25 26#define KERN_VIRT_SIZE (-PAGE_OFFSET) --- 83 unchanged lines hidden (view full) --- 110#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr))) 111 112#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ 113 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 114 115#include <asm-generic/memory_model.h> 116#include <asm-generic/getorder.h> 117 | 29/* 30 * PAGE_OFFSET -- the first address of the first page of memory. 31 * When not using MMU this corresponds to the first free page in 32 * physical memory (aligned on a page boundary). 33 */ 34#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 35 36#define KERN_VIRT_SIZE (-PAGE_OFFSET) --- 83 unchanged lines hidden (view full) --- 120#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr))) 121 122#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ 123 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 124 125#include <asm-generic/memory_model.h> 126#include <asm-generic/getorder.h> 127 |
118/* vDSO support */ 119/* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */ 120#define __HAVE_ARCH_GATE_AREA 121 | |
122#endif /* _ASM_RISCV_PAGE_H */ | 128#endif /* _ASM_RISCV_PAGE_H */ |