diff options
Diffstat (limited to 'arch/x86')
| -rw-r--r-- | arch/x86/boot/video-vga.c | 22 | ||||
| -rw-r--r-- | arch/x86/include/asm/paravirt.h | 15 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable-2level.h | 7 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable-3level.h | 17 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/kvm.c | 7 | ||||
| -rw-r--r-- | arch/x86/kernel/paravirt.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/vmi_32.c | 6 | ||||
| -rw-r--r-- | arch/x86/mm/pgtable_32.c | 2 | ||||
| -rw-r--r-- | arch/x86/xen/mmu.c | 1 |
10 files changed, 14 insertions, 66 deletions
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c index 5d4742ed4aa2..95d86ce0421c 100644 --- a/arch/x86/boot/video-vga.c +++ b/arch/x86/boot/video-vga.c | |||
| @@ -129,41 +129,45 @@ u16 vga_crtc(void) | |||
| 129 | return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4; | 129 | return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static void vga_set_480_scanlines(int end) | 132 | static void vga_set_480_scanlines(int lines) |
| 133 | { | 133 | { |
| 134 | u16 crtc; | 134 | u16 crtc; /* CRTC base address */ |
| 135 | u8 csel; | 135 | u8 csel; /* CRTC miscellaneous output register */ |
| 136 | u8 ovfw; /* CRTC overflow register */ | ||
| 137 | int end = lines-1; | ||
| 136 | 138 | ||
| 137 | crtc = vga_crtc(); | 139 | crtc = vga_crtc(); |
| 138 | 140 | ||
| 141 | ovfw = 0x3c | ((end >> (8-1)) & 0x02) | ((end >> (9-6)) & 0x40); | ||
| 142 | |||
| 139 | out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */ | 143 | out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */ |
| 140 | out_idx(0x0b, crtc, 0x06); /* Vertical total */ | 144 | out_idx(0x0b, crtc, 0x06); /* Vertical total */ |
| 141 | out_idx(0x3e, crtc, 0x07); /* Vertical overflow */ | 145 | out_idx(ovfw, crtc, 0x07); /* Vertical overflow */ |
| 142 | out_idx(0xea, crtc, 0x10); /* Vertical sync start */ | 146 | out_idx(0xea, crtc, 0x10); /* Vertical sync start */ |
| 143 | out_idx(end, crtc, 0x12); /* Vertical display end */ | 147 | out_idx(end, crtc, 0x12); /* Vertical display end */ |
| 144 | out_idx(0xe7, crtc, 0x15); /* Vertical blank start */ | 148 | out_idx(0xe7, crtc, 0x15); /* Vertical blank start */ |
| 145 | out_idx(0x04, crtc, 0x16); /* Vertical blank end */ | 149 | out_idx(0x04, crtc, 0x16); /* Vertical blank end */ |
| 146 | csel = inb(0x3cc); | 150 | csel = inb(0x3cc); |
| 147 | csel &= 0x0d; | 151 | csel &= 0x0d; |
| 148 | csel |= 0xe2; | 152 | csel |= 0xe2; |
| 149 | outb(csel, 0x3cc); | 153 | outb(csel, 0x3c2); |
| 150 | } | 154 | } |
| 151 | 155 | ||
| 152 | static void vga_set_80x30(void) | 156 | static void vga_set_80x30(void) |
| 153 | { | 157 | { |
| 154 | vga_set_480_scanlines(0xdf); | 158 | vga_set_480_scanlines(30*16); |
| 155 | } | 159 | } |
| 156 | 160 | ||
| 157 | static void vga_set_80x34(void) | 161 | static void vga_set_80x34(void) |
| 158 | { | 162 | { |
| 159 | vga_set_14font(); | 163 | vga_set_14font(); |
| 160 | vga_set_480_scanlines(0xdb); | 164 | vga_set_480_scanlines(34*14); |
| 161 | } | 165 | } |
| 162 | 166 | ||
| 163 | static void vga_set_80x60(void) | 167 | static void vga_set_80x60(void) |
| 164 | { | 168 | { |
| 165 | vga_set_8font(); | 169 | vga_set_8font(); |
| 166 | vga_set_480_scanlines(0xdf); | 170 | vga_set_480_scanlines(60*8); |
| 167 | } | 171 | } |
| 168 | 172 | ||
| 169 | static int vga_set_mode(struct mode_info *mode) | 173 | static int vga_set_mode(struct mode_info *mode) |
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 31fe83b10a4f..7727aa8b7dda 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
| @@ -317,8 +317,6 @@ struct pv_mmu_ops { | |||
| 317 | #if PAGETABLE_LEVELS >= 3 | 317 | #if PAGETABLE_LEVELS >= 3 |
| 318 | #ifdef CONFIG_X86_PAE | 318 | #ifdef CONFIG_X86_PAE |
| 319 | void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); | 319 | void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); |
| 320 | void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, | ||
| 321 | pte_t *ptep, pte_t pte); | ||
| 322 | void (*pte_clear)(struct mm_struct *mm, unsigned long addr, | 320 | void (*pte_clear)(struct mm_struct *mm, unsigned long addr, |
| 323 | pte_t *ptep); | 321 | pte_t *ptep); |
| 324 | void (*pmd_clear)(pmd_t *pmdp); | 322 | void (*pmd_clear)(pmd_t *pmdp); |
| @@ -1365,13 +1363,6 @@ static inline void set_pte_atomic(pte_t *ptep, pte_t pte) | |||
| 1365 | pte.pte, pte.pte >> 32); | 1363 | pte.pte, pte.pte >> 32); |
| 1366 | } | 1364 | } |
| 1367 | 1365 | ||
| 1368 | static inline void set_pte_present(struct mm_struct *mm, unsigned long addr, | ||
| 1369 | pte_t *ptep, pte_t pte) | ||
| 1370 | { | ||
| 1371 | /* 5 arg words */ | ||
| 1372 | pv_mmu_ops.set_pte_present(mm, addr, ptep, pte); | ||
| 1373 | } | ||
| 1374 | |||
| 1375 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, | 1366 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, |
| 1376 | pte_t *ptep) | 1367 | pte_t *ptep) |
| 1377 | { | 1368 | { |
| @@ -1388,12 +1379,6 @@ static inline void set_pte_atomic(pte_t *ptep, pte_t pte) | |||
| 1388 | set_pte(ptep, pte); | 1379 | set_pte(ptep, pte); |
| 1389 | } | 1380 | } |
| 1390 | 1381 | ||
| 1391 | static inline void set_pte_present(struct mm_struct *mm, unsigned long addr, | ||
| 1392 | pte_t *ptep, pte_t pte) | ||
| 1393 | { | ||
| 1394 | set_pte(ptep, pte); | ||
| 1395 | } | ||
| 1396 | |||
| 1397 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, | 1382 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, |
| 1398 | pte_t *ptep) | 1383 | pte_t *ptep) |
| 1399 | { | 1384 | { |
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index c1774ac9da7a..2334982b339e 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
| @@ -26,13 +26,6 @@ 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, | ||
| 30 | unsigned long addr, | ||
| 31 | pte_t *ptep, pte_t pte) | ||
| 32 | { | ||
| 33 | native_set_pte(ptep, pte); | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void native_pmd_clear(pmd_t *pmdp) | 29 | static inline void native_pmd_clear(pmd_t *pmdp) |
| 37 | { | 30 | { |
| 38 | native_set_pmd(pmdp, __pmd(0)); | 31 | native_set_pmd(pmdp, __pmd(0)); |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 3f13cdf61156..177b0165ea01 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
| @@ -31,23 +31,6 @@ static inline void native_set_pte(pte_t *ptep, pte_t pte) | |||
| 31 | ptep->pte_low = pte.pte_low; | 31 | ptep->pte_low = pte.pte_low; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /* | ||
| 35 | * Since this is only called on user PTEs, and the page fault handler | ||
| 36 | * must handle the already racy situation of simultaneous page faults, | ||
| 37 | * we are justified in merely clearing the PTE present bit, followed | ||
| 38 | * by a set. The ordering here is important. | ||
| 39 | */ | ||
| 40 | static inline void native_set_pte_present(struct mm_struct *mm, | ||
| 41 | unsigned long addr, | ||
| 42 | pte_t *ptep, pte_t pte) | ||
| 43 | { | ||
| 44 | ptep->pte_low = 0; | ||
| 45 | smp_wmb(); | ||
| 46 | ptep->pte_high = pte.pte_high; | ||
| 47 | smp_wmb(); | ||
| 48 | ptep->pte_low = pte.pte_low; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) | 34 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) |
| 52 | { | 35 | { |
| 53 | set_64bit((unsigned long long *)(ptep), native_pte_val(pte)); | 36 | set_64bit((unsigned long long *)(ptep), native_pte_val(pte)); |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index d0812e155f1d..29d96d168bc0 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
| @@ -31,8 +31,6 @@ extern struct list_head pgd_list; | |||
| 31 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) | 31 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) |
| 32 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) | 32 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) |
| 33 | 33 | ||
| 34 | #define set_pte_present(mm, addr, ptep, pte) \ | ||
| 35 | native_set_pte_present(mm, addr, ptep, pte) | ||
| 36 | #define set_pte_atomic(ptep, pte) \ | 34 | #define set_pte_atomic(ptep, pte) \ |
| 37 | native_set_pte_atomic(ptep, pte) | 35 | native_set_pte_atomic(ptep, pte) |
| 38 | 36 | ||
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 478bca986eca..33019ddb56b4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
| @@ -138,12 +138,6 @@ static void kvm_set_pte_atomic(pte_t *ptep, pte_t pte) | |||
| 138 | kvm_mmu_write(ptep, pte_val(pte)); | 138 | kvm_mmu_write(ptep, pte_val(pte)); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static void kvm_set_pte_present(struct mm_struct *mm, unsigned long addr, | ||
| 142 | pte_t *ptep, pte_t pte) | ||
| 143 | { | ||
| 144 | kvm_mmu_write(ptep, pte_val(pte)); | ||
| 145 | } | ||
| 146 | |||
| 147 | static void kvm_pte_clear(struct mm_struct *mm, | 141 | static void kvm_pte_clear(struct mm_struct *mm, |
| 148 | unsigned long addr, pte_t *ptep) | 142 | unsigned long addr, pte_t *ptep) |
| 149 | { | 143 | { |
| @@ -220,7 +214,6 @@ static void paravirt_ops_setup(void) | |||
| 220 | #if PAGETABLE_LEVELS >= 3 | 214 | #if PAGETABLE_LEVELS >= 3 |
| 221 | #ifdef CONFIG_X86_PAE | 215 | #ifdef CONFIG_X86_PAE |
| 222 | pv_mmu_ops.set_pte_atomic = kvm_set_pte_atomic; | 216 | pv_mmu_ops.set_pte_atomic = kvm_set_pte_atomic; |
| 223 | pv_mmu_ops.set_pte_present = kvm_set_pte_present; | ||
| 224 | pv_mmu_ops.pte_clear = kvm_pte_clear; | 217 | pv_mmu_ops.pte_clear = kvm_pte_clear; |
| 225 | pv_mmu_ops.pmd_clear = kvm_pmd_clear; | 218 | pv_mmu_ops.pmd_clear = kvm_pmd_clear; |
| 226 | #endif | 219 | #endif |
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 63dd358d8ee1..8e45f4464880 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
| @@ -470,7 +470,6 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
| 470 | #if PAGETABLE_LEVELS >= 3 | 470 | #if PAGETABLE_LEVELS >= 3 |
| 471 | #ifdef CONFIG_X86_PAE | 471 | #ifdef CONFIG_X86_PAE |
| 472 | .set_pte_atomic = native_set_pte_atomic, | 472 | .set_pte_atomic = native_set_pte_atomic, |
| 473 | .set_pte_present = native_set_pte_present, | ||
| 474 | .pte_clear = native_pte_clear, | 473 | .pte_clear = native_pte_clear, |
| 475 | .pmd_clear = native_pmd_clear, | 474 | .pmd_clear = native_pmd_clear, |
| 476 | #endif | 475 | #endif |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 2cc4a90e2cb3..95deb9f2211e 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
| @@ -395,11 +395,6 @@ static void vmi_set_pte_atomic(pte_t *ptep, pte_t pteval) | |||
| 395 | vmi_ops.update_pte(ptep, VMI_PAGE_PT); | 395 | vmi_ops.update_pte(ptep, VMI_PAGE_PT); |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | static void vmi_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) | ||
| 399 | { | ||
| 400 | vmi_ops.set_pte(pte, ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 1)); | ||
| 401 | } | ||
| 402 | |||
| 403 | static void vmi_set_pud(pud_t *pudp, pud_t pudval) | 398 | static void vmi_set_pud(pud_t *pudp, pud_t pudval) |
| 404 | { | 399 | { |
| 405 | /* Um, eww */ | 400 | /* Um, eww */ |
| @@ -750,7 +745,6 @@ static inline int __init activate_vmi(void) | |||
| 750 | pv_mmu_ops.set_pmd = vmi_set_pmd; | 745 | pv_mmu_ops.set_pmd = vmi_set_pmd; |
| 751 | #ifdef CONFIG_X86_PAE | 746 | #ifdef CONFIG_X86_PAE |
| 752 | pv_mmu_ops.set_pte_atomic = vmi_set_pte_atomic; | 747 | pv_mmu_ops.set_pte_atomic = vmi_set_pte_atomic; |
| 753 | pv_mmu_ops.set_pte_present = vmi_set_pte_present; | ||
| 754 | pv_mmu_ops.set_pud = vmi_set_pud; | 748 | pv_mmu_ops.set_pud = vmi_set_pud; |
| 755 | pv_mmu_ops.pte_clear = vmi_pte_clear; | 749 | pv_mmu_ops.pte_clear = vmi_pte_clear; |
| 756 | pv_mmu_ops.pmd_clear = vmi_pmd_clear; | 750 | pv_mmu_ops.pmd_clear = vmi_pmd_clear; |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index f2e477c91c1b..46c8834aedc0 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
| @@ -50,7 +50,7 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pteval) | |||
| 50 | } | 50 | } |
| 51 | pte = pte_offset_kernel(pmd, vaddr); | 51 | pte = pte_offset_kernel(pmd, vaddr); |
| 52 | if (pte_val(pteval)) | 52 | if (pte_val(pteval)) |
| 53 | set_pte_present(&init_mm, vaddr, pte, pteval); | 53 | set_pte_at(&init_mm, vaddr, pte, pteval); |
| 54 | else | 54 | else |
| 55 | pte_clear(&init_mm, vaddr, pte); | 55 | pte_clear(&init_mm, vaddr, pte); |
| 56 | 56 | ||
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 72f6a76dbfb9..db3802fb7b84 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
| @@ -1870,7 +1870,6 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
| 1870 | 1870 | ||
| 1871 | #ifdef CONFIG_X86_PAE | 1871 | #ifdef CONFIG_X86_PAE |
| 1872 | .set_pte_atomic = xen_set_pte_atomic, | 1872 | .set_pte_atomic = xen_set_pte_atomic, |
| 1873 | .set_pte_present = xen_set_pte_at, | ||
| 1874 | .pte_clear = xen_pte_clear, | 1873 | .pte_clear = xen_pte_clear, |
| 1875 | .pmd_clear = xen_pmd_clear, | 1874 | .pmd_clear = xen_pmd_clear, |
| 1876 | #endif /* CONFIG_X86_PAE */ | 1875 | #endif /* CONFIG_X86_PAE */ |
