diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:59:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:59:11 -0500 |
commit | 4522d58275f124105819723e24e912c8e5bf3cdd (patch) | |
tree | b92c29014fadffe049c1925676037f0092b8d112 /include/asm-i386/pgtable.h | |
parent | 6cf24f031bc97cb5a7c9df3b6e73c45b628b2b28 (diff) | |
parent | 64a26a731235b59c9d73bbe82c1f896d57400d37 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
[PATCH] x86-64: Export smp_call_function_single
[PATCH] i386: Clean up smp_tune_scheduling()
[PATCH] unwinder: move .eh_frame to RODATA
[PATCH] unwinder: fully support linker generated .eh_frame_hdr section
[PATCH] x86-64: don't use set_irq_regs()
[PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
[PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
[PATCH] i386: replace kmalloc+memset with kzalloc
[PATCH] x86-64: remove remaining pc98 code
[PATCH] x86-64: remove unused variable
[PATCH] x86-64: Fix constraints in atomic_add_return()
[PATCH] x86-64: fix asm constraints in i386 atomic_add_return
[PATCH] x86-64: Correct documentation for bzImage protocol v2.05
[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
[PATCH] x86-64: Fix numaq build error
[PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
[PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
[PATCH] x86-64: Clarify error message in GART code
[PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
[PATCH] x86-64: Remove unwind stack pointer alignment forcing again
...
Fixed conflict in include/linux/uaccess.h manually
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/pgtable.h')
-rw-r--r-- | include/asm-i386/pgtable.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index bfee7ddfff53..e6a4723f0eb1 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
16 | #include <asm/fixmap.h> | 16 | #include <asm/fixmap.h> |
17 | #include <linux/threads.h> | 17 | #include <linux/threads.h> |
18 | #include <asm/paravirt.h> | ||
18 | 19 | ||
19 | #ifndef _I386_BITOPS_H | 20 | #ifndef _I386_BITOPS_H |
20 | #include <asm/bitops.h> | 21 | #include <asm/bitops.h> |
@@ -246,6 +247,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p | |||
246 | # include <asm/pgtable-2level.h> | 247 | # include <asm/pgtable-2level.h> |
247 | #endif | 248 | #endif |
248 | 249 | ||
250 | #ifndef CONFIG_PARAVIRT | ||
249 | /* | 251 | /* |
250 | * Rules for using pte_update - it must be called after any PTE update which | 252 | * Rules for using pte_update - it must be called after any PTE update which |
251 | * has not been done using the set_pte / clear_pte interfaces. It is used by | 253 | * has not been done using the set_pte / clear_pte interfaces. It is used by |
@@ -261,7 +263,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p | |||
261 | */ | 263 | */ |
262 | #define pte_update(mm, addr, ptep) do { } while (0) | 264 | #define pte_update(mm, addr, ptep) do { } while (0) |
263 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 265 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
264 | 266 | #endif | |
265 | 267 | ||
266 | /* | 268 | /* |
267 | * We only update the dirty/accessed state if we set | 269 | * We only update the dirty/accessed state if we set |
@@ -275,7 +277,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p | |||
275 | do { \ | 277 | do { \ |
276 | if (dirty) { \ | 278 | if (dirty) { \ |
277 | (ptep)->pte_low = (entry).pte_low; \ | 279 | (ptep)->pte_low = (entry).pte_low; \ |
278 | pte_update_defer((vma)->vm_mm, (addr), (ptep)); \ | 280 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ |
279 | flush_tlb_page(vma, address); \ | 281 | flush_tlb_page(vma, address); \ |
280 | } \ | 282 | } \ |
281 | } while (0) | 283 | } while (0) |
@@ -305,7 +307,7 @@ do { \ | |||
305 | __dirty = pte_dirty(*(ptep)); \ | 307 | __dirty = pte_dirty(*(ptep)); \ |
306 | if (__dirty) { \ | 308 | if (__dirty) { \ |
307 | clear_bit(_PAGE_BIT_DIRTY, &(ptep)->pte_low); \ | 309 | clear_bit(_PAGE_BIT_DIRTY, &(ptep)->pte_low); \ |
308 | pte_update_defer((vma)->vm_mm, (addr), (ptep)); \ | 310 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ |
309 | flush_tlb_page(vma, address); \ | 311 | flush_tlb_page(vma, address); \ |
310 | } \ | 312 | } \ |
311 | __dirty; \ | 313 | __dirty; \ |
@@ -318,12 +320,20 @@ do { \ | |||
318 | __young = pte_young(*(ptep)); \ | 320 | __young = pte_young(*(ptep)); \ |
319 | if (__young) { \ | 321 | if (__young) { \ |
320 | clear_bit(_PAGE_BIT_ACCESSED, &(ptep)->pte_low); \ | 322 | clear_bit(_PAGE_BIT_ACCESSED, &(ptep)->pte_low); \ |
321 | pte_update_defer((vma)->vm_mm, (addr), (ptep)); \ | 323 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ |
322 | flush_tlb_page(vma, address); \ | 324 | flush_tlb_page(vma, address); \ |
323 | } \ | 325 | } \ |
324 | __young; \ | 326 | __young; \ |
325 | }) | 327 | }) |
326 | 328 | ||
329 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
330 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ||
331 | { | ||
332 | pte_t pte = raw_ptep_get_and_clear(ptep); | ||
333 | pte_update(mm, addr, ptep); | ||
334 | return pte; | ||
335 | } | ||
336 | |||
327 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | 337 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL |
328 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | 338 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) |
329 | { | 339 | { |