blob: 4cf45a99fd792a5e1b528c96a610cfdd9120f14e [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Vineet Gupta5dda4dc2013-01-18 15:12:19 +05302/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
Vineet Gupta5dda4dc2013-01-18 15:12:19 +05304 */
5
6#ifndef _ASM_ARC_PGTABLE_H
7#define _ASM_ARC_PGTABLE_H
8
Masahiro Yamadafe6ba882019-07-16 16:27:01 -07009#include <linux/bits.h>
Vineet Guptafe6cb7b2019-09-13 15:25:52 -070010
11#include <asm/pgtable-levels.h>
12#include <asm/pgtable-bits-arcv2.h>
Vineet Gupta868a6532017-05-05 11:59:41 -070013#include <asm/page.h>
Vineet Gupta288ff7d2019-09-09 17:36:34 -070014#include <asm/mmu.h>
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053015
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053016/*
17 * Number of entries a user land program use.
18 * TASK_SIZE is the maximum vaddr that can be used by a userland program.
19 */
20#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
21
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053022#ifndef __ASSEMBLY__
23
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053024extern char empty_zero_page[PAGE_SIZE];
25#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
26
Vineet Guptafe6cb7b2019-09-13 15:25:52 -070027extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053028
Vineet Gupta5bba49f2013-05-09 19:20:43 +053029/* to cope with aliasing VIPT cache */
30#define HAVE_ARCH_UNMAPPED_AREA
31
Vineet Gupta5dda4dc2013-01-18 15:12:19 +053032#endif /* __ASSEMBLY__ */
33
34#endif