diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2005-02-22 23:42:56 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2005-02-22 23:42:56 -0800 |
| commit | ae3d0a847f4b38812241e4a5dc3371965c752a8c (patch) | |
| tree | 41ba29cfb3f0085b0f82a9387c6e492274678a37 /fs/exec.c | |
| parent | 75be0272cb9b49ee7cb753b008844b89c2269585 (diff) | |
[MM]: Add set_pte_at() which takes 'mm' and 'addr' args.
I'm taking a slightly different approach this time around so things
are easier to integrate. Here is the first patch which builds the
infrastructure. Basically:
1) Add set_pte_at() which is set_pte() with 'mm' and 'addr' arguments
added. All generic code uses set_pte_at().
Most platforms simply get this define:
#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
I chose this method over simply changing all set_pte() call sites
because many platforms implement this in assembler and it would
take forever to preserve the build and stabilize things if modifying
that was necessary.
Soon, with platform maintainer's help, we can kill of set_pte() entirely.
To be honest, there are only a handful of set_pte() call sites in the
arch specific code.
Actually, in this patch ppc64 is completely set_pte() free and does not
define it.
2) pte_clear() gets 'mm' and 'addr' arguments now.
This had a cascading effect on many ptep_test_and_*() routines. Specifically:
a) ptep_test_and_clear_{young,dirty}() now take 'vma' and 'address' args.
b) ptep_get_and_clear now take 'mm' and 'address' args.
c) ptep_mkdirty was deleted, unused by any code.
d) ptep_set_wrprotect now takes 'mm' and 'address' args.
I've tested this patch as follows:
1) compile and run tested on sparc64/SMP
2) compile tested on:
a) ppc64/SMP
b) i386 both with and without PAE enabled
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index ee58e91a9d7f..1a065b2f8444 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -328,7 +328,7 @@ void install_arg_page(struct vm_area_struct *vma, } mm->rss++; lru_cache_add_active(page); - set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte( + set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte( page, vma->vm_page_prot)))); page_add_anon_rmap(page, vma, address); pte_unmap(pte); |
