pgtable.h (d85ddd1318e66c0c2665dbfcbc21a8b66c9152aa) | pgtable.h (12564485ed8caac3c18572793ec01330792c7191) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ 3#define _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ 4 5#include <asm-generic/pgtable-nop4d.h> 6 7#ifndef __ASSEMBLY__ 8#include <linux/mmdebug.h> --- 6 unchanged lines hidden (view full) --- 15#define _PAGE_BIT_SWAP_TYPE 0 16 17#define _PAGE_EXEC 0x00001 /* execute permission */ 18#define _PAGE_WRITE 0x00002 /* write access allowed */ 19#define _PAGE_READ 0x00004 /* read access allowed */ 20#define _PAGE_RW (_PAGE_READ | _PAGE_WRITE) 21#define _PAGE_RWX (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC) 22#define _PAGE_PRIVILEGED 0x00008 /* kernel access only */ | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ 3#define _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ 4 5#include <asm-generic/pgtable-nop4d.h> 6 7#ifndef __ASSEMBLY__ 8#include <linux/mmdebug.h> --- 6 unchanged lines hidden (view full) --- 15#define _PAGE_BIT_SWAP_TYPE 0 16 17#define _PAGE_EXEC 0x00001 /* execute permission */ 18#define _PAGE_WRITE 0x00002 /* write access allowed */ 19#define _PAGE_READ 0x00004 /* read access allowed */ 20#define _PAGE_RW (_PAGE_READ | _PAGE_WRITE) 21#define _PAGE_RWX (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC) 22#define _PAGE_PRIVILEGED 0x00008 /* kernel access only */ |
23 24#define _PAGE_CACHE_CTL 0x00030 /* Bits for the folowing cache modes */ 25 /* No bits set is normal cacheable memory */ 26 /* 0x00010 unused, is SAO bit on radix POWER9 */ | 23#define _PAGE_SAO 0x00010 /* Strong access order */ |
27#define _PAGE_NON_IDEMPOTENT 0x00020 /* non idempotent memory */ 28#define _PAGE_TOLERANT 0x00030 /* tolerant memory, cache inhibited */ | 24#define _PAGE_NON_IDEMPOTENT 0x00020 /* non idempotent memory */ 25#define _PAGE_TOLERANT 0x00030 /* tolerant memory, cache inhibited */ |
29 | |
30#define _PAGE_DIRTY 0x00080 /* C: page changed */ 31#define _PAGE_ACCESSED 0x00100 /* R: page referenced */ 32/* 33 * Software bits 34 */ 35#define _RPAGE_SW0 0x2000000000000000UL 36#define _RPAGE_SW1 0x00800 37#define _RPAGE_SW2 0x00400 --- 785 unchanged lines hidden (view full) --- 823static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, 824 pte_t *ptep, pte_t pte, int percpu) 825{ 826 if (radix_enabled()) 827 return radix__set_pte_at(mm, addr, ptep, pte, percpu); 828 return hash__set_pte_at(mm, addr, ptep, pte, percpu); 829} 830 | 26#define _PAGE_DIRTY 0x00080 /* C: page changed */ 27#define _PAGE_ACCESSED 0x00100 /* R: page referenced */ 28/* 29 * Software bits 30 */ 31#define _RPAGE_SW0 0x2000000000000000UL 32#define _RPAGE_SW1 0x00800 33#define _RPAGE_SW2 0x00400 --- 785 unchanged lines hidden (view full) --- 819static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, 820 pte_t *ptep, pte_t pte, int percpu) 821{ 822 if (radix_enabled()) 823 return radix__set_pte_at(mm, addr, ptep, pte, percpu); 824 return hash__set_pte_at(mm, addr, ptep, pte, percpu); 825} 826 |
827#define _PAGE_CACHE_CTL (_PAGE_SAO | _PAGE_NON_IDEMPOTENT | _PAGE_TOLERANT) 828 |
|
831#define pgprot_noncached pgprot_noncached 832static inline pgprot_t pgprot_noncached(pgprot_t prot) 833{ 834 return __pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | 835 _PAGE_NON_IDEMPOTENT); 836} 837 838#define pgprot_noncached_wc pgprot_noncached_wc --- 531 unchanged lines hidden --- | 829#define pgprot_noncached pgprot_noncached 830static inline pgprot_t pgprot_noncached(pgprot_t prot) 831{ 832 return __pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | 833 _PAGE_NON_IDEMPOTENT); 834} 835 836#define pgprot_noncached_wc pgprot_noncached_wc --- 531 unchanged lines hidden --- |