aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_bus.c
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2008-04-17 01:46:28 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:47:06 -0400
commit1749a81d629b1295b38071914728cc2e72066f4d (patch)
tree8918ddaa31fe27bb385fd70b8bd03cc6dbb9782a /drivers/s390/crypto/ap_bus.c
parent3f12ebce6a004c8e9bf639801842f67e578ee7c6 (diff)
[S390] zcrypt: Comments and kernel-doc cleanup
Comments, which suggested to be kernel-doc but were not in the right formatting, have been corrected. Additionally some minor cleanup in the comments has been done. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r--drivers/s390/crypto/ap_bus.c189
1 files changed, 120 insertions, 69 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 7b0b81901297..a1ab3e3efd11 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -45,7 +45,7 @@ static int ap_poll_thread_start(void);
45static void ap_poll_thread_stop(void); 45static void ap_poll_thread_stop(void);
46static void ap_request_timeout(unsigned long); 46static void ap_request_timeout(unsigned long);
47 47
48/** 48/*
49 * Module description. 49 * Module description.
50 */ 50 */
51MODULE_AUTHOR("IBM Corporation"); 51MODULE_AUTHOR("IBM Corporation");
@@ -53,7 +53,7 @@ MODULE_DESCRIPTION("Adjunct Processor Bus driver, "
53 "Copyright 2006 IBM Corporation"); 53 "Copyright 2006 IBM Corporation");
54MODULE_LICENSE("GPL"); 54MODULE_LICENSE("GPL");
55 55
56/** 56/*
57 * Module parameter 57 * Module parameter
58 */ 58 */
59int ap_domain_index = -1; /* Adjunct Processor Domain Index */ 59int ap_domain_index = -1; /* Adjunct Processor Domain Index */
@@ -69,7 +69,7 @@ static struct device *ap_root_device = NULL;
69static DEFINE_SPINLOCK(ap_device_lock); 69static DEFINE_SPINLOCK(ap_device_lock);
70static LIST_HEAD(ap_device_list); 70static LIST_HEAD(ap_device_list);
71 71
72/** 72/*
73 * Workqueue & timer for bus rescan. 73 * Workqueue & timer for bus rescan.
74 */ 74 */
75static struct workqueue_struct *ap_work_queue; 75static struct workqueue_struct *ap_work_queue;
@@ -77,7 +77,7 @@ static struct timer_list ap_config_timer;
77static int ap_config_time = AP_CONFIG_TIME; 77static int ap_config_time = AP_CONFIG_TIME;
78static DECLARE_WORK(ap_config_work, ap_scan_bus); 78static DECLARE_WORK(ap_config_work, ap_scan_bus);
79 79
80/** 80/*
81 * Tasklet & timer for AP request polling. 81 * Tasklet & timer for AP request polling.
82 */ 82 */
83static struct timer_list ap_poll_timer = TIMER_INITIALIZER(ap_poll_timeout,0,0); 83static struct timer_list ap_poll_timer = TIMER_INITIALIZER(ap_poll_timeout,0,0);
@@ -88,9 +88,9 @@ static struct task_struct *ap_poll_kthread = NULL;
88static DEFINE_MUTEX(ap_poll_thread_mutex); 88static DEFINE_MUTEX(ap_poll_thread_mutex);
89 89
90/** 90/**
91 * Test if ap instructions are available. 91 * ap_intructions_available() - Test if AP instructions are available.
92 * 92 *
93 * Returns 0 if the ap instructions are installed. 93 * Returns 0 if the AP instructions are installed.
94 */ 94 */
95static inline int ap_instructions_available(void) 95static inline int ap_instructions_available(void)
96{ 96{
@@ -108,12 +108,12 @@ static inline int ap_instructions_available(void)
108} 108}
109 109
110/** 110/**
111 * Test adjunct processor queue. 111 * ap_test_queue(): Test adjunct processor queue.
112 * @qid: the ap queue number 112 * @qid: The AP queue number
113 * @queue_depth: pointer to queue depth value 113 * @queue_depth: Pointer to queue depth value
114 * @device_type: pointer to device type value 114 * @device_type: Pointer to device type value
115 * 115 *
116 * Returns ap queue status structure. 116 * Returns AP queue status structure.
117 */ 117 */
118static inline struct ap_queue_status 118static inline struct ap_queue_status
119ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type) 119ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type)
@@ -130,10 +130,10 @@ ap_test_queue(ap_qid_t qid, int *queue_depth, int *device_type)
130} 130}
131 131
132/** 132/**
133 * Reset adjunct processor queue. 133 * ap_reset_queue(): Reset adjunct processor queue.
134 * @qid: the ap queue number 134 * @qid: The AP queue number
135 * 135 *
136 * Returns ap queue status structure. 136 * Returns AP queue status structure.
137 */ 137 */
138static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid) 138static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid)
139{ 139{
@@ -148,16 +148,14 @@ static inline struct ap_queue_status ap_reset_queue(ap_qid_t qid)
148} 148}
149 149
150/** 150/**
151 * Send message to adjunct processor queue. 151 * __ap_send(): Send message to adjunct processor queue.
152 * @qid: the ap queue number 152 * @qid: The AP queue number
153 * @psmid: the program supplied message identifier 153 * @psmid: The program supplied message identifier
154 * @msg: the message text 154 * @msg: The message text
155 * @length: the message length 155 * @length: The message length
156 *
157 * Returns ap queue status structure.
158 * 156 *
157 * Returns AP queue status structure.
159 * Condition code 1 on NQAP can't happen because the L bit is 1. 158 * Condition code 1 on NQAP can't happen because the L bit is 1.
160 *
161 * Condition code 2 on NQAP also means the send is incomplete, 159 * Condition code 2 on NQAP also means the send is incomplete,
162 * because a segment boundary was reached. The NQAP is repeated. 160 * because a segment boundary was reached. The NQAP is repeated.
163 */ 161 */
@@ -198,23 +196,20 @@ int ap_send(ap_qid_t qid, unsigned long long psmid, void *msg, size_t length)
198} 196}
199EXPORT_SYMBOL(ap_send); 197EXPORT_SYMBOL(ap_send);
200 198
201/* 199/**
202 * Receive message from adjunct processor queue. 200 * __ap_recv(): Receive message from adjunct processor queue.
203 * @qid: the ap queue number 201 * @qid: The AP queue number
204 * @psmid: pointer to program supplied message identifier 202 * @psmid: Pointer to program supplied message identifier
205 * @msg: the message text 203 * @msg: The message text
206 * @length: the message length 204 * @length: The message length
207 *
208 * Returns ap queue status structure.
209 * 205 *
206 * Returns AP queue status structure.
210 * Condition code 1 on DQAP means the receive has taken place 207 * Condition code 1 on DQAP means the receive has taken place
211 * but only partially. The response is incomplete, hence the 208 * but only partially. The response is incomplete, hence the
212 * DQAP is repeated. 209 * DQAP is repeated.
213 *
214 * Condition code 2 on DQAP also means the receive is incomplete, 210 * Condition code 2 on DQAP also means the receive is incomplete,
215 * this time because a segment boundary was reached. Again, the 211 * this time because a segment boundary was reached. Again, the
216 * DQAP is repeated. 212 * DQAP is repeated.
217 *
218 * Note that gpr2 is used by the DQAP instruction to keep track of 213 * Note that gpr2 is used by the DQAP instruction to keep track of
219 * any 'residual' length, in case the instruction gets interrupted. 214 * any 'residual' length, in case the instruction gets interrupted.
220 * Hence it gets zeroed before the instruction. 215 * Hence it gets zeroed before the instruction.
@@ -263,11 +258,12 @@ int ap_recv(ap_qid_t qid, unsigned long long *psmid, void *msg, size_t length)
263EXPORT_SYMBOL(ap_recv); 258EXPORT_SYMBOL(ap_recv);
264 259
265/** 260/**
266 * Check if an AP queue is available. The test is repeated for 261 * ap_query_queue(): Check if an AP queue is available.
267 * AP_MAX_RESET times. 262 * @qid: The AP queue number
268 * @qid: the ap queue number 263 * @queue_depth: Pointer to queue depth value
269 * @queue_depth: pointer to queue depth value 264 * @device_type: Pointer to device type value
270 * @device_type: pointer to device type value 265 *
266 * The test is repeated for AP_MAX_RESET times.
271 */ 267 */
272static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type) 268static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type)
273{ 269{
@@ -308,8 +304,10 @@ static int ap_query_queue(ap_qid_t qid, int *queue_depth, int *device_type)
308} 304}
309 305
310/** 306/**
307 * ap_init_queue(): Reset an AP queue.
308 * @qid: The AP queue number
309 *
311 * Reset an AP queue and wait for it to become available again. 310 * Reset an AP queue and wait for it to become available again.
312 * @qid: the ap queue number
313 */ 311 */
314static int ap_init_queue(ap_qid_t qid) 312static int ap_init_queue(ap_qid_t qid)
315{ 313{
@@ -346,7 +344,10 @@ static int ap_init_queue(ap_qid_t qid)
346} 344}
347 345
348/** 346/**
349 * Arm request timeout if a AP device was idle and a new request is submitted. 347 * ap_increase_queue_count(): Arm request timeout.
348 * @ap_dev: Pointer to an AP device.
349 *
350 * Arm request timeout if an AP device was idle and a new request is submitted.
350 */ 351 */
351static void ap_increase_queue_count(struct ap_device *ap_dev) 352static void ap_increase_queue_count(struct ap_device *ap_dev)
352{ 353{
@@ -360,7 +361,10 @@ static void ap_increase_queue_count(struct ap_device *ap_dev)
360} 361}
361 362
362/** 363/**
363 * AP device is still alive, re-schedule request timeout if there are still 364 * ap_decrease_queue_count(): Decrease queue count.
365 * @ap_dev: Pointer to an AP device.
366 *
367 * If AP device is still alive, re-schedule request timeout if there are still
364 * pending requests. 368 * pending requests.
365 */ 369 */
366static void ap_decrease_queue_count(struct ap_device *ap_dev) 370static void ap_decrease_queue_count(struct ap_device *ap_dev)
@@ -371,7 +375,7 @@ static void ap_decrease_queue_count(struct ap_device *ap_dev)
371 if (ap_dev->queue_count > 0) 375 if (ap_dev->queue_count > 0)
372 mod_timer(&ap_dev->timeout, jiffies + timeout); 376 mod_timer(&ap_dev->timeout, jiffies + timeout);
373 else 377 else
374 /** 378 /*
375 * The timeout timer should to be disabled now - since 379 * The timeout timer should to be disabled now - since
376 * del_timer_sync() is very expensive, we just tell via the 380 * del_timer_sync() is very expensive, we just tell via the
377 * reset flag to ignore the pending timeout timer. 381 * reset flag to ignore the pending timeout timer.
@@ -379,7 +383,7 @@ static void ap_decrease_queue_count(struct ap_device *ap_dev)
379 ap_dev->reset = AP_RESET_IGNORE; 383 ap_dev->reset = AP_RESET_IGNORE;
380} 384}
381 385
382/** 386/*
383 * AP device related attributes. 387 * AP device related attributes.
384 */ 388 */
385static ssize_t ap_hwtype_show(struct device *dev, 389static ssize_t ap_hwtype_show(struct device *dev,
@@ -433,6 +437,10 @@ static struct attribute_group ap_dev_attr_group = {
433}; 437};
434 438
435/** 439/**
440 * ap_bus_match()
441 * @dev: Pointer to device
442 * @drv: Pointer to device_driver
443 *
436 * AP bus driver registration/unregistration. 444 * AP bus driver registration/unregistration.
437 */ 445 */
438static int ap_bus_match(struct device *dev, struct device_driver *drv) 446static int ap_bus_match(struct device *dev, struct device_driver *drv)
@@ -441,7 +449,7 @@ static int ap_bus_match(struct device *dev, struct device_driver *drv)
441 struct ap_driver *ap_drv = to_ap_drv(drv); 449 struct ap_driver *ap_drv = to_ap_drv(drv);
442 struct ap_device_id *id; 450 struct ap_device_id *id;
443 451
444 /** 452 /*
445 * Compare device type of the device with the list of 453 * Compare device type of the device with the list of
446 * supported types of the device_driver. 454 * supported types of the device_driver.
447 */ 455 */
@@ -455,8 +463,12 @@ static int ap_bus_match(struct device *dev, struct device_driver *drv)
455} 463}
456 464
457/** 465/**
458 * uevent function for AP devices. It sets up a single environment 466 * ap_uevent(): Uevent function for AP devices.
459 * variable DEV_TYPE which contains the hardware device type. 467 * @dev: Pointer to device
468 * @env: Pointer to kobj_uevent_env
469 *
470 * It sets up a single environment variable DEV_TYPE which contains the
471 * hardware device type.
460 */ 472 */
461static int ap_uevent (struct device *dev, struct kobj_uevent_env *env) 473static int ap_uevent (struct device *dev, struct kobj_uevent_env *env)
462{ 474{
@@ -500,8 +512,10 @@ static int ap_device_probe(struct device *dev)
500} 512}
501 513
502/** 514/**
515 * __ap_flush_queue(): Flush requests.
516 * @ap_dev: Pointer to the AP device
517 *
503 * Flush all requests from the request/pending queue of an AP device. 518 * Flush all requests from the request/pending queue of an AP device.
504 * @ap_dev: pointer to the AP device.
505 */ 519 */
506static void __ap_flush_queue(struct ap_device *ap_dev) 520static void __ap_flush_queue(struct ap_device *ap_dev)
507{ 521{
@@ -565,7 +579,7 @@ void ap_driver_unregister(struct ap_driver *ap_drv)
565} 579}
566EXPORT_SYMBOL(ap_driver_unregister); 580EXPORT_SYMBOL(ap_driver_unregister);
567 581
568/** 582/*
569 * AP bus attributes. 583 * AP bus attributes.
570 */ 584 */
571static ssize_t ap_domain_show(struct bus_type *bus, char *buf) 585static ssize_t ap_domain_show(struct bus_type *bus, char *buf)
@@ -630,14 +644,16 @@ static struct bus_attribute *const ap_bus_attrs[] = {
630}; 644};
631 645
632/** 646/**
633 * Pick one of the 16 ap domains. 647 * ap_select_domain(): Select an AP domain.
648 *
649 * Pick one of the 16 AP domains.
634 */ 650 */
635static int ap_select_domain(void) 651static int ap_select_domain(void)
636{ 652{
637 int queue_depth, device_type, count, max_count, best_domain; 653 int queue_depth, device_type, count, max_count, best_domain;
638 int rc, i, j; 654 int rc, i, j;
639 655
640 /** 656 /*
641 * We want to use a single domain. Either the one specified with 657 * We want to use a single domain. Either the one specified with
642 * the "domain=" parameter or the domain with the maximum number 658 * the "domain=" parameter or the domain with the maximum number
643 * of devices. 659 * of devices.
@@ -669,8 +685,10 @@ static int ap_select_domain(void)
669} 685}
670 686
671/** 687/**
672 * Find the device type if query queue returned a device type of 0. 688 * ap_probe_device_type(): Find the device type of an AP.
673 * @ap_dev: pointer to the AP device. 689 * @ap_dev: pointer to the AP device.
690 *
691 * Find the device type if query queue returned a device type of 0.
674 */ 692 */
675static int ap_probe_device_type(struct ap_device *ap_dev) 693static int ap_probe_device_type(struct ap_device *ap_dev)
676{ 694{
@@ -764,7 +782,11 @@ out:
764} 782}
765 783
766/** 784/**
767 * Scan the ap bus for new devices. 785 * __ap_scan_bus(): Scan the AP bus.
786 * @dev: Pointer to device
787 * @data: Pointer to data
788 *
789 * Scan the AP bus for new devices.
768 */ 790 */
769static int __ap_scan_bus(struct device *dev, void *data) 791static int __ap_scan_bus(struct device *dev, void *data)
770{ 792{
@@ -867,6 +889,8 @@ ap_config_timeout(unsigned long ptr)
867} 889}
868 890
869/** 891/**
892 * ap_schedule_poll_timer(): Schedule poll timer.
893 *
870 * Set up the timer to run the poll tasklet 894 * Set up the timer to run the poll tasklet
871 */ 895 */
872static inline void ap_schedule_poll_timer(void) 896static inline void ap_schedule_poll_timer(void)
@@ -877,10 +901,11 @@ static inline void ap_schedule_poll_timer(void)
877} 901}
878 902
879/** 903/**
880 * Receive pending reply messages from an AP device. 904 * ap_poll_read(): Receive pending reply messages from an AP device.
881 * @ap_dev: pointer to the AP device 905 * @ap_dev: pointer to the AP device
882 * @flags: pointer to control flags, bit 2^0 is set if another poll is 906 * @flags: pointer to control flags, bit 2^0 is set if another poll is
883 * required, bit 2^1 is set if the poll timer needs to get armed 907 * required, bit 2^1 is set if the poll timer needs to get armed
908 *
884 * Returns 0 if the device is still present, -ENODEV if not. 909 * Returns 0 if the device is still present, -ENODEV if not.
885 */ 910 */
886static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) 911static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags)
@@ -925,10 +950,11 @@ static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags)
925} 950}
926 951
927/** 952/**
928 * Send messages from the request queue to an AP device. 953 * ap_poll_write(): Send messages from the request queue to an AP device.
929 * @ap_dev: pointer to the AP device 954 * @ap_dev: pointer to the AP device
930 * @flags: pointer to control flags, bit 2^0 is set if another poll is 955 * @flags: pointer to control flags, bit 2^0 is set if another poll is
931 * required, bit 2^1 is set if the poll timer needs to get armed 956 * required, bit 2^1 is set if the poll timer needs to get armed
957 *
932 * Returns 0 if the device is still present, -ENODEV if not. 958 * Returns 0 if the device is still present, -ENODEV if not.
933 */ 959 */
934static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) 960static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags)
@@ -968,11 +994,13 @@ static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags)
968} 994}
969 995
970/** 996/**
971 * Poll AP device for pending replies and send new messages. If either 997 * ap_poll_queue(): Poll AP device for pending replies and send new messages.
972 * ap_poll_read or ap_poll_write returns -ENODEV unregister the device.
973 * @ap_dev: pointer to the bus device 998 * @ap_dev: pointer to the bus device
974 * @flags: pointer to control flags, bit 2^0 is set if another poll is 999 * @flags: pointer to control flags, bit 2^0 is set if another poll is
975 * required, bit 2^1 is set if the poll timer needs to get armed 1000 * required, bit 2^1 is set if the poll timer needs to get armed
1001 *
1002 * Poll AP device for pending replies and send new messages. If either
1003 * ap_poll_read or ap_poll_write returns -ENODEV unregister the device.
976 * Returns 0. 1004 * Returns 0.
977 */ 1005 */
978static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags) 1006static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags)
@@ -986,9 +1014,11 @@ static inline int ap_poll_queue(struct ap_device *ap_dev, unsigned long *flags)
986} 1014}
987 1015
988/** 1016/**
989 * Queue a message to a device. 1017 * __ap_queue_message(): Queue a message to a device.
990 * @ap_dev: pointer to the AP device 1018 * @ap_dev: pointer to the AP device
991 * @ap_msg: the message to be queued 1019 * @ap_msg: the message to be queued
1020 *
1021 * Queue a message to a device. Returns 0 if successful.
992 */ 1022 */
993static int __ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg) 1023static int __ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
994{ 1024{
@@ -1055,12 +1085,14 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
1055EXPORT_SYMBOL(ap_queue_message); 1085EXPORT_SYMBOL(ap_queue_message);
1056 1086
1057/** 1087/**
1088 * ap_cancel_message(): Cancel a crypto request.
1089 * @ap_dev: The AP device that has the message queued
1090 * @ap_msg: The message that is to be removed
1091 *
1058 * Cancel a crypto request. This is done by removing the request 1092 * Cancel a crypto request. This is done by removing the request
1059 * from the devive pendingq or requestq queue. Note that the 1093 * from the device pending or request queue. Note that the
1060 * request stays on the AP queue. When it finishes the message 1094 * request stays on the AP queue. When it finishes the message
1061 * reply will be discarded because the psmid can't be found. 1095 * reply will be discarded because the psmid can't be found.
1062 * @ap_dev: AP device that has the message queued
1063 * @ap_msg: the message that is to be removed
1064 */ 1096 */
1065void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg) 1097void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
1066{ 1098{
@@ -1082,7 +1114,10 @@ void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
1082EXPORT_SYMBOL(ap_cancel_message); 1114EXPORT_SYMBOL(ap_cancel_message);
1083 1115
1084/** 1116/**
1085 * AP receive polling for finished AP requests 1117 * ap_poll_timeout(): AP receive polling for finished AP requests.
1118 * @unused: Unused variable.
1119 *
1120 * Schedules the AP tasklet.
1086 */ 1121 */
1087static void ap_poll_timeout(unsigned long unused) 1122static void ap_poll_timeout(unsigned long unused)
1088{ 1123{
@@ -1090,6 +1125,9 @@ static void ap_poll_timeout(unsigned long unused)
1090} 1125}
1091 1126
1092/** 1127/**
1128 * ap_reset(): Reset a not responding AP device.
1129 * @ap_dev: Pointer to the AP device
1130 *
1093 * Reset a not responding AP device and move all requests from the 1131 * Reset a not responding AP device and move all requests from the
1094 * pending queue to the request queue. 1132 * pending queue to the request queue.
1095 */ 1133 */
@@ -1108,11 +1146,6 @@ static void ap_reset(struct ap_device *ap_dev)
1108 ap_dev->unregistered = 1; 1146 ap_dev->unregistered = 1;
1109} 1147}
1110 1148
1111/**
1112 * Poll all AP devices on the bus in a round robin fashion. Continue
1113 * polling until bit 2^0 of the control flags is not set. If bit 2^1
1114 * of the control flags has been set arm the poll timer.
1115 */
1116static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags) 1149static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags)
1117{ 1150{
1118 spin_lock(&ap_dev->lock); 1151 spin_lock(&ap_dev->lock);
@@ -1126,6 +1159,14 @@ static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags)
1126 return 0; 1159 return 0;
1127} 1160}
1128 1161
1162/**
1163 * ap_poll_all(): Poll all AP devices.
1164 * @dummy: Unused variable
1165 *
1166 * Poll all AP devices on the bus in a round robin fashion. Continue
1167 * polling until bit 2^0 of the control flags is not set. If bit 2^1
1168 * of the control flags has been set arm the poll timer.
1169 */
1129static void ap_poll_all(unsigned long dummy) 1170static void ap_poll_all(unsigned long dummy)
1130{ 1171{
1131 unsigned long flags; 1172 unsigned long flags;
@@ -1144,6 +1185,9 @@ static void ap_poll_all(unsigned long dummy)
1144} 1185}
1145 1186
1146/** 1187/**
1188 * ap_poll_thread(): Thread that polls for finished requests.
1189 * @data: Unused pointer
1190 *
1147 * AP bus poll thread. The purpose of this thread is to poll for 1191 * AP bus poll thread. The purpose of this thread is to poll for
1148 * finished requests in a loop if there is a "free" cpu - that is 1192 * finished requests in a loop if there is a "free" cpu - that is
1149 * a cpu that doesn't have anything better to do. The polling stops 1193 * a cpu that doesn't have anything better to do. The polling stops
@@ -1213,7 +1257,10 @@ static void ap_poll_thread_stop(void)
1213} 1257}
1214 1258
1215/** 1259/**
1216 * Handling of request timeouts 1260 * ap_request_timeout(): Handling of request timeouts
1261 * @data: Holds the AP device.
1262 *
1263 * Handles request timeouts.
1217 */ 1264 */
1218static void ap_request_timeout(unsigned long data) 1265static void ap_request_timeout(unsigned long data)
1219{ 1266{
@@ -1246,7 +1293,9 @@ static struct reset_call ap_reset_call = {
1246}; 1293};
1247 1294
1248/** 1295/**
1249 * The module initialization code. 1296 * ap_module_init(): The module initialization code.
1297 *
1298 * Initializes the module.
1250 */ 1299 */
1251int __init ap_module_init(void) 1300int __init ap_module_init(void)
1252{ 1301{
@@ -1288,7 +1337,7 @@ int __init ap_module_init(void)
1288 if (ap_select_domain() == 0) 1337 if (ap_select_domain() == 0)
1289 ap_scan_bus(NULL); 1338 ap_scan_bus(NULL);
1290 1339
1291 /* Setup the ap bus rescan timer. */ 1340 /* Setup the AP bus rescan timer. */
1292 init_timer(&ap_config_timer); 1341 init_timer(&ap_config_timer);
1293 ap_config_timer.function = ap_config_timeout; 1342 ap_config_timer.function = ap_config_timeout;
1294 ap_config_timer.data = 0; 1343 ap_config_timer.data = 0;
@@ -1325,7 +1374,9 @@ static int __ap_match_all(struct device *dev, void *data)
1325} 1374}
1326 1375
1327/** 1376/**
1328 * The module termination code 1377 * ap_modules_exit(): The module termination code
1378 *
1379 * Terminates the module.
1329 */ 1380 */
1330void ap_module_exit(void) 1381void ap_module_exit(void)
1331{ 1382{