Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License version 2 as
0007  * published by the Free Software Foundation.
0008  */
0009 
0010 #ifndef _UAPI__ASM_ARC_PAGE_H
0011 #define _UAPI__ASM_ARC_PAGE_H
0012 
0013 #include <linux/const.h>
0014 
0015 /* PAGE_SHIFT determines the page size */
0016 #if defined(CONFIG_ARC_PAGE_SIZE_16K)
0017 #define PAGE_SHIFT 14
0018 #elif defined(CONFIG_ARC_PAGE_SIZE_4K)
0019 #define PAGE_SHIFT 12
0020 #else
0021 /*
0022  * Default 8k
0023  * done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc
0024  * user code (busybox appletlib.h) expects PAGE_SHIFT to be defined w/o
0025  * using the correct uClibc header and in their build our autoconf.h is
0026  * not available
0027  */
0028 #define PAGE_SHIFT 13
0029 #endif
0030 
0031 #define PAGE_SIZE   _BITUL(PAGE_SHIFT)  /* Default 8K */
0032 #define PAGE_OFFSET _AC(0x80000000, UL) /* Kernel starts at 2G onwrds */
0033 
0034 #define PAGE_MASK   (~(PAGE_SIZE-1))
0035 
0036 #endif /* _UAPI__ASM_ARC_PAGE_H */