pgtable.h (7b513cf2bfdcdb7ba3f2b6e83f0e17e0793825d7) pgtable.h (5e144c42ee683a771b96239f76d44243a4632094)
1/* SPDX-License-Identifier: GPL-2.0 */
2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3
4#ifndef __ASM_CSKY_PGTABLE_H
5#define __ASM_CSKY_PGTABLE_H
6
7#include <asm/fixmap.h>
8#include <asm/memory.h>

--- 49 unchanged lines hidden (view full) ---

58#define __mk_pte(page_nr, pgprot) __pte(((page_nr) << PAGE_SHIFT) | \
59 pgprot_val(pgprot))
60
61/*
62 * CSKY can't do page protection for execute, and considers that the same like
63 * read. Also, write permissions imply read permissions. This is the closest
64 * we can get by reasonable means..
65 */
1/* SPDX-License-Identifier: GPL-2.0 */
2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3
4#ifndef __ASM_CSKY_PGTABLE_H
5#define __ASM_CSKY_PGTABLE_H
6
7#include <asm/fixmap.h>
8#include <asm/memory.h>

--- 49 unchanged lines hidden (view full) ---

58#define __mk_pte(page_nr, pgprot) __pte(((page_nr) << PAGE_SHIFT) | \
59 pgprot_val(pgprot))
60
61/*
62 * CSKY can't do page protection for execute, and considers that the same like
63 * read. Also, write permissions imply read permissions. This is the closest
64 * we can get by reasonable means..
65 */
66#define PAGE_NONE __pgprot(_PAGE_PRESENT | _CACHE_CACHED)
67#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
66#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED)
67
68#define PAGE_NONE __pgprot(_PAGE_BASE | _CACHE_CACHED)
69#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_WRITE | \
68 _CACHE_CACHED)
70 _CACHE_CACHED)
69#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | _CACHE_CACHED)
70#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_READ | _CACHE_CACHED)
71#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
71#define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_READ | _CACHE_CACHED)
72#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_READ | _CACHE_CACHED)
73#define PAGE_KERNEL __pgprot(_PAGE_BASE | __READABLE | __WRITEABLE | \
72 _PAGE_GLOBAL | _CACHE_CACHED)
74 _PAGE_GLOBAL | _CACHE_CACHED)
73#define PAGE_USERIO __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
75#define PAGE_USERIO __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_WRITE | \
74 _CACHE_CACHED)
75
76#define _PAGE_IOREMAP \
76 _CACHE_CACHED)
77
78#define _PAGE_IOREMAP \
77 (_PAGE_PRESENT | __READABLE | __WRITEABLE | _PAGE_GLOBAL | \
79 (_PAGE_BASE | __READABLE | __WRITEABLE | _PAGE_GLOBAL | \
78 _CACHE_UNCACHED | _PAGE_SO)
79
80#define __P000 PAGE_NONE
81#define __P001 PAGE_READONLY
82#define __P010 PAGE_COPY
83#define __P011 PAGE_COPY
84#define __P100 PAGE_READONLY
85#define __P101 PAGE_READONLY

--- 193 unchanged lines hidden ---
80 _CACHE_UNCACHED | _PAGE_SO)
81
82#define __P000 PAGE_NONE
83#define __P001 PAGE_READONLY
84#define __P010 PAGE_COPY
85#define __P011 PAGE_COPY
86#define __P100 PAGE_READONLY
87#define __P101 PAGE_READONLY

--- 193 unchanged lines hidden ---