ia64/xen-unstable

changeset 16788:37a3e770a85c

[IA64] domheap: Allocate mca related objects from domheap instead of xenheap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:05:43 2008 -0700 (2008-01-17)
parents a1288419288e
children 0c2dc9424a68
files xen/arch/ia64/linux-xen/mca.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/mca.c	Thu Jan 17 12:05:43 2008 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/mca.c	Thu Jan 17 12:05:43 2008 -0700
     1.3 @@ -184,11 +184,14 @@ static ia64_state_log_t ia64_state_log[I
     1.4  #define IA64_LOG_ALLOCATE(it, size) \
     1.5  	do { \
     1.6  		unsigned int pageorder; \
     1.7 +		struct page_info *page;	\
     1.8  		pageorder = get_order_from_bytes(size); \
     1.9 +		page = alloc_domheap_pages(NULL, pageorder, 0); \
    1.10  		ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
    1.11 -		  (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
    1.12 +			page? (ia64_err_rec_t *)page_to_virt(page): NULL;  \
    1.13 +		page = alloc_domheap_pages(NULL, pageorder, 0); \
    1.14  		ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
    1.15 -		  (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
    1.16 +			page? (ia64_err_rec_t *)page_to_virt(page): NULL; \
    1.17  	} while(0)
    1.18  #endif
    1.19  
    1.20 @@ -240,9 +243,11 @@ ia64_log_init(int sal_info_type)
    1.21  #ifdef XEN
    1.22  	if (sal_record == NULL) {
    1.23  		unsigned int pageorder;
    1.24 +		struct page_info *page;
    1.25  		pageorder  = get_order_from_bytes(max_size);
    1.26 -		sal_record = (sal_log_record_header_t *)
    1.27 -		             alloc_xenheap_pages(pageorder);
    1.28 +		page = alloc_domheap_pages(NULL, pageorder, 0);
    1.29 +		BUG_ON(page == NULL);
    1.30 +		sal_record = (sal_log_record_header_t *)page_to_virt(page);
    1.31  		BUG_ON(sal_record == NULL);
    1.32  	}
    1.33  #endif
    1.34 @@ -1623,7 +1628,9 @@ ia64_mca_cpu_init(void *cpu_data)
    1.35  #endif
    1.36  		for (cpu = 0; cpu < NR_CPUS; cpu++) {
    1.37  #ifdef XEN
    1.38 -			mca_data = alloc_xenheap_pages(pageorder);
    1.39 +			struct page_info *page;
    1.40 +			page = alloc_domheap_pages(NULL, pageorder, 0);
    1.41 +			mca_data = page? page_to_virt(page): NULL;
    1.42  			__per_cpu_mca[cpu] = __pa(mca_data);
    1.43  			IA64_MCA_DEBUG("%s: __per_cpu_mca[%d]=%lx"
    1.44  			               "(mca_data[%d]=%lx)\n",