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 14/16] domheap: allocate mca related objects fro

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 14/16] domheap: allocate mca related objects from domheap instead of xenheap
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:56:34 -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 1198654939 -32400
# Node ID c5d178b2c54fb2dda200a1abb0bf49671378bd02
# Parent  502c064ec8a6c1209fd4d1f6c06837f6fbaab309
allocate mca related objects from domheap instead of xenheap
PATCHNAME: allocate_mca_from_domheap

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

diff -r 502c064ec8a6 -r c5d178b2c54f xen/arch/ia64/linux-xen/mca.c
--- a/xen/arch/ia64/linux-xen/mca.c     Wed Dec 26 16:00:34 2007 +0900
+++ b/xen/arch/ia64/linux-xen/mca.c     Wed Dec 26 16:42:19 2007 +0900
@@ -184,11 +184,14 @@ static ia64_state_log_t ia64_state_log[I
 #define IA64_LOG_ALLOCATE(it, size) \
        do { \
                unsigned int pageorder; \
+               struct page_info *page; \
                pageorder = get_order_from_bytes(size); \
+               page = alloc_domheap_pages(NULL, pageorder, 0); \
                ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
-                 (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
+                       page? (ia64_err_rec_t *)page_to_virt(page): NULL;  \
+               page = alloc_domheap_pages(NULL, pageorder, 0); \
                ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
-                 (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
+                       page? (ia64_err_rec_t *)page_to_virt(page): NULL; \
        } while(0)
 #endif
 
@@ -240,9 +243,11 @@ ia64_log_init(int sal_info_type)
 #ifdef XEN
        if (sal_record == NULL) {
                unsigned int pageorder;
+               struct page_info *page;
                pageorder  = get_order_from_bytes(max_size);
-               sal_record = (sal_log_record_header_t *)
-                            alloc_xenheap_pages(pageorder);
+               page = alloc_domheap_pages(NULL, pageorder, 0);
+               BUG_ON(page == NULL);
+               sal_record = (sal_log_record_header_t *)page_to_virt(page);
                BUG_ON(sal_record == NULL);
        }
 #endif
@@ -1623,7 +1628,9 @@ ia64_mca_cpu_init(void *cpu_data)
 #endif
                for (cpu = 0; cpu < NR_CPUS; cpu++) {
 #ifdef XEN
-                       mca_data = alloc_xenheap_pages(pageorder);
+                       struct page_info *page;
+                       page = alloc_domheap_pages(NULL, pageorder, 0);
+                       mca_data = page? page_to_virt(page): NULL;
                        __per_cpu_mca[cpu] = __pa(mca_data);
                        IA64_MCA_DEBUG("%s: __per_cpu_mca[%d]=%lx"
                                       "(mca_data[%d]=%lx)\n",

Attachment: 16708_c5d178b2c54f_allocate_mca_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 14/16] domheap: allocate mca related objects from domheap instead of xenheap, Isaku Yamahata <=