Linux Kernel
3.7.1
|
#include <linux/irqflags.h>
#include <asm/octeon/cvmx.h>
#include <asm/octeon/cvmx-l2c.h>
#include <asm/octeon/cvmx-spinlock.h>
Go to the source code of this file.
Data Structures | |
union | __cvmx_l2c_tag |
struct | __cvmx_l2c_tag::cvmx_l2c_tag_cn50xx |
struct | __cvmx_l2c_tag::cvmx_l2c_tag_cn30xx |
struct | __cvmx_l2c_tag::cvmx_l2c_tag_cn31xx |
struct | __cvmx_l2c_tag::cvmx_l2c_tag_cn38xx |
struct | __cvmx_l2c_tag::cvmx_l2c_tag_cn58xx |
Variables | |
cvmx_spinlock_t | cvmx_l2c_spinlock |
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.
Unlocks a region of memory that is locked in the L2 cache
: start physical address : length (in bytes) to unlock
Returns Number of locked lines that the call unlocked
Definition at line 498 of file cvmx-l2c.c.
cvmx_spinlock_t cvmx_l2c_spinlock |
Definition at line 46 of file cvmx-l2c.c.