aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/litmus.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-05-30 19:46:21 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-06-01 10:23:13 -0400
commitcedc8df1cf1ff935af5455a9d565dac05192a47f (patch)
tree04771859bf08ff847894af6107e4b799a7a00cea /litmus/litmus.c
parent5b54b24c13b7c5dbaa06eae5e1a0075da354289c (diff)
Make release master support optional
Introduces CONFIG_RELEASE_MASTER and makes release master support dependent on the new symbol. This is useful because dedicated interrupt handling only applies to "large" multicore platforms. This will allow us to not implement smp_send_pull_timers() for all platforms.
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r--litmus/litmus.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c
index b71fc819eb51..c60423228607 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -30,8 +30,10 @@ atomic_t cannot_use_plugin = ATOMIC_INIT(0);
30/* Give log messages sequential IDs. */ 30/* Give log messages sequential IDs. */
31atomic_t __log_seq_no = ATOMIC_INIT(0); 31atomic_t __log_seq_no = ATOMIC_INIT(0);
32 32
33#ifdef CONFIG_RELEASE_MASTER
33/* current master CPU for handling timer IRQs */ 34/* current master CPU for handling timer IRQs */
34atomic_t release_master_cpu = ATOMIC_INIT(NO_CPU); 35atomic_t release_master_cpu = ATOMIC_INIT(NO_CPU);
36#endif
35 37
36static struct kmem_cache * bheap_node_cache; 38static struct kmem_cache * bheap_node_cache;
37extern struct kmem_cache * release_heap_cache; 39extern struct kmem_cache * release_heap_cache;
@@ -627,6 +629,7 @@ static int proc_write_cluster_size(struct file *file,
627 return len; 629 return len;
628} 630}
629 631
632#ifdef CONFIG_RELEASE_MASTER
630static int proc_read_release_master(char *page, char **start, 633static int proc_read_release_master(char *page, char **start,
631 off_t off, int count, 634 off_t off, int count,
632 int *eof, void *data) 635 int *eof, void *data)
@@ -676,13 +679,16 @@ static int proc_write_release_master(struct file *file,
676 } 679 }
677 } 680 }
678} 681}
682#endif
679 683
680static struct proc_dir_entry *litmus_dir = NULL, 684static struct proc_dir_entry *litmus_dir = NULL,
681 *curr_file = NULL, 685 *curr_file = NULL,
682 *stat_file = NULL, 686 *stat_file = NULL,
683 *plugs_file = NULL, 687 *plugs_file = NULL,
684 *clus_cache_idx_file = NULL, 688#ifdef CONFIG_RELEASE_MASTER
685 *release_master_file = NULL; 689 *release_master_file = NULL,
690#endif
691 *clus_cache_idx_file = NULL;
686 692
687static int __init init_litmus_proc(void) 693static int __init init_litmus_proc(void)
688{ 694{
@@ -702,6 +708,7 @@ static int __init init_litmus_proc(void)
702 curr_file->read_proc = proc_read_curr; 708 curr_file->read_proc = proc_read_curr;
703 curr_file->write_proc = proc_write_curr; 709 curr_file->write_proc = proc_write_curr;
704 710
711#ifdef CONFIG_RELEASE_MASTER
705 release_master_file = create_proc_entry("release_master", 712 release_master_file = create_proc_entry("release_master",
706 0644, litmus_dir); 713 0644, litmus_dir);
707 if (!release_master_file) { 714 if (!release_master_file) {
@@ -711,6 +718,7 @@ static int __init init_litmus_proc(void)
711 } 718 }
712 release_master_file->read_proc = proc_read_release_master; 719 release_master_file->read_proc = proc_read_release_master;
713 release_master_file->write_proc = proc_write_release_master; 720 release_master_file->write_proc = proc_write_release_master;
721#endif
714 722
715 clus_cache_idx_file = create_proc_entry("cluster_cache", 723 clus_cache_idx_file = create_proc_entry("cluster_cache",
716 0644, litmus_dir); 724 0644, litmus_dir);
@@ -741,8 +749,10 @@ static void exit_litmus_proc(void)
741 remove_proc_entry("active_plugin", litmus_dir); 749 remove_proc_entry("active_plugin", litmus_dir);
742 if (clus_cache_idx_file) 750 if (clus_cache_idx_file)
743 remove_proc_entry("cluster_cache", litmus_dir); 751 remove_proc_entry("cluster_cache", litmus_dir);
752#ifdef CONFIG_RELEASE_MASTER
744 if (release_master_file) 753 if (release_master_file)
745 remove_proc_entry("release_master", litmus_dir); 754 remove_proc_entry("release_master", litmus_dir);
755#endif
746 if (litmus_dir) 756 if (litmus_dir)
747 remove_proc_entry("litmus", NULL); 757 remove_proc_entry("litmus", NULL);
748} 758}