diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:25:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:25:51 -0400 |
commit | 9e9abecfc0ff3a9ad2ead954b37bbfcb863c775e (patch) | |
tree | 0c3ffda953b82750638a06507591ad587b565ff2 /include/asm-x86/pgtable-2level.h | |
parent | d7bb545d86825e635cab33a1dd81ca0ad7b92887 (diff) | |
parent | 77ad386e596c6b0930cc2e09e3cce485e3ee7f72 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (613 commits)
x86: standalone trampoline code
x86: move suspend wakeup code to C
x86: coding style fixes to arch/x86/kernel/acpi/sleep.c
x86: setup_trampoline() - fix section mismatch warning
x86: section mismatch fixes, #1
x86: fix paranoia about using BIOS quickboot mechanism.
x86: print out buggy mptable
x86: use cpu_online()
x86: use cpumask_of_cpu()
x86: remove unnecessary tmp local variable
x86: remove unnecessary memset()
x86: use ioapic_read_entry() and ioapic_write_entry()
x86: avoid redundant loop in io_apic_level_ack_pending()
x86: remove superfluous initialisation in boot code.
x86: merge mpparse_{32,64}.c
x86: unify mp_register_gsi
x86: unify mp_config_acpi_legacy_irqs
x86: unify mp_register_ioapic
x86: unify uniq_io_apic_id
x86: unify smp_scan_config
...
Diffstat (limited to 'include/asm-x86/pgtable-2level.h')
-rw-r--r-- | include/asm-x86/pgtable-2level.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/asm-x86/pgtable-2level.h b/include/asm-x86/pgtable-2level.h index 701404fab308..46bc52c0eae1 100644 --- a/include/asm-x86/pgtable-2level.h +++ b/include/asm-x86/pgtable-2level.h | |||
@@ -26,7 +26,8 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) | |||
26 | native_set_pte(ptep, pte); | 26 | native_set_pte(ptep, pte); |
27 | } | 27 | } |
28 | 28 | ||
29 | static inline void native_set_pte_present(struct mm_struct *mm, unsigned long addr, | 29 | static inline void native_set_pte_present(struct mm_struct *mm, |
30 | unsigned long addr, | ||
30 | pte_t *ptep, pte_t pte) | 31 | pte_t *ptep, pte_t pte) |
31 | { | 32 | { |
32 | native_set_pte(ptep, pte); | 33 | native_set_pte(ptep, pte); |
@@ -37,7 +38,8 @@ static inline void native_pmd_clear(pmd_t *pmdp) | |||
37 | native_set_pmd(pmdp, __pmd(0)); | 38 | native_set_pmd(pmdp, __pmd(0)); |
38 | } | 39 | } |
39 | 40 | ||
40 | static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *xp) | 41 | static inline void native_pte_clear(struct mm_struct *mm, |
42 | unsigned long addr, pte_t *xp) | ||
41 | { | 43 | { |
42 | *xp = native_make_pte(0); | 44 | *xp = native_make_pte(0); |
43 | } | 45 | } |
@@ -61,16 +63,18 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
61 | */ | 63 | */ |
62 | #define PTE_FILE_MAX_BITS 29 | 64 | #define PTE_FILE_MAX_BITS 29 |
63 | 65 | ||
64 | #define pte_to_pgoff(pte) \ | 66 | #define pte_to_pgoff(pte) \ |
65 | ((((pte).pte_low >> 1) & 0x1f ) + (((pte).pte_low >> 8) << 5 )) | 67 | ((((pte).pte_low >> 1) & 0x1f) + (((pte).pte_low >> 8) << 5)) |
66 | 68 | ||
67 | #define pgoff_to_pte(off) \ | 69 | #define pgoff_to_pte(off) \ |
68 | ((pte_t) { .pte_low = (((off) & 0x1f) << 1) + (((off) >> 5) << 8) + _PAGE_FILE }) | 70 | ((pte_t) { .pte_low = (((off) & 0x1f) << 1) + \ |
71 | (((off) >> 5) << 8) + _PAGE_FILE }) | ||
69 | 72 | ||
70 | /* Encode and de-code a swap entry */ | 73 | /* Encode and de-code a swap entry */ |
71 | #define __swp_type(x) (((x).val >> 1) & 0x1f) | 74 | #define __swp_type(x) (((x).val >> 1) & 0x1f) |
72 | #define __swp_offset(x) ((x).val >> 8) | 75 | #define __swp_offset(x) ((x).val >> 8) |
73 | #define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) | 76 | #define __swp_entry(type, offset) \ |
77 | ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) | ||
74 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) | 78 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) |
75 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) | 79 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) |
76 | 80 | ||