From 9b1379950e7de5e233495758fe1a92335d0e8080 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Thu, 15 Apr 2010 17:46:16 -0400 Subject: Adding support for L1 cache as cluster size --- litmus/litmus.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/litmus/litmus.c b/litmus/litmus.c index c815c5ac492c..524f0e9198a6 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c @@ -561,9 +561,10 @@ static int proc_read_cluster_size(char *page, char **start, int len; if (cluster_cache_index == 2) len = snprintf(page, PAGE_SIZE, "L2\n"); - else - /* (cluster_cache_index == 3) */ + else if (cluster_cache_index == 3) len = snprintf(page, PAGE_SIZE, "L3\n"); + else if (cluster_cache_index == 1) + len = snprintf(page, PAGE_SIZE, "L1\n"); return len; } @@ -575,10 +576,10 @@ static int proc_write_cluster_size(struct file *file, { int len; /* L2, L3 */ - char cache_name[5]; + char cache_name[33]; - if(count > 5) - len = 4; + if(count > 32) + len = 32; else len = count; @@ -595,6 +596,8 @@ static int proc_write_cluster_size(struct file *file, cluster_cache_index = 2; else if (!strcmp(cache_name, "L3")) cluster_cache_index = 3; + else if (!strcmp(cache_name, "L1")) + cluster_cache_index = 1; else printk(KERN_INFO "Cluster '%s' is unknown.\n", cache_name); -- cgit v1.2.2