[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [PATCH 13/16] domheap: allocate percpu area from domheap.



# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1198652434 -32400
# Node ID 502c064ec8a6c1209fd4d1f6c06837f6fbaab309
# Parent  77cb59b30e8cc1a9ee04f70c462529b1b438b3c7
allocate percpu area from domheap.
PATCHNAME: alloate_percpu_area_from_domheap

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 77cb59b30e8c -r 502c064ec8a6 xen/arch/ia64/linux-xen/mm_contig.c
--- a/xen/arch/ia64/linux-xen/mm_contig.c       Wed Dec 26 14:43:09 2007 +0900
+++ b/xen/arch/ia64/linux-xen/mm_contig.c       Wed Dec 26 16:00:34 2007 +0900
@@ -193,8 +193,13 @@ per_cpu_init (void)
         */
        if (smp_processor_id() == 0) {
 #ifdef XEN
-               cpu_data = alloc_xenheap_pages(get_order(NR_CPUS
-                                                        * PERCPU_PAGE_SIZE));
+               struct page_info *page;
+               page = alloc_domheap_pages(NULL,
+                                          get_order(NR_CPUS *
+                                                    PERCPU_PAGE_SIZE), 0);
+               if (page == NULL) 
+                       panic("can't allocate per cpu area.\n");
+               cpu_data = page_to_virt(page);
 #else
                cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
                                           PERCPU_PAGE_SIZE, 
__pa(MAX_DMA_ADDRESS));

Attachment: 16707_502c064ec8a6_alloate_percpu_area_from_domheap.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.