diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/hugetlb.h | 10 | ||||
-rw-r--r-- | include/asm-powerpc/io.h | 5 | ||||
-rw-r--r-- | include/asm-powerpc/kgdb.h | 92 | ||||
-rw-r--r-- | include/asm-powerpc/mmu-hash64.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/page.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/page_64.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/pgalloc-64.h | 4 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-4k.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-64k.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 16 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 8 |
11 files changed, 95 insertions, 55 deletions
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index be32ff02f4a0..26f0d0ab27a5 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -7,7 +7,7 @@ | |||
7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | 7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, |
8 | unsigned long len); | 8 | unsigned long len); |
9 | 9 | ||
10 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 10 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
11 | unsigned long end, unsigned long floor, | 11 | unsigned long end, unsigned long floor, |
12 | unsigned long ceiling); | 12 | unsigned long ceiling); |
13 | 13 | ||
@@ -21,11 +21,13 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
21 | * If the arch doesn't supply something else, assume that hugepage | 21 | * If the arch doesn't supply something else, assume that hugepage |
22 | * size aligned regions are ok without further preparation. | 22 | * size aligned regions are ok without further preparation. |
23 | */ | 23 | */ |
24 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 24 | static inline int prepare_hugepage_range(struct file *file, |
25 | unsigned long addr, unsigned long len) | ||
25 | { | 26 | { |
26 | if (len & ~HPAGE_MASK) | 27 | struct hstate *h = hstate_file(file); |
28 | if (len & ~huge_page_mask(h)) | ||
27 | return -EINVAL; | 29 | return -EINVAL; |
28 | if (addr & ~HPAGE_MASK) | 30 | if (addr & ~huge_page_mask(h)) |
29 | return -EINVAL; | 31 | return -EINVAL; |
30 | return 0; | 32 | return 0; |
31 | } | 33 | } |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 8b627823f5f9..77c7fa025e65 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -617,7 +617,8 @@ static inline void iosync(void) | |||
617 | * and can be hooked by the platform via ppc_md | 617 | * and can be hooked by the platform via ppc_md |
618 | * | 618 | * |
619 | * * ioremap_flags allows to specify the page flags as an argument and can | 619 | * * ioremap_flags allows to specify the page flags as an argument and can |
620 | * also be hooked by the platform via ppc_md | 620 | * also be hooked by the platform via ppc_md. ioremap_prot is the exact |
621 | * same thing as ioremap_flags. | ||
621 | * | 622 | * |
622 | * * ioremap_nocache is identical to ioremap | 623 | * * ioremap_nocache is identical to ioremap |
623 | * | 624 | * |
@@ -639,6 +640,8 @@ extern void __iomem *ioremap(phys_addr_t address, unsigned long size); | |||
639 | extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, | 640 | extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, |
640 | unsigned long flags); | 641 | unsigned long flags); |
641 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) | 642 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) |
643 | #define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot)) | ||
644 | |||
642 | extern void iounmap(volatile void __iomem *addr); | 645 | extern void iounmap(volatile void __iomem *addr); |
643 | 646 | ||
644 | extern void __iomem *__ioremap(phys_addr_t, unsigned long size, | 647 | extern void __iomem *__ioremap(phys_addr_t, unsigned long size, |
diff --git a/include/asm-powerpc/kgdb.h b/include/asm-powerpc/kgdb.h index b617dac82969..1399caf719ae 100644 --- a/include/asm-powerpc/kgdb.h +++ b/include/asm-powerpc/kgdb.h | |||
@@ -1,57 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | * kgdb.h: Defines and declarations for serial line source level | 2 | * include/asm-powerpc/kgdb.h |
3 | * remote debugging of the Linux kernel using gdb. | ||
4 | * | 3 | * |
4 | * The PowerPC (32/64) specific defines / externs for KGDB. Based on | ||
5 | * the previous 32bit and 64bit specific files, which had the following | ||
6 | * copyrights: | ||
7 | * | ||
8 | * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com) | ||
9 | * PPC Mods (C) 2004 Tom Rini (trini@mvista.com) | ||
10 | * PPC Mods (C) 2003 John Whitney (john.whitney@timesys.com) | ||
5 | * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) | 11 | * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) |
6 | * | 12 | * |
13 | * | ||
7 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 14 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
15 | * Author: Tom Rini <trini@kernel.crashing.org> | ||
16 | * | ||
17 | * 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
18 | * the terms of the GNU General Public License version 2. This program | ||
19 | * is licensed "as is" without any warranty of any kind, whether express | ||
20 | * or implied. | ||
8 | */ | 21 | */ |
9 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
10 | #ifndef _PPC_KGDB_H | 23 | #ifndef __POWERPC_KGDB_H__ |
11 | #define _PPC_KGDB_H | 24 | #define __POWERPC_KGDB_H__ |
12 | 25 | ||
13 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
14 | 27 | ||
15 | /* Things specific to the gen550 backend. */ | 28 | #define BREAK_INSTR_SIZE 4 |
16 | struct uart_port; | 29 | #define BUFMAX ((NUMREGBYTES * 2) + 512) |
17 | 30 | #define OUTBUFMAX ((NUMREGBYTES * 2) + 512) | |
18 | extern void gen550_progress(char *, unsigned short); | 31 | static inline void arch_kgdb_breakpoint(void) |
19 | extern void gen550_kgdb_map_scc(void); | 32 | { |
20 | extern void gen550_init(int, struct uart_port *); | 33 | asm(".long 0x7d821008"); /* twge r2, r2 */ |
21 | 34 | } | |
22 | /* Things specific to the pmac backend. */ | 35 | #define CACHE_FLUSH_IS_SAFE 1 |
23 | extern void zs_kgdb_hook(int tty_num); | ||
24 | |||
25 | /* To init the kgdb engine. (called by serial hook)*/ | ||
26 | extern void set_debug_traps(void); | ||
27 | |||
28 | /* To enter the debugger explicitly. */ | ||
29 | extern void breakpoint(void); | ||
30 | |||
31 | /* For taking exceptions | ||
32 | * these are defined in traps.c | ||
33 | */ | ||
34 | extern int (*debugger)(struct pt_regs *regs); | ||
35 | extern int (*debugger_bpt)(struct pt_regs *regs); | ||
36 | extern int (*debugger_sstep)(struct pt_regs *regs); | ||
37 | extern int (*debugger_iabr_match)(struct pt_regs *regs); | ||
38 | extern int (*debugger_dabr_match)(struct pt_regs *regs); | ||
39 | extern void (*debugger_fault_handler)(struct pt_regs *regs); | ||
40 | |||
41 | /* What we bring to the party */ | ||
42 | int kgdb_bpt(struct pt_regs *regs); | ||
43 | int kgdb_sstep(struct pt_regs *regs); | ||
44 | void kgdb(struct pt_regs *regs); | ||
45 | int kgdb_iabr_match(struct pt_regs *regs); | ||
46 | int kgdb_dabr_match(struct pt_regs *regs); | ||
47 | 36 | ||
37 | /* The number bytes of registers we have to save depends on a few | ||
38 | * things. For 64bit we default to not including vector registers and | ||
39 | * vector state registers. */ | ||
40 | #ifdef CONFIG_PPC64 | ||
48 | /* | 41 | /* |
49 | * external low-level support routines (ie macserial.c) | 42 | * 64 bit (8 byte) registers: |
43 | * 32 gpr, 32 fpr, nip, msr, link, ctr | ||
44 | * 32 bit (4 byte) registers: | ||
45 | * ccr, xer, fpscr | ||
50 | */ | 46 | */ |
51 | extern void kgdb_interruptible(int); /* control interrupts from serial */ | 47 | #define NUMREGBYTES ((68 * 8) + (3 * 4)) |
52 | extern void putDebugChar(char); /* write a single character */ | 48 | #define NUMCRITREGBYTES 184 |
53 | extern char getDebugChar(void); /* read and return a single char */ | 49 | #else /* CONFIG_PPC32 */ |
54 | 50 | /* On non-E500 family PPC32 we determine the size by picking the last | |
51 | * register we need, but on E500 we skip sections so we list what we | ||
52 | * need to store, and add it up. */ | ||
53 | #ifndef CONFIG_E500 | ||
54 | #define MAXREG (PT_FPSCR+1) | ||
55 | #else | ||
56 | /* 32 GPRs (8 bytes), nip, msr, ccr, link, ctr, xer, acc (8 bytes), spefscr*/ | ||
57 | #define MAXREG ((32*2)+6+2+1) | ||
58 | #endif | ||
59 | #define NUMREGBYTES (MAXREG * sizeof(int)) | ||
60 | /* CR/LR, R1, R2, R13-R31 inclusive. */ | ||
61 | #define NUMCRITREGBYTES (23 * sizeof(int)) | ||
62 | #endif /* 32/64 */ | ||
55 | #endif /* !(__ASSEMBLY__) */ | 63 | #endif /* !(__ASSEMBLY__) */ |
56 | #endif /* !(_PPC_KGDB_H) */ | 64 | #endif /* !__POWERPC_KGDB_H__ */ |
57 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h index d1dc16afb118..19c7a9403490 100644 --- a/include/asm-powerpc/mmu-hash64.h +++ b/include/asm-powerpc/mmu-hash64.h | |||
@@ -194,9 +194,9 @@ extern int mmu_ci_restrictions; | |||
194 | 194 | ||
195 | #ifdef CONFIG_HUGETLB_PAGE | 195 | #ifdef CONFIG_HUGETLB_PAGE |
196 | /* | 196 | /* |
197 | * The page size index of the huge pages for use by hugetlbfs | 197 | * The page size indexes of the huge pages for use by hugetlbfs |
198 | */ | 198 | */ |
199 | extern int mmu_huge_psize; | 199 | extern unsigned int mmu_huge_psizes[MMU_PAGE_COUNT]; |
200 | 200 | ||
201 | #endif /* CONFIG_HUGETLB_PAGE */ | 201 | #endif /* CONFIG_HUGETLB_PAGE */ |
202 | 202 | ||
@@ -281,6 +281,8 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
281 | unsigned long pstart, unsigned long mode, | 281 | unsigned long pstart, unsigned long mode, |
282 | int psize, int ssize); | 282 | int psize, int ssize); |
283 | extern void set_huge_psize(int psize); | 283 | extern void set_huge_psize(int psize); |
284 | extern void add_gpage(unsigned long addr, unsigned long page_size, | ||
285 | unsigned long number_of_pages); | ||
284 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); | 286 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); |
285 | 287 | ||
286 | extern void htab_initialize(void); | 288 | extern void htab_initialize(void); |
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index cffdf0eb0df6..e088545cb3f5 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
@@ -119,9 +119,6 @@ extern phys_addr_t kernstart_addr; | |||
119 | /* align addr on a size boundary - adjust address up if needed */ | 119 | /* align addr on a size boundary - adjust address up if needed */ |
120 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) | 120 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) |
121 | 121 | ||
122 | /* to align the pointer to the (next) page boundary */ | ||
123 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | ||
124 | |||
125 | /* | 122 | /* |
126 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for | 123 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for |
127 | * "kernelness", use is_kernel_addr() - it should do what you want. | 124 | * "kernelness", use is_kernel_addr() - it should do what you want. |
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 02fd80710e9d..043bfdfe4f73 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -90,6 +90,7 @@ extern unsigned int HPAGE_SHIFT; | |||
90 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | 90 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) |
91 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 91 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
92 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 92 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
93 | #define HUGE_MAX_HSTATE 3 | ||
93 | 94 | ||
94 | #endif /* __ASSEMBLY__ */ | 95 | #endif /* __ASSEMBLY__ */ |
95 | 96 | ||
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h index 68980990f62a..812a1d8f35cb 100644 --- a/include/asm-powerpc/pgalloc-64.h +++ b/include/asm-powerpc/pgalloc-64.h | |||
@@ -22,7 +22,7 @@ extern struct kmem_cache *pgtable_cache[]; | |||
22 | #define PUD_CACHE_NUM 1 | 22 | #define PUD_CACHE_NUM 1 |
23 | #define PMD_CACHE_NUM 1 | 23 | #define PMD_CACHE_NUM 1 |
24 | #define HUGEPTE_CACHE_NUM 2 | 24 | #define HUGEPTE_CACHE_NUM 2 |
25 | #define PTE_NONCACHE_NUM 3 /* from GFP rather than kmem_cache */ | 25 | #define PTE_NONCACHE_NUM 7 /* from GFP rather than kmem_cache */ |
26 | 26 | ||
27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
28 | { | 28 | { |
@@ -119,7 +119,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | |||
119 | __free_page(ptepage); | 119 | __free_page(ptepage); |
120 | } | 120 | } |
121 | 121 | ||
122 | #define PGF_CACHENUM_MASK 0x3 | 122 | #define PGF_CACHENUM_MASK 0x7 |
123 | 123 | ||
124 | typedef struct pgtable_free { | 124 | typedef struct pgtable_free { |
125 | unsigned long val; | 125 | unsigned long val; |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index fd2090dc1dce..c9601dfb4a1e 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -51,6 +51,9 @@ | |||
51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ | 51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ |
52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) | 52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) |
53 | 53 | ||
54 | /* There is no 4K PFN hack on 4K pages */ | ||
55 | #define _PAGE_4K_PFN 0 | ||
56 | |||
54 | /* PAGE_MASK gives the right answer below, but only by accident */ | 57 | /* PAGE_MASK gives the right answer below, but only by accident */ |
55 | /* It should be preserving the high 48 bits and then specifically */ | 58 | /* It should be preserving the high 48 bits and then specifically */ |
56 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ | 59 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ |
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h index c5007712473f..7e54adb35596 100644 --- a/include/asm-powerpc/pgtable-64k.h +++ b/include/asm-powerpc/pgtable-64k.h | |||
@@ -138,7 +138,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd) | |||
138 | unsigned __split = (psize == MMU_PAGE_4K || \ | 138 | unsigned __split = (psize == MMU_PAGE_4K || \ |
139 | psize == MMU_PAGE_64K_AP); \ | 139 | psize == MMU_PAGE_64K_AP); \ |
140 | shift = mmu_psize_defs[psize].shift; \ | 140 | shift = mmu_psize_defs[psize].shift; \ |
141 | for (index = 0; va < __end; index++, va += (1 << shift)) { \ | 141 | for (index = 0; va < __end; index++, va += (1L << shift)) { \ |
142 | if (!__split || __rpte_sub_valid(rpte, index)) do { \ | 142 | if (!__split || __rpte_sub_valid(rpte, index)) do { \ |
143 | 143 | ||
144 | #define pte_iterate_hashed_end() } while(0); } } while(0) | 144 | #define pte_iterate_hashed_end() } while(0); } } while(0) |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 3a96d001cb75..bdbab72f3ebc 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -395,6 +395,12 @@ extern int icache_44x_need_flush; | |||
395 | #ifndef _PAGE_EXEC | 395 | #ifndef _PAGE_EXEC |
396 | #define _PAGE_EXEC 0 | 396 | #define _PAGE_EXEC 0 |
397 | #endif | 397 | #endif |
398 | #ifndef _PAGE_ENDIAN | ||
399 | #define _PAGE_ENDIAN 0 | ||
400 | #endif | ||
401 | #ifndef _PAGE_COHERENT | ||
402 | #define _PAGE_COHERENT 0 | ||
403 | #endif | ||
398 | #ifndef _PMD_PRESENT_MASK | 404 | #ifndef _PMD_PRESENT_MASK |
399 | #define _PMD_PRESENT_MASK _PMD_PRESENT | 405 | #define _PMD_PRESENT_MASK _PMD_PRESENT |
400 | #endif | 406 | #endif |
@@ -405,6 +411,12 @@ extern int icache_44x_need_flush; | |||
405 | 411 | ||
406 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) | 412 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) |
407 | 413 | ||
414 | |||
415 | #define PAGE_PROT_BITS __pgprot(_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | ||
416 | _PAGE_WRITETHRU | _PAGE_ENDIAN | \ | ||
417 | _PAGE_USER | _PAGE_ACCESSED | \ | ||
418 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \ | ||
419 | _PAGE_EXEC | _PAGE_HWEXEC) | ||
408 | /* | 420 | /* |
409 | * Note: the _PAGE_COHERENT bit automatically gets set in the hardware | 421 | * Note: the _PAGE_COHERENT bit automatically gets set in the hardware |
410 | * PTE if CONFIG_SMP is defined (hash_page does this); there is no need | 422 | * PTE if CONFIG_SMP is defined (hash_page does this); there is no need |
@@ -538,6 +550,10 @@ static inline pte_t pte_mkyoung(pte_t pte) { | |||
538 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 550 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
539 | static inline pte_t pte_mkspecial(pte_t pte) { | 551 | static inline pte_t pte_mkspecial(pte_t pte) { |
540 | return pte; } | 552 | return pte; } |
553 | static inline unsigned long pte_pgprot(pte_t pte) | ||
554 | { | ||
555 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; | ||
556 | } | ||
541 | 557 | ||
542 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 558 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
543 | { | 559 | { |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index ab98a9c80b28..ba8000352b9a 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -117,6 +117,10 @@ | |||
117 | #define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE) | 117 | #define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE) |
118 | #define HAVE_PAGE_AGP | 118 | #define HAVE_PAGE_AGP |
119 | 119 | ||
120 | #define PAGE_PROT_BITS __pgprot(_PAGE_GUARDED | _PAGE_COHERENT | \ | ||
121 | _PAGE_NO_CACHE | _PAGE_WRITETHRU | \ | ||
122 | _PAGE_4K_PFN | _PAGE_RW | _PAGE_USER | \ | ||
123 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_EXEC) | ||
120 | /* PTEIDX nibble */ | 124 | /* PTEIDX nibble */ |
121 | #define _PTEIDX_SECONDARY 0x8 | 125 | #define _PTEIDX_SECONDARY 0x8 |
122 | #define _PTEIDX_GROUP_IX 0x7 | 126 | #define _PTEIDX_GROUP_IX 0x7 |
@@ -262,6 +266,10 @@ static inline pte_t pte_mkhuge(pte_t pte) { | |||
262 | return pte; } | 266 | return pte; } |
263 | static inline pte_t pte_mkspecial(pte_t pte) { | 267 | static inline pte_t pte_mkspecial(pte_t pte) { |
264 | return pte; } | 268 | return pte; } |
269 | static inline unsigned long pte_pgprot(pte_t pte) | ||
270 | { | ||
271 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; | ||
272 | } | ||
265 | 273 | ||
266 | /* Atomic PTE updates */ | 274 | /* Atomic PTE updates */ |
267 | static inline unsigned long pte_update(struct mm_struct *mm, | 275 | static inline unsigned long pte_update(struct mm_struct *mm, |