Path: blob/master/arch/mn10300/proc-mn103e010/include/proc/cache.h
15159 views
/* MN103E010 Cache specification1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/10#ifndef _ASM_PROC_CACHE_H11#define _ASM_PROC_CACHE_H1213/* L1 cache */1415#define L1_CACHE_NWAYS 4 /* number of ways in caches */16#define L1_CACHE_NENTRIES 256 /* number of entries in each way */17#define L1_CACHE_BYTES 16 /* bytes per entry */18#define L1_CACHE_SHIFT 4 /* shift for bytes per entry */19#define L1_CACHE_WAYDISP 0x1000 /* displacement of one way from the next */2021#define L1_CACHE_TAG_VALID 0x00000001 /* cache tag valid bit */22#define L1_CACHE_TAG_DIRTY 0x00000008 /* data cache tag dirty bit */23#define L1_CACHE_TAG_ENTRY 0x00000ff0 /* cache tag entry address mask */24#define L1_CACHE_TAG_ADDRESS 0xfffff000 /* cache tag line address mask */25#define L1_CACHE_TAG_MASK +(L1_CACHE_TAG_ADDRESS|L1_CACHE_TAG_ENTRY)2627/*28* specification of the interval between interrupt checking intervals whilst29* managing the cache with the interrupts disabled30*/31#define MN10300_DCACHE_INV_RANGE_INTR_LOG2_INTERVAL 43233/*34* The size of range at which it becomes more economical to just flush the35* whole cache rather than trying to flush the specified range.36*/37#define MN10300_DCACHE_FLUSH_BORDER \38+(L1_CACHE_NWAYS * L1_CACHE_NENTRIES * L1_CACHE_BYTES)39#define MN10300_DCACHE_FLUSH_INV_BORDER \40+(L1_CACHE_NWAYS * L1_CACHE_NENTRIES * L1_CACHE_BYTES)4142#endif /* _ASM_PROC_CACHE_H */434445