aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/paravirt.h10
-rw-r--r--arch/x86/include/asm/paravirt_types.h9
-rw-r--r--arch/x86/include/asm/pgtable.h10
-rw-r--r--arch/x86/include/asm/pgtable_types.h4
-rw-r--r--arch/x86/include/asm/x86_init.h13
5 files changed, 15 insertions, 31 deletions
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 3de6435a106a..1caf25b91e6b 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -351,16 +351,6 @@ static inline void paravirt_post_allocator_init(void)
351 (*pv_init_ops.post_allocator_init)(); 351 (*pv_init_ops.post_allocator_init)();
352} 352}
353 353
354static inline void paravirt_pagetable_setup_start(pgd_t *base)
355{
356 (*pv_mmu_ops.pagetable_setup_start)(base);
357}
358
359static inline void paravirt_pagetable_setup_done(pgd_t *base)
360{
361 (*pv_mmu_ops.pagetable_setup_done)(base);
362}
363
364#ifdef CONFIG_SMP 354#ifdef CONFIG_SMP
365static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, 355static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
366 unsigned long start_esp) 356 unsigned long start_esp)
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index ce7723c81a1e..4039eefd3ebc 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -231,15 +231,6 @@ struct pv_apic_ops {
231}; 231};
232 232
233struct pv_mmu_ops { 233struct pv_mmu_ops {
234 /*
235 * Called before/after init_mm pagetable setup. setup_start
236 * may reset %cr3, and may pre-install parts of the pagetable;
237 * pagetable setup is expected to preserve any existing
238 * mapping.
239 */
240 void (*pagetable_setup_start)(pgd_t *pgd_base);
241 void (*pagetable_setup_done)(pgd_t *pgd_base);
242
243 unsigned long (*read_cr2)(void); 234 unsigned long (*read_cr2)(void);
244 void (*write_cr2)(unsigned long); 235 void (*write_cr2)(unsigned long);
245 236
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 16748077559a..60d422adf706 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -56,16 +56,6 @@ extern struct list_head pgd_list;
56#define pte_update(mm, addr, ptep) do { } while (0) 56#define pte_update(mm, addr, ptep) do { } while (0)
57#define pte_update_defer(mm, addr, ptep) do { } while (0) 57#define pte_update_defer(mm, addr, ptep) do { } while (0)
58 58
59static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
60{
61 native_pagetable_setup_start(base);
62}
63
64static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
65{
66 native_pagetable_setup_done(base);
67}
68
69#define pgd_val(x) native_pgd_val(x) 59#define pgd_val(x) native_pgd_val(x)
70#define __pgd(x) native_make_pgd(x) 60#define __pgd(x) native_make_pgd(x)
71 61
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 54cb697f4900..7b467bf3c680 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -299,8 +299,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte);
299extern void native_pagetable_setup_start(pgd_t *base); 299extern void native_pagetable_setup_start(pgd_t *base);
300extern void native_pagetable_setup_done(pgd_t *base); 300extern void native_pagetable_setup_done(pgd_t *base);
301#else 301#else
302static inline void native_pagetable_setup_start(pgd_t *base) {} 302#define native_pagetable_setup_start x86_init_pgd_noop
303static inline void native_pagetable_setup_done(pgd_t *base) {} 303#define native_pagetable_setup_done x86_init_pgd_noop
304#endif 304#endif
305 305
306struct seq_file; 306struct seq_file;
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index ee7c59df7814..b9bb4faefc48 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_PLATFORM_H 1#ifndef _ASM_X86_PLATFORM_H
2#define _ASM_X86_PLATFORM_H 2#define _ASM_X86_PLATFORM_H
3 3
4#include <asm/pgtable_types.h>
5
4struct mpc_bus; 6struct mpc_bus;
5struct mpc_cpu; 7struct mpc_cpu;
6struct mpc_table; 8struct mpc_table;
@@ -67,6 +69,16 @@ struct x86_init_oem {
67}; 69};
68 70
69/** 71/**
72 * struct x86_init_paging - platform specific paging functions
73 * @pagetable_setup_start: platform specific pre paging_init() call
74 * @pagetable_setup_done: platform specific post paging_init() call
75 */
76struct x86_init_paging {
77 void (*pagetable_setup_start)(pgd_t *base);
78 void (*pagetable_setup_done)(pgd_t *base);
79};
80
81/**
70 * struct x86_init_ops - functions for platform specific setup 82 * struct x86_init_ops - functions for platform specific setup
71 * 83 *
72 */ 84 */
@@ -75,6 +87,7 @@ struct x86_init_ops {
75 struct x86_init_mpparse mpparse; 87 struct x86_init_mpparse mpparse;
76 struct x86_init_irqs irqs; 88 struct x86_init_irqs irqs;
77 struct x86_init_oem oem; 89 struct x86_init_oem oem;
90 struct x86_init_paging paging;
78}; 91};
79 92
80extern struct x86_init_ops x86_init; 93extern struct x86_init_ops x86_init;