diff options
Diffstat (limited to 'arch/s390/kernel/debug.c')
| -rw-r--r-- | arch/s390/kernel/debug.c | 70 |
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 | }; |
| 113 | EXPORT_SYMBOL(debug_raw_view); | ||
| 113 | 114 | ||
| 114 | struct debug_view debug_hex_ascii_view = { | 115 | struct 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 | }; |
| 123 | EXPORT_SYMBOL(debug_hex_ascii_view); | ||
| 122 | 124 | ||
| 123 | static struct debug_view debug_level_view = { | 125 | static 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 | }; |
| 160 | EXPORT_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 */ |
| 160 | static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION; | 163 | static 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 | } |
| 736 | EXPORT_SYMBOL(debug_register); | ||
| 733 | 737 | ||
| 734 | /* | 738 | /* |
| 735 | * debug_unregister: | 739 | * debug_unregister: |
| @@ -748,6 +752,7 @@ debug_unregister(debug_info_t * id) | |||
| 748 | out: | 752 | out: |
| 749 | return; | 753 | return; |
| 750 | } | 754 | } |
| 755 | EXPORT_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 | 818 | EXPORT_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 | 938 | EXPORT_SYMBOL(debug_stop_all); | |
| 934 | 939 | ||
| 935 | void debug_set_critical(void) | 940 | void 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 | } |
| 971 | EXPORT_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 | } |
| 999 | EXPORT_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 | } |
| 1053 | EXPORT_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 | 1092 | EXPORT_SYMBOL(debug_sprintf_exception); | |
| 1085 | /* | ||
| 1086 | * debug_init: | ||
| 1087 | * - is called exactly once to initialize the debug feature | ||
| 1088 | */ | ||
| 1089 | |||
| 1090 | static 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) | |||
| 1147 | out: | 1137 | out: |
| 1148 | return rc; | 1138 | return rc; |
| 1149 | } | 1139 | } |
| 1140 | EXPORT_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) | |||
| 1176 | out: | 1167 | out: |
| 1177 | return rc; | 1168 | return rc; |
| 1178 | } | 1169 | } |
| 1170 | EXPORT_SYMBOL(debug_unregister_view); | ||
| 1179 | 1171 | ||
| 1180 | static inline char * | 1172 | static inline char * |
| 1181 | debug_get_user_string(const char __user *user_buf, size_t user_len) | 1173 | debug_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 | } |
| 1480 | EXPORT_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 | */ |
| 1538 | static void __exit debug_exit(void) | 1532 | static 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 | */ | ||
| 1548 | postcore_initcall(debug_init); | 1541 | postcore_initcall(debug_init); |
| 1549 | module_exit(debug_exit); | ||
| 1550 | MODULE_LICENSE("GPL"); | ||
| 1551 | |||
| 1552 | EXPORT_SYMBOL(debug_register); | ||
| 1553 | EXPORT_SYMBOL(debug_unregister); | ||
| 1554 | EXPORT_SYMBOL(debug_set_level); | ||
| 1555 | EXPORT_SYMBOL(debug_stop_all); | ||
| 1556 | EXPORT_SYMBOL(debug_register_view); | ||
| 1557 | EXPORT_SYMBOL(debug_unregister_view); | ||
| 1558 | EXPORT_SYMBOL(debug_event_common); | ||
| 1559 | EXPORT_SYMBOL(debug_exception_common); | ||
| 1560 | EXPORT_SYMBOL(debug_hex_ascii_view); | ||
| 1561 | EXPORT_SYMBOL(debug_raw_view); | ||
| 1562 | EXPORT_SYMBOL(debug_dflt_header_fn); | ||
| 1563 | EXPORT_SYMBOL(debug_sprintf_view); | ||
| 1564 | EXPORT_SYMBOL(debug_sprintf_exception); | ||
| 1565 | EXPORT_SYMBOL(debug_sprintf_event); | ||
