diff options
Diffstat (limited to 'litmus/litmus.c')
| -rw-r--r-- | litmus/litmus.c | 14 |
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. */ |
| 31 | atomic_t __log_seq_no = ATOMIC_INIT(0); | 31 | atomic_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 */ |
| 34 | atomic_t release_master_cpu = ATOMIC_INIT(NO_CPU); | 35 | atomic_t release_master_cpu = ATOMIC_INIT(NO_CPU); |
| 36 | #endif | ||
| 35 | 37 | ||
| 36 | static struct kmem_cache * bheap_node_cache; | 38 | static struct kmem_cache * bheap_node_cache; |
| 37 | extern struct kmem_cache * release_heap_cache; | 39 | extern 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 | ||
| 630 | static int proc_read_release_master(char *page, char **start, | 633 | static 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 | ||
| 680 | static struct proc_dir_entry *litmus_dir = NULL, | 684 | static 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 | ||
| 687 | static int __init init_litmus_proc(void) | 693 | static 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 | } |
