ia64/xen-unstable

changeset 14420:e014b94333aa

[IA64] Fix thash_init()

Lost initializating page_flag of the last member in cch.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
author awilliam@xenbuild2.aw
date Tue Mar 20 09:16:09 2007 -0600 (2007-03-20)
parents 1584263f9fc5
children e1d626bde5db
files xen/arch/ia64/vmx/vtlb.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vtlb.c	Thu Mar 15 09:04:23 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vtlb.c	Tue Mar 20 09:16:09 2007 -0600
     1.3 @@ -642,7 +642,7 @@ void thash_init(thash_cb_t *hcb, u64 sz)
     1.4      }while(num);
     1.5      
     1.6      hcb->cch_freelist = p = hcb->cch_buf;
     1.7 -    num = (hcb->cch_sz/sizeof(thash_data_t))-1;
     1.8 +    num = hcb->cch_sz / sizeof(thash_data_t);
     1.9      do{
    1.10          p->page_flags = 0;
    1.11          p->itir = 0;
    1.12 @@ -650,6 +650,6 @@ void thash_init(thash_cb_t *hcb, u64 sz)
    1.13          p++;
    1.14          num--;
    1.15      }while(num);
    1.16 -    p->itir = 0;
    1.17 -    p->next = NULL;
    1.18 +
    1.19 +    (p - 1)->next = NULL;
    1.20  }