aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/cpu-multi32.h7
-rw-r--r--include/asm-arm/cpu-single.h4
-rw-r--r--include/asm-arm/pgtable.h11
3 files changed, 13 insertions, 9 deletions
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index 4679f63688e9..715e18a4add1 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -50,9 +50,10 @@ extern struct processor {
50 */ 50 */
51 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm); 51 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm);
52 /* 52 /*
53 * Set a PTE 53 * Set a possibly extended PTE. Non-extended PTEs should
54 * ignore 'ext'.
54 */ 55 */
55 void (*set_pte)(pte_t *ptep, pte_t pte); 56 void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext);
56} processor; 57} processor;
57 58
58#define cpu_proc_init() processor._proc_init() 59#define cpu_proc_init() processor._proc_init()
@@ -60,5 +61,5 @@ extern struct processor {
60#define cpu_reset(addr) processor.reset(addr) 61#define cpu_reset(addr) processor.reset(addr)
61#define cpu_do_idle() processor._do_idle() 62#define cpu_do_idle() processor._do_idle()
62#define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz) 63#define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz)
63#define cpu_set_pte(ptep, pte) processor.set_pte(ptep, pte) 64#define cpu_set_pte_ext(ptep,pte,ext) processor.set_pte_ext(ptep,pte,ext)
64#define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm) 65#define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index 6723e67244fa..0b120ee36091 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -28,7 +28,7 @@
28#define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle) 28#define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle)
29#define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area) 29#define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area)
30#define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm) 30#define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm)
31#define cpu_set_pte __cpu_fn(CPU_NAME,_set_pte) 31#define cpu_set_pte_ext __cpu_fn(CPU_NAME,_set_pte_ext)
32 32
33#include <asm/page.h> 33#include <asm/page.h>
34 34
@@ -40,5 +40,5 @@ extern void cpu_proc_fin(void);
40extern int cpu_do_idle(void); 40extern int cpu_do_idle(void);
41extern void cpu_dcache_clean_area(void *, int); 41extern void cpu_dcache_clean_area(void *, int);
42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
43extern void cpu_set_pte(pte_t *ptep, pte_t pte); 43extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext);
44extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); 44extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 88cd5c784ef0..b8cf2d5ec304 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -21,6 +21,7 @@
21 21
22#include <asm/memory.h> 22#include <asm/memory.h>
23#include <asm/arch/vmalloc.h> 23#include <asm/arch/vmalloc.h>
24#include <asm/pgtable-hwdef.h>
24 25
25/* 26/*
26 * Just any arbitrary offset to the start of the vmalloc VM area: the 27 * Just any arbitrary offset to the start of the vmalloc VM area: the
@@ -170,7 +171,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
170#define L_PTE_EXEC (1 << 6) 171#define L_PTE_EXEC (1 << 6)
171#define L_PTE_DIRTY (1 << 7) 172#define L_PTE_DIRTY (1 << 7)
172#define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */ 173#define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */
173#define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */
174 174
175#ifndef __ASSEMBLY__ 175#ifndef __ASSEMBLY__
176 176
@@ -228,7 +228,7 @@ extern struct page *empty_zero_page;
228#define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) 228#define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)))
229 229
230#define pte_none(pte) (!pte_val(pte)) 230#define pte_none(pte) (!pte_val(pte))
231#define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) 231#define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0)
232#define pte_page(pte) (pfn_to_page(pte_pfn(pte))) 232#define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
233#define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) 233#define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr))
234#define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) 234#define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr))
@@ -236,8 +236,11 @@ extern struct page *empty_zero_page;
236#define pte_unmap(pte) do { } while (0) 236#define pte_unmap(pte) do { } while (0)
237#define pte_unmap_nested(pte) do { } while (0) 237#define pte_unmap_nested(pte) do { } while (0)
238 238
239#define set_pte(ptep, pte) cpu_set_pte(ptep,pte) 239#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
240#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 240
241#define set_pte_at(mm,addr,ptep,pteval) do { \
242 set_pte_ext(ptep, pteval, (addr) >= PAGE_OFFSET ? 0 : PTE_EXT_NG); \
243 } while (0)
241 244
242/* 245/*
243 * The following only work if pte_present() is true. 246 * The following only work if pte_present() is true.