aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2015-01-28 01:44:24 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2015-01-28 05:00:51 -0500
commitbf9d834a9bc54477f3745ba0bf926c8917c45680 (patch)
treebca18eba23a261080ed045f00f76647abda4a1ce
parenta3f5239650a9c08df0473261aedd6f50f7775410 (diff)
x86/xen: add some __init annotations in arch/x86/xen/mmu.c
The file arch/x86/xen/mmu.c has some functions that can be annotated with "__init". Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--arch/x86/xen/mmu.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 5c1f9ace7ae7..6a8bbf43e617 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1489,7 +1489,7 @@ static void __init xen_set_pte_init(pte_t *ptep, pte_t pte)
1489 native_set_pte(ptep, pte); 1489 native_set_pte(ptep, pte);
1490} 1490}
1491 1491
1492static void pin_pagetable_pfn(unsigned cmd, unsigned long pfn) 1492static void __init pin_pagetable_pfn(unsigned cmd, unsigned long pfn)
1493{ 1493{
1494 struct mmuext_op op; 1494 struct mmuext_op op;
1495 op.cmd = cmd; 1495 op.cmd = cmd;
@@ -1657,7 +1657,7 @@ void __init xen_reserve_top(void)
1657 * Like __va(), but returns address in the kernel mapping (which is 1657 * Like __va(), but returns address in the kernel mapping (which is
1658 * all we have until the physical memory mapping has been set up. 1658 * all we have until the physical memory mapping has been set up.
1659 */ 1659 */
1660static void *__ka(phys_addr_t paddr) 1660static void * __init __ka(phys_addr_t paddr)
1661{ 1661{
1662#ifdef CONFIG_X86_64 1662#ifdef CONFIG_X86_64
1663 return (void *)(paddr + __START_KERNEL_map); 1663 return (void *)(paddr + __START_KERNEL_map);
@@ -1667,7 +1667,7 @@ static void *__ka(phys_addr_t paddr)
1667} 1667}
1668 1668
1669/* Convert a machine address to physical address */ 1669/* Convert a machine address to physical address */
1670static unsigned long m2p(phys_addr_t maddr) 1670static unsigned long __init m2p(phys_addr_t maddr)
1671{ 1671{
1672 phys_addr_t paddr; 1672 phys_addr_t paddr;
1673 1673
@@ -1678,13 +1678,14 @@ static unsigned long m2p(phys_addr_t maddr)
1678} 1678}
1679 1679
1680/* Convert a machine address to kernel virtual */ 1680/* Convert a machine address to kernel virtual */
1681static void *m2v(phys_addr_t maddr) 1681static void * __init m2v(phys_addr_t maddr)
1682{ 1682{
1683 return __ka(m2p(maddr)); 1683 return __ka(m2p(maddr));
1684} 1684}
1685 1685
1686/* Set the page permissions on an identity-mapped pages */ 1686/* Set the page permissions on an identity-mapped pages */
1687static void set_page_prot_flags(void *addr, pgprot_t prot, unsigned long flags) 1687static void __init set_page_prot_flags(void *addr, pgprot_t prot,
1688 unsigned long flags)
1688{ 1689{
1689 unsigned long pfn = __pa(addr) >> PAGE_SHIFT; 1690 unsigned long pfn = __pa(addr) >> PAGE_SHIFT;
1690 pte_t pte = pfn_pte(pfn, prot); 1691 pte_t pte = pfn_pte(pfn, prot);
@@ -1696,7 +1697,7 @@ static void set_page_prot_flags(void *addr, pgprot_t prot, unsigned long flags)
1696 if (HYPERVISOR_update_va_mapping((unsigned long)addr, pte, flags)) 1697 if (HYPERVISOR_update_va_mapping((unsigned long)addr, pte, flags))
1697 BUG(); 1698 BUG();
1698} 1699}
1699static void set_page_prot(void *addr, pgprot_t prot) 1700static void __init set_page_prot(void *addr, pgprot_t prot)
1700{ 1701{
1701 return set_page_prot_flags(addr, prot, UVMF_NONE); 1702 return set_page_prot_flags(addr, prot, UVMF_NONE);
1702} 1703}
@@ -1769,7 +1770,7 @@ void __init xen_setup_machphys_mapping(void)
1769} 1770}
1770 1771
1771#ifdef CONFIG_X86_64 1772#ifdef CONFIG_X86_64
1772static void convert_pfn_mfn(void *v) 1773static void __init convert_pfn_mfn(void *v)
1773{ 1774{
1774 pte_t *pte = v; 1775 pte_t *pte = v;
1775 int i; 1776 int i;