ia64/xen-unstable

changeset 9769:d23c088eac6d

[IA64] smp boot speed-up (sal cache flush, itc/itv messages)

Use sal_cache_flush to emulate SAL_CACHE_FLUSH instead of fc.
Only prints one vcpu_set_itc message, do not print set itv message.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Tue Apr 25 22:32:14 2006 -0600 (2006-04-25)
parents 63af1c14fa18
children ced37bea0647
files xen/arch/ia64/xen/dom_fw.c xen/arch/ia64/xen/vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw.c	Tue Apr 25 22:30:07 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Tue Apr 25 22:32:14 2006 -0600
     1.3 @@ -222,9 +222,18 @@ sal_emulator (long index, unsigned long 
     1.4  		printf("*** CALLED SAL_MC_SET_PARAMS.  IGNORED...\n");
     1.5  		break;
     1.6  	    case SAL_CACHE_FLUSH:
     1.7 -	        /*  The best we can do is to flush with fc all the domain.  */
     1.8 -	        domain_cache_flush (current->domain, in1 == 4 ? 1 : 0);
     1.9 -		status = 0;
    1.10 +		if (1) {
    1.11 +			/*  Flush using SAL.
    1.12 +			    This method is faster but has a side effect on
    1.13 +			    other vcpu running on this cpu.  */
    1.14 +			status = ia64_sal_cache_flush (in1);
    1.15 +		}
    1.16 +		else {
    1.17 +			/*  Flush with fc all the domain.
    1.18 +			    This method is slower but has no side effects.  */
    1.19 +			domain_cache_flush (current->domain, in1 == 4 ? 1 : 0);
    1.20 +			status = 0;
    1.21 +		}
    1.22  		break;
    1.23  	    case SAL_CACHE_INIT:
    1.24  		printf("*** CALLED SAL_CACHE_INIT.  IGNORED...\n");
     2.1 --- a/xen/arch/ia64/xen/vcpu.c	Tue Apr 25 22:30:07 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/vcpu.c	Tue Apr 25 22:32:14 2006 -0600
     2.3 @@ -965,13 +965,12 @@ IA64FAULT vcpu_set_lrr1(VCPU *vcpu, UINT
     2.4  
     2.5  IA64FAULT vcpu_set_itv(VCPU *vcpu, UINT64 val)
     2.6  {
     2.7 -//extern unsigned long privop_trace;
     2.8 -//privop_trace=1;
     2.9 -	if (val & 0xef00) return (IA64_ILLOP_FAULT);
    2.10 +	/* Check reserved fields.  */
    2.11 +	if (val & 0xef00)
    2.12 +		return (IA64_ILLOP_FAULT);
    2.13  	PSCB(vcpu,itv) = val;
    2.14  	if (val & 0x10000) {
    2.15 -		printf("**** vcpu_set_itv(%lu): vitm=%lx, setting to 0\n",
    2.16 -		       val,PSCBX(vcpu,domain_itm));
    2.17 +		/* Disable itm.  */
    2.18  		PSCBX(vcpu,domain_itm) = 0;
    2.19  	}
    2.20  	else vcpu_set_next_timer(vcpu);
    2.21 @@ -1091,7 +1090,12 @@ IA64FAULT vcpu_set_itc(VCPU *vcpu, UINT6
    2.22  {
    2.23  #define DISALLOW_SETTING_ITC_FOR_NOW
    2.24  #ifdef DISALLOW_SETTING_ITC_FOR_NOW
    2.25 -printf("vcpu_set_itc: Setting ar.itc is currently disabled\n");
    2.26 +	static int did_print;
    2.27 +	if (!did_print) {
    2.28 +		printf("vcpu_set_itc: Setting ar.itc is currently disabled\n");
    2.29 +		printf("(this message is only displayed one)\n");
    2.30 +		did_print = 1;
    2.31 +	}
    2.32  #else
    2.33  	UINT64 oldnow = ia64_get_itc();
    2.34  	UINT64 olditm = PSCBX(vcpu,domain_itm);