diff options
author | Daniel Kiper <dkiper@net-space.pl> | 2011-05-12 17:19:53 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-19 11:30:29 -0400 |
commit | 3f508953dd2ebcbcd32d28d0b6aad4d76980e722 (patch) | |
tree | 9cacaf12639717b9887d71d108cef6997b242d70 /arch/x86/xen | |
parent | ae15a3b4d1374b733016ce4b4148b2ba42bbeb0f (diff) |
arch/x86/xen/mmu: Cleanup code/data sections definitions
Cleanup code/data sections definitions
accordingly to include/linux/init.h.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
[v1: Rebased on top of latest linus's to include fixes in mmu.c]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 0684f3c74d53..b5f776f60b1b 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1054,7 +1054,7 @@ void xen_mm_pin_all(void) | |||
1054 | * that's before we have page structures to store the bits. So do all | 1054 | * that's before we have page structures to store the bits. So do all |
1055 | * the book-keeping now. | 1055 | * the book-keeping now. |
1056 | */ | 1056 | */ |
1057 | static __init int xen_mark_pinned(struct mm_struct *mm, struct page *page, | 1057 | static int __init xen_mark_pinned(struct mm_struct *mm, struct page *page, |
1058 | enum pt_level level) | 1058 | enum pt_level level) |
1059 | { | 1059 | { |
1060 | SetPagePinned(page); | 1060 | SetPagePinned(page); |
@@ -1271,7 +1271,7 @@ void xen_exit_mmap(struct mm_struct *mm) | |||
1271 | spin_unlock(&mm->page_table_lock); | 1271 | spin_unlock(&mm->page_table_lock); |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | static __init void xen_pagetable_setup_start(pgd_t *base) | 1274 | static void __init xen_pagetable_setup_start(pgd_t *base) |
1275 | { | 1275 | { |
1276 | } | 1276 | } |
1277 | 1277 | ||
@@ -1291,7 +1291,7 @@ static __init void xen_mapping_pagetable_reserve(u64 start, u64 end) | |||
1291 | 1291 | ||
1292 | static void xen_post_allocator_init(void); | 1292 | static void xen_post_allocator_init(void); |
1293 | 1293 | ||
1294 | static __init void xen_pagetable_setup_done(pgd_t *base) | 1294 | static void __init xen_pagetable_setup_done(pgd_t *base) |
1295 | { | 1295 | { |
1296 | xen_setup_shared_info(); | 1296 | xen_setup_shared_info(); |
1297 | xen_post_allocator_init(); | 1297 | xen_post_allocator_init(); |
@@ -1488,7 +1488,7 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
1488 | } | 1488 | } |
1489 | 1489 | ||
1490 | #ifdef CONFIG_X86_32 | 1490 | #ifdef CONFIG_X86_32 |
1491 | static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | 1491 | static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte) |
1492 | { | 1492 | { |
1493 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ | 1493 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ |
1494 | if (pte_val_ma(*ptep) & _PAGE_PRESENT) | 1494 | if (pte_val_ma(*ptep) & _PAGE_PRESENT) |
@@ -1498,7 +1498,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | |||
1498 | return pte; | 1498 | return pte; |
1499 | } | 1499 | } |
1500 | #else /* CONFIG_X86_64 */ | 1500 | #else /* CONFIG_X86_64 */ |
1501 | static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | 1501 | static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte) |
1502 | { | 1502 | { |
1503 | unsigned long pfn = pte_pfn(pte); | 1503 | unsigned long pfn = pte_pfn(pte); |
1504 | 1504 | ||
@@ -1519,7 +1519,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | |||
1519 | 1519 | ||
1520 | /* Init-time set_pte while constructing initial pagetables, which | 1520 | /* Init-time set_pte while constructing initial pagetables, which |
1521 | doesn't allow RO pagetable pages to be remapped RW */ | 1521 | doesn't allow RO pagetable pages to be remapped RW */ |
1522 | static __init void xen_set_pte_init(pte_t *ptep, pte_t pte) | 1522 | static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) |
1523 | { | 1523 | { |
1524 | pte = mask_rw_pte(ptep, pte); | 1524 | pte = mask_rw_pte(ptep, pte); |
1525 | 1525 | ||
@@ -1537,7 +1537,7 @@ static void pin_pagetable_pfn(unsigned cmd, unsigned long pfn) | |||
1537 | 1537 | ||
1538 | /* Early in boot, while setting up the initial pagetable, assume | 1538 | /* Early in boot, while setting up the initial pagetable, assume |
1539 | everything is pinned. */ | 1539 | everything is pinned. */ |
1540 | static __init void xen_alloc_pte_init(struct mm_struct *mm, unsigned long pfn) | 1540 | static void __init xen_alloc_pte_init(struct mm_struct *mm, unsigned long pfn) |
1541 | { | 1541 | { |
1542 | #ifdef CONFIG_FLATMEM | 1542 | #ifdef CONFIG_FLATMEM |
1543 | BUG_ON(mem_map); /* should only be used early */ | 1543 | BUG_ON(mem_map); /* should only be used early */ |
@@ -1547,7 +1547,7 @@ static __init void xen_alloc_pte_init(struct mm_struct *mm, unsigned long pfn) | |||
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | /* Used for pmd and pud */ | 1549 | /* Used for pmd and pud */ |
1550 | static __init void xen_alloc_pmd_init(struct mm_struct *mm, unsigned long pfn) | 1550 | static void __init xen_alloc_pmd_init(struct mm_struct *mm, unsigned long pfn) |
1551 | { | 1551 | { |
1552 | #ifdef CONFIG_FLATMEM | 1552 | #ifdef CONFIG_FLATMEM |
1553 | BUG_ON(mem_map); /* should only be used early */ | 1553 | BUG_ON(mem_map); /* should only be used early */ |
@@ -1557,13 +1557,13 @@ static __init void xen_alloc_pmd_init(struct mm_struct *mm, unsigned long pfn) | |||
1557 | 1557 | ||
1558 | /* Early release_pte assumes that all pts are pinned, since there's | 1558 | /* Early release_pte assumes that all pts are pinned, since there's |
1559 | only init_mm and anything attached to that is pinned. */ | 1559 | only init_mm and anything attached to that is pinned. */ |
1560 | static __init void xen_release_pte_init(unsigned long pfn) | 1560 | static void __init xen_release_pte_init(unsigned long pfn) |
1561 | { | 1561 | { |
1562 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); | 1562 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); |
1563 | make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); | 1563 | make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); |
1564 | } | 1564 | } |
1565 | 1565 | ||
1566 | static __init void xen_release_pmd_init(unsigned long pfn) | 1566 | static void __init xen_release_pmd_init(unsigned long pfn) |
1567 | { | 1567 | { |
1568 | make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); | 1568 | make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); |
1569 | } | 1569 | } |
@@ -1689,7 +1689,7 @@ static void set_page_prot(void *addr, pgprot_t prot) | |||
1689 | BUG(); | 1689 | BUG(); |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | 1692 | static void __init xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) |
1693 | { | 1693 | { |
1694 | unsigned pmdidx, pteidx; | 1694 | unsigned pmdidx, pteidx; |
1695 | unsigned ident_pte; | 1695 | unsigned ident_pte; |
@@ -1772,7 +1772,7 @@ static void convert_pfn_mfn(void *v) | |||
1772 | * of the physical mapping once some sort of allocator has been set | 1772 | * of the physical mapping once some sort of allocator has been set |
1773 | * up. | 1773 | * up. |
1774 | */ | 1774 | */ |
1775 | __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, | 1775 | pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd, |
1776 | unsigned long max_pfn) | 1776 | unsigned long max_pfn) |
1777 | { | 1777 | { |
1778 | pud_t *l3; | 1778 | pud_t *l3; |
@@ -1843,7 +1843,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, | |||
1843 | static RESERVE_BRK_ARRAY(pmd_t, initial_kernel_pmd, PTRS_PER_PMD); | 1843 | static RESERVE_BRK_ARRAY(pmd_t, initial_kernel_pmd, PTRS_PER_PMD); |
1844 | static RESERVE_BRK_ARRAY(pmd_t, swapper_kernel_pmd, PTRS_PER_PMD); | 1844 | static RESERVE_BRK_ARRAY(pmd_t, swapper_kernel_pmd, PTRS_PER_PMD); |
1845 | 1845 | ||
1846 | static __init void xen_write_cr3_init(unsigned long cr3) | 1846 | static void __init xen_write_cr3_init(unsigned long cr3) |
1847 | { | 1847 | { |
1848 | unsigned long pfn = PFN_DOWN(__pa(swapper_pg_dir)); | 1848 | unsigned long pfn = PFN_DOWN(__pa(swapper_pg_dir)); |
1849 | 1849 | ||
@@ -1880,7 +1880,7 @@ static __init void xen_write_cr3_init(unsigned long cr3) | |||
1880 | pv_mmu_ops.write_cr3 = &xen_write_cr3; | 1880 | pv_mmu_ops.write_cr3 = &xen_write_cr3; |
1881 | } | 1881 | } |
1882 | 1882 | ||
1883 | __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, | 1883 | pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd, |
1884 | unsigned long max_pfn) | 1884 | unsigned long max_pfn) |
1885 | { | 1885 | { |
1886 | pmd_t *kernel_pmd; | 1886 | pmd_t *kernel_pmd; |
@@ -1986,7 +1986,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) | |||
1986 | #endif | 1986 | #endif |
1987 | } | 1987 | } |
1988 | 1988 | ||
1989 | __init void xen_ident_map_ISA(void) | 1989 | void __init xen_ident_map_ISA(void) |
1990 | { | 1990 | { |
1991 | unsigned long pa; | 1991 | unsigned long pa; |
1992 | 1992 | ||
@@ -2009,7 +2009,7 @@ __init void xen_ident_map_ISA(void) | |||
2009 | xen_flush_tlb(); | 2009 | xen_flush_tlb(); |
2010 | } | 2010 | } |
2011 | 2011 | ||
2012 | static __init void xen_post_allocator_init(void) | 2012 | static void __init xen_post_allocator_init(void) |
2013 | { | 2013 | { |
2014 | #ifdef CONFIG_XEN_DEBUG | 2014 | #ifdef CONFIG_XEN_DEBUG |
2015 | pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug); | 2015 | pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug); |
@@ -2046,7 +2046,7 @@ static void xen_leave_lazy_mmu(void) | |||
2046 | preempt_enable(); | 2046 | preempt_enable(); |
2047 | } | 2047 | } |
2048 | 2048 | ||
2049 | static const struct pv_mmu_ops xen_mmu_ops __initdata = { | 2049 | static const struct pv_mmu_ops xen_mmu_ops __initconst = { |
2050 | .read_cr2 = xen_read_cr2, | 2050 | .read_cr2 = xen_read_cr2, |
2051 | .write_cr2 = xen_write_cr2, | 2051 | .write_cr2 = xen_write_cr2, |
2052 | 2052 | ||