pgtable.h (b70366e5d31788650b2a5cec5cd13ea80ac7e44a) | pgtable.h (d27cfa1fc823d35a6cf45ba51f5623db8a14a9b9) |
---|---|
1/* 2 * Copyright (C) 2012 ARM Ltd. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 60 unchanged lines hidden (view full) --- 69 */ 70#define pte_present(pte) (!!(pte_val(pte) & (PTE_VALID | PTE_PROT_NONE))) 71#define pte_young(pte) (!!(pte_val(pte) & PTE_AF)) 72#define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL)) 73#define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) 74#define pte_user_exec(pte) (!(pte_val(pte) & PTE_UXN)) 75#define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT)) 76 | 1/* 2 * Copyright (C) 2012 ARM Ltd. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 60 unchanged lines hidden (view full) --- 69 */ 70#define pte_present(pte) (!!(pte_val(pte) & (PTE_VALID | PTE_PROT_NONE))) 71#define pte_young(pte) (!!(pte_val(pte) & PTE_AF)) 72#define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL)) 73#define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) 74#define pte_user_exec(pte) (!(pte_val(pte) & PTE_UXN)) 75#define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT)) 76 |
77#define pte_cont_addr_end(addr, end) \ 78({ unsigned long __boundary = ((addr) + CONT_PTE_SIZE) & CONT_PTE_MASK; \ 79 (__boundary - 1 < (end) - 1) ? __boundary : (end); \ 80}) 81 82#define pmd_cont_addr_end(addr, end) \ 83({ unsigned long __boundary = ((addr) + CONT_PMD_SIZE) & CONT_PMD_MASK; \ 84 (__boundary - 1 < (end) - 1) ? __boundary : (end); \ 85}) 86 |
|
77#ifdef CONFIG_ARM64_HW_AFDBM 78#define pte_hw_dirty(pte) (pte_write(pte) && !(pte_val(pte) & PTE_RDONLY)) 79#else 80#define pte_hw_dirty(pte) (0) 81#endif 82#define pte_sw_dirty(pte) (!!(pte_val(pte) & PTE_DIRTY)) 83#define pte_dirty(pte) (pte_sw_dirty(pte) || pte_hw_dirty(pte)) 84 --- 652 unchanged lines hidden --- | 87#ifdef CONFIG_ARM64_HW_AFDBM 88#define pte_hw_dirty(pte) (pte_write(pte) && !(pte_val(pte) & PTE_RDONLY)) 89#else 90#define pte_hw_dirty(pte) (0) 91#endif 92#define pte_sw_dirty(pte) (!!(pte_val(pte) & PTE_DIRTY)) 93#define pte_dirty(pte) (pte_sw_dirty(pte) || pte_hw_dirty(pte)) 94 --- 652 unchanged lines hidden --- |