linux/arch
Suresh Siddha 5180da410d x86, pat: separate the pfn attribute tracking for remap_pfn_range and vm_insert_pfn
With PAT enabled, vm_insert_pfn() looks up the existing pfn memory
attribute and uses it.  Expectation is that the driver reserves the
memory attributes for the pfn before calling vm_insert_pfn().

remap_pfn_range() (when called for the whole vma) will setup a new
attribute (based on the prot argument) for the specified pfn range.
This addresses the legacy usage which typically calls remap_pfn_range()
with a desired memory attribute.  For ranges smaller than the vma size
(which is typically not the case), remap_pfn_range() will use the
existing memory attribute for the pfn range.

Expose two different API's for these different behaviors.
track_pfn_insert() for tracking the pfn attribute set by vm_insert_pfn()
and track_pfn_remap() for the remap_pfn_range().

This cleanup also prepares the ground for the track/untrack pfn vma
routines to take over the ownership of setting PAT specific vm_flag in
the 'vma'.

[khlebnikov@openvz.org: Clear checks in track_pfn_remap()]
[akpm@linux-foundation.org: tweak a few comments]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Venkatesh Pallipadi <venki@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:16 +09:00
..
alpha Prepared for main script 2012-10-03 13:45:43 -07:00
arm Kconfig: clean up the long arch list for the DEBUG_KMEMLEAK config option 2012-10-09 16:22:14 +09:00
arm64 Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry 2012-10-09 16:22:14 +09:00
avr32 cross-arch: don't corrupt personality flags upon exec() 2012-10-06 03:04:47 +09:00
blackfin Kconfig: clean up the long arch list for the UID16 config option 2012-10-09 16:22:13 +09:00
c6x Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers 2012-10-07 07:55:10 +09:00
cris Kconfig: clean up the long arch list for the UID16 config option 2012-10-09 16:22:13 +09:00
frv Kconfig: clean up the long arch list for the DEBUG_BUGVERBOSE config option 2012-10-09 16:22:14 +09:00
h8300 Kconfig: clean up the long arch list for the UID16 config option 2012-10-09 16:22:13 +09:00
hexagon Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers 2012-10-07 07:55:10 +09:00
ia64 Features: 2012-10-07 07:13:01 +09:00
m32r Kconfig: clean up the long arch list for the DEBUG_BUGVERBOSE config option 2012-10-09 16:22:14 +09:00
m68k Kconfig: clean up the long arch list for the DEBUG_BUGVERBOSE config option 2012-10-09 16:22:14 +09:00
microblaze Kconfig: clean up the long arch list for the DEBUG_KMEMLEAK config option 2012-10-09 16:22:14 +09:00
mips Kconfig: clean up the long arch list for the DEBUG_KMEMLEAK config option 2012-10-09 16:22:14 +09:00
mn10300 cross-arch: don't corrupt personality flags upon exec() 2012-10-06 03:04:47 +09:00
openrisc Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers 2012-10-07 07:55:10 +09:00
parisc compat: move compat_siginfo_t definition to asm/compat.h 2012-10-06 03:05:16 +09:00
powerpc Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry 2012-10-09 16:22:14 +09:00
s390 Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry 2012-10-09 16:22:14 +09:00
score Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers 2012-10-07 07:55:10 +09:00
sh Kconfig: clean up the long arch list for the DEBUG_BUGVERBOSE config option 2012-10-09 16:22:14 +09:00
sparc Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry 2012-10-09 16:22:14 +09:00
tile Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry 2012-10-09 16:22:14 +09:00
um Kconfig: clean up the long arch list for the UID16 config option 2012-10-09 16:22:13 +09:00
unicore32 Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers 2012-10-07 07:55:10 +09:00
x86 x86, pat: separate the pfn attribute tracking for remap_pfn_range and vm_insert_pfn 2012-10-09 16:22:16 +09:00
xtensa cross-arch: don't corrupt personality flags upon exec() 2012-10-06 03:04:47 +09:00
.gitignore
Kconfig Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-10-01 10:43:39 -07:00