diff options
Diffstat (limited to 'arch/ia64/mm')
-rw-r--r-- | arch/ia64/mm/init.c | 36 | ||||
-rw-r--r-- | arch/ia64/mm/tlb.c | 2 |
2 files changed, 37 insertions, 1 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index e3215ba64ffd..b38b6d213c15 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -635,3 +635,39 @@ mem_init (void) | |||
635 | ia32_mem_init(); | 635 | ia32_mem_init(); |
636 | #endif | 636 | #endif |
637 | } | 637 | } |
638 | |||
639 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
640 | void online_page(struct page *page) | ||
641 | { | ||
642 | ClearPageReserved(page); | ||
643 | set_page_count(page, 1); | ||
644 | __free_page(page); | ||
645 | totalram_pages++; | ||
646 | num_physpages++; | ||
647 | } | ||
648 | |||
649 | int add_memory(u64 start, u64 size) | ||
650 | { | ||
651 | pg_data_t *pgdat; | ||
652 | struct zone *zone; | ||
653 | unsigned long start_pfn = start >> PAGE_SHIFT; | ||
654 | unsigned long nr_pages = size >> PAGE_SHIFT; | ||
655 | int ret; | ||
656 | |||
657 | pgdat = NODE_DATA(0); | ||
658 | |||
659 | zone = pgdat->node_zones + ZONE_NORMAL; | ||
660 | ret = __add_pages(zone, start_pfn, nr_pages); | ||
661 | |||
662 | if (ret) | ||
663 | printk("%s: Problem encountered in __add_pages() as ret=%d\n", | ||
664 | __FUNCTION__, ret); | ||
665 | |||
666 | return ret; | ||
667 | } | ||
668 | |||
669 | int remove_memory(u64 start, u64 size) | ||
670 | { | ||
671 | return -EINVAL; | ||
672 | } | ||
673 | #endif | ||
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index 41105d454423..6a4eec9113e8 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -90,7 +90,7 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start, | |||
90 | { | 90 | { |
91 | static DEFINE_SPINLOCK(ptcg_lock); | 91 | static DEFINE_SPINLOCK(ptcg_lock); |
92 | 92 | ||
93 | if (mm != current->active_mm) { | 93 | if (mm != current->active_mm || !current->mm) { |
94 | flush_tlb_all(); | 94 | flush_tlb_all(); |
95 | return; | 95 | return; |
96 | } | 96 | } |