Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
union | cvmx_l2c_tag |
Macros | |
#define | CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ |
#define | CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ |
#define | CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ |
#define | CVMX_L2C_IDX_ADDR_SHIFT 7 /* based on 128 byte cache line size */ |
#define | CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) |
#define | CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) |
#define | CVMX_L2C_ALIAS_MASK (CVMX_L2C_IDX_MASK << CVMX_L2C_TAG_ADDR_ALIAS_SHIFT) |
#define | CVMX_L2C_MEMBANK_SELECT_SIZE 4096 |
#define | CVMX_L2C_VRT_MAX_VIRTID_ALLOWED ((OCTEON_IS_MODEL(OCTEON_CN63XX)) ? 64 : 0) |
#define | CVMX_L2C_VRT_MAX_MEMSZ_ALLOWED ((OCTEON_IS_MODEL(OCTEON_CN63XX)) ? 32 : 0) |
#define | CVMX_L2C_TADS 1 |
#define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ |
Definition at line 36 of file cvmx-l2c.h.
#define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ |
Definition at line 37 of file cvmx-l2c.h.
#define CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ |
Definition at line 38 of file cvmx-l2c.h.
#define CVMX_L2C_ALIAS_MASK (CVMX_L2C_IDX_MASK << CVMX_L2C_TAG_ADDR_ALIAS_SHIFT) |
Definition at line 46 of file cvmx-l2c.h.
Definition at line 41 of file cvmx-l2c.h.
#define CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) |
Definition at line 42 of file cvmx-l2c.h.
#define CVMX_L2C_MEMBANK_SELECT_SIZE 4096 |
Definition at line 47 of file cvmx-l2c.h.
#define CVMX_L2C_TADS 1 |
Definition at line 66 of file cvmx-l2c.h.
#define CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) |
Definition at line 45 of file cvmx-l2c.h.
#define CVMX_L2C_VRT_MAX_MEMSZ_ALLOWED ((OCTEON_IS_MODEL(OCTEON_CN63XX)) ? 32 : 0) |
Definition at line 51 of file cvmx-l2c.h.
#define CVMX_L2C_VRT_MAX_VIRTID_ALLOWED ((OCTEON_IS_MODEL(OCTEON_CN63XX)) ? 64 : 0) |
Definition at line 50 of file cvmx-l2c.h.
enum cvmx_l2c_event |
Definition at line 69 of file cvmx-l2c.h.
enum cvmx_l2c_tad_event |
Definition at line 128 of file cvmx-l2c.h.
Returns the cache index for a given physical address
: physical address
Returns L2 cache index
Definition at line 717 of file cvmx-l2c.c.
void cvmx_l2c_config_perf | ( | uint32_t | counter, |
enum cvmx_l2c_event | event, | ||
uint32_t | clear_on_read | ||
) |
Flushes (and unlocks) the entire L2 cache. IMPORTANT: Must only be run by one core at a time due to use of L2C debug features.
Definition at line 424 of file cvmx-l2c.c.
Returns Returns the size of the L2 cache in bytes, -1 on error (unrecognized model)
Definition at line 745 of file cvmx-l2c.c.
Return the number of associations in the L2 Cache
Returns
Definition at line 782 of file cvmx-l2c.c.
Return log base 2 of the number of sets in the L2 cache Returns
Definition at line 755 of file cvmx-l2c.c.
|
write |
Read the L2 controller tag for a given location in L2
: Which association to read line from : Which way to read from.
Returns l2c tag structure for line requested.
Definition at line 637 of file cvmx-l2c.c.
Locks a line in the L2 cache at the specified physical address
: physical address of line to lock
Returns 0 on success, 1 if line not locked.
Definition at line 309 of file cvmx-l2c.c.
Locks a specified memory region in the L2 cache.
Note that if not all lines can be locked, that means that all but one of the ways (associations) available to the locking core are locked. Having only 1 association available for normal caching may have a significant adverse affect on performance. Care should be taken to ensure that enough of the L2 cache is left unlocked to allow for normal caching of DRAM.
: Physical address of the start of the region to lock : Length (in bytes) of region to lock
Returns Number of requested lines that where not locked. 0 on success (all locked)
Definition at line 407 of file cvmx-l2c.c.
Partitions the L2 cache for a core
: The core that the partitioning applies to. : The partitioning of the ways expressed as a binary mask. A 0 bit allows the core to evict cache lines from a way, while a 1 bit blocks the core from evicting any lines from that way. There must be at least one allowed way (0 bit) in the mask.
Definition at line 83 of file cvmx-l2c.c.
Partitions the L2 cache for the hardware blocks.
: The partitioning of the ways expressed as a binary mask. A 0 bit allows the core to evict cache lines from a way, while a 1 bit blocks the core from evicting any lines from that way. There must be at least one allowed way (0 bit) in the mask.
Definition at line 141 of file cvmx-l2c.c.
Unlock and flush a cache line from the L2 cache. IMPORTANT: Must only be run by one core at a time due to use of L2C debug features. Note that this function will flush a matching but unlocked cache line. (If address is not in L2, no lines are flushed.)
: Physical address to unlock
Returns 0: line not unlocked 1: line unlocked
Definition at line 452 of file cvmx-l2c.c.