- Remove bunch of declared but not defined cach-related variables
- Add mips_picache_linesize and mips_pdcache_linesize variables
This commit is contained in:
parent
7e60d1a36c
commit
0ffd7b6759
@ -159,50 +159,8 @@ struct mips_cache_ops {
|
||||
extern struct mips_cache_ops mips_cache_ops;
|
||||
|
||||
/* PRIMARY CACHE VARIABLES */
|
||||
extern u_int mips_picache_size;
|
||||
extern u_int mips_picache_line_size;
|
||||
extern u_int mips_picache_ways;
|
||||
extern u_int mips_picache_way_size;
|
||||
extern u_int mips_picache_way_mask;
|
||||
|
||||
extern u_int mips_pdcache_size; /* and unified */
|
||||
extern u_int mips_pdcache_line_size;
|
||||
extern u_int mips_pdcache_ways;
|
||||
extern u_int mips_pdcache_way_size;
|
||||
extern u_int mips_pdcache_way_mask;
|
||||
extern int mips_pdcache_write_through;
|
||||
|
||||
extern int mips_pcache_unified;
|
||||
|
||||
/* SECONDARY CACHE VARIABLES */
|
||||
extern u_int mips_sicache_size;
|
||||
extern u_int mips_sicache_line_size;
|
||||
extern u_int mips_sicache_ways;
|
||||
extern u_int mips_sicache_way_size;
|
||||
extern u_int mips_sicache_way_mask;
|
||||
|
||||
extern u_int mips_sdcache_size; /* and unified */
|
||||
extern u_int mips_sdcache_line_size;
|
||||
extern u_int mips_sdcache_ways;
|
||||
extern u_int mips_sdcache_way_size;
|
||||
extern u_int mips_sdcache_way_mask;
|
||||
extern int mips_sdcache_write_through;
|
||||
|
||||
extern int mips_scache_unified;
|
||||
|
||||
/* TERTIARY CACHE VARIABLES */
|
||||
extern u_int mips_tcache_size; /* always unified */
|
||||
extern u_int mips_tcache_line_size;
|
||||
extern u_int mips_tcache_ways;
|
||||
extern u_int mips_tcache_way_size;
|
||||
extern u_int mips_tcache_way_mask;
|
||||
extern int mips_tcache_write_through;
|
||||
|
||||
extern u_int mips_dcache_align;
|
||||
extern u_int mips_dcache_align_mask;
|
||||
|
||||
extern u_int mips_cache_alias_mask;
|
||||
extern u_int mips_cache_prefer_mask;
|
||||
extern int mips_picache_linesize;
|
||||
extern int mips_pdcache_linesize;
|
||||
|
||||
#define __mco_noargs(prefix, x) \
|
||||
do { \
|
||||
|
@ -65,6 +65,11 @@ __FBSDID("$FreeBSD$");
|
||||
#define SYNCI
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exported variables for consumers like bus_dma code
|
||||
*/
|
||||
int mips_picache_linesize;
|
||||
int mips_pdcache_linesize;
|
||||
|
||||
static int picache_size;
|
||||
static int picache_stride;
|
||||
@ -107,10 +112,15 @@ mipsNN_cache_init(struct mips_cpuinfo * cpuinfo)
|
||||
pdcache_loopcount = (cpuinfo->l1.dc_nsets * cpuinfo->l1.dc_linesize / PAGE_SIZE) *
|
||||
cpuinfo->l1.dc_nways;
|
||||
}
|
||||
|
||||
mips_picache_linesize = cpuinfo->l1.ic_linesize;
|
||||
mips_pdcache_linesize = cpuinfo->l1.dc_linesize;
|
||||
|
||||
picache_size = cpuinfo->l1.ic_size;
|
||||
picache_way_mask = cpuinfo->l1.ic_nways - 1;
|
||||
pdcache_size = cpuinfo->l1.dc_size;
|
||||
pdcache_way_mask = cpuinfo->l1.dc_nways - 1;
|
||||
|
||||
#define CACHE_DEBUG
|
||||
#ifdef CACHE_DEBUG
|
||||
printf("Cache info:\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user