cpci_hotplug_core.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. /*
  2. * CompactPCI Hot Plug Driver
  3. *
  4. * Copyright (C) 2002,2005 SOMA Networks, Inc.
  5. * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
  6. * Copyright (C) 2001 IBM Corp.
  7. *
  8. * All rights reserved.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  18. * NON INFRINGEMENT. See the GNU General Public License for more
  19. * details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. *
  25. * Send feedback to <scottm@somanetworks.com>
  26. */
  27. #include <linux/module.h>
  28. #include <linux/kernel.h>
  29. #include <linux/slab.h>
  30. #include <linux/pci.h>
  31. #include <linux/pci_hotplug.h>
  32. #include <linux/init.h>
  33. #include <linux/interrupt.h>
  34. #include <asm/atomic.h>
  35. #include <linux/delay.h>
  36. #include <linux/kthread.h>
  37. #include "cpci_hotplug.h"
  38. #define DRIVER_AUTHOR "Scott Murray <scottm@somanetworks.com>"
  39. #define DRIVER_DESC "CompactPCI Hot Plug Core"
  40. #define MY_NAME "cpci_hotplug"
  41. #define dbg(format, arg...) \
  42. do { \
  43. if (cpci_debug) \
  44. printk (KERN_DEBUG "%s: " format "\n", \
  45. MY_NAME , ## arg); \
  46. } while (0)
  47. #define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
  48. #define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
  49. #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
  50. /* local variables */
  51. static DECLARE_RWSEM(list_rwsem);
  52. static LIST_HEAD(slot_list);
  53. static int slots;
  54. static atomic_t extracting;
  55. int cpci_debug;
  56. static struct cpci_hp_controller *controller;
  57. static struct task_struct *cpci_thread;
  58. static int thread_finished;
  59. static int enable_slot(struct hotplug_slot *slot);
  60. static int disable_slot(struct hotplug_slot *slot);
  61. static int set_attention_status(struct hotplug_slot *slot, u8 value);
  62. static int get_power_status(struct hotplug_slot *slot, u8 * value);
  63. static int get_attention_status(struct hotplug_slot *slot, u8 * value);
  64. static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
  65. static int get_latch_status(struct hotplug_slot *slot, u8 * value);
  66. static struct hotplug_slot_ops cpci_hotplug_slot_ops = {
  67. .enable_slot = enable_slot,
  68. .disable_slot = disable_slot,
  69. .set_attention_status = set_attention_status,
  70. .get_power_status = get_power_status,
  71. .get_attention_status = get_attention_status,
  72. .get_adapter_status = get_adapter_status,
  73. .get_latch_status = get_latch_status,
  74. };
  75. static int
  76. update_latch_status(struct hotplug_slot *hotplug_slot, u8 value)
  77. {
  78. struct hotplug_slot_info info;
  79. memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
  80. info.latch_status = value;
  81. return pci_hp_change_slot_info(hotplug_slot, &info);
  82. }
  83. static int
  84. update_adapter_status(struct hotplug_slot *hotplug_slot, u8 value)
  85. {
  86. struct hotplug_slot_info info;
  87. memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
  88. info.adapter_status = value;
  89. return pci_hp_change_slot_info(hotplug_slot, &info);
  90. }
  91. static int
  92. enable_slot(struct hotplug_slot *hotplug_slot)
  93. {
  94. struct slot *slot = hotplug_slot->private;
  95. int retval = 0;
  96. dbg("%s - physical_slot = %s", __func__, slot_name(slot));
  97. if (controller->ops->set_power)
  98. retval = controller->ops->set_power(slot, 1);
  99. return retval;
  100. }
  101. static int
  102. disable_slot(struct hotplug_slot *hotplug_slot)
  103. {
  104. struct slot *slot = hotplug_slot->private;
  105. int retval = 0;
  106. dbg("%s - physical_slot = %s", __func__, slot_name(slot));
  107. down_write(&list_rwsem);
  108. /* Unconfigure device */
  109. dbg("%s - unconfiguring slot %s", __func__, slot_name(slot));
  110. if ((retval = cpci_unconfigure_slot(slot))) {
  111. err("%s - could not unconfigure slot %s",
  112. __func__, slot_name(slot));
  113. goto disable_error;
  114. }
  115. dbg("%s - finished unconfiguring slot %s", __func__, slot_name(slot));
  116. /* Clear EXT (by setting it) */
  117. if (cpci_clear_ext(slot)) {
  118. err("%s - could not clear EXT for slot %s",
  119. __func__, slot_name(slot));
  120. retval = -ENODEV;
  121. goto disable_error;
  122. }
  123. cpci_led_on(slot);
  124. if (controller->ops->set_power)
  125. if ((retval = controller->ops->set_power(slot, 0)))
  126. goto disable_error;
  127. if (update_adapter_status(slot->hotplug_slot, 0))
  128. warn("failure to update adapter file");
  129. if (slot->extracting) {
  130. slot->extracting = 0;
  131. atomic_dec(&extracting);
  132. }
  133. disable_error:
  134. up_write(&list_rwsem);
  135. return retval;
  136. }
  137. static u8
  138. cpci_get_power_status(struct slot *slot)
  139. {
  140. u8 power = 1;
  141. if (controller->ops->get_power)
  142. power = controller->ops->get_power(slot);
  143. return power;
  144. }
  145. static int
  146. get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
  147. {
  148. struct slot *slot = hotplug_slot->private;
  149. *value = cpci_get_power_status(slot);
  150. return 0;
  151. }
  152. static int
  153. get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
  154. {
  155. struct slot *slot = hotplug_slot->private;
  156. *value = cpci_get_attention_status(slot);
  157. return 0;
  158. }
  159. static int
  160. set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
  161. {
  162. return cpci_set_attention_status(hotplug_slot->private, status);
  163. }
  164. static int
  165. get_adapter_status(struct hotplug_slot *hotplug_slot, u8 * value)
  166. {
  167. *value = hotplug_slot->info->adapter_status;
  168. return 0;
  169. }
  170. static int
  171. get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value)
  172. {
  173. *value = hotplug_slot->info->latch_status;
  174. return 0;
  175. }
  176. static void release_slot(struct hotplug_slot *hotplug_slot)
  177. {
  178. struct slot *slot = hotplug_slot->private;
  179. kfree(slot->hotplug_slot->info);
  180. kfree(slot->hotplug_slot);
  181. if (slot->dev)
  182. pci_dev_put(slot->dev);
  183. kfree(slot);
  184. }
  185. #define SLOT_NAME_SIZE 6
  186. int
  187. cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
  188. {
  189. struct slot *slot;
  190. struct hotplug_slot *hotplug_slot;
  191. struct hotplug_slot_info *info;
  192. char name[SLOT_NAME_SIZE];
  193. int status = -ENOMEM;
  194. int i;
  195. if (!(controller && bus))
  196. return -ENODEV;
  197. /*
  198. * Create a structure for each slot, and register that slot
  199. * with the pci_hotplug subsystem.
  200. */
  201. for (i = first; i <= last; ++i) {
  202. slot = kzalloc(sizeof (struct slot), GFP_KERNEL);
  203. if (!slot)
  204. goto error;
  205. hotplug_slot =
  206. kzalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
  207. if (!hotplug_slot)
  208. goto error_slot;
  209. slot->hotplug_slot = hotplug_slot;
  210. info = kzalloc(sizeof (struct hotplug_slot_info), GFP_KERNEL);
  211. if (!info)
  212. goto error_hpslot;
  213. hotplug_slot->info = info;
  214. slot->bus = bus;
  215. slot->number = i;
  216. slot->devfn = PCI_DEVFN(i, 0);
  217. snprintf(name, SLOT_NAME_SIZE, "%02x:%02x", bus->number, i);
  218. hotplug_slot->private = slot;
  219. hotplug_slot->release = &release_slot;
  220. hotplug_slot->ops = &cpci_hotplug_slot_ops;
  221. /*
  222. * Initialize the slot info structure with some known
  223. * good values.
  224. */
  225. dbg("initializing slot %s", name);
  226. info->power_status = cpci_get_power_status(slot);
  227. info->attention_status = cpci_get_attention_status(slot);
  228. dbg("registering slot %s", name);
  229. status = pci_hp_register(slot->hotplug_slot, bus, i, name);
  230. if (status) {
  231. err("pci_hp_register failed with error %d", status);
  232. goto error_info;
  233. }
  234. dbg("slot registered with name: %s", slot_name(slot));
  235. /* Add slot to our internal list */
  236. down_write(&list_rwsem);
  237. list_add(&slot->slot_list, &slot_list);
  238. slots++;
  239. up_write(&list_rwsem);
  240. }
  241. return 0;
  242. error_info:
  243. kfree(info);
  244. error_hpslot:
  245. kfree(hotplug_slot);
  246. error_slot:
  247. kfree(slot);
  248. error:
  249. return status;
  250. }
  251. int
  252. cpci_hp_unregister_bus(struct pci_bus *bus)
  253. {
  254. struct slot *slot;
  255. struct slot *tmp;
  256. int status = 0;
  257. down_write(&list_rwsem);
  258. if (!slots) {
  259. up_write(&list_rwsem);
  260. return -1;
  261. }
  262. list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
  263. if (slot->bus == bus) {
  264. list_del(&slot->slot_list);
  265. slots--;
  266. dbg("deregistering slot %s", slot_name(slot));
  267. status = pci_hp_deregister(slot->hotplug_slot);
  268. if (status) {
  269. err("pci_hp_deregister failed with error %d",
  270. status);
  271. break;
  272. }
  273. }
  274. }
  275. up_write(&list_rwsem);
  276. return status;
  277. }
  278. /* This is the interrupt mode interrupt handler */
  279. static irqreturn_t
  280. cpci_hp_intr(int irq, void *data)
  281. {
  282. dbg("entered cpci_hp_intr");
  283. /* Check to see if it was our interrupt */
  284. if ((controller->irq_flags & IRQF_SHARED) &&
  285. !controller->ops->check_irq(controller->dev_id)) {
  286. dbg("exited cpci_hp_intr, not our interrupt");
  287. return IRQ_NONE;
  288. }
  289. /* Disable ENUM interrupt */
  290. controller->ops->disable_irq();
  291. /* Trigger processing by the event thread */
  292. wake_up_process(cpci_thread);
  293. return IRQ_HANDLED;
  294. }
  295. /*
  296. * According to PICMG 2.1 R2.0, section 6.3.2, upon
  297. * initialization, the system driver shall clear the
  298. * INS bits of the cold-inserted devices.
  299. */
  300. static int
  301. init_slots(int clear_ins)
  302. {
  303. struct slot *slot;
  304. struct pci_dev* dev;
  305. dbg("%s - enter", __func__);
  306. down_read(&list_rwsem);
  307. if (!slots) {
  308. up_read(&list_rwsem);
  309. return -1;
  310. }
  311. list_for_each_entry(slot, &slot_list, slot_list) {
  312. dbg("%s - looking at slot %s", __func__, slot_name(slot));
  313. if (clear_ins && cpci_check_and_clear_ins(slot))
  314. dbg("%s - cleared INS for slot %s",
  315. __func__, slot_name(slot));
  316. dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
  317. if (dev) {
  318. if (update_adapter_status(slot->hotplug_slot, 1))
  319. warn("failure to update adapter file");
  320. if (update_latch_status(slot->hotplug_slot, 1))
  321. warn("failure to update latch file");
  322. slot->dev = dev;
  323. }
  324. }
  325. up_read(&list_rwsem);
  326. dbg("%s - exit", __func__);
  327. return 0;
  328. }
  329. static int
  330. check_slots(void)
  331. {
  332. struct slot *slot;
  333. int extracted;
  334. int inserted;
  335. u16 hs_csr;
  336. down_read(&list_rwsem);
  337. if (!slots) {
  338. up_read(&list_rwsem);
  339. err("no slots registered, shutting down");
  340. return -1;
  341. }
  342. extracted = inserted = 0;
  343. list_for_each_entry(slot, &slot_list, slot_list) {
  344. dbg("%s - looking at slot %s", __func__, slot_name(slot));
  345. if (cpci_check_and_clear_ins(slot)) {
  346. /*
  347. * Some broken hardware (e.g. PLX 9054AB) asserts
  348. * ENUM# twice...
  349. */
  350. if (slot->dev) {
  351. warn("slot %s already inserted",
  352. slot_name(slot));
  353. inserted++;
  354. continue;
  355. }
  356. /* Process insertion */
  357. dbg("%s - slot %s inserted", __func__, slot_name(slot));
  358. /* GSM, debug */
  359. hs_csr = cpci_get_hs_csr(slot);
  360. dbg("%s - slot %s HS_CSR (1) = %04x",
  361. __func__, slot_name(slot), hs_csr);
  362. /* Configure device */
  363. dbg("%s - configuring slot %s",
  364. __func__, slot_name(slot));
  365. if (cpci_configure_slot(slot)) {
  366. err("%s - could not configure slot %s",
  367. __func__, slot_name(slot));
  368. continue;
  369. }
  370. dbg("%s - finished configuring slot %s",
  371. __func__, slot_name(slot));
  372. /* GSM, debug */
  373. hs_csr = cpci_get_hs_csr(slot);
  374. dbg("%s - slot %s HS_CSR (2) = %04x",
  375. __func__, slot_name(slot), hs_csr);
  376. if (update_latch_status(slot->hotplug_slot, 1))
  377. warn("failure to update latch file");
  378. if (update_adapter_status(slot->hotplug_slot, 1))
  379. warn("failure to update adapter file");
  380. cpci_led_off(slot);
  381. /* GSM, debug */
  382. hs_csr = cpci_get_hs_csr(slot);
  383. dbg("%s - slot %s HS_CSR (3) = %04x",
  384. __func__, slot_name(slot), hs_csr);
  385. inserted++;
  386. } else if (cpci_check_ext(slot)) {
  387. /* Process extraction request */
  388. dbg("%s - slot %s extracted",
  389. __func__, slot_name(slot));
  390. /* GSM, debug */
  391. hs_csr = cpci_get_hs_csr(slot);
  392. dbg("%s - slot %s HS_CSR = %04x",
  393. __func__, slot_name(slot), hs_csr);
  394. if (!slot->extracting) {
  395. if (update_latch_status(slot->hotplug_slot, 0)) {
  396. warn("failure to update latch file");
  397. }
  398. slot->extracting = 1;
  399. atomic_inc(&extracting);
  400. }
  401. extracted++;
  402. } else if (slot->extracting) {
  403. hs_csr = cpci_get_hs_csr(slot);
  404. if (hs_csr == 0xffff) {
  405. /*
  406. * Hmmm, we're likely hosed at this point, should we
  407. * bother trying to tell the driver or not?
  408. */
  409. err("card in slot %s was improperly removed",
  410. slot_name(slot));
  411. if (update_adapter_status(slot->hotplug_slot, 0))
  412. warn("failure to update adapter file");
  413. slot->extracting = 0;
  414. atomic_dec(&extracting);
  415. }
  416. }
  417. }
  418. up_read(&list_rwsem);
  419. dbg("inserted=%d, extracted=%d, extracting=%d",
  420. inserted, extracted, atomic_read(&extracting));
  421. if (inserted || extracted)
  422. return extracted;
  423. else if (!atomic_read(&extracting)) {
  424. err("cannot find ENUM# source, shutting down");
  425. return -1;
  426. }
  427. return 0;
  428. }
  429. /* This is the interrupt mode worker thread body */
  430. static int
  431. event_thread(void *data)
  432. {
  433. int rc;
  434. dbg("%s - event thread started", __func__);
  435. while (1) {
  436. dbg("event thread sleeping");
  437. set_current_state(TASK_INTERRUPTIBLE);
  438. schedule();
  439. if (kthread_should_stop())
  440. break;
  441. do {
  442. rc = check_slots();
  443. if (rc > 0) {
  444. /* Give userspace a chance to handle extraction */
  445. msleep(500);
  446. } else if (rc < 0) {
  447. dbg("%s - error checking slots", __func__);
  448. thread_finished = 1;
  449. goto out;
  450. }
  451. } while (atomic_read(&extracting) && !kthread_should_stop());
  452. if (kthread_should_stop())
  453. break;
  454. /* Re-enable ENUM# interrupt */
  455. dbg("%s - re-enabling irq", __func__);
  456. controller->ops->enable_irq();
  457. }
  458. out:
  459. return 0;
  460. }
  461. /* This is the polling mode worker thread body */
  462. static int
  463. poll_thread(void *data)
  464. {
  465. int rc;
  466. while (1) {
  467. if (kthread_should_stop() || signal_pending(current))
  468. break;
  469. if (controller->ops->query_enum()) {
  470. do {
  471. rc = check_slots();
  472. if (rc > 0) {
  473. /* Give userspace a chance to handle extraction */
  474. msleep(500);
  475. } else if (rc < 0) {
  476. dbg("%s - error checking slots", __func__);
  477. thread_finished = 1;
  478. goto out;
  479. }
  480. } while (atomic_read(&extracting) && !kthread_should_stop());
  481. }
  482. msleep(100);
  483. }
  484. out:
  485. return 0;
  486. }
  487. static int
  488. cpci_start_thread(void)
  489. {
  490. if (controller->irq)
  491. cpci_thread = kthread_run(event_thread, NULL, "cpci_hp_eventd");
  492. else
  493. cpci_thread = kthread_run(poll_thread, NULL, "cpci_hp_polld");
  494. if (IS_ERR(cpci_thread)) {
  495. err("Can't start up our thread");
  496. return PTR_ERR(cpci_thread);
  497. }
  498. thread_finished = 0;
  499. return 0;
  500. }
  501. static void
  502. cpci_stop_thread(void)
  503. {
  504. kthread_stop(cpci_thread);
  505. thread_finished = 1;
  506. }
  507. int
  508. cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
  509. {
  510. int status = 0;
  511. if (controller)
  512. return -1;
  513. if (!(new_controller && new_controller->ops))
  514. return -EINVAL;
  515. if (new_controller->irq) {
  516. if (!(new_controller->ops->enable_irq &&
  517. new_controller->ops->disable_irq))
  518. status = -EINVAL;
  519. if (request_irq(new_controller->irq,
  520. cpci_hp_intr,
  521. new_controller->irq_flags,
  522. MY_NAME,
  523. new_controller->dev_id)) {
  524. err("Can't get irq %d for the hotplug cPCI controller",
  525. new_controller->irq);
  526. status = -ENODEV;
  527. }
  528. dbg("%s - acquired controller irq %d",
  529. __func__, new_controller->irq);
  530. }
  531. if (!status)
  532. controller = new_controller;
  533. return status;
  534. }
  535. static void
  536. cleanup_slots(void)
  537. {
  538. struct slot *slot;
  539. struct slot *tmp;
  540. /*
  541. * Unregister all of our slots with the pci_hotplug subsystem,
  542. * and free up all memory that we had allocated.
  543. */
  544. down_write(&list_rwsem);
  545. if (!slots)
  546. goto cleanup_null;
  547. list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
  548. list_del(&slot->slot_list);
  549. pci_hp_deregister(slot->hotplug_slot);
  550. }
  551. cleanup_null:
  552. up_write(&list_rwsem);
  553. return;
  554. }
  555. int
  556. cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller)
  557. {
  558. int status = 0;
  559. if (controller) {
  560. if (!thread_finished)
  561. cpci_stop_thread();
  562. if (controller->irq)
  563. free_irq(controller->irq, controller->dev_id);
  564. controller = NULL;
  565. cleanup_slots();
  566. } else
  567. status = -ENODEV;
  568. return status;
  569. }
  570. int
  571. cpci_hp_start(void)
  572. {
  573. static int first = 1;
  574. int status;
  575. dbg("%s - enter", __func__);
  576. if (!controller)
  577. return -ENODEV;
  578. down_read(&list_rwsem);
  579. if (list_empty(&slot_list)) {
  580. up_read(&list_rwsem);
  581. return -ENODEV;
  582. }
  583. up_read(&list_rwsem);
  584. status = init_slots(first);
  585. if (first)
  586. first = 0;
  587. if (status)
  588. return status;
  589. status = cpci_start_thread();
  590. if (status)
  591. return status;
  592. dbg("%s - thread started", __func__);
  593. if (controller->irq) {
  594. /* Start enum interrupt processing */
  595. dbg("%s - enabling irq", __func__);
  596. controller->ops->enable_irq();
  597. }
  598. dbg("%s - exit", __func__);
  599. return 0;
  600. }
  601. int
  602. cpci_hp_stop(void)
  603. {
  604. if (!controller)
  605. return -ENODEV;
  606. if (controller->irq) {
  607. /* Stop enum interrupt processing */
  608. dbg("%s - disabling irq", __func__);
  609. controller->ops->disable_irq();
  610. }
  611. cpci_stop_thread();
  612. return 0;
  613. }
  614. int __init
  615. cpci_hotplug_init(int debug)
  616. {
  617. cpci_debug = debug;
  618. return 0;
  619. }
  620. void __exit
  621. cpci_hotplug_exit(void)
  622. {
  623. /*
  624. * Clean everything up.
  625. */
  626. cpci_hp_stop();
  627. cpci_hp_unregister_controller(controller);
  628. }
  629. EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
  630. EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
  631. EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
  632. EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
  633. EXPORT_SYMBOL_GPL(cpci_hp_start);
  634. EXPORT_SYMBOL_GPL(cpci_hp_stop);