WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 13/16] domheap: allocate percpu area from domheap.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 16:52:34 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Sun, 06 Jan 2008 23:55:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 13/16] domheap: allocate percpu area from domheap., Isaku Yamahata <=