direct-io.hg

changeset 11448:685bf9b75eb1

[IA64] Bug fix: do not crash if no FPSWA.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon Sep 04 14:48:03 2006 -0600 (2006-09-04)
parents 9fed76231248
children d4e85f8453ba
files xen/arch/ia64/xen/dom_fw.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw.c	Mon Sep 04 14:45:20 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Mon Sep 04 14:48:03 2006 -0600
     1.3 @@ -816,9 +816,12 @@ dom_fw_init(struct domain *d,
     1.4  	                       FW_HYPERCALL_SAL_RETURN, 0, hypercalls_imva);
     1.5  
     1.6  	/* Fill in the FPSWA interface: */
     1.7 -	tables->fpswa_inf.revision = fpswa_interface->revision;
     1.8 -	dom_fpswa_hypercall_patch(d, hypercalls_imva);
     1.9 -	tables->fpswa_inf.fpswa = (void *)FW_HYPERCALL_FPSWA_ENTRY_PADDR;
    1.10 +	if (fpswa_interface) {
    1.11 +		tables->fpswa_inf.revision = fpswa_interface->revision;
    1.12 +		dom_fpswa_hypercall_patch(d, hypercalls_imva);
    1.13 +		tables->fpswa_inf.fpswa = 
    1.14 +		                       (void *)FW_HYPERCALL_FPSWA_ENTRY_PADDR;
    1.15 +	}
    1.16  
    1.17  	i = 0; /* Used by MAKE_MD */
    1.18  
    1.19 @@ -867,7 +870,8 @@ dom_fw_init(struct domain *d,
    1.20  	bp->console_info.num_rows = 25;
    1.21  	bp->console_info.orig_x = 0;
    1.22  	bp->console_info.orig_y = 24;
    1.23 -	bp->fpswa = FW_FIELD_MPA(fpswa_inf);
    1.24 +	if (fpswa_interface)
    1.25 +		bp->fpswa = FW_FIELD_MPA(fpswa_inf);
    1.26  }
    1.27  
    1.28  void dom_fw_setup(struct domain *d, unsigned long bp_mpa, unsigned long maxmem)