Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: pci-acpi.c |
Len Brown | a406d9e | 2005-03-23 16:16:03 -0500 | [diff] [blame] | 3 | * Purpose: Provide PCI support in ACPI |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 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. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <linux/delay.h> |
| 11 | #include <linux/init.h> |
| 12 | #include <linux/pci.h> |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 13 | #include <linux/pci_hotplug.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #include <linux/module.h> |
Shaohua Li | 5fde244 | 2008-07-23 10:32:24 +0800 | [diff] [blame] | 15 | #include <linux/pci-aspm.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <linux/pci-acpi.h> |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 17 | #include <linux/pm_runtime.h> |
Rafael J. Wysocki | 8b713a8 | 2012-10-24 02:08:38 +0200 | [diff] [blame] | 18 | #include <linux/pm_qos.h> |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 19 | #include "pci.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Aaron Lu | 18e94a3 | 2015-03-25 14:31:41 +0800 | [diff] [blame] | 21 | /* |
| 22 | * The UUID is defined in the PCI Firmware Specification available here: |
| 23 | * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf |
| 24 | */ |
| 25 | const u8 pci_acpi_dsm_uuid[] = { |
| 26 | 0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d, |
| 27 | 0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d |
| 28 | }; |
| 29 | |
Jiang Liu | f4b57a3 | 2012-06-22 14:55:16 +0800 | [diff] [blame] | 30 | phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle) |
| 31 | { |
| 32 | acpi_status status = AE_NOT_EXIST; |
| 33 | unsigned long long mcfg_addr; |
| 34 | |
| 35 | if (handle) |
| 36 | status = acpi_evaluate_integer(handle, METHOD_NAME__CBA, |
| 37 | NULL, &mcfg_addr); |
| 38 | if (ACPI_FAILURE(status)) |
| 39 | return 0; |
| 40 | |
| 41 | return (phys_addr_t)mcfg_addr; |
| 42 | } |
| 43 | |
Bjorn Helgaas | abbfec3 | 2014-09-12 15:29:55 -0600 | [diff] [blame] | 44 | static acpi_status decode_type0_hpx_record(union acpi_object *record, |
| 45 | struct hotplug_params *hpx) |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 46 | { |
| 47 | int i; |
| 48 | union acpi_object *fields = record->package.elements; |
| 49 | u32 revision = fields[1].integer.value; |
| 50 | |
| 51 | switch (revision) { |
| 52 | case 1: |
| 53 | if (record->package.count != 6) |
| 54 | return AE_ERROR; |
| 55 | for (i = 2; i < 6; i++) |
| 56 | if (fields[i].type != ACPI_TYPE_INTEGER) |
| 57 | return AE_ERROR; |
| 58 | hpx->t0 = &hpx->type0_data; |
| 59 | hpx->t0->revision = revision; |
| 60 | hpx->t0->cache_line_size = fields[2].integer.value; |
| 61 | hpx->t0->latency_timer = fields[3].integer.value; |
| 62 | hpx->t0->enable_serr = fields[4].integer.value; |
| 63 | hpx->t0->enable_perr = fields[5].integer.value; |
| 64 | break; |
| 65 | default: |
| 66 | printk(KERN_WARNING |
| 67 | "%s: Type 0 Revision %d record not supported\n", |
| 68 | __func__, revision); |
| 69 | return AE_ERROR; |
| 70 | } |
| 71 | return AE_OK; |
| 72 | } |
| 73 | |
Bjorn Helgaas | abbfec3 | 2014-09-12 15:29:55 -0600 | [diff] [blame] | 74 | static acpi_status decode_type1_hpx_record(union acpi_object *record, |
| 75 | struct hotplug_params *hpx) |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 76 | { |
| 77 | int i; |
| 78 | union acpi_object *fields = record->package.elements; |
| 79 | u32 revision = fields[1].integer.value; |
| 80 | |
| 81 | switch (revision) { |
| 82 | case 1: |
| 83 | if (record->package.count != 5) |
| 84 | return AE_ERROR; |
| 85 | for (i = 2; i < 5; i++) |
| 86 | if (fields[i].type != ACPI_TYPE_INTEGER) |
| 87 | return AE_ERROR; |
| 88 | hpx->t1 = &hpx->type1_data; |
| 89 | hpx->t1->revision = revision; |
| 90 | hpx->t1->max_mem_read = fields[2].integer.value; |
| 91 | hpx->t1->avg_max_split = fields[3].integer.value; |
| 92 | hpx->t1->tot_max_split = fields[4].integer.value; |
| 93 | break; |
| 94 | default: |
| 95 | printk(KERN_WARNING |
| 96 | "%s: Type 1 Revision %d record not supported\n", |
| 97 | __func__, revision); |
| 98 | return AE_ERROR; |
| 99 | } |
| 100 | return AE_OK; |
| 101 | } |
| 102 | |
Bjorn Helgaas | abbfec3 | 2014-09-12 15:29:55 -0600 | [diff] [blame] | 103 | static acpi_status decode_type2_hpx_record(union acpi_object *record, |
| 104 | struct hotplug_params *hpx) |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 105 | { |
| 106 | int i; |
| 107 | union acpi_object *fields = record->package.elements; |
| 108 | u32 revision = fields[1].integer.value; |
| 109 | |
| 110 | switch (revision) { |
| 111 | case 1: |
| 112 | if (record->package.count != 18) |
| 113 | return AE_ERROR; |
| 114 | for (i = 2; i < 18; i++) |
| 115 | if (fields[i].type != ACPI_TYPE_INTEGER) |
| 116 | return AE_ERROR; |
| 117 | hpx->t2 = &hpx->type2_data; |
| 118 | hpx->t2->revision = revision; |
| 119 | hpx->t2->unc_err_mask_and = fields[2].integer.value; |
| 120 | hpx->t2->unc_err_mask_or = fields[3].integer.value; |
| 121 | hpx->t2->unc_err_sever_and = fields[4].integer.value; |
| 122 | hpx->t2->unc_err_sever_or = fields[5].integer.value; |
| 123 | hpx->t2->cor_err_mask_and = fields[6].integer.value; |
| 124 | hpx->t2->cor_err_mask_or = fields[7].integer.value; |
| 125 | hpx->t2->adv_err_cap_and = fields[8].integer.value; |
| 126 | hpx->t2->adv_err_cap_or = fields[9].integer.value; |
| 127 | hpx->t2->pci_exp_devctl_and = fields[10].integer.value; |
| 128 | hpx->t2->pci_exp_devctl_or = fields[11].integer.value; |
| 129 | hpx->t2->pci_exp_lnkctl_and = fields[12].integer.value; |
| 130 | hpx->t2->pci_exp_lnkctl_or = fields[13].integer.value; |
| 131 | hpx->t2->sec_unc_err_sever_and = fields[14].integer.value; |
| 132 | hpx->t2->sec_unc_err_sever_or = fields[15].integer.value; |
| 133 | hpx->t2->sec_unc_err_mask_and = fields[16].integer.value; |
| 134 | hpx->t2->sec_unc_err_mask_or = fields[17].integer.value; |
| 135 | break; |
| 136 | default: |
| 137 | printk(KERN_WARNING |
| 138 | "%s: Type 2 Revision %d record not supported\n", |
| 139 | __func__, revision); |
| 140 | return AE_ERROR; |
| 141 | } |
| 142 | return AE_OK; |
| 143 | } |
| 144 | |
Bjorn Helgaas | abbfec3 | 2014-09-12 15:29:55 -0600 | [diff] [blame] | 145 | static acpi_status acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx) |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 146 | { |
| 147 | acpi_status status; |
| 148 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; |
| 149 | union acpi_object *package, *record, *fields; |
| 150 | u32 type; |
| 151 | int i; |
| 152 | |
| 153 | /* Clear the return buffer with zeros */ |
| 154 | memset(hpx, 0, sizeof(struct hotplug_params)); |
| 155 | |
| 156 | status = acpi_evaluate_object(handle, "_HPX", NULL, &buffer); |
| 157 | if (ACPI_FAILURE(status)) |
| 158 | return status; |
| 159 | |
| 160 | package = (union acpi_object *)buffer.pointer; |
| 161 | if (package->type != ACPI_TYPE_PACKAGE) { |
| 162 | status = AE_ERROR; |
| 163 | goto exit; |
| 164 | } |
| 165 | |
| 166 | for (i = 0; i < package->package.count; i++) { |
| 167 | record = &package->package.elements[i]; |
| 168 | if (record->type != ACPI_TYPE_PACKAGE) { |
| 169 | status = AE_ERROR; |
| 170 | goto exit; |
| 171 | } |
| 172 | |
| 173 | fields = record->package.elements; |
| 174 | if (fields[0].type != ACPI_TYPE_INTEGER || |
| 175 | fields[1].type != ACPI_TYPE_INTEGER) { |
| 176 | status = AE_ERROR; |
| 177 | goto exit; |
| 178 | } |
| 179 | |
| 180 | type = fields[0].integer.value; |
| 181 | switch (type) { |
| 182 | case 0: |
| 183 | status = decode_type0_hpx_record(record, hpx); |
| 184 | if (ACPI_FAILURE(status)) |
| 185 | goto exit; |
| 186 | break; |
| 187 | case 1: |
| 188 | status = decode_type1_hpx_record(record, hpx); |
| 189 | if (ACPI_FAILURE(status)) |
| 190 | goto exit; |
| 191 | break; |
| 192 | case 2: |
| 193 | status = decode_type2_hpx_record(record, hpx); |
| 194 | if (ACPI_FAILURE(status)) |
| 195 | goto exit; |
| 196 | break; |
| 197 | default: |
| 198 | printk(KERN_ERR "%s: Type %d record not supported\n", |
| 199 | __func__, type); |
| 200 | status = AE_ERROR; |
| 201 | goto exit; |
| 202 | } |
| 203 | } |
| 204 | exit: |
| 205 | kfree(buffer.pointer); |
| 206 | return status; |
| 207 | } |
| 208 | |
Bjorn Helgaas | abbfec3 | 2014-09-12 15:29:55 -0600 | [diff] [blame] | 209 | static acpi_status acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) |
Bjorn Helgaas | 9ce90ea | 2014-09-12 15:23:14 -0600 | [diff] [blame] | 210 | { |
| 211 | acpi_status status; |
| 212 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 213 | union acpi_object *package, *fields; |
| 214 | int i; |
| 215 | |
| 216 | memset(hpp, 0, sizeof(struct hotplug_params)); |
| 217 | |
| 218 | status = acpi_evaluate_object(handle, "_HPP", NULL, &buffer); |
| 219 | if (ACPI_FAILURE(status)) |
| 220 | return status; |
| 221 | |
| 222 | package = (union acpi_object *) buffer.pointer; |
| 223 | if (package->type != ACPI_TYPE_PACKAGE || |
| 224 | package->package.count != 4) { |
| 225 | status = AE_ERROR; |
| 226 | goto exit; |
| 227 | } |
| 228 | |
| 229 | fields = package->package.elements; |
| 230 | for (i = 0; i < 4; i++) { |
| 231 | if (fields[i].type != ACPI_TYPE_INTEGER) { |
| 232 | status = AE_ERROR; |
| 233 | goto exit; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | hpp->t0 = &hpp->type0_data; |
| 238 | hpp->t0->revision = 1; |
| 239 | hpp->t0->cache_line_size = fields[0].integer.value; |
| 240 | hpp->t0->latency_timer = fields[1].integer.value; |
| 241 | hpp->t0->enable_serr = fields[2].integer.value; |
| 242 | hpp->t0->enable_perr = fields[3].integer.value; |
| 243 | |
| 244 | exit: |
| 245 | kfree(buffer.pointer); |
| 246 | return status; |
| 247 | } |
| 248 | |
| 249 | /* pci_get_hp_params |
| 250 | * |
| 251 | * @dev - the pci_dev for which we want parameters |
| 252 | * @hpp - allocated by the caller |
| 253 | */ |
| 254 | int pci_get_hp_params(struct pci_dev *dev, struct hotplug_params *hpp) |
| 255 | { |
| 256 | acpi_status status; |
| 257 | acpi_handle handle, phandle; |
| 258 | struct pci_bus *pbus; |
| 259 | |
| 260 | handle = NULL; |
| 261 | for (pbus = dev->bus; pbus; pbus = pbus->parent) { |
| 262 | handle = acpi_pci_get_bridge_handle(pbus); |
| 263 | if (handle) |
| 264 | break; |
| 265 | } |
| 266 | |
| 267 | /* |
| 268 | * _HPP settings apply to all child buses, until another _HPP is |
| 269 | * encountered. If we don't find an _HPP for the input pci dev, |
| 270 | * look for it in the parent device scope since that would apply to |
| 271 | * this pci dev. |
| 272 | */ |
| 273 | while (handle) { |
| 274 | status = acpi_run_hpx(handle, hpp); |
| 275 | if (ACPI_SUCCESS(status)) |
| 276 | return 0; |
| 277 | status = acpi_run_hpp(handle, hpp); |
| 278 | if (ACPI_SUCCESS(status)) |
| 279 | return 0; |
| 280 | if (acpi_is_root_bridge(handle)) |
| 281 | break; |
| 282 | status = acpi_get_parent(handle, &phandle); |
| 283 | if (ACPI_FAILURE(status)) |
| 284 | break; |
| 285 | handle = phandle; |
| 286 | } |
| 287 | return -ENODEV; |
| 288 | } |
| 289 | EXPORT_SYMBOL_GPL(pci_get_hp_params); |
| 290 | |
Bjorn Helgaas | 5e3d234 | 2014-09-12 15:36:29 -0600 | [diff] [blame] | 291 | /** |
| 292 | * pci_acpi_wake_bus - Root bus wakeup notification fork function. |
| 293 | * @work: Work item to handle. |
| 294 | */ |
| 295 | static void pci_acpi_wake_bus(struct work_struct *work) |
| 296 | { |
| 297 | struct acpi_device *adev; |
| 298 | struct acpi_pci_root *root; |
| 299 | |
| 300 | adev = container_of(work, struct acpi_device, wakeup.context.work); |
| 301 | root = acpi_driver_data(adev); |
| 302 | pci_pme_wakeup_bus(root->bus); |
| 303 | } |
| 304 | |
| 305 | /** |
| 306 | * pci_acpi_wake_dev - PCI device wakeup notification work function. |
| 307 | * @handle: ACPI handle of a device the notification is for. |
| 308 | * @work: Work item to handle. |
| 309 | */ |
| 310 | static void pci_acpi_wake_dev(struct work_struct *work) |
| 311 | { |
| 312 | struct acpi_device_wakeup_context *context; |
| 313 | struct pci_dev *pci_dev; |
| 314 | |
| 315 | context = container_of(work, struct acpi_device_wakeup_context, work); |
| 316 | pci_dev = to_pci_dev(context->dev); |
| 317 | |
| 318 | if (pci_dev->pme_poll) |
| 319 | pci_dev->pme_poll = false; |
| 320 | |
| 321 | if (pci_dev->current_state == PCI_D3cold) { |
| 322 | pci_wakeup_event(pci_dev); |
| 323 | pm_runtime_resume(&pci_dev->dev); |
| 324 | return; |
| 325 | } |
| 326 | |
| 327 | /* Clear PME Status if set. */ |
| 328 | if (pci_dev->pme_support) |
| 329 | pci_check_pme_status(pci_dev); |
| 330 | |
| 331 | pci_wakeup_event(pci_dev); |
| 332 | pm_runtime_resume(&pci_dev->dev); |
| 333 | |
Markus Elfring | ff0387c | 2014-11-10 21:02:17 -0700 | [diff] [blame] | 334 | pci_pme_wakeup_bus(pci_dev->subordinate); |
Bjorn Helgaas | 5e3d234 | 2014-09-12 15:36:29 -0600 | [diff] [blame] | 335 | } |
| 336 | |
| 337 | /** |
| 338 | * pci_acpi_add_bus_pm_notifier - Register PM notifier for root PCI bus. |
| 339 | * @dev: PCI root bridge ACPI device. |
| 340 | */ |
| 341 | acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev) |
| 342 | { |
| 343 | return acpi_add_pm_notifier(dev, NULL, pci_acpi_wake_bus); |
| 344 | } |
| 345 | |
| 346 | /** |
| 347 | * pci_acpi_add_pm_notifier - Register PM notifier for given PCI device. |
| 348 | * @dev: ACPI device to add the notifier for. |
| 349 | * @pci_dev: PCI device to check for the PME status if an event is signaled. |
| 350 | */ |
| 351 | acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, |
| 352 | struct pci_dev *pci_dev) |
| 353 | { |
| 354 | return acpi_add_pm_notifier(dev, &pci_dev->dev, pci_acpi_wake_dev); |
| 355 | } |
| 356 | |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 357 | /* |
| 358 | * _SxD returns the D-state with the highest power |
| 359 | * (lowest D-state number) supported in the S-state "x". |
| 360 | * |
| 361 | * If the devices does not have a _PRW |
| 362 | * (Power Resources for Wake) supporting system wakeup from "x" |
| 363 | * then the OS is free to choose a lower power (higher number |
| 364 | * D-state) than the return value from _SxD. |
| 365 | * |
| 366 | * But if _PRW is enabled at S-state "x", the OS |
| 367 | * must not choose a power lower than _SxD -- |
| 368 | * unless the device has an _SxW method specifying |
| 369 | * the lowest power (highest D-state number) the device |
| 370 | * may enter while still able to wake the system. |
| 371 | * |
| 372 | * ie. depending on global OS policy: |
| 373 | * |
| 374 | * if (_PRW at S-state x) |
| 375 | * choose from highest power _SxD to lowest power _SxW |
| 376 | * else // no _PRW at S-state x |
Bjorn Helgaas | f762598 | 2013-11-14 11:28:18 -0700 | [diff] [blame] | 377 | * choose highest power _SxD or any lower power |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 378 | */ |
| 379 | |
Rafael J. Wysocki | 8d2bdf4 | 2008-06-05 01:16:37 +0200 | [diff] [blame] | 380 | static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev) |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 381 | { |
Huang Ying | 448bd85 | 2012-06-23 10:23:51 +0800 | [diff] [blame] | 382 | int acpi_state, d_max; |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 383 | |
Huang Ying | 448bd85 | 2012-06-23 10:23:51 +0800 | [diff] [blame] | 384 | if (pdev->no_d3cold) |
| 385 | d_max = ACPI_STATE_D3_HOT; |
| 386 | else |
| 387 | d_max = ACPI_STATE_D3_COLD; |
| 388 | acpi_state = acpi_pm_device_sleep_state(&pdev->dev, NULL, d_max); |
Shaohua Li | ab826ca | 2007-07-20 10:03:22 +0800 | [diff] [blame] | 389 | if (acpi_state < 0) |
| 390 | return PCI_POWER_ERROR; |
| 391 | |
| 392 | switch (acpi_state) { |
| 393 | case ACPI_STATE_D0: |
| 394 | return PCI_D0; |
| 395 | case ACPI_STATE_D1: |
| 396 | return PCI_D1; |
| 397 | case ACPI_STATE_D2: |
| 398 | return PCI_D2; |
Lin Ming | 1cc0c99 | 2012-04-23 09:03:49 +0800 | [diff] [blame] | 399 | case ACPI_STATE_D3_HOT: |
Shaohua Li | ab826ca | 2007-07-20 10:03:22 +0800 | [diff] [blame] | 400 | return PCI_D3hot; |
Lin Ming | 28c2103 | 2011-05-04 22:56:43 +0800 | [diff] [blame] | 401 | case ACPI_STATE_D3_COLD: |
| 402 | return PCI_D3cold; |
Shaohua Li | ab826ca | 2007-07-20 10:03:22 +0800 | [diff] [blame] | 403 | } |
| 404 | return PCI_POWER_ERROR; |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 405 | } |
Rafael J. Wysocki | 961d912 | 2008-07-07 03:32:02 +0200 | [diff] [blame] | 406 | |
| 407 | static bool acpi_pci_power_manageable(struct pci_dev *dev) |
| 408 | { |
Rafael J. Wysocki | 85dbb3d | 2014-07-24 01:18:53 +0200 | [diff] [blame] | 409 | struct acpi_device *adev = ACPI_COMPANION(&dev->dev); |
| 410 | return adev ? acpi_device_power_manageable(adev) : false; |
Rafael J. Wysocki | 961d912 | 2008-07-07 03:32:02 +0200 | [diff] [blame] | 411 | } |
David Shaohua Li | 0f64474 | 2005-03-19 00:15:48 -0500 | [diff] [blame] | 412 | |
David Shaohua Li | b913100 | 2005-03-19 00:16:18 -0500 | [diff] [blame] | 413 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
| 414 | { |
Rafael J. Wysocki | 85dbb3d | 2014-07-24 01:18:53 +0200 | [diff] [blame] | 415 | struct acpi_device *adev = ACPI_COMPANION(&dev->dev); |
David Brownell | 583c377 | 2008-02-22 21:41:51 -0800 | [diff] [blame] | 416 | static const u8 state_conv[] = { |
| 417 | [PCI_D0] = ACPI_STATE_D0, |
| 418 | [PCI_D1] = ACPI_STATE_D1, |
| 419 | [PCI_D2] = ACPI_STATE_D2, |
Rafael J. Wysocki | fc6504b | 2013-06-14 00:29:50 +0200 | [diff] [blame] | 420 | [PCI_D3hot] = ACPI_STATE_D3_COLD, |
| 421 | [PCI_D3cold] = ACPI_STATE_D3_COLD, |
David Shaohua Li | b913100 | 2005-03-19 00:16:18 -0500 | [diff] [blame] | 422 | }; |
Rafael J. Wysocki | 44e4e66 | 2008-07-07 03:32:52 +0200 | [diff] [blame] | 423 | int error = -EINVAL; |
David Shaohua Li | b913100 | 2005-03-19 00:16:18 -0500 | [diff] [blame] | 424 | |
Shaohua Li | 10b3dca | 2007-07-20 10:03:25 +0800 | [diff] [blame] | 425 | /* If the ACPI device has _EJ0, ignore the device */ |
Rafael J. Wysocki | 85dbb3d | 2014-07-24 01:18:53 +0200 | [diff] [blame] | 426 | if (!adev || acpi_has_method(adev->handle, "_EJ0")) |
Rafael J. Wysocki | 44e4e66 | 2008-07-07 03:32:52 +0200 | [diff] [blame] | 427 | return -ENODEV; |
David Brownell | 583c377 | 2008-02-22 21:41:51 -0800 | [diff] [blame] | 428 | |
| 429 | switch (state) { |
Rafael J. Wysocki | 8b713a8 | 2012-10-24 02:08:38 +0200 | [diff] [blame] | 430 | case PCI_D3cold: |
| 431 | if (dev_pm_qos_flags(&dev->dev, PM_QOS_FLAG_NO_POWER_OFF) == |
| 432 | PM_QOS_FLAGS_ALL) { |
| 433 | error = -EBUSY; |
| 434 | break; |
| 435 | } |
David Brownell | 583c377 | 2008-02-22 21:41:51 -0800 | [diff] [blame] | 436 | case PCI_D0: |
| 437 | case PCI_D1: |
| 438 | case PCI_D2: |
| 439 | case PCI_D3hot: |
Rafael J. Wysocki | 85dbb3d | 2014-07-24 01:18:53 +0200 | [diff] [blame] | 440 | error = acpi_device_set_power(adev, state_conv[state]); |
David Brownell | 583c377 | 2008-02-22 21:41:51 -0800 | [diff] [blame] | 441 | } |
Rafael J. Wysocki | 44e4e66 | 2008-07-07 03:32:52 +0200 | [diff] [blame] | 442 | |
| 443 | if (!error) |
Lan Tianyu | d010e57 | 2013-07-30 10:32:30 +0800 | [diff] [blame] | 444 | dev_dbg(&dev->dev, "power state changed by ACPI to %s\n", |
Rafael J. Wysocki | fc6504b | 2013-06-14 00:29:50 +0200 | [diff] [blame] | 445 | acpi_power_state_string(state_conv[state])); |
Rafael J. Wysocki | 44e4e66 | 2008-07-07 03:32:52 +0200 | [diff] [blame] | 446 | |
| 447 | return error; |
David Shaohua Li | b913100 | 2005-03-19 00:16:18 -0500 | [diff] [blame] | 448 | } |
| 449 | |
Rafael J. Wysocki | eb9d0fe | 2008-07-07 03:34:48 +0200 | [diff] [blame] | 450 | static bool acpi_pci_can_wakeup(struct pci_dev *dev) |
| 451 | { |
Rafael J. Wysocki | 85dbb3d | 2014-07-24 01:18:53 +0200 | [diff] [blame] | 452 | struct acpi_device *adev = ACPI_COMPANION(&dev->dev); |
| 453 | return adev ? acpi_device_can_wakeup(adev) : false; |
Rafael J. Wysocki | eb9d0fe | 2008-07-07 03:34:48 +0200 | [diff] [blame] | 454 | } |
| 455 | |
Rafael J. Wysocki | 0baed8d | 2009-09-08 23:16:24 +0200 | [diff] [blame] | 456 | static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) |
| 457 | { |
| 458 | while (bus->parent) { |
Rafael J. Wysocki | dc1a94ae | 2009-11-29 16:35:54 +0100 | [diff] [blame] | 459 | if (!acpi_pm_device_sleep_wake(&bus->self->dev, enable)) |
Rafael J. Wysocki | 0baed8d | 2009-09-08 23:16:24 +0200 | [diff] [blame] | 460 | return; |
| 461 | bus = bus->parent; |
| 462 | } |
| 463 | |
| 464 | /* We have reached the root bus. */ |
| 465 | if (bus->bridge) |
| 466 | acpi_pm_device_sleep_wake(bus->bridge, enable); |
| 467 | } |
| 468 | |
Rafael J. Wysocki | eb9d0fe | 2008-07-07 03:34:48 +0200 | [diff] [blame] | 469 | static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) |
| 470 | { |
Rafael J. Wysocki | 0baed8d | 2009-09-08 23:16:24 +0200 | [diff] [blame] | 471 | if (acpi_pci_can_wakeup(dev)) |
| 472 | return acpi_pm_device_sleep_wake(&dev->dev, enable); |
| 473 | |
Rafael J. Wysocki | dc1a94ae | 2009-11-29 16:35:54 +0100 | [diff] [blame] | 474 | acpi_pci_propagate_wakeup_enable(dev->bus, enable); |
Rafael J. Wysocki | 0baed8d | 2009-09-08 23:16:24 +0200 | [diff] [blame] | 475 | return 0; |
Rafael J. Wysocki | eb9d0fe | 2008-07-07 03:34:48 +0200 | [diff] [blame] | 476 | } |
| 477 | |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 478 | static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) |
| 479 | { |
| 480 | while (bus->parent) { |
| 481 | struct pci_dev *bridge = bus->self; |
| 482 | |
| 483 | if (bridge->pme_interrupt) |
| 484 | return; |
Lin Ming | b24e509 | 2012-03-27 15:43:25 +0800 | [diff] [blame] | 485 | if (!acpi_pm_device_run_wake(&bridge->dev, enable)) |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 486 | return; |
| 487 | bus = bus->parent; |
| 488 | } |
| 489 | |
| 490 | /* We have reached the root bus. */ |
| 491 | if (bus->bridge) |
Lin Ming | b24e509 | 2012-03-27 15:43:25 +0800 | [diff] [blame] | 492 | acpi_pm_device_run_wake(bus->bridge, enable); |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 493 | } |
| 494 | |
| 495 | static int acpi_pci_run_wake(struct pci_dev *dev, bool enable) |
| 496 | { |
Huang Ying | 448bd85 | 2012-06-23 10:23:51 +0800 | [diff] [blame] | 497 | /* |
| 498 | * Per PCI Express Base Specification Revision 2.0 section |
| 499 | * 5.3.3.2 Link Wakeup, platform support is needed for D3cold |
| 500 | * waking up to power on the main link even if there is PME |
| 501 | * support for D3cold |
| 502 | */ |
| 503 | if (dev->pme_interrupt && !dev->runtime_d3cold) |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 504 | return 0; |
| 505 | |
Lin Ming | b24e509 | 2012-03-27 15:43:25 +0800 | [diff] [blame] | 506 | if (!acpi_pm_device_run_wake(&dev->dev, enable)) |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 507 | return 0; |
| 508 | |
| 509 | acpi_pci_propagate_run_wake(dev->bus, enable); |
| 510 | return 0; |
| 511 | } |
| 512 | |
Rafael J. Wysocki | bac2a90 | 2015-01-21 02:17:42 +0100 | [diff] [blame] | 513 | static bool acpi_pci_need_resume(struct pci_dev *dev) |
| 514 | { |
| 515 | struct acpi_device *adev = ACPI_COMPANION(&dev->dev); |
| 516 | |
| 517 | if (!adev || !acpi_device_power_manageable(adev)) |
| 518 | return false; |
| 519 | |
| 520 | if (device_may_wakeup(&dev->dev) != !!adev->wakeup.prepare_count) |
| 521 | return true; |
| 522 | |
| 523 | if (acpi_target_system_state() == ACPI_STATE_S0) |
| 524 | return false; |
| 525 | |
| 526 | return !!adev->power.flags.dsw_present; |
| 527 | } |
| 528 | |
Rafael J. Wysocki | 961d912 | 2008-07-07 03:32:02 +0200 | [diff] [blame] | 529 | static struct pci_platform_pm_ops acpi_pci_platform_pm = { |
| 530 | .is_manageable = acpi_pci_power_manageable, |
| 531 | .set_state = acpi_pci_set_power_state, |
| 532 | .choose_state = acpi_pci_choose_state, |
Rafael J. Wysocki | eb9d0fe | 2008-07-07 03:34:48 +0200 | [diff] [blame] | 533 | .sleep_wake = acpi_pci_sleep_wake, |
Rafael J. Wysocki | b67ea76 | 2010-02-17 23:44:09 +0100 | [diff] [blame] | 534 | .run_wake = acpi_pci_run_wake, |
Rafael J. Wysocki | bac2a90 | 2015-01-21 02:17:42 +0100 | [diff] [blame] | 535 | .need_resume = acpi_pci_need_resume, |
Rafael J. Wysocki | 961d912 | 2008-07-07 03:32:02 +0200 | [diff] [blame] | 536 | }; |
David Shaohua Li | b913100 | 2005-03-19 00:16:18 -0500 | [diff] [blame] | 537 | |
Jiang Liu | 5090d4a | 2013-04-12 05:44:21 +0000 | [diff] [blame] | 538 | void acpi_pci_add_bus(struct pci_bus *bus) |
| 539 | { |
Aaron Lu | e33caa8 | 2015-03-25 14:37:06 +0800 | [diff] [blame^] | 540 | union acpi_object *obj; |
| 541 | struct pci_host_bridge *bridge; |
| 542 | |
Rafael J. Wysocki | be1c9de | 2013-07-13 23:27:23 +0200 | [diff] [blame] | 543 | if (acpi_pci_disabled || !bus->bridge) |
Jiang Liu | 5090d4a | 2013-04-12 05:44:21 +0000 | [diff] [blame] | 544 | return; |
| 545 | |
Rafael J. Wysocki | be1c9de | 2013-07-13 23:27:23 +0200 | [diff] [blame] | 546 | acpi_pci_slot_enumerate(bus); |
| 547 | acpiphp_enumerate_slots(bus); |
Aaron Lu | e33caa8 | 2015-03-25 14:37:06 +0800 | [diff] [blame^] | 548 | |
| 549 | /* |
| 550 | * For a host bridge, check its _DSM for function 8 and if |
| 551 | * that is available, mark it in pci_host_bridge. |
| 552 | */ |
| 553 | if (!pci_is_root_bus(bus)) |
| 554 | return; |
| 555 | |
| 556 | obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), pci_acpi_dsm_uuid, 3, |
| 557 | RESET_DELAY_DSM, NULL); |
| 558 | if (!obj) |
| 559 | return; |
| 560 | |
| 561 | if (obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 1) { |
| 562 | bridge = pci_find_host_bridge(bus); |
| 563 | bridge->ignore_reset_delay = 1; |
| 564 | } |
| 565 | ACPI_FREE(obj); |
Jiang Liu | 5090d4a | 2013-04-12 05:44:21 +0000 | [diff] [blame] | 566 | } |
| 567 | |
| 568 | void acpi_pci_remove_bus(struct pci_bus *bus) |
| 569 | { |
Rafael J. Wysocki | be1c9de | 2013-07-13 23:27:23 +0200 | [diff] [blame] | 570 | if (acpi_pci_disabled || !bus->bridge) |
Jiang Liu | 5090d4a | 2013-04-12 05:44:21 +0000 | [diff] [blame] | 571 | return; |
| 572 | |
Jiang Liu | 3b63aaa | 2013-04-12 05:44:26 +0000 | [diff] [blame] | 573 | acpiphp_remove_slots(bus); |
Jiang Liu | 5c0b04e | 2013-04-12 05:44:24 +0000 | [diff] [blame] | 574 | acpi_pci_slot_remove(bus); |
Jiang Liu | 5090d4a | 2013-04-12 05:44:21 +0000 | [diff] [blame] | 575 | } |
| 576 | |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 577 | /* ACPI bus type */ |
Rafael J. Wysocki | e3f02c5 | 2013-11-29 16:27:34 +0100 | [diff] [blame] | 578 | static struct acpi_device *acpi_pci_find_companion(struct device *dev) |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 579 | { |
Rafael J. Wysocki | 60f75b8 | 2013-08-07 22:55:00 +0200 | [diff] [blame] | 580 | struct pci_dev *pci_dev = to_pci_dev(dev); |
Rafael J. Wysocki | 5ce79d2 | 2013-11-28 23:58:08 +0100 | [diff] [blame] | 581 | bool check_children; |
Rafael J. Wysocki | 60f75b8 | 2013-08-07 22:55:00 +0200 | [diff] [blame] | 582 | u64 addr; |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 583 | |
Yijing Wang | 6788a51 | 2014-05-04 12:23:38 +0800 | [diff] [blame] | 584 | check_children = pci_is_bridge(pci_dev); |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 585 | /* Please ref to ACPI spec for the syntax of _ADR */ |
| 586 | addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn); |
Rafael J. Wysocki | e3f02c5 | 2013-11-29 16:27:34 +0100 | [diff] [blame] | 587 | return acpi_find_child_device(ACPI_COMPANION(dev->parent), addr, |
Rafael J. Wysocki | 5ce79d2 | 2013-11-28 23:58:08 +0100 | [diff] [blame] | 588 | check_children); |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 589 | } |
| 590 | |
Aaron Lu | e33caa8 | 2015-03-25 14:37:06 +0800 | [diff] [blame^] | 591 | /** |
| 592 | * pci_acpi_optimize_delay - optimize PCI D3 and D3cold delay from ACPI |
| 593 | * @pdev: the PCI device whose delay is to be updated |
| 594 | * @adev: the companion ACPI device of this PCI device |
| 595 | * |
| 596 | * Update the d3_delay and d3cold_delay of a PCI device from the ACPI _DSM |
| 597 | * control method of either the device itself or the PCI host bridge. |
| 598 | * |
| 599 | * Function 8, "Reset Delay," applies to the entire hierarchy below a PCI |
| 600 | * host bridge. If it returns one, the OS may assume that all devices in |
| 601 | * the hierarchy have already completed power-on reset delays. |
| 602 | * |
| 603 | * Function 9, "Device Readiness Durations," applies only to the object |
| 604 | * where it is located. It returns delay durations required after various |
| 605 | * events if the device requires less time than the spec requires. Delays |
| 606 | * from this function take precedence over the Reset Delay function. |
| 607 | * |
| 608 | * These _DSM functions are defined by the draft ECN of January 28, 2014, |
| 609 | * titled "ACPI additions for FW latency optimizations." |
| 610 | */ |
| 611 | static void pci_acpi_optimize_delay(struct pci_dev *pdev, |
| 612 | acpi_handle handle) |
| 613 | { |
| 614 | struct pci_host_bridge *bridge = pci_find_host_bridge(pdev->bus); |
| 615 | int value; |
| 616 | union acpi_object *obj, *elements; |
| 617 | |
| 618 | if (bridge->ignore_reset_delay) |
| 619 | pdev->d3cold_delay = 0; |
| 620 | |
| 621 | obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 3, |
| 622 | FUNCTION_DELAY_DSM, NULL); |
| 623 | if (!obj) |
| 624 | return; |
| 625 | |
| 626 | if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 5) { |
| 627 | elements = obj->package.elements; |
| 628 | if (elements[0].type == ACPI_TYPE_INTEGER) { |
| 629 | value = (int)elements[0].integer.value / 1000; |
| 630 | if (value < PCI_PM_D3COLD_WAIT) |
| 631 | pdev->d3cold_delay = value; |
| 632 | } |
| 633 | if (elements[3].type == ACPI_TYPE_INTEGER) { |
| 634 | value = (int)elements[3].integer.value / 1000; |
| 635 | if (value < PCI_PM_D3_WAIT) |
| 636 | pdev->d3_delay = value; |
| 637 | } |
| 638 | } |
| 639 | ACPI_FREE(obj); |
| 640 | } |
| 641 | |
Rafael J. Wysocki | 38a9a67 | 2012-12-23 00:02:54 +0100 | [diff] [blame] | 642 | static void pci_acpi_setup(struct device *dev) |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 643 | { |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 644 | struct pci_dev *pci_dev = to_pci_dev(dev); |
Rafael J. Wysocki | f084280 | 2013-12-29 23:37:15 +0100 | [diff] [blame] | 645 | struct acpi_device *adev = ACPI_COMPANION(dev); |
Rafael J. Wysocki | 38a9a67 | 2012-12-23 00:02:54 +0100 | [diff] [blame] | 646 | |
Rafael J. Wysocki | f084280 | 2013-12-29 23:37:15 +0100 | [diff] [blame] | 647 | if (!adev) |
| 648 | return; |
| 649 | |
Aaron Lu | e33caa8 | 2015-03-25 14:37:06 +0800 | [diff] [blame^] | 650 | pci_acpi_optimize_delay(pci_dev, adev->handle); |
| 651 | |
Rafael J. Wysocki | f084280 | 2013-12-29 23:37:15 +0100 | [diff] [blame] | 652 | pci_acpi_add_pm_notifier(adev, pci_dev); |
| 653 | if (!adev->wakeup.flags.valid) |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 654 | return; |
| 655 | |
| 656 | device_set_wakeup_capable(dev, true); |
| 657 | acpi_pci_sleep_wake(pci_dev, false); |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 658 | if (adev->wakeup.flags.run_wake) |
| 659 | device_set_run_wake(dev, true); |
| 660 | } |
| 661 | |
Rafael J. Wysocki | 38a9a67 | 2012-12-23 00:02:54 +0100 | [diff] [blame] | 662 | static void pci_acpi_cleanup(struct device *dev) |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 663 | { |
Rafael J. Wysocki | f084280 | 2013-12-29 23:37:15 +0100 | [diff] [blame] | 664 | struct acpi_device *adev = ACPI_COMPANION(dev); |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 665 | |
Rafael J. Wysocki | f084280 | 2013-12-29 23:37:15 +0100 | [diff] [blame] | 666 | if (!adev) |
| 667 | return; |
| 668 | |
| 669 | pci_acpi_remove_pm_notifier(adev); |
| 670 | if (adev->wakeup.flags.valid) { |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 671 | device_set_wakeup_capable(dev, false); |
| 672 | device_set_run_wake(dev, false); |
Rafael J. Wysocki | d2e5f0c | 2012-12-23 00:02:44 +0100 | [diff] [blame] | 673 | } |
| 674 | } |
| 675 | |
Rafael J. Wysocki | 5354009 | 2013-03-03 22:35:20 +0100 | [diff] [blame] | 676 | static bool pci_acpi_bus_match(struct device *dev) |
| 677 | { |
Yijing Wang | 40c368c | 2013-12-05 19:52:53 +0800 | [diff] [blame] | 678 | return dev_is_pci(dev); |
Rafael J. Wysocki | 5354009 | 2013-03-03 22:35:20 +0100 | [diff] [blame] | 679 | } |
| 680 | |
Muthu Kumar | 9c273b9 | 2006-04-28 00:42:21 -0700 | [diff] [blame] | 681 | static struct acpi_bus_type acpi_pci_bus = { |
Rafael J. Wysocki | 5354009 | 2013-03-03 22:35:20 +0100 | [diff] [blame] | 682 | .name = "PCI", |
| 683 | .match = pci_acpi_bus_match, |
Rafael J. Wysocki | e3f02c5 | 2013-11-29 16:27:34 +0100 | [diff] [blame] | 684 | .find_companion = acpi_pci_find_companion, |
Rafael J. Wysocki | 38a9a67 | 2012-12-23 00:02:54 +0100 | [diff] [blame] | 685 | .setup = pci_acpi_setup, |
| 686 | .cleanup = pci_acpi_cleanup, |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 687 | }; |
| 688 | |
Muthu Kumar | 9c273b9 | 2006-04-28 00:42:21 -0700 | [diff] [blame] | 689 | static int __init acpi_pci_init(void) |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 690 | { |
| 691 | int ret; |
| 692 | |
Bob Moore | 993958f | 2009-02-03 15:14:33 +0800 | [diff] [blame] | 693 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_MSI) { |
Yijing Wang | e7d4515 | 2013-05-28 16:03:46 +0800 | [diff] [blame] | 694 | pr_info("ACPI FADT declares the system doesn't support MSI, so disable it\n"); |
Shaohua Li | f8993af | 2007-04-25 11:05:12 +0800 | [diff] [blame] | 695 | pci_no_msi(); |
| 696 | } |
Shaohua Li | 5fde244 | 2008-07-23 10:32:24 +0800 | [diff] [blame] | 697 | |
Bob Moore | 993958f | 2009-02-03 15:14:33 +0800 | [diff] [blame] | 698 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { |
Yijing Wang | e7d4515 | 2013-05-28 16:03:46 +0800 | [diff] [blame] | 699 | pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n"); |
Shaohua Li | 5fde244 | 2008-07-23 10:32:24 +0800 | [diff] [blame] | 700 | pcie_no_aspm(); |
| 701 | } |
| 702 | |
Muthu Kumar | 9c273b9 | 2006-04-28 00:42:21 -0700 | [diff] [blame] | 703 | ret = register_acpi_bus_type(&acpi_pci_bus); |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 704 | if (ret) |
| 705 | return 0; |
Jiang Liu | 5c0b04e | 2013-04-12 05:44:24 +0000 | [diff] [blame] | 706 | |
Rafael J. Wysocki | 961d912 | 2008-07-07 03:32:02 +0200 | [diff] [blame] | 707 | pci_set_platform_pm(&acpi_pci_platform_pm); |
Jiang Liu | 5c0b04e | 2013-04-12 05:44:24 +0000 | [diff] [blame] | 708 | acpi_pci_slot_init(); |
Jiang Liu | 3b63aaa | 2013-04-12 05:44:26 +0000 | [diff] [blame] | 709 | acpiphp_init(); |
Jiang Liu | 5c0b04e | 2013-04-12 05:44:24 +0000 | [diff] [blame] | 710 | |
David Shaohua Li | 84df749f | 2005-03-18 18:53:36 -0500 | [diff] [blame] | 711 | return 0; |
| 712 | } |
Muthu Kumar | 9c273b9 | 2006-04-28 00:42:21 -0700 | [diff] [blame] | 713 | arch_initcall(acpi_pci_init); |