system.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. /*
  2. * acpi_system.c - ACPI System Driver ($Revision: 63 $)
  3. *
  4. * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
  5. * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
  6. *
  7. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or (at
  12. * your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  22. *
  23. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. */
  25. #include <linux/proc_fs.h>
  26. #include <linux/seq_file.h>
  27. #include <linux/init.h>
  28. #include <asm/uaccess.h>
  29. #include <acpi/acpi_drivers.h>
  30. #define _COMPONENT ACPI_SYSTEM_COMPONENT
  31. ACPI_MODULE_NAME("system");
  32. #ifdef MODULE_PARAM_PREFIX
  33. #undef MODULE_PARAM_PREFIX
  34. #endif
  35. #define MODULE_PARAM_PREFIX "acpi."
  36. #define ACPI_SYSTEM_CLASS "system"
  37. #define ACPI_SYSTEM_DEVICE_NAME "System"
  38. u32 acpi_irq_handled;
  39. /*
  40. * Make ACPICA version work as module param
  41. */
  42. static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
  43. {
  44. int result;
  45. result = sprintf(buffer, "%x", ACPI_CA_VERSION);
  46. return result;
  47. }
  48. module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444);
  49. /* --------------------------------------------------------------------------
  50. FS Interface (/sys)
  51. -------------------------------------------------------------------------- */
  52. static LIST_HEAD(acpi_table_attr_list);
  53. static struct kobject *tables_kobj;
  54. struct acpi_table_attr {
  55. struct bin_attribute attr;
  56. char name[8];
  57. int instance;
  58. struct list_head node;
  59. };
  60. static ssize_t acpi_table_show(struct kobject *kobj,
  61. struct bin_attribute *bin_attr, char *buf,
  62. loff_t offset, size_t count)
  63. {
  64. struct acpi_table_attr *table_attr =
  65. container_of(bin_attr, struct acpi_table_attr, attr);
  66. struct acpi_table_header *table_header = NULL;
  67. acpi_status status;
  68. status =
  69. acpi_get_table(table_attr->name, table_attr->instance,
  70. &table_header);
  71. if (ACPI_FAILURE(status))
  72. return -ENODEV;
  73. return memory_read_from_buffer(buf, count, &offset,
  74. table_header, table_header->length);
  75. }
  76. static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
  77. struct acpi_table_header *table_header)
  78. {
  79. struct acpi_table_header *header = NULL;
  80. struct acpi_table_attr *attr = NULL;
  81. memcpy(table_attr->name, table_header->signature, ACPI_NAME_SIZE);
  82. list_for_each_entry(attr, &acpi_table_attr_list, node) {
  83. if (!memcmp(table_header->signature, attr->name,
  84. ACPI_NAME_SIZE))
  85. if (table_attr->instance < attr->instance)
  86. table_attr->instance = attr->instance;
  87. }
  88. table_attr->instance++;
  89. if (table_attr->instance > 1 || (table_attr->instance == 1 &&
  90. !acpi_get_table(table_header->
  91. signature, 2,
  92. &header)))
  93. sprintf(table_attr->name + 4, "%d", table_attr->instance);
  94. table_attr->attr.size = 0;
  95. table_attr->attr.read = acpi_table_show;
  96. table_attr->attr.attr.name = table_attr->name;
  97. table_attr->attr.attr.mode = 0444;
  98. table_attr->attr.attr.owner = THIS_MODULE;
  99. return;
  100. }
  101. static int acpi_system_sysfs_init(void)
  102. {
  103. struct acpi_table_attr *table_attr;
  104. struct acpi_table_header *table_header = NULL;
  105. int table_index = 0;
  106. int result;
  107. tables_kobj = kobject_create_and_add("tables", acpi_kobj);
  108. if (!tables_kobj)
  109. return -ENOMEM;
  110. do {
  111. result = acpi_get_table_by_index(table_index, &table_header);
  112. if (!result) {
  113. table_index++;
  114. table_attr = NULL;
  115. table_attr =
  116. kzalloc(sizeof(struct acpi_table_attr), GFP_KERNEL);
  117. if (!table_attr)
  118. return -ENOMEM;
  119. acpi_table_attr_init(table_attr, table_header);
  120. result =
  121. sysfs_create_bin_file(tables_kobj,
  122. &table_attr->attr);
  123. if (result) {
  124. kfree(table_attr);
  125. return result;
  126. } else
  127. list_add_tail(&table_attr->node,
  128. &acpi_table_attr_list);
  129. }
  130. } while (!result);
  131. kobject_uevent(tables_kobj, KOBJ_ADD);
  132. return 0;
  133. }
  134. /*
  135. * Detailed ACPI IRQ counters in /sys/firmware/acpi/interrupts/
  136. * See Documentation/ABI/testing/sysfs-firmware-acpi
  137. */
  138. #define COUNT_GPE 0
  139. #define COUNT_SCI 1 /* acpi_irq_handled */
  140. #define COUNT_ERROR 2 /* other */
  141. #define NUM_COUNTERS_EXTRA 3
  142. #define ACPI_EVENT_VALID 0x01
  143. struct event_counter {
  144. u32 count;
  145. u32 flags;
  146. };
  147. static struct event_counter *all_counters;
  148. static u32 num_gpes;
  149. static u32 num_counters;
  150. static struct attribute **all_attrs;
  151. static u32 acpi_gpe_count;
  152. static struct attribute_group interrupt_stats_attr_group = {
  153. .name = "interrupts",
  154. };
  155. static struct kobj_attribute *counter_attrs;
  156. static int count_num_gpes(void)
  157. {
  158. int count = 0;
  159. struct acpi_gpe_xrupt_info *gpe_xrupt_info;
  160. struct acpi_gpe_block_info *gpe_block;
  161. acpi_cpu_flags flags;
  162. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  163. gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
  164. while (gpe_xrupt_info) {
  165. gpe_block = gpe_xrupt_info->gpe_block_list_head;
  166. while (gpe_block) {
  167. count += gpe_block->register_count *
  168. ACPI_GPE_REGISTER_WIDTH;
  169. gpe_block = gpe_block->next;
  170. }
  171. gpe_xrupt_info = gpe_xrupt_info->next;
  172. }
  173. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  174. return count;
  175. }
  176. static int get_gpe_device(int index, acpi_handle *handle)
  177. {
  178. struct acpi_gpe_xrupt_info *gpe_xrupt_info;
  179. struct acpi_gpe_block_info *gpe_block;
  180. acpi_cpu_flags flags;
  181. struct acpi_namespace_node *node;
  182. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  183. gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
  184. while (gpe_xrupt_info) {
  185. gpe_block = gpe_xrupt_info->gpe_block_list_head;
  186. node = gpe_block->node;
  187. while (gpe_block) {
  188. index -= gpe_block->register_count *
  189. ACPI_GPE_REGISTER_WIDTH;
  190. if (index < 0) {
  191. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  192. /* return NULL if it's FADT GPE */
  193. if (node->type != ACPI_TYPE_DEVICE)
  194. *handle = NULL;
  195. else
  196. *handle = node;
  197. return 0;
  198. }
  199. node = gpe_block->node;
  200. gpe_block = gpe_block->next;
  201. }
  202. gpe_xrupt_info = gpe_xrupt_info->next;
  203. }
  204. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  205. return -ENODEV;
  206. }
  207. static void delete_gpe_attr_array(void)
  208. {
  209. struct event_counter *tmp = all_counters;
  210. all_counters = NULL;
  211. kfree(tmp);
  212. if (counter_attrs) {
  213. int i;
  214. for (i = 0; i < num_gpes; i++)
  215. kfree(counter_attrs[i].attr.name);
  216. kfree(counter_attrs);
  217. }
  218. kfree(all_attrs);
  219. return;
  220. }
  221. void acpi_os_gpe_count(u32 gpe_number)
  222. {
  223. acpi_gpe_count++;
  224. if (!all_counters)
  225. return;
  226. if (gpe_number < num_gpes)
  227. all_counters[gpe_number].count++;
  228. else
  229. all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_ERROR].
  230. count++;
  231. return;
  232. }
  233. void acpi_os_fixed_event_count(u32 event_number)
  234. {
  235. if (!all_counters)
  236. return;
  237. if (event_number < ACPI_NUM_FIXED_EVENTS)
  238. all_counters[num_gpes + event_number].count++;
  239. else
  240. all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_ERROR].
  241. count++;
  242. return;
  243. }
  244. static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle)
  245. {
  246. int result = 0;
  247. if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
  248. goto end;
  249. if (index < num_gpes) {
  250. result = get_gpe_device(index, handle);
  251. if (result) {
  252. ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
  253. "Invalid GPE 0x%x\n", index));
  254. goto end;
  255. }
  256. result = acpi_get_gpe_status(*handle, index,
  257. ACPI_NOT_ISR, status);
  258. } else if (index < (num_gpes + ACPI_NUM_FIXED_EVENTS))
  259. result = acpi_get_event_status(index - num_gpes, status);
  260. /*
  261. * sleep/power button GPE/Fixed Event is enabled after acpi_system_init,
  262. * check the status at runtime and mark it as valid once it's enabled
  263. */
  264. if (!result && (*status & ACPI_EVENT_FLAG_ENABLED))
  265. all_counters[index].flags |= ACPI_EVENT_VALID;
  266. end:
  267. return result;
  268. }
  269. static ssize_t counter_show(struct kobject *kobj,
  270. struct kobj_attribute *attr, char *buf)
  271. {
  272. int index = attr - counter_attrs;
  273. int size;
  274. acpi_handle handle;
  275. acpi_event_status status;
  276. int result = 0;
  277. all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI].count =
  278. acpi_irq_handled;
  279. all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_GPE].count =
  280. acpi_gpe_count;
  281. size = sprintf(buf, "%8d", all_counters[index].count);
  282. /* "gpe_all" or "sci" */
  283. if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
  284. goto end;
  285. result = get_status(index, &status, &handle);
  286. if (result)
  287. goto end;
  288. if (!(all_counters[index].flags & ACPI_EVENT_VALID))
  289. size += sprintf(buf + size, " invalid");
  290. else if (status & ACPI_EVENT_FLAG_ENABLED)
  291. size += sprintf(buf + size, " enable");
  292. else
  293. size += sprintf(buf + size, " disable");
  294. end:
  295. size += sprintf(buf + size, "\n");
  296. return result ? result : size;
  297. }
  298. /*
  299. * counter_set() sets the specified counter.
  300. * setting the total "sci" file to any value clears all counters.
  301. * enable/disable/clear a gpe/fixed event in user space.
  302. */
  303. static ssize_t counter_set(struct kobject *kobj,
  304. struct kobj_attribute *attr, const char *buf, size_t size)
  305. {
  306. int index = attr - counter_attrs;
  307. acpi_event_status status;
  308. acpi_handle handle;
  309. int result = 0;
  310. if (index == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI) {
  311. int i;
  312. for (i = 0; i < num_counters; ++i)
  313. all_counters[i].count = 0;
  314. acpi_gpe_count = 0;
  315. acpi_irq_handled = 0;
  316. goto end;
  317. }
  318. /* show the event status for both GPEs and Fixed Events */
  319. result = get_status(index, &status, &handle);
  320. if (result)
  321. goto end;
  322. if (!(all_counters[index].flags & ACPI_EVENT_VALID)) {
  323. ACPI_DEBUG_PRINT((ACPI_DB_WARN,
  324. "Can not change Invalid GPE/Fixed Event status\n"));
  325. return -EINVAL;
  326. }
  327. if (index < num_gpes) {
  328. if (!strcmp(buf, "disable\n") &&
  329. (status & ACPI_EVENT_FLAG_ENABLED))
  330. result = acpi_disable_gpe(handle, index, ACPI_NOT_ISR);
  331. else if (!strcmp(buf, "enable\n") &&
  332. !(status & ACPI_EVENT_FLAG_ENABLED))
  333. result = acpi_enable_gpe(handle, index, ACPI_NOT_ISR);
  334. else if (!strcmp(buf, "clear\n") &&
  335. (status & ACPI_EVENT_FLAG_SET))
  336. result = acpi_clear_gpe(handle, index, ACPI_NOT_ISR);
  337. else
  338. all_counters[index].count = strtoul(buf, NULL, 0);
  339. } else if (index < num_gpes + ACPI_NUM_FIXED_EVENTS) {
  340. int event = index - num_gpes;
  341. if (!strcmp(buf, "disable\n") &&
  342. (status & ACPI_EVENT_FLAG_ENABLED))
  343. result = acpi_disable_event(event, ACPI_NOT_ISR);
  344. else if (!strcmp(buf, "enable\n") &&
  345. !(status & ACPI_EVENT_FLAG_ENABLED))
  346. result = acpi_enable_event(event, ACPI_NOT_ISR);
  347. else if (!strcmp(buf, "clear\n") &&
  348. (status & ACPI_EVENT_FLAG_SET))
  349. result = acpi_clear_event(event);
  350. else
  351. all_counters[index].count = strtoul(buf, NULL, 0);
  352. } else
  353. all_counters[index].count = strtoul(buf, NULL, 0);
  354. if (ACPI_FAILURE(result))
  355. result = -EINVAL;
  356. end:
  357. return result ? result : size;
  358. }
  359. void acpi_irq_stats_init(void)
  360. {
  361. int i;
  362. if (all_counters)
  363. return;
  364. num_gpes = count_num_gpes();
  365. num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA;
  366. all_attrs = kzalloc(sizeof(struct attribute *) * (num_counters + 1),
  367. GFP_KERNEL);
  368. if (all_attrs == NULL)
  369. return;
  370. all_counters = kzalloc(sizeof(struct event_counter) * (num_counters),
  371. GFP_KERNEL);
  372. if (all_counters == NULL)
  373. goto fail;
  374. counter_attrs = kzalloc(sizeof(struct kobj_attribute) * (num_counters),
  375. GFP_KERNEL);
  376. if (counter_attrs == NULL)
  377. goto fail;
  378. for (i = 0; i < num_counters; ++i) {
  379. char buffer[12];
  380. char *name;
  381. if (i < num_gpes)
  382. sprintf(buffer, "gpe%02X", i);
  383. else if (i == num_gpes + ACPI_EVENT_PMTIMER)
  384. sprintf(buffer, "ff_pmtimer");
  385. else if (i == num_gpes + ACPI_EVENT_GLOBAL)
  386. sprintf(buffer, "ff_gbl_lock");
  387. else if (i == num_gpes + ACPI_EVENT_POWER_BUTTON)
  388. sprintf(buffer, "ff_pwr_btn");
  389. else if (i == num_gpes + ACPI_EVENT_SLEEP_BUTTON)
  390. sprintf(buffer, "ff_slp_btn");
  391. else if (i == num_gpes + ACPI_EVENT_RTC)
  392. sprintf(buffer, "ff_rt_clk");
  393. else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_GPE)
  394. sprintf(buffer, "gpe_all");
  395. else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI)
  396. sprintf(buffer, "sci");
  397. else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_ERROR)
  398. sprintf(buffer, "error");
  399. else
  400. sprintf(buffer, "bug%02X", i);
  401. name = kzalloc(strlen(buffer) + 1, GFP_KERNEL);
  402. if (name == NULL)
  403. goto fail;
  404. strncpy(name, buffer, strlen(buffer) + 1);
  405. counter_attrs[i].attr.name = name;
  406. counter_attrs[i].attr.mode = 0644;
  407. counter_attrs[i].show = counter_show;
  408. counter_attrs[i].store = counter_set;
  409. all_attrs[i] = &counter_attrs[i].attr;
  410. }
  411. interrupt_stats_attr_group.attrs = all_attrs;
  412. if (!sysfs_create_group(acpi_kobj, &interrupt_stats_attr_group))
  413. return;
  414. fail:
  415. delete_gpe_attr_array();
  416. return;
  417. }
  418. static void __exit interrupt_stats_exit(void)
  419. {
  420. sysfs_remove_group(acpi_kobj, &interrupt_stats_attr_group);
  421. delete_gpe_attr_array();
  422. return;
  423. }
  424. /* --------------------------------------------------------------------------
  425. FS Interface (/proc)
  426. -------------------------------------------------------------------------- */
  427. #ifdef CONFIG_ACPI_PROCFS
  428. #define ACPI_SYSTEM_FILE_INFO "info"
  429. #define ACPI_SYSTEM_FILE_EVENT "event"
  430. #define ACPI_SYSTEM_FILE_DSDT "dsdt"
  431. #define ACPI_SYSTEM_FILE_FADT "fadt"
  432. static int acpi_system_read_info(struct seq_file *seq, void *offset)
  433. {
  434. seq_printf(seq, "version: %x\n", ACPI_CA_VERSION);
  435. return 0;
  436. }
  437. static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
  438. {
  439. return single_open(file, acpi_system_read_info, PDE(inode)->data);
  440. }
  441. static const struct file_operations acpi_system_info_ops = {
  442. .owner = THIS_MODULE,
  443. .open = acpi_system_info_open_fs,
  444. .read = seq_read,
  445. .llseek = seq_lseek,
  446. .release = single_release,
  447. };
  448. static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t,
  449. loff_t *);
  450. static const struct file_operations acpi_system_dsdt_ops = {
  451. .owner = THIS_MODULE,
  452. .read = acpi_system_read_dsdt,
  453. };
  454. static ssize_t
  455. acpi_system_read_dsdt(struct file *file,
  456. char __user * buffer, size_t count, loff_t * ppos)
  457. {
  458. acpi_status status = AE_OK;
  459. struct acpi_table_header *dsdt = NULL;
  460. ssize_t res;
  461. status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt);
  462. if (ACPI_FAILURE(status))
  463. return -ENODEV;
  464. res = simple_read_from_buffer(buffer, count, ppos, dsdt, dsdt->length);
  465. return res;
  466. }
  467. static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t,
  468. loff_t *);
  469. static const struct file_operations acpi_system_fadt_ops = {
  470. .owner = THIS_MODULE,
  471. .read = acpi_system_read_fadt,
  472. };
  473. static ssize_t
  474. acpi_system_read_fadt(struct file *file,
  475. char __user * buffer, size_t count, loff_t * ppos)
  476. {
  477. acpi_status status = AE_OK;
  478. struct acpi_table_header *fadt = NULL;
  479. ssize_t res;
  480. status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt);
  481. if (ACPI_FAILURE(status))
  482. return -ENODEV;
  483. res = simple_read_from_buffer(buffer, count, ppos, fadt, fadt->length);
  484. return res;
  485. }
  486. static int acpi_system_procfs_init(void)
  487. {
  488. struct proc_dir_entry *entry;
  489. int error = 0;
  490. /* 'info' [R] */
  491. entry = proc_create(ACPI_SYSTEM_FILE_INFO, S_IRUGO, acpi_root_dir,
  492. &acpi_system_info_ops);
  493. if (!entry)
  494. goto Error;
  495. /* 'dsdt' [R] */
  496. entry = proc_create(ACPI_SYSTEM_FILE_DSDT, S_IRUSR, acpi_root_dir,
  497. &acpi_system_dsdt_ops);
  498. if (!entry)
  499. goto Error;
  500. /* 'fadt' [R] */
  501. entry = proc_create(ACPI_SYSTEM_FILE_FADT, S_IRUSR, acpi_root_dir,
  502. &acpi_system_fadt_ops);
  503. if (!entry)
  504. goto Error;
  505. Done:
  506. return error;
  507. Error:
  508. remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
  509. remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
  510. remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
  511. error = -EFAULT;
  512. goto Done;
  513. }
  514. #else
  515. static int acpi_system_procfs_init(void)
  516. {
  517. return 0;
  518. }
  519. #endif
  520. static int __init acpi_system_init(void)
  521. {
  522. int result = 0;
  523. if (acpi_disabled)
  524. return 0;
  525. result = acpi_system_procfs_init();
  526. if (result)
  527. return result;
  528. result = acpi_system_sysfs_init();
  529. return result;
  530. }
  531. subsys_initcall(acpi_system_init);