system.c 16 KB

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