direct-io.hg

changeset 7532:91268555f215

Define VHPT constants from VHPT_SIZE_LOG2.
Prototypes added.
author djm@kirby.fc.hp.com
date Mon Oct 24 11:31:09 2005 -0600 (2005-10-24)
parents 998e85f9963d
children eb1ae533d480
files xen/include/asm-ia64/vhpt.h
line diff
     1.1 --- a/xen/include/asm-ia64/vhpt.h	Mon Oct 24 10:46:39 2005 -0600
     1.2 +++ b/xen/include/asm-ia64/vhpt.h	Mon Oct 24 11:31:09 2005 -0600
     1.3 @@ -5,27 +5,16 @@
     1.4  #define VHPT_ENABLED_REGION_0_TO_6 1
     1.5  #define VHPT_ENABLED_REGION_7 0
     1.6  
     1.7 +/* Size of the VHPT.  */
     1.8 +#define	VHPT_SIZE_LOG2			24
     1.9  
    1.10 -#if 0
    1.11 +/* Number of entries in the VHPT.  The size of an entry is 4*8B == 32B */
    1.12 +#define	VHPT_NUM_ENTRIES		(1 << (VHPT_SIZE_LOG2 - 5))
    1.13 +
    1.14 +#define VHPT_CACHE_MASK			(VHPT_NUM_ENTRIES - 1)
    1.15  #define	VHPT_CACHE_ENTRY_SIZE		64
    1.16 -#define	VHPT_CACHE_MASK			2097151
    1.17 -#define	VHPT_CACHE_NUM_ENTRIES		32768
    1.18 -#define	VHPT_NUM_ENTRIES		2097152
    1.19 -#define	VHPT_CACHE_ENTRY_SIZE_LOG2	6
    1.20 -#define	VHPT_SIZE_LOG2			26	//????
    1.21 -#define	VHPT_PAGE_SHIFT			26	//????
    1.22 -#else
    1.23 -//#define	VHPT_CACHE_NUM_ENTRIES		2048
    1.24 -//#define	VHPT_NUM_ENTRIES		131072
    1.25 -//#define	VHPT_CACHE_MASK			131071
    1.26 -//#define	VHPT_SIZE_LOG2			22	//????
    1.27 -#define	VHPT_CACHE_ENTRY_SIZE		64
    1.28 -#define	VHPT_CACHE_NUM_ENTRIES		8192
    1.29 -#define	VHPT_NUM_ENTRIES		524288
    1.30 -#define	VHPT_CACHE_MASK			524287
    1.31 -#define	VHPT_SIZE_LOG2			24	//????
    1.32 -#define	VHPT_PAGE_SHIFT			24	//????
    1.33 -#endif
    1.34 +
    1.35 +#define	VHPT_PAGE_SHIFT			VHPT_SIZE_LOG2
    1.36  
    1.37  // FIXME: These should be automatically generated
    1.38  
    1.39 @@ -52,7 +41,7 @@
    1.40  // VHPT collison chain entry (part of the "V-Cache")
    1.41  // DO NOT CHANGE THE SIZE OF THIS STRUCTURE (see vhpt.S banked regs calculations)
    1.42  //
    1.43 -typedef struct vcache_entry {
    1.44 +struct vcache_entry {
    1.45      union {
    1.46          struct {
    1.47              unsigned long tag  : 63; // 0-62
    1.48 @@ -123,12 +112,21 @@ struct vhpt_lf_entry {
    1.49  
    1.50  #define INVALID_TI_TAG 0x8000000000000000L
    1.51  
    1.52 +extern void vhpt_init (void);
    1.53 +extern void zero_vhpt_stats(void);
    1.54 +extern int dump_vhpt_stats(char *buf);
    1.55 +extern void vhpt_flush_address(unsigned long vadr, unsigned long addr_range);
    1.56 +extern void vhpt_multiple_insert(unsigned long vaddr, unsigned long pte,
    1.57 +				 unsigned long logps);
    1.58 +extern void vhpt_insert (unsigned long vadr, unsigned long ptr,
    1.59 +			 unsigned logps);
    1.60 +extern void vhpt_flush(void);
    1.61  #endif /* !__ASSEMBLY */
    1.62  
    1.63  #if !VHPT_ENABLED
    1.64  #define VHPT_CCHAIN_LOOKUP(Name, i_or_d)
    1.65  #else
    1.66 -#ifdef CONFIG_SMP
    1.67 +#if 0 /* One VHPT per cpu! def CONFIG_SMP */
    1.68  #warning "FIXME SMP: VHPT_CCHAIN_LOOKUP needs a semaphore on the VHPT!"
    1.69  #endif
    1.70