diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/apb_timer.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/p2m.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 1293c709ee85..cd1ffed4ee22 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
@@ -316,7 +316,7 @@ static void apbt_setup_irq(struct apbt_dev *adev) | |||
316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); | 316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); |
317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); | 317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); |
318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ | 318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ |
319 | __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge"); | 319 | __irq_set_handler(adev->irq, handle_edge_irq, 0, "edge"); |
320 | 320 | ||
321 | if (system_state == SYSTEM_BOOTING) { | 321 | if (system_state == SYSTEM_BOOTING) { |
322 | if (request_irq(adev->irq, apbt_interrupt_handler, | 322 | if (request_irq(adev->irq, apbt_interrupt_handler, |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 215a3ce61068..141eb0de8b06 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -497,7 +497,7 @@ static bool alloc_p2m(unsigned long pfn) | |||
497 | return true; | 497 | return true; |
498 | } | 498 | } |
499 | 499 | ||
500 | bool __early_alloc_p2m(unsigned long pfn) | 500 | static bool __init __early_alloc_p2m(unsigned long pfn) |
501 | { | 501 | { |
502 | unsigned topidx, mididx, idx; | 502 | unsigned topidx, mididx, idx; |
503 | 503 | ||
@@ -530,7 +530,7 @@ bool __early_alloc_p2m(unsigned long pfn) | |||
530 | } | 530 | } |
531 | return idx != 0; | 531 | return idx != 0; |
532 | } | 532 | } |
533 | unsigned long set_phys_range_identity(unsigned long pfn_s, | 533 | unsigned long __init set_phys_range_identity(unsigned long pfn_s, |
534 | unsigned long pfn_e) | 534 | unsigned long pfn_e) |
535 | { | 535 | { |
536 | unsigned long pfn; | 536 | unsigned long pfn; |
@@ -671,7 +671,9 @@ int m2p_add_override(unsigned long mfn, struct page *page) | |||
671 | page->private = mfn; | 671 | page->private = mfn; |
672 | page->index = pfn_to_mfn(pfn); | 672 | page->index = pfn_to_mfn(pfn); |
673 | 673 | ||
674 | __set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); | 674 | if (unlikely(!set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)))) |
675 | return -ENOMEM; | ||
676 | |||
675 | if (!PageHighMem(page)) | 677 | if (!PageHighMem(page)) |
676 | /* Just zap old mapping for now */ | 678 | /* Just zap old mapping for now */ |
677 | pte_clear(&init_mm, address, ptep); | 679 | pte_clear(&init_mm, address, ptep); |
@@ -709,7 +711,7 @@ int m2p_remove_override(struct page *page) | |||
709 | spin_lock_irqsave(&m2p_override_lock, flags); | 711 | spin_lock_irqsave(&m2p_override_lock, flags); |
710 | list_del(&page->lru); | 712 | list_del(&page->lru); |
711 | spin_unlock_irqrestore(&m2p_override_lock, flags); | 713 | spin_unlock_irqrestore(&m2p_override_lock, flags); |
712 | __set_phys_to_machine(pfn, page->index); | 714 | set_phys_to_machine(pfn, page->index); |
713 | 715 | ||
714 | if (!PageHighMem(page)) | 716 | if (!PageHighMem(page)) |
715 | set_pte_at(&init_mm, address, ptep, | 717 | set_pte_at(&init_mm, address, ptep, |