aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/debug.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-07-24 08:27:53 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-07-26 04:07:25 -0400
commitd5274369945a9c1cc05cb05c0d9713afe2f87db0 (patch)
tree1e4073689ab605f458692d81f74db92248e4e6e8 /arch/s390/kernel/debug.c
parentbdc0077af574800d24318b6945cf2344e8dbb050 (diff)
s390/debug: remove module_exit function / move EXPORT_SYMBOLs
debug.c is not a module, so remove the module_exit function, since it will never be called. Also move the EXPORT_SYMBOL statements to the functions they belong to. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/debug.c')
-rw-r--r--arch/s390/kernel/debug.c70
1 files changed, 23 insertions, 47 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 21be961e8a43..ba500d8dc392 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -110,6 +110,7 @@ struct debug_view debug_raw_view = {
110 NULL, 110 NULL,
111 NULL 111 NULL
112}; 112};
113EXPORT_SYMBOL(debug_raw_view);
113 114
114struct debug_view debug_hex_ascii_view = { 115struct debug_view debug_hex_ascii_view = {
115 "hex_ascii", 116 "hex_ascii",
@@ -119,6 +120,7 @@ struct debug_view debug_hex_ascii_view = {
119 NULL, 120 NULL,
120 NULL 121 NULL
121}; 122};
123EXPORT_SYMBOL(debug_hex_ascii_view);
122 124
123static struct debug_view debug_level_view = { 125static struct debug_view debug_level_view = {
124 "level", 126 "level",
@@ -155,6 +157,7 @@ struct debug_view debug_sprintf_view = {
155 NULL, 157 NULL,
156 NULL 158 NULL
157}; 159};
160EXPORT_SYMBOL(debug_sprintf_view);
158 161
159/* used by dump analysis tools to determine version of debug feature */ 162/* used by dump analysis tools to determine version of debug feature */
160static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION; 163static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION;
@@ -730,6 +733,7 @@ debug_info_t *debug_register(const char *name, int pages_per_area,
730 return debug_register_mode(name, pages_per_area, nr_areas, buf_size, 733 return debug_register_mode(name, pages_per_area, nr_areas, buf_size,
731 S_IRUSR | S_IWUSR, 0, 0); 734 S_IRUSR | S_IWUSR, 0, 0);
732} 735}
736EXPORT_SYMBOL(debug_register);
733 737
734/* 738/*
735 * debug_unregister: 739 * debug_unregister:
@@ -748,6 +752,7 @@ debug_unregister(debug_info_t * id)
748out: 752out:
749 return; 753 return;
750} 754}
755EXPORT_SYMBOL(debug_unregister);
751 756
752/* 757/*
753 * debug_set_size: 758 * debug_set_size:
@@ -810,7 +815,7 @@ debug_set_level(debug_info_t* id, int new_level)
810 } 815 }
811 spin_unlock_irqrestore(&id->lock,flags); 816 spin_unlock_irqrestore(&id->lock,flags);
812} 817}
813 818EXPORT_SYMBOL(debug_set_level);
814 819
815/* 820/*
816 * proceed_active_entry: 821 * proceed_active_entry:
@@ -930,7 +935,7 @@ debug_stop_all(void)
930 if (debug_stoppable) 935 if (debug_stoppable)
931 debug_active = 0; 936 debug_active = 0;
932} 937}
933 938EXPORT_SYMBOL(debug_stop_all);
934 939
935void debug_set_critical(void) 940void debug_set_critical(void)
936{ 941{
@@ -963,6 +968,7 @@ debug_event_common(debug_info_t * id, int level, const void *buf, int len)
963 968
964 return active; 969 return active;
965} 970}
971EXPORT_SYMBOL(debug_event_common);
966 972
967/* 973/*
968 * debug_exception_common: 974 * debug_exception_common:
@@ -990,6 +996,7 @@ debug_entry_t
990 996
991 return active; 997 return active;
992} 998}
999EXPORT_SYMBOL(debug_exception_common);
993 1000
994/* 1001/*
995 * counts arguments in format string for sprintf view 1002 * counts arguments in format string for sprintf view
@@ -1043,6 +1050,7 @@ debug_sprintf_event(debug_info_t* id, int level,char *string,...)
1043 1050
1044 return active; 1051 return active;
1045} 1052}
1053EXPORT_SYMBOL(debug_sprintf_event);
1046 1054
1047/* 1055/*
1048 * debug_sprintf_exception: 1056 * debug_sprintf_exception:
@@ -1081,25 +1089,7 @@ debug_sprintf_exception(debug_info_t* id, int level,char *string,...)
1081 1089
1082 return active; 1090 return active;
1083} 1091}
1084 1092EXPORT_SYMBOL(debug_sprintf_exception);
1085/*
1086 * debug_init:
1087 * - is called exactly once to initialize the debug feature
1088 */
1089
1090static int
1091__init debug_init(void)
1092{
1093 int rc = 0;
1094
1095 s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
1096 mutex_lock(&debug_mutex);
1097 debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
1098 initialized = 1;
1099 mutex_unlock(&debug_mutex);
1100
1101 return rc;
1102}
1103 1093
1104/* 1094/*
1105 * debug_register_view: 1095 * debug_register_view:
@@ -1147,6 +1137,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
1147out: 1137out:
1148 return rc; 1138 return rc;
1149} 1139}
1140EXPORT_SYMBOL(debug_register_view);
1150 1141
1151/* 1142/*
1152 * debug_unregister_view: 1143 * debug_unregister_view:
@@ -1176,6 +1167,7 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view)
1176out: 1167out:
1177 return rc; 1168 return rc;
1178} 1169}
1170EXPORT_SYMBOL(debug_unregister_view);
1179 1171
1180static inline char * 1172static inline char *
1181debug_get_user_string(const char __user *user_buf, size_t user_len) 1173debug_get_user_string(const char __user *user_buf, size_t user_len)
@@ -1485,6 +1477,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view,
1485 except_str, entry->id.fields.cpuid, (void *) caller); 1477 except_str, entry->id.fields.cpuid, (void *) caller);
1486 return rc; 1478 return rc;
1487} 1479}
1480EXPORT_SYMBOL(debug_dflt_header_fn);
1488 1481
1489/* 1482/*
1490 * prints debug data sprintf-formated: 1483 * prints debug data sprintf-formated:
@@ -1533,33 +1526,16 @@ out:
1533} 1526}
1534 1527
1535/* 1528/*
1536 * clean up module 1529 * debug_init:
1530 * - is called exactly once to initialize the debug feature
1537 */ 1531 */
1538static void __exit debug_exit(void) 1532static int __init debug_init(void)
1539{ 1533{
1540 debugfs_remove(debug_debugfs_root_entry); 1534 s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
1541 unregister_sysctl_table(s390dbf_sysctl_header); 1535 mutex_lock(&debug_mutex);
1542 return; 1536 debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT, NULL);
1537 initialized = 1;
1538 mutex_unlock(&debug_mutex);
1539 return 0;
1543} 1540}
1544
1545/*
1546 * module definitions
1547 */
1548postcore_initcall(debug_init); 1541postcore_initcall(debug_init);
1549module_exit(debug_exit);
1550MODULE_LICENSE("GPL");
1551
1552EXPORT_SYMBOL(debug_register);
1553EXPORT_SYMBOL(debug_unregister);
1554EXPORT_SYMBOL(debug_set_level);
1555EXPORT_SYMBOL(debug_stop_all);
1556EXPORT_SYMBOL(debug_register_view);
1557EXPORT_SYMBOL(debug_unregister_view);
1558EXPORT_SYMBOL(debug_event_common);
1559EXPORT_SYMBOL(debug_exception_common);
1560EXPORT_SYMBOL(debug_hex_ascii_view);
1561EXPORT_SYMBOL(debug_raw_view);
1562EXPORT_SYMBOL(debug_dflt_header_fn);
1563EXPORT_SYMBOL(debug_sprintf_view);
1564EXPORT_SYMBOL(debug_sprintf_exception);
1565EXPORT_SYMBOL(debug_sprintf_event);