Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cache.c File Reference
#include <asm/cacheflush.h>
#include <linux/cache.h>
#include <asm/cpuinfo.h>
#include <asm/pvr.h>

Go to the source code of this file.

Macros

#define CACHE_LOOP_LIMITS(start, end, cache_line_length, cache_size)
 
#define CACHE_ALL_LOOP(cache_size, line_length, op)
 
#define CACHE_RANGE_LOOP_2(start, end, line_length, op)
 
#define CACHE_RANGE_LOOP_1(start, end, line_length, op)
 
#define ASM_LOOP
 
#define CPUVER_7_20_A   0x0c
 
#define CPUVER_7_20_D   0x0f
 
#define INFO(s)   printk(KERN_INFO "cache: " s "\n");
 

Functions

void microblaze_cache_init (void)
 

Variables

struct scachembc
 

Macro Definition Documentation

#define ASM_LOOP

Definition at line 168 of file cache.c.

#define CACHE_ALL_LOOP (   cache_size,
  line_length,
  op 
)
Value:
do { \
unsigned int len = cache_size - line_length; \
int step = -line_length; \
WARN_ON(step >= 0); \
\
__asm__ __volatile__ (" 1: " #op " %0, r0; \ bgtid %0, 1b; \ addk %0, %0, %1; \ " : : "r" (len), "r" (step) \
: "memory"); \
} while (0);

Definition at line 115 of file cache.c.

#define CACHE_LOOP_LIMITS (   start,
  end,
  cache_line_length,
  cache_size 
)
Value:
do { \
int align = ~(cache_line_length - 1); \
end = min(start + cache_size, end); \
start &= align; \
} while (0);

Definition at line 104 of file cache.c.

#define CACHE_RANGE_LOOP_1 (   start,
  end,
  line_length,
  op 
)
Value:
do { \
int volatile temp; \
int align = ~(line_length - 1); \
end = ((end & align) == end) ? end - line_length : end & align; \
WARN_ON(end - start < 0); \
\
__asm__ __volatile__ (" 1: " #op " %1, r0; \ cmpu %0, %1, %2; \ bgtid %0, 1b; \ addk %1, %1, %3; \ " : : "r" (temp), "r" (start), "r" (end),\
"r" (line_length) : "memory"); \
} while (0);

Definition at line 153 of file cache.c.

#define CACHE_RANGE_LOOP_2 (   start,
  end,
  line_length,
  op 
)
Value:
do { \
int step = -line_length; \
int align = ~(line_length - 1); \
int count; \
end = ((end & align) == end) ? end - line_length : end & align; \
count = end - start; \
WARN_ON(count < 0); \
\
__asm__ __volatile__ (" 1: " #op " %0, %1; \ bgtid %1, 1b; \ addk %1, %1, %2; \ " : : "r" (start), "r" (count), \
"r" (step) : "memory"); \
} while (0);

Definition at line 136 of file cache.c.

#define CPUVER_7_20_A   0x0c

Definition at line 616 of file cache.c.

#define CPUVER_7_20_D   0x0f

Definition at line 617 of file cache.c.

#define INFO (   s)    printk(KERN_INFO "cache: " s "\n");

Definition at line 619 of file cache.c.

Function Documentation

void microblaze_cache_init ( void  )

Definition at line 621 of file cache.c.

Variable Documentation

struct scache* mbc

Definition at line 519 of file cache.c.