404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.147.27.20: ~ $
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_SCORE_PAGE_H
#define _ASM_SCORE_PAGE_H

#include <linux/pfn.h>
#include <linux/const.h>

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT	(12)
#define PAGE_SIZE	(_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK	(~(PAGE_SIZE-1))

#ifdef __KERNEL__

#ifndef __ASSEMBLY__

#define PAGE_UP(addr)	(((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
#define PAGE_DOWN(addr)	((addr)&(~((PAGE_SIZE)-1)))

/* align addr on a size boundary - adjust address up/down if needed */
#define _ALIGN_UP(addr, size)	(((addr)+((size)-1))&(~((size)-1)))
#define _ALIGN_DOWN(addr, size)	((addr)&(~((size)-1)))

/* align addr on a size boundary - adjust address up if needed */
#define _ALIGN(addr, size)	_ALIGN_UP(addr, size)

/*
 * PAGE_OFFSET -- the first address of the first page of memory. When not
 * using MMU this corresponds to the first free page in physical memory (aligned
 * on a page boundary).
 */
#define PAGE_OFFSET		(0xA0000000UL)

#define clear_page(pgaddr)			memset((pgaddr), 0, PAGE_SIZE)
#define copy_page(to, from)			memcpy((to), (from), PAGE_SIZE)

#define clear_user_page(pgaddr, vaddr, page)	memset((pgaddr), 0, PAGE_SIZE)
#define copy_user_page(vto, vfrom, vaddr, topg) \
			memcpy((vto), (vfrom), PAGE_SIZE)

/*
 * These are used to make use of C type-checking..
 */

typedef struct { unsigned long pte; } pte_t;		/* page table entry */
typedef struct { unsigned long pgd; } pgd_t;		/* PGD table entry */
typedef struct { unsigned long pgprot; } pgprot_t;
typedef struct page *pgtable_t;

#define pte_val(x)	((x).pte)
#define pgd_val(x)	((x).pgd)
#define pgprot_val(x)	((x).pgprot)

#define __pte(x)	((pte_t) { (x) })
#define __pgd(x)	((pgd_t) { (x) })
#define __pgprot(x)	((pgprot_t) { (x) })

extern unsigned long max_low_pfn;
extern unsigned long min_low_pfn;
extern unsigned long max_pfn;

#define __pa(x)		((unsigned long)(x) - PAGE_OFFSET)
#define __va(x)		((void *)((unsigned long) (x) + PAGE_OFFSET))

#define phys_to_pfn(phys)	(PFN_DOWN(phys))
#define pfn_to_phys(pfn)	(PFN_PHYS(pfn))

#define virt_to_pfn(vaddr)	(phys_to_pfn((__pa(vaddr))))
#define pfn_to_virt(pfn)	__va(pfn_to_phys((pfn)))

#define virt_to_page(vaddr)	(pfn_to_page(virt_to_pfn(vaddr)))
#define page_to_virt(page)	(pfn_to_virt(page_to_pfn(page)))

#define page_to_phys(page)	(pfn_to_phys(page_to_pfn(page)))
#define page_to_bus(page)	(page_to_phys(page))
#define phys_to_page(paddr)	(pfn_to_page(phys_to_pfn(paddr)))

#define pfn_valid(pfn)		(((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn))

#define ARCH_PFN_OFFSET		(PAGE_OFFSET >> PAGE_SHIFT)

#endif /* __ASSEMBLY__ */

#define virt_addr_valid(vaddr)	(pfn_valid(virt_to_pfn(vaddr)))

#endif /* __KERNEL__ */

#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

#include <asm-generic/memory_model.h>
#include <asm-generic/getorder.h>

#endif /* _ASM_SCORE_PAGE_H */

Filemanager

Name Type Size Permission Actions
Kbuild File 340 B 0644
asm-offsets.h File 35 B 0644
asmmacro.h File 2.48 KB 0644
atomic.h File 187 B 0644
bitops.h File 266 B 0644
bug.h File 578 B 0644
bugs.h File 154 B 0644
cache.h File 199 B 0644
cacheflush.h File 1.63 KB 0644
checksum.h File 5.61 KB 0644
cmpxchg.h File 1.02 KB 0644
delay.h File 567 B 0644
device.h File 162 B 0644
div64.h File 158 B 0644
dma.h File 171 B 0644
elf.h File 2.84 KB 0644
emergency-restart.h File 206 B 0644
exec.h File 181 B 0644
fixmap.h File 2.38 KB 0644
ftrace.h File 90 B 0644
futex.h File 158 B 0644
hardirq.h File 166 B 0644
hw_irq.h File 90 B 0644
io.h File 212 B 0644
irq.h File 794 B 0644
irq_regs.h File 258 B 0644
irqflags.h File 1.9 KB 0644
kdebug.h File 162 B 0644
kmap_types.h File 178 B 0644
linkage.h File 189 B 0644
local.h File 158 B 0644
local64.h File 33 B 0644
mmu.h File 157 B 0644
mmu_context.h File 2.68 KB 0644
module.h File 949 B 0644
page.h File 2.84 KB 0644
pci.h File 81 B 0644
percpu.h File 162 B 0644
pgalloc.h File 1.81 KB 0644
pgtable-bits.h File 990 B 0644
pgtable.h File 7.29 KB 0644
processor.h File 2.39 KB 0644
ptrace.h File 749 B 0644
scoreregs.h File 1.4 KB 0644
segment.h File 513 B 0644
setup.h File 1.01 KB 0644
shmparam.h File 170 B 0644
string.h File 327 B 0644
switch_to.h File 323 B 0644
syscalls.h File 229 B 0644
thread_info.h File 2.55 KB 0644
timex.h File 216 B 0644
tlb.h File 538 B 0644
tlbflush.h File 3.02 KB 0644
topology.h File 170 B 0644
uaccess.h File 10.78 KB 0644
ucontext.h File 34 B 0644
unaligned.h File 174 B 0644
user.h File 437 B 0644