2005-04-16 15:20:36 -07:00
|
|
|
|
2008-08-02 10:55:55 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 00:22:09 +00:00
|
|
|
|
2006-06-20 20:46:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-22 17:30:28 +00:00
|
|
|
|
2012-10-02 18:01:25 +01:00
|
|
|
|
2006-06-20 20:46:52 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-11-22 17:30:28 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-12-13 14:34:43 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-07-25 14:39:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-22 17:30:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-05 17:41:02 +01:00
|
|
|
|
2011-11-22 17:30:29 +00:00
|
|
|
|
2011-09-05 17:41:02 +01:00
|
|
|
|
2005-05-03 12:20:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-25 00:35:59 -04:00
|
|
|
|
2005-05-03 12:20:29 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 00:19:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-11-16 00:19:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-04-19 13:29:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-28 21:43:40 +00:00
|
|
|
|
2005-04-19 13:29:21 -07:00
|
|
|
|
2013-04-29 15:07:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-02-11 13:45:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-09-06 20:04:59 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-02-11 13:45:13 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-01-20 18:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-09-07 17:16:54 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-09-01 05:22:12 +01:00
|
|
|
|
2010-11-16 08:40:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 00:23:31 +00:00
|
|
|
|
|
|
|
|
|
2013-01-20 18:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-06 05:34:16 +01:00
|
|
|
|
2008-09-07 17:16:54 +01:00
|
|
|
|
2012-09-01 05:22:12 +01:00
|
|
|
|
2010-11-16 08:40:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-11 13:45:13 +01:00
|
|
|
|
2010-11-26 17:39:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-28 12:42:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-26 17:39:28 +00:00
|
|
|
|
|
|
|
|
|
2010-11-16 00:23:31 +00:00
|
|
|
|
2010-11-26 17:39:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 00:23:31 +00:00
|
|
|
|
2010-11-26 17:39:28 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-11 13:45:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-07 17:16:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-02-11 13:45:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-07 17:16:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-26 20:12:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-25 23:31:48 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-09-05 17:52:36 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-09-05 17:52:36 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 00:16:01 +00:00
|
|
|
|
|
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-05 17:52:36 +01:00
|
|
|
|
2011-02-15 12:42:57 +01:00
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARM: 7985/1: mm: implement pte_accessible for faulting mappings
The pte_accessible macro can be used to identify page table entries
capable of being cached by a TLB. In principle, this differs from
pte_present, since PROT_NONE mappings are mapped using invalid entries
identified as present and ptes designated as `old' can use either
invalid entries or those with the access flag cleared (guaranteed not to
be in the TLB). However, there is a race to take care of, as described
in 20841405940e ("mm: fix TLB flush race between migration, and
change_protection_range"), between a page being migrated and mprotected
at the same time. In this case, we can check whether a TLB invalidation
is pending for the mm and if so, temporarily consider PROT_NONE mappings
as valid.
This patch implements a quick pte_accessible macro for ARM by simply
checking if the pte is valid/present depending on the mm. For classic
MMU, these checks are identical and will generate some false positives
for PROT_NONE mappings, but this is better than the current asm-generic
definition of ((void)(pte),1).
Finally, pte_present_user is moved to use pte_valid (and renamed
appropriately) since we don't care about cache flushing for faulting
mappings.
Acked-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-02-21 17:01:48 +01:00
|
|
|
|
|
|
|
|
|
2010-11-16 08:40:36 +00:00
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
2010-11-16 00:23:31 +00:00
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
ARM: 7985/1: mm: implement pte_accessible for faulting mappings
The pte_accessible macro can be used to identify page table entries
capable of being cached by a TLB. In principle, this differs from
pte_present, since PROT_NONE mappings are mapped using invalid entries
identified as present and ptes designated as `old' can use either
invalid entries or those with the access flag cleared (guaranteed not to
be in the TLB). However, there is a race to take care of, as described
in 20841405940e ("mm: fix TLB flush race between migration, and
change_protection_range"), between a page being migrated and mprotected
at the same time. In this case, we can check whether a TLB invalidation
is pending for the mm and if so, temporarily consider PROT_NONE mappings
as valid.
This patch implements a quick pte_accessible macro for ARM by simply
checking if the pte is valid/present depending on the mm. For classic
MMU, these checks are identical and will generate some false positives
for PROT_NONE mappings, but this is better than the current asm-generic
definition of ((void)(pte),1).
Finally, pte_present_user is moved to use pte_valid (and renamed
appropriately) since we don't care about cache flushing for faulting
mappings.
Acked-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-02-21 17:01:48 +01:00
|
|
|
|
|
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
2012-08-10 17:51:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARM: 7985/1: mm: implement pte_accessible for faulting mappings
The pte_accessible macro can be used to identify page table entries
capable of being cached by a TLB. In principle, this differs from
pte_present, since PROT_NONE mappings are mapped using invalid entries
identified as present and ptes designated as `old' can use either
invalid entries or those with the access flag cleared (guaranteed not to
be in the TLB). However, there is a race to take care of, as described
in 20841405940e ("mm: fix TLB flush race between migration, and
change_protection_range"), between a page being migrated and mprotected
at the same time. In this case, we can check whether a TLB invalidation
is pending for the mm and if so, temporarily consider PROT_NONE mappings
as valid.
This patch implements a quick pte_accessible macro for ARM by simply
checking if the pte is valid/present depending on the mm. For classic
MMU, these checks are identical and will generate some false positives
for PROT_NONE mappings, but this is better than the current asm-generic
definition of ((void)(pte),1).
Finally, pte_present_user is moved to use pte_valid (and renamed
appropriately) since we don't care about cache flushing for faulting
mappings.
Acked-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-02-21 17:01:48 +01:00
|
|
|
|
2012-08-10 17:51:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-16 08:40:36 +00:00
|
|
|
|
|
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-17 10:29:12 -07:00
|
|
|
|
|
|
|
|
|
2010-11-26 20:35:25 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-18 17:51:20 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
|
|
|
|
|
2012-08-10 17:51:19 +01:00
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
2012-08-10 17:51:19 +01:00
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-07-11 16:57:20 +01:00
|
|
|
|
2012-08-10 17:51:19 +01:00
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-05 11:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-05 11:52:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-11 16:57:20 +01:00
|
|
|
|
2009-07-05 11:52:21 +01:00
|
|
|
|
|
|
|
|
|
2009-07-11 16:57:20 +01:00
|
|
|
|
|
|
|
|
|
2009-07-05 11:52:21 +01:00
|
|
|
|
2009-07-11 16:57:20 +01:00
|
|
|
|
2009-07-05 11:52:21 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-22 04:01:07 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-20 20:46:52 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|