aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/paravirt.h17
-rw-r--r--include/asm-i386/pgtable.h16
2 files changed, 32 insertions, 1 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h
index 0aacb13bb929..c49b44cdd8ee 100644
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -2,10 +2,11 @@
2#define __ASM_PARAVIRT_H 2#define __ASM_PARAVIRT_H
3/* Various instructions on x86 need to be replaced for 3/* Various instructions on x86 need to be replaced for
4 * para-virtualization: those hooks are defined here. */ 4 * para-virtualization: those hooks are defined here. */
5
6#ifdef CONFIG_PARAVIRT
5#include <linux/stringify.h> 7#include <linux/stringify.h>
6#include <asm/page.h> 8#include <asm/page.h>
7 9
8#ifdef CONFIG_PARAVIRT
9/* These are the most performance critical ops, so we want to be able to patch 10/* These are the most performance critical ops, so we want to be able to patch
10 * callers */ 11 * callers */
11#define PARAVIRT_IRQ_DISABLE 0 12#define PARAVIRT_IRQ_DISABLE 0
@@ -50,6 +51,9 @@ struct paravirt_ops
50 char *(*memory_setup)(void); 51 char *(*memory_setup)(void);
51 void (*init_IRQ)(void); 52 void (*init_IRQ)(void);
52 53
54 void (*pagetable_setup_start)(pgd_t *pgd_base);
55 void (*pagetable_setup_done)(pgd_t *pgd_base);
56
53 void (*banner)(void); 57 void (*banner)(void);
54 58
55 unsigned long (*get_wallclock)(void); 59 unsigned long (*get_wallclock)(void);
@@ -370,6 +374,17 @@ static inline void setup_secondary_clock(void)
370} 374}
371#endif 375#endif
372 376
377static inline void paravirt_pagetable_setup_start(pgd_t *base)
378{
379 if (paravirt_ops.pagetable_setup_start)
380 (*paravirt_ops.pagetable_setup_start)(base);
381}
382
383static inline void paravirt_pagetable_setup_done(pgd_t *base)
384{
385 if (paravirt_ops.pagetable_setup_done)
386 (*paravirt_ops.pagetable_setup_done)(base);
387}
373 388
374#ifdef CONFIG_SMP 389#ifdef CONFIG_SMP
375static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, 390static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 147f2553784d..0790ad6ed440 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -514,6 +514,22 @@ do { \
514 * tables contain all the necessary information. 514 * tables contain all the necessary information.
515 */ 515 */
516#define update_mmu_cache(vma,address,pte) do { } while (0) 516#define update_mmu_cache(vma,address,pte) do { } while (0)
517
518void native_pagetable_setup_start(pgd_t *base);
519void native_pagetable_setup_done(pgd_t *base);
520
521#ifndef CONFIG_PARAVIRT
522static inline void paravirt_pagetable_setup_start(pgd_t *base)
523{
524 native_pagetable_setup_start(base);
525}
526
527static inline void paravirt_pagetable_setup_done(pgd_t *base)
528{
529 native_pagetable_setup_done(base);
530}
531#endif /* !CONFIG_PARAVIRT */
532
517#endif /* !__ASSEMBLY__ */ 533#endif /* !__ASSEMBLY__ */
518 534
519#ifdef CONFIG_FLATMEM 535#ifdef CONFIG_FLATMEM