pci-acpi.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. /*
  2. * File: pci-acpi.c
  3. * Purpose: Provide PCI support in ACPI
  4. *
  5. * Copyright (C) 2005 David Shaohua Li <shaohua.li@intel.com>
  6. * Copyright (C) 2004 Tom Long Nguyen <tom.l.nguyen@intel.com>
  7. * Copyright (C) 2004 Intel Corp.
  8. */
  9. #include <linux/delay.h>
  10. #include <linux/init.h>
  11. #include <linux/pci.h>
  12. #include <linux/pci_hotplug.h>
  13. #include <linux/module.h>
  14. #include <linux/pci-aspm.h>
  15. #include <linux/pci-acpi.h>
  16. #include <linux/pm_runtime.h>
  17. #include <linux/pm_qos.h>
  18. #include "pci.h"
  19. /*
  20. * The UUID is defined in the PCI Firmware Specification available here:
  21. * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf
  22. */
  23. const u8 pci_acpi_dsm_uuid[] = {
  24. 0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d,
  25. 0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d
  26. };
  27. phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle)
  28. {
  29. acpi_status status = AE_NOT_EXIST;
  30. unsigned long long mcfg_addr;
  31. if (handle)
  32. status = acpi_evaluate_integer(handle, METHOD_NAME__CBA,
  33. NULL, &mcfg_addr);
  34. if (ACPI_FAILURE(status))
  35. return 0;
  36. return (phys_addr_t)mcfg_addr;
  37. }
  38. static acpi_status decode_type0_hpx_record(union acpi_object *record,
  39. struct hotplug_params *hpx)
  40. {
  41. int i;
  42. union acpi_object *fields = record->package.elements;
  43. u32 revision = fields[1].integer.value;
  44. switch (revision) {
  45. case 1:
  46. if (record->package.count != 6)
  47. return AE_ERROR;
  48. for (i = 2; i < 6; i++)
  49. if (fields[i].type != ACPI_TYPE_INTEGER)
  50. return AE_ERROR;
  51. hpx->t0 = &hpx->type0_data;
  52. hpx->t0->revision = revision;
  53. hpx->t0->cache_line_size = fields[2].integer.value;
  54. hpx->t0->latency_timer = fields[3].integer.value;
  55. hpx->t0->enable_serr = fields[4].integer.value;
  56. hpx->t0->enable_perr = fields[5].integer.value;
  57. break;
  58. default:
  59. printk(KERN_WARNING
  60. "%s: Type 0 Revision %d record not supported\n",
  61. __func__, revision);
  62. return AE_ERROR;
  63. }
  64. return AE_OK;
  65. }
  66. static acpi_status decode_type1_hpx_record(union acpi_object *record,
  67. struct hotplug_params *hpx)
  68. {
  69. int i;
  70. union acpi_object *fields = record->package.elements;
  71. u32 revision = fields[1].integer.value;
  72. switch (revision) {
  73. case 1:
  74. if (record->package.count != 5)
  75. return AE_ERROR;
  76. for (i = 2; i < 5; i++)
  77. if (fields[i].type != ACPI_TYPE_INTEGER)
  78. return AE_ERROR;
  79. hpx->t1 = &hpx->type1_data;
  80. hpx->t1->revision = revision;
  81. hpx->t1->max_mem_read = fields[2].integer.value;
  82. hpx->t1->avg_max_split = fields[3].integer.value;
  83. hpx->t1->tot_max_split = fields[4].integer.value;
  84. break;
  85. default:
  86. printk(KERN_WARNING
  87. "%s: Type 1 Revision %d record not supported\n",
  88. __func__, revision);
  89. return AE_ERROR;
  90. }
  91. return AE_OK;
  92. }
  93. static acpi_status decode_type2_hpx_record(union acpi_object *record,
  94. struct hotplug_params *hpx)
  95. {
  96. int i;
  97. union acpi_object *fields = record->package.elements;
  98. u32 revision = fields[1].integer.value;
  99. switch (revision) {
  100. case 1:
  101. if (record->package.count != 18)
  102. return AE_ERROR;
  103. for (i = 2; i < 18; i++)
  104. if (fields[i].type != ACPI_TYPE_INTEGER)
  105. return AE_ERROR;
  106. hpx->t2 = &hpx->type2_data;
  107. hpx->t2->revision = revision;
  108. hpx->t2->unc_err_mask_and = fields[2].integer.value;
  109. hpx->t2->unc_err_mask_or = fields[3].integer.value;
  110. hpx->t2->unc_err_sever_and = fields[4].integer.value;
  111. hpx->t2->unc_err_sever_or = fields[5].integer.value;
  112. hpx->t2->cor_err_mask_and = fields[6].integer.value;
  113. hpx->t2->cor_err_mask_or = fields[7].integer.value;
  114. hpx->t2->adv_err_cap_and = fields[8].integer.value;
  115. hpx->t2->adv_err_cap_or = fields[9].integer.value;
  116. hpx->t2->pci_exp_devctl_and = fields[10].integer.value;
  117. hpx->t2->pci_exp_devctl_or = fields[11].integer.value;
  118. hpx->t2->pci_exp_lnkctl_and = fields[12].integer.value;
  119. hpx->t2->pci_exp_lnkctl_or = fields[13].integer.value;
  120. hpx->t2->sec_unc_err_sever_and = fields[14].integer.value;
  121. hpx->t2->sec_unc_err_sever_or = fields[15].integer.value;
  122. hpx->t2->sec_unc_err_mask_and = fields[16].integer.value;
  123. hpx->t2->sec_unc_err_mask_or = fields[17].integer.value;
  124. break;
  125. default:
  126. printk(KERN_WARNING
  127. "%s: Type 2 Revision %d record not supported\n",
  128. __func__, revision);
  129. return AE_ERROR;
  130. }
  131. return AE_OK;
  132. }
  133. static acpi_status acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
  134. {
  135. acpi_status status;
  136. struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
  137. union acpi_object *package, *record, *fields;
  138. u32 type;
  139. int i;
  140. /* Clear the return buffer with zeros */
  141. memset(hpx, 0, sizeof(struct hotplug_params));
  142. status = acpi_evaluate_object(handle, "_HPX", NULL, &buffer);
  143. if (ACPI_FAILURE(status))
  144. return status;
  145. package = (union acpi_object *)buffer.pointer;
  146. if (package->type != ACPI_TYPE_PACKAGE) {
  147. status = AE_ERROR;
  148. goto exit;
  149. }
  150. for (i = 0; i < package->package.count; i++) {
  151. record = &package->package.elements[i];
  152. if (record->type != ACPI_TYPE_PACKAGE) {
  153. status = AE_ERROR;
  154. goto exit;
  155. }
  156. fields = record->package.elements;
  157. if (fields[0].type != ACPI_TYPE_INTEGER ||
  158. fields[1].type != ACPI_TYPE_INTEGER) {
  159. status = AE_ERROR;
  160. goto exit;
  161. }
  162. type = fields[0].integer.value;
  163. switch (type) {
  164. case 0:
  165. status = decode_type0_hpx_record(record, hpx);
  166. if (ACPI_FAILURE(status))
  167. goto exit;
  168. break;
  169. case 1:
  170. status = decode_type1_hpx_record(record, hpx);
  171. if (ACPI_FAILURE(status))
  172. goto exit;
  173. break;
  174. case 2:
  175. status = decode_type2_hpx_record(record, hpx);
  176. if (ACPI_FAILURE(status))
  177. goto exit;
  178. break;
  179. default:
  180. printk(KERN_ERR "%s: Type %d record not supported\n",
  181. __func__, type);
  182. status = AE_ERROR;
  183. goto exit;
  184. }
  185. }
  186. exit:
  187. kfree(buffer.pointer);
  188. return status;
  189. }
  190. static acpi_status acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
  191. {
  192. acpi_status status;
  193. struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
  194. union acpi_object *package, *fields;
  195. int i;
  196. memset(hpp, 0, sizeof(struct hotplug_params));
  197. status = acpi_evaluate_object(handle, "_HPP", NULL, &buffer);
  198. if (ACPI_FAILURE(status))
  199. return status;
  200. package = (union acpi_object *) buffer.pointer;
  201. if (package->type != ACPI_TYPE_PACKAGE ||
  202. package->package.count != 4) {
  203. status = AE_ERROR;
  204. goto exit;
  205. }
  206. fields = package->package.elements;
  207. for (i = 0; i < 4; i++) {
  208. if (fields[i].type != ACPI_TYPE_INTEGER) {
  209. status = AE_ERROR;
  210. goto exit;
  211. }
  212. }
  213. hpp->t0 = &hpp->type0_data;
  214. hpp->t0->revision = 1;
  215. hpp->t0->cache_line_size = fields[0].integer.value;
  216. hpp->t0->latency_timer = fields[1].integer.value;
  217. hpp->t0->enable_serr = fields[2].integer.value;
  218. hpp->t0->enable_perr = fields[3].integer.value;
  219. exit:
  220. kfree(buffer.pointer);
  221. return status;
  222. }
  223. /* pci_get_hp_params
  224. *
  225. * @dev - the pci_dev for which we want parameters
  226. * @hpp - allocated by the caller
  227. */
  228. int pci_get_hp_params(struct pci_dev *dev, struct hotplug_params *hpp)
  229. {
  230. acpi_status status;
  231. acpi_handle handle, phandle;
  232. struct pci_bus *pbus;
  233. handle = NULL;
  234. for (pbus = dev->bus; pbus; pbus = pbus->parent) {
  235. handle = acpi_pci_get_bridge_handle(pbus);
  236. if (handle)
  237. break;
  238. }
  239. /*
  240. * _HPP settings apply to all child buses, until another _HPP is
  241. * encountered. If we don't find an _HPP for the input pci dev,
  242. * look for it in the parent device scope since that would apply to
  243. * this pci dev.
  244. */
  245. while (handle) {
  246. status = acpi_run_hpx(handle, hpp);
  247. if (ACPI_SUCCESS(status))
  248. return 0;
  249. status = acpi_run_hpp(handle, hpp);
  250. if (ACPI_SUCCESS(status))
  251. return 0;
  252. if (acpi_is_root_bridge(handle))
  253. break;
  254. status = acpi_get_parent(handle, &phandle);
  255. if (ACPI_FAILURE(status))
  256. break;
  257. handle = phandle;
  258. }
  259. return -ENODEV;
  260. }
  261. EXPORT_SYMBOL_GPL(pci_get_hp_params);
  262. /**
  263. * pci_acpi_wake_bus - Root bus wakeup notification fork function.
  264. * @work: Work item to handle.
  265. */
  266. static void pci_acpi_wake_bus(struct work_struct *work)
  267. {
  268. struct acpi_device *adev;
  269. struct acpi_pci_root *root;
  270. adev = container_of(work, struct acpi_device, wakeup.context.work);
  271. root = acpi_driver_data(adev);
  272. pci_pme_wakeup_bus(root->bus);
  273. }
  274. /**
  275. * pci_acpi_wake_dev - PCI device wakeup notification work function.
  276. * @handle: ACPI handle of a device the notification is for.
  277. * @work: Work item to handle.
  278. */
  279. static void pci_acpi_wake_dev(struct work_struct *work)
  280. {
  281. struct acpi_device_wakeup_context *context;
  282. struct pci_dev *pci_dev;
  283. context = container_of(work, struct acpi_device_wakeup_context, work);
  284. pci_dev = to_pci_dev(context->dev);
  285. if (pci_dev->pme_poll)
  286. pci_dev->pme_poll = false;
  287. if (pci_dev->current_state == PCI_D3cold) {
  288. pci_wakeup_event(pci_dev);
  289. pm_runtime_resume(&pci_dev->dev);
  290. return;
  291. }
  292. /* Clear PME Status if set. */
  293. if (pci_dev->pme_support)
  294. pci_check_pme_status(pci_dev);
  295. pci_wakeup_event(pci_dev);
  296. pm_runtime_resume(&pci_dev->dev);
  297. pci_pme_wakeup_bus(pci_dev->subordinate);
  298. }
  299. /**
  300. * pci_acpi_add_bus_pm_notifier - Register PM notifier for root PCI bus.
  301. * @dev: PCI root bridge ACPI device.
  302. */
  303. acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev)
  304. {
  305. return acpi_add_pm_notifier(dev, NULL, pci_acpi_wake_bus);
  306. }
  307. /**
  308. * pci_acpi_add_pm_notifier - Register PM notifier for given PCI device.
  309. * @dev: ACPI device to add the notifier for.
  310. * @pci_dev: PCI device to check for the PME status if an event is signaled.
  311. */
  312. acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
  313. struct pci_dev *pci_dev)
  314. {
  315. return acpi_add_pm_notifier(dev, &pci_dev->dev, pci_acpi_wake_dev);
  316. }
  317. /*
  318. * _SxD returns the D-state with the highest power
  319. * (lowest D-state number) supported in the S-state "x".
  320. *
  321. * If the devices does not have a _PRW
  322. * (Power Resources for Wake) supporting system wakeup from "x"
  323. * then the OS is free to choose a lower power (higher number
  324. * D-state) than the return value from _SxD.
  325. *
  326. * But if _PRW is enabled at S-state "x", the OS
  327. * must not choose a power lower than _SxD --
  328. * unless the device has an _SxW method specifying
  329. * the lowest power (highest D-state number) the device
  330. * may enter while still able to wake the system.
  331. *
  332. * ie. depending on global OS policy:
  333. *
  334. * if (_PRW at S-state x)
  335. * choose from highest power _SxD to lowest power _SxW
  336. * else // no _PRW at S-state x
  337. * choose highest power _SxD or any lower power
  338. */
  339. static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
  340. {
  341. int acpi_state, d_max;
  342. if (pdev->no_d3cold)
  343. d_max = ACPI_STATE_D3_HOT;
  344. else
  345. d_max = ACPI_STATE_D3_COLD;
  346. acpi_state = acpi_pm_device_sleep_state(&pdev->dev, NULL, d_max);
  347. if (acpi_state < 0)
  348. return PCI_POWER_ERROR;
  349. switch (acpi_state) {
  350. case ACPI_STATE_D0:
  351. return PCI_D0;
  352. case ACPI_STATE_D1:
  353. return PCI_D1;
  354. case ACPI_STATE_D2:
  355. return PCI_D2;
  356. case ACPI_STATE_D3_HOT:
  357. return PCI_D3hot;
  358. case ACPI_STATE_D3_COLD:
  359. return PCI_D3cold;
  360. }
  361. return PCI_POWER_ERROR;
  362. }
  363. static bool acpi_pci_power_manageable(struct pci_dev *dev)
  364. {
  365. struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
  366. return adev ? acpi_device_power_manageable(adev) : false;
  367. }
  368. static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
  369. {
  370. struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
  371. static const u8 state_conv[] = {
  372. [PCI_D0] = ACPI_STATE_D0,
  373. [PCI_D1] = ACPI_STATE_D1,
  374. [PCI_D2] = ACPI_STATE_D2,
  375. [PCI_D3hot] = ACPI_STATE_D3_COLD,
  376. [PCI_D3cold] = ACPI_STATE_D3_COLD,
  377. };
  378. int error = -EINVAL;
  379. /* If the ACPI device has _EJ0, ignore the device */
  380. if (!adev || acpi_has_method(adev->handle, "_EJ0"))
  381. return -ENODEV;
  382. switch (state) {
  383. case PCI_D3cold:
  384. if (dev_pm_qos_flags(&dev->dev, PM_QOS_FLAG_NO_POWER_OFF) ==
  385. PM_QOS_FLAGS_ALL) {
  386. error = -EBUSY;
  387. break;
  388. }
  389. case PCI_D0:
  390. case PCI_D1:
  391. case PCI_D2:
  392. case PCI_D3hot:
  393. error = acpi_device_set_power(adev, state_conv[state]);
  394. }
  395. if (!error)
  396. dev_dbg(&dev->dev, "power state changed by ACPI to %s\n",
  397. acpi_power_state_string(state_conv[state]));
  398. return error;
  399. }
  400. static bool acpi_pci_can_wakeup(struct pci_dev *dev)
  401. {
  402. struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
  403. return adev ? acpi_device_can_wakeup(adev) : false;
  404. }
  405. static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable)
  406. {
  407. while (bus->parent) {
  408. if (!acpi_pm_device_sleep_wake(&bus->self->dev, enable))
  409. return;
  410. bus = bus->parent;
  411. }
  412. /* We have reached the root bus. */
  413. if (bus->bridge)
  414. acpi_pm_device_sleep_wake(bus->bridge, enable);
  415. }
  416. static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable)
  417. {
  418. if (acpi_pci_can_wakeup(dev))
  419. return acpi_pm_device_sleep_wake(&dev->dev, enable);
  420. acpi_pci_propagate_wakeup_enable(dev->bus, enable);
  421. return 0;
  422. }
  423. static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable)
  424. {
  425. while (bus->parent) {
  426. struct pci_dev *bridge = bus->self;
  427. if (bridge->pme_interrupt)
  428. return;
  429. if (!acpi_pm_device_run_wake(&bridge->dev, enable))
  430. return;
  431. bus = bus->parent;
  432. }
  433. /* We have reached the root bus. */
  434. if (bus->bridge)
  435. acpi_pm_device_run_wake(bus->bridge, enable);
  436. }
  437. static int acpi_pci_run_wake(struct pci_dev *dev, bool enable)
  438. {
  439. /*
  440. * Per PCI Express Base Specification Revision 2.0 section
  441. * 5.3.3.2 Link Wakeup, platform support is needed for D3cold
  442. * waking up to power on the main link even if there is PME
  443. * support for D3cold
  444. */
  445. if (dev->pme_interrupt && !dev->runtime_d3cold)
  446. return 0;
  447. if (!acpi_pm_device_run_wake(&dev->dev, enable))
  448. return 0;
  449. acpi_pci_propagate_run_wake(dev->bus, enable);
  450. return 0;
  451. }
  452. static bool acpi_pci_need_resume(struct pci_dev *dev)
  453. {
  454. struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
  455. if (!adev || !acpi_device_power_manageable(adev))
  456. return false;
  457. if (device_may_wakeup(&dev->dev) != !!adev->wakeup.prepare_count)
  458. return true;
  459. if (acpi_target_system_state() == ACPI_STATE_S0)
  460. return false;
  461. return !!adev->power.flags.dsw_present;
  462. }
  463. static struct pci_platform_pm_ops acpi_pci_platform_pm = {
  464. .is_manageable = acpi_pci_power_manageable,
  465. .set_state = acpi_pci_set_power_state,
  466. .choose_state = acpi_pci_choose_state,
  467. .sleep_wake = acpi_pci_sleep_wake,
  468. .run_wake = acpi_pci_run_wake,
  469. .need_resume = acpi_pci_need_resume,
  470. };
  471. void acpi_pci_add_bus(struct pci_bus *bus)
  472. {
  473. if (acpi_pci_disabled || !bus->bridge)
  474. return;
  475. acpi_pci_slot_enumerate(bus);
  476. acpiphp_enumerate_slots(bus);
  477. }
  478. void acpi_pci_remove_bus(struct pci_bus *bus)
  479. {
  480. if (acpi_pci_disabled || !bus->bridge)
  481. return;
  482. acpiphp_remove_slots(bus);
  483. acpi_pci_slot_remove(bus);
  484. }
  485. /* ACPI bus type */
  486. static struct acpi_device *acpi_pci_find_companion(struct device *dev)
  487. {
  488. struct pci_dev *pci_dev = to_pci_dev(dev);
  489. bool check_children;
  490. u64 addr;
  491. check_children = pci_is_bridge(pci_dev);
  492. /* Please ref to ACPI spec for the syntax of _ADR */
  493. addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn);
  494. return acpi_find_child_device(ACPI_COMPANION(dev->parent), addr,
  495. check_children);
  496. }
  497. static void pci_acpi_setup(struct device *dev)
  498. {
  499. struct pci_dev *pci_dev = to_pci_dev(dev);
  500. struct acpi_device *adev = ACPI_COMPANION(dev);
  501. if (!adev)
  502. return;
  503. pci_acpi_add_pm_notifier(adev, pci_dev);
  504. if (!adev->wakeup.flags.valid)
  505. return;
  506. device_set_wakeup_capable(dev, true);
  507. acpi_pci_sleep_wake(pci_dev, false);
  508. if (adev->wakeup.flags.run_wake)
  509. device_set_run_wake(dev, true);
  510. }
  511. static void pci_acpi_cleanup(struct device *dev)
  512. {
  513. struct acpi_device *adev = ACPI_COMPANION(dev);
  514. if (!adev)
  515. return;
  516. pci_acpi_remove_pm_notifier(adev);
  517. if (adev->wakeup.flags.valid) {
  518. device_set_wakeup_capable(dev, false);
  519. device_set_run_wake(dev, false);
  520. }
  521. }
  522. static bool pci_acpi_bus_match(struct device *dev)
  523. {
  524. return dev_is_pci(dev);
  525. }
  526. static struct acpi_bus_type acpi_pci_bus = {
  527. .name = "PCI",
  528. .match = pci_acpi_bus_match,
  529. .find_companion = acpi_pci_find_companion,
  530. .setup = pci_acpi_setup,
  531. .cleanup = pci_acpi_cleanup,
  532. };
  533. static int __init acpi_pci_init(void)
  534. {
  535. int ret;
  536. if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_MSI) {
  537. pr_info("ACPI FADT declares the system doesn't support MSI, so disable it\n");
  538. pci_no_msi();
  539. }
  540. if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
  541. pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
  542. pcie_no_aspm();
  543. }
  544. ret = register_acpi_bus_type(&acpi_pci_bus);
  545. if (ret)
  546. return 0;
  547. pci_set_platform_pm(&acpi_pci_platform_pm);
  548. acpi_pci_slot_init();
  549. acpiphp_init();
  550. return 0;
  551. }
  552. arch_initcall(acpi_pci_init);