summaryrefslogtreecommitdiff
path: root/big-little/virtualisor/include/cache_geom.h
diff options
context:
space:
mode:
Diffstat (limited to 'big-little/virtualisor/include/cache_geom.h')
-rw-r--r--big-little/virtualisor/include/cache_geom.h81
1 files changed, 38 insertions, 43 deletions
diff --git a/big-little/virtualisor/include/cache_geom.h b/big-little/virtualisor/include/cache_geom.h
index 359c480..654a0f0 100644
--- a/big-little/virtualisor/include/cache_geom.h
+++ b/big-little/virtualisor/include/cache_geom.h
@@ -18,7 +18,7 @@
* contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
- */
+ */
#ifndef __CACHE_GEOM_H__
#define __CACHE_GEOM_H__
@@ -46,38 +46,38 @@
* maximum granularity.
*/
typedef struct cache_diff {
- /* Stores whether target cache is =,<,> host cache */
- unsigned csize_diff;
- /*
- * Stores factor by which target cache line
- * has to be multiplied to get absolute line
- * no.
- */
- unsigned tcline_factor;
- /*
- * Stores factor by which absolute cache line
- * no. has to be divided to get host cache line
- * no.
- */
- unsigned hcline_factor;
- /* Max absolute target cpu cache line number */
- unsigned tnumabs_clines;
- /* Max absolute host cpu cache line number */
- unsigned hnumabs_clines;
+ /* Stores whether target cache is =,<,> host cache */
+ unsigned csize_diff;
+ /*
+ * Stores factor by which target cache line
+ * has to be multiplied to get absolute line
+ * no.
+ */
+ unsigned tcline_factor;
+ /*
+ * Stores factor by which absolute cache line
+ * no. has to be divided to get host cache line
+ * no.
+ */
+ unsigned hcline_factor;
+ /* Max absolute target cpu cache line number */
+ unsigned tnumabs_clines;
+ /* Max absolute host cpu cache line number */
+ unsigned hnumabs_clines;
} cache_diff;
/*
* Data structure that defines the cache topology of a cpu
*/
typedef struct cache_geom {
- unsigned clidr;
- /*
- * One for each cpu to store the cache level
- * the OS thinks its operating on.
- */
- unsigned csselr;
- /* One for each cache level */
- unsigned ccsidr[MAX_CACHE_LEVELS];
+ unsigned clidr;
+ /*
+ * One for each cpu to store the cache level
+ * the OS thinks its operating on.
+ */
+ unsigned csselr;
+ /* One for each cache level */
+ unsigned ccsidr[MAX_CACHE_LEVELS];
} cache_geometry;
/*
@@ -85,23 +85,18 @@ typedef struct cache_geom {
* Reset for each switchover.
*/
typedef struct cache_stats {
- /* Number of cm ops which did not cover the whole cache */
- unsigned part_cmop_cnt;
- /* Number of cm ops which spanned the entire cache */
- unsigned cmpl_cmop_cnt;
+ /* Number of cm ops which did not cover the whole cache */
+ unsigned part_cmop_cnt;
+ /* Number of cm ops which spanned the entire cache */
+ unsigned cmpl_cmop_cnt;
} cache_stats;
-extern unsigned map_cache_geometries(cache_geometry *,
- cache_geometry *,
- cache_diff *);
+extern unsigned map_cache_geometries(cache_geometry *,
+ cache_geometry *, cache_diff *);
extern void find_cache_geometry(cache_geometry *);
-extern void find_cache_diff(cache_geometry *,
- cache_geometry *,
- cache_diff *);
+extern void find_cache_diff(cache_geometry *, cache_geometry *, cache_diff *);
extern void handle_cm_op(unsigned,
- void (*) (unsigned),
- cache_geometry *,
- cache_geometry *,
- cache_diff *);
-
-#endif /* __CACHE_GEOM_H__ */
+ void (*)(unsigned),
+ cache_geometry *, cache_geometry *, cache_diff *);
+
+#endif /* __CACHE_GEOM_H__ */