diff options
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 5e4686d70f62..bea215230b20 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | 29 | ||
30 | #include <xen/interface/xen.h> | 30 | #include <xen/interface/xen.h> |
31 | #include <xen/interface/version.h> | ||
31 | #include <xen/interface/physdev.h> | 32 | #include <xen/interface/physdev.h> |
32 | #include <xen/interface/vcpu.h> | 33 | #include <xen/interface/vcpu.h> |
33 | #include <xen/features.h> | 34 | #include <xen/features.h> |
@@ -793,7 +794,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) | |||
793 | 794 | ||
794 | ret = 0; | 795 | ret = 0; |
795 | 796 | ||
796 | switch(msr) { | 797 | switch (msr) { |
797 | #ifdef CONFIG_X86_64 | 798 | #ifdef CONFIG_X86_64 |
798 | unsigned which; | 799 | unsigned which; |
799 | u64 base; | 800 | u64 base; |
@@ -1453,7 +1454,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1453 | 1454 | ||
1454 | ident_pte = 0; | 1455 | ident_pte = 0; |
1455 | pfn = 0; | 1456 | pfn = 0; |
1456 | for(pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { | 1457 | for (pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { |
1457 | pte_t *pte_page; | 1458 | pte_t *pte_page; |
1458 | 1459 | ||
1459 | /* Reuse or allocate a page of ptes */ | 1460 | /* Reuse or allocate a page of ptes */ |
@@ -1471,7 +1472,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | /* Install mappings */ | 1474 | /* Install mappings */ |
1474 | for(pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { | 1475 | for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { |
1475 | pte_t pte; | 1476 | pte_t pte; |
1476 | 1477 | ||
1477 | if (pfn > max_pfn_mapped) | 1478 | if (pfn > max_pfn_mapped) |
@@ -1485,7 +1486,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1485 | } | 1486 | } |
1486 | } | 1487 | } |
1487 | 1488 | ||
1488 | for(pteidx = 0; pteidx < ident_pte; pteidx += PTRS_PER_PTE) | 1489 | for (pteidx = 0; pteidx < ident_pte; pteidx += PTRS_PER_PTE) |
1489 | set_page_prot(&level1_ident_pgt[pteidx], PAGE_KERNEL_RO); | 1490 | set_page_prot(&level1_ident_pgt[pteidx], PAGE_KERNEL_RO); |
1490 | 1491 | ||
1491 | set_page_prot(pmd, PAGE_KERNEL_RO); | 1492 | set_page_prot(pmd, PAGE_KERNEL_RO); |
@@ -1499,7 +1500,7 @@ static void convert_pfn_mfn(void *v) | |||
1499 | 1500 | ||
1500 | /* All levels are converted the same way, so just treat them | 1501 | /* All levels are converted the same way, so just treat them |
1501 | as ptes. */ | 1502 | as ptes. */ |
1502 | for(i = 0; i < PTRS_PER_PTE; i++) | 1503 | for (i = 0; i < PTRS_PER_PTE; i++) |
1503 | pte[i] = xen_make_pte(pte[i].pte); | 1504 | pte[i] = xen_make_pte(pte[i].pte); |
1504 | } | 1505 | } |
1505 | 1506 | ||
@@ -1514,7 +1515,8 @@ static void convert_pfn_mfn(void *v) | |||
1514 | * of the physical mapping once some sort of allocator has been set | 1515 | * of the physical mapping once some sort of allocator has been set |
1515 | * up. | 1516 | * up. |
1516 | */ | 1517 | */ |
1517 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | 1518 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, |
1519 | unsigned long max_pfn) | ||
1518 | { | 1520 | { |
1519 | pud_t *l3; | 1521 | pud_t *l3; |
1520 | pmd_t *l2; | 1522 | pmd_t *l2; |
@@ -1577,7 +1579,8 @@ static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pf | |||
1577 | #else /* !CONFIG_X86_64 */ | 1579 | #else /* !CONFIG_X86_64 */ |
1578 | static pmd_t level2_kernel_pgt[PTRS_PER_PMD] __page_aligned_bss; | 1580 | static pmd_t level2_kernel_pgt[PTRS_PER_PMD] __page_aligned_bss; |
1579 | 1581 | ||
1580 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | 1582 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, |
1583 | unsigned long max_pfn) | ||
1581 | { | 1584 | { |
1582 | pmd_t *kernel_pmd; | 1585 | pmd_t *kernel_pmd; |
1583 | 1586 | ||