Path: blob/master/arch/mn10300/proc-mn2ws0050/include/proc/cache.h
10820 views
/* Cache specification1*2* Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* Modified by Matsushita Electric Industrial Co., Ltd.6* Modifications:7* 13-Nov-2006 MEI Add L1_CACHE_SHIFT_MAX definition.8* 29-Jul-2008 MEI Add define for MN10300_HAS_AREAPURGE_REG.9*10* This program is free software; you can redistribute it and/or11* modify it under the terms of the GNU General Public License12* as published by the Free Software Foundation; either version13* 2 of the License, or (at your option) any later version.14*/15#ifndef _ASM_PROC_CACHE_H16#define _ASM_PROC_CACHE_H1718/*19* L1 cache20*/21#define L1_CACHE_NWAYS 4 /* number of ways in caches */22#define L1_CACHE_NENTRIES 128 /* number of entries in each way */23#define L1_CACHE_BYTES 32 /* bytes per entry */24#define L1_CACHE_SHIFT 5 /* shift for bytes per entry */25#define L1_CACHE_WAYDISP 0x1000 /* distance from one way to the next */2627#define L1_CACHE_TAG_VALID 0x00000001 /* cache tag valid bit */28#define L1_CACHE_TAG_DIRTY 0x00000008 /* data cache tag dirty bit */29#define L1_CACHE_TAG_ENTRY 0x00000fe0 /* cache tag entry address mask */30#define L1_CACHE_TAG_ADDRESS 0xfffff000 /* cache tag line address mask */31#define L1_CACHE_TAG_MASK +(L1_CACHE_TAG_ADDRESS|L1_CACHE_TAG_ENTRY)3233/*34* specification of the interval between interrupt checking intervals whilst35* managing the cache with the interrupts disabled36*/37#define MN10300_DCACHE_INV_RANGE_INTR_LOG2_INTERVAL 43839/*40* The size of range at which it becomes more economical to just flush the41* whole cache rather than trying to flush the specified range.42*/43#define MN10300_DCACHE_FLUSH_BORDER \44+(L1_CACHE_NWAYS * L1_CACHE_NENTRIES * L1_CACHE_BYTES)45#define MN10300_DCACHE_FLUSH_INV_BORDER \46+(L1_CACHE_NWAYS * L1_CACHE_NENTRIES * L1_CACHE_BYTES)4748#endif /* _ASM_PROC_CACHE_H */495051