xen-acpi-processor.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /*
  2. * Copyright 2012 by Oracle Inc
  3. * Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  4. *
  5. * This code borrows ideas from https://lkml.org/lkml/2011/11/30/249
  6. * so many thanks go to Kevin Tian <kevin.tian@intel.com>
  7. * and Yu Ke <ke.yu@intel.com>.
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms and conditions of the GNU General Public License,
  11. * version 2, as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  16. * more details.
  17. *
  18. */
  19. #include <linux/cpumask.h>
  20. #include <linux/cpufreq.h>
  21. #include <linux/freezer.h>
  22. #include <linux/kernel.h>
  23. #include <linux/kthread.h>
  24. #include <linux/init.h>
  25. #include <linux/module.h>
  26. #include <linux/types.h>
  27. #include <acpi/acpi_bus.h>
  28. #include <acpi/acpi_drivers.h>
  29. #include <acpi/processor.h>
  30. #include <xen/interface/platform.h>
  31. #include <asm/xen/hypercall.h>
  32. #define DRV_NAME "xen-acpi-processor: "
  33. static int no_hypercall;
  34. MODULE_PARM_DESC(off, "Inhibit the hypercall.");
  35. module_param_named(off, no_hypercall, int, 0400);
  36. /*
  37. * Note: Do not convert the acpi_id* below to cpumask_var_t or use cpumask_bit
  38. * - as those shrink to nr_cpu_bits (which is dependent on possible_cpu), which
  39. * can be less than what we want to put in. Instead use the 'nr_acpi_bits'
  40. * which is dynamically computed based on the MADT or x2APIC table.
  41. */
  42. static unsigned int nr_acpi_bits;
  43. /* Mutex to protect the acpi_ids_done - for CPU hotplug use. */
  44. static DEFINE_MUTEX(acpi_ids_mutex);
  45. /* Which ACPI ID we have processed from 'struct acpi_processor'. */
  46. static unsigned long *acpi_ids_done;
  47. /* Which ACPI ID exist in the SSDT/DSDT processor definitions. */
  48. static unsigned long __initdata *acpi_id_present;
  49. /* And if there is an _CST definition (or a PBLK) for the ACPI IDs */
  50. static unsigned long __initdata *acpi_id_cst_present;
  51. static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
  52. {
  53. struct xen_platform_op op = {
  54. .cmd = XENPF_set_processor_pminfo,
  55. .interface_version = XENPF_INTERFACE_VERSION,
  56. .u.set_pminfo.id = _pr->acpi_id,
  57. .u.set_pminfo.type = XEN_PM_CX,
  58. };
  59. struct xen_processor_cx *dst_cx, *dst_cx_states = NULL;
  60. struct acpi_processor_cx *cx;
  61. unsigned int i, ok;
  62. int ret = 0;
  63. dst_cx_states = kcalloc(_pr->power.count,
  64. sizeof(struct xen_processor_cx), GFP_KERNEL);
  65. if (!dst_cx_states)
  66. return -ENOMEM;
  67. for (ok = 0, i = 1; i <= _pr->power.count; i++) {
  68. cx = &_pr->power.states[i];
  69. if (!cx->valid)
  70. continue;
  71. dst_cx = &(dst_cx_states[ok++]);
  72. dst_cx->reg.space_id = ACPI_ADR_SPACE_SYSTEM_IO;
  73. if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
  74. dst_cx->reg.bit_width = 8;
  75. dst_cx->reg.bit_offset = 0;
  76. dst_cx->reg.access_size = 1;
  77. } else {
  78. dst_cx->reg.space_id = ACPI_ADR_SPACE_FIXED_HARDWARE;
  79. if (cx->entry_method == ACPI_CSTATE_FFH) {
  80. /* NATIVE_CSTATE_BEYOND_HALT */
  81. dst_cx->reg.bit_offset = 2;
  82. dst_cx->reg.bit_width = 1; /* VENDOR_INTEL */
  83. }
  84. dst_cx->reg.access_size = 0;
  85. }
  86. dst_cx->reg.address = cx->address;
  87. dst_cx->type = cx->type;
  88. dst_cx->latency = cx->latency;
  89. dst_cx->power = cx->power;
  90. dst_cx->dpcnt = 0;
  91. set_xen_guest_handle(dst_cx->dp, NULL);
  92. }
  93. if (!ok) {
  94. pr_debug(DRV_NAME "No _Cx for ACPI CPU %u\n", _pr->acpi_id);
  95. kfree(dst_cx_states);
  96. return -EINVAL;
  97. }
  98. op.u.set_pminfo.power.count = ok;
  99. op.u.set_pminfo.power.flags.bm_control = _pr->flags.bm_control;
  100. op.u.set_pminfo.power.flags.bm_check = _pr->flags.bm_check;
  101. op.u.set_pminfo.power.flags.has_cst = _pr->flags.has_cst;
  102. op.u.set_pminfo.power.flags.power_setup_done =
  103. _pr->flags.power_setup_done;
  104. set_xen_guest_handle(op.u.set_pminfo.power.states, dst_cx_states);
  105. if (!no_hypercall)
  106. ret = HYPERVISOR_dom0_op(&op);
  107. if (!ret) {
  108. pr_debug("ACPI CPU%u - C-states uploaded.\n", _pr->acpi_id);
  109. for (i = 1; i <= _pr->power.count; i++) {
  110. cx = &_pr->power.states[i];
  111. if (!cx->valid)
  112. continue;
  113. pr_debug(" C%d: %s %d uS\n",
  114. cx->type, cx->desc, (u32)cx->latency);
  115. }
  116. } else
  117. pr_err(DRV_NAME "(CX): Hypervisor error (%d) for ACPI CPU%u\n",
  118. ret, _pr->acpi_id);
  119. kfree(dst_cx_states);
  120. return ret;
  121. }
  122. static struct xen_processor_px *
  123. xen_copy_pss_data(struct acpi_processor *_pr,
  124. struct xen_processor_performance *dst_perf)
  125. {
  126. struct xen_processor_px *dst_states = NULL;
  127. unsigned int i;
  128. BUILD_BUG_ON(sizeof(struct xen_processor_px) !=
  129. sizeof(struct acpi_processor_px));
  130. dst_states = kcalloc(_pr->performance->state_count,
  131. sizeof(struct xen_processor_px), GFP_KERNEL);
  132. if (!dst_states)
  133. return ERR_PTR(-ENOMEM);
  134. dst_perf->state_count = _pr->performance->state_count;
  135. for (i = 0; i < _pr->performance->state_count; i++) {
  136. /* Fortunatly for us, they are both the same size */
  137. memcpy(&(dst_states[i]), &(_pr->performance->states[i]),
  138. sizeof(struct acpi_processor_px));
  139. }
  140. return dst_states;
  141. }
  142. static int xen_copy_psd_data(struct acpi_processor *_pr,
  143. struct xen_processor_performance *dst)
  144. {
  145. struct acpi_psd_package *pdomain;
  146. BUILD_BUG_ON(sizeof(struct xen_psd_package) !=
  147. sizeof(struct acpi_psd_package));
  148. /* This information is enumerated only if acpi_processor_preregister_performance
  149. * has been called.
  150. */
  151. dst->shared_type = _pr->performance->shared_type;
  152. pdomain = &(_pr->performance->domain_info);
  153. /* 'acpi_processor_preregister_performance' does not parse if the
  154. * num_processors <= 1, but Xen still requires it. Do it manually here.
  155. */
  156. if (pdomain->num_processors <= 1) {
  157. if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
  158. dst->shared_type = CPUFREQ_SHARED_TYPE_ALL;
  159. else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL)
  160. dst->shared_type = CPUFREQ_SHARED_TYPE_HW;
  161. else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
  162. dst->shared_type = CPUFREQ_SHARED_TYPE_ANY;
  163. }
  164. memcpy(&(dst->domain_info), pdomain, sizeof(struct acpi_psd_package));
  165. return 0;
  166. }
  167. static int xen_copy_pct_data(struct acpi_pct_register *pct,
  168. struct xen_pct_register *dst_pct)
  169. {
  170. /* It would be nice if you could just do 'memcpy(pct, dst_pct') but
  171. * sadly the Xen structure did not have the proper padding so the
  172. * descriptor field takes two (dst_pct) bytes instead of one (pct).
  173. */
  174. dst_pct->descriptor = pct->descriptor;
  175. dst_pct->length = pct->length;
  176. dst_pct->space_id = pct->space_id;
  177. dst_pct->bit_width = pct->bit_width;
  178. dst_pct->bit_offset = pct->bit_offset;
  179. dst_pct->reserved = pct->reserved;
  180. dst_pct->address = pct->address;
  181. return 0;
  182. }
  183. static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
  184. {
  185. int ret = 0;
  186. struct xen_platform_op op = {
  187. .cmd = XENPF_set_processor_pminfo,
  188. .interface_version = XENPF_INTERFACE_VERSION,
  189. .u.set_pminfo.id = _pr->acpi_id,
  190. .u.set_pminfo.type = XEN_PM_PX,
  191. };
  192. struct xen_processor_performance *dst_perf;
  193. struct xen_processor_px *dst_states = NULL;
  194. dst_perf = &op.u.set_pminfo.perf;
  195. dst_perf->platform_limit = _pr->performance_platform_limit;
  196. dst_perf->flags |= XEN_PX_PPC;
  197. xen_copy_pct_data(&(_pr->performance->control_register),
  198. &dst_perf->control_register);
  199. xen_copy_pct_data(&(_pr->performance->status_register),
  200. &dst_perf->status_register);
  201. dst_perf->flags |= XEN_PX_PCT;
  202. dst_states = xen_copy_pss_data(_pr, dst_perf);
  203. if (!IS_ERR_OR_NULL(dst_states)) {
  204. set_xen_guest_handle(dst_perf->states, dst_states);
  205. dst_perf->flags |= XEN_PX_PSS;
  206. }
  207. if (!xen_copy_psd_data(_pr, dst_perf))
  208. dst_perf->flags |= XEN_PX_PSD;
  209. if (dst_perf->flags != (XEN_PX_PSD | XEN_PX_PSS | XEN_PX_PCT | XEN_PX_PPC)) {
  210. pr_warn(DRV_NAME "ACPI CPU%u missing some P-state data (%x), skipping.\n",
  211. _pr->acpi_id, dst_perf->flags);
  212. ret = -ENODEV;
  213. goto err_free;
  214. }
  215. if (!no_hypercall)
  216. ret = HYPERVISOR_dom0_op(&op);
  217. if (!ret) {
  218. struct acpi_processor_performance *perf;
  219. unsigned int i;
  220. perf = _pr->performance;
  221. pr_debug("ACPI CPU%u - P-states uploaded.\n", _pr->acpi_id);
  222. for (i = 0; i < perf->state_count; i++) {
  223. pr_debug(" %cP%d: %d MHz, %d mW, %d uS\n",
  224. (i == perf->state ? '*' : ' '), i,
  225. (u32) perf->states[i].core_frequency,
  226. (u32) perf->states[i].power,
  227. (u32) perf->states[i].transition_latency);
  228. }
  229. } else if (ret != -EINVAL)
  230. /* EINVAL means the ACPI ID is incorrect - meaning the ACPI
  231. * table is referencing a non-existing CPU - which can happen
  232. * with broken ACPI tables. */
  233. pr_warn(DRV_NAME "(_PXX): Hypervisor error (%d) for ACPI CPU%u\n",
  234. ret, _pr->acpi_id);
  235. err_free:
  236. if (!IS_ERR_OR_NULL(dst_states))
  237. kfree(dst_states);
  238. return ret;
  239. }
  240. static int upload_pm_data(struct acpi_processor *_pr)
  241. {
  242. int err = 0;
  243. mutex_lock(&acpi_ids_mutex);
  244. if (__test_and_set_bit(_pr->acpi_id, acpi_ids_done)) {
  245. mutex_unlock(&acpi_ids_mutex);
  246. return -EBUSY;
  247. }
  248. if (_pr->flags.power)
  249. err = push_cxx_to_hypervisor(_pr);
  250. if (_pr->performance && _pr->performance->states)
  251. err |= push_pxx_to_hypervisor(_pr);
  252. mutex_unlock(&acpi_ids_mutex);
  253. return err;
  254. }
  255. static unsigned int __init get_max_acpi_id(void)
  256. {
  257. struct xenpf_pcpuinfo *info;
  258. struct xen_platform_op op = {
  259. .cmd = XENPF_get_cpuinfo,
  260. .interface_version = XENPF_INTERFACE_VERSION,
  261. };
  262. int ret = 0;
  263. unsigned int i, last_cpu, max_acpi_id = 0;
  264. info = &op.u.pcpu_info;
  265. info->xen_cpuid = 0;
  266. ret = HYPERVISOR_dom0_op(&op);
  267. if (ret)
  268. return NR_CPUS;
  269. /* The max_present is the same irregardless of the xen_cpuid */
  270. last_cpu = op.u.pcpu_info.max_present;
  271. for (i = 0; i <= last_cpu; i++) {
  272. info->xen_cpuid = i;
  273. ret = HYPERVISOR_dom0_op(&op);
  274. if (ret)
  275. continue;
  276. max_acpi_id = max(info->acpi_id, max_acpi_id);
  277. }
  278. max_acpi_id *= 2; /* Slack for CPU hotplug support. */
  279. pr_debug(DRV_NAME "Max ACPI ID: %u\n", max_acpi_id);
  280. return max_acpi_id;
  281. }
  282. /*
  283. * The read_acpi_id and check_acpi_ids are there to support the Xen
  284. * oddity of virtual CPUs != physical CPUs in the initial domain.
  285. * The user can supply 'xen_max_vcpus=X' on the Xen hypervisor line
  286. * which will band the amount of CPUs the initial domain can see.
  287. * In general that is OK, except it plays havoc with any of the
  288. * for_each_[present|online]_cpu macros which are banded to the virtual
  289. * CPU amount.
  290. */
  291. static acpi_status __init
  292. read_acpi_id(acpi_handle handle, u32 lvl, void *context, void **rv)
  293. {
  294. u32 acpi_id;
  295. acpi_status status;
  296. acpi_object_type acpi_type;
  297. unsigned long long tmp;
  298. union acpi_object object = { 0 };
  299. struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
  300. acpi_io_address pblk = 0;
  301. status = acpi_get_type(handle, &acpi_type);
  302. if (ACPI_FAILURE(status))
  303. return AE_OK;
  304. switch (acpi_type) {
  305. case ACPI_TYPE_PROCESSOR:
  306. status = acpi_evaluate_object(handle, NULL, NULL, &buffer);
  307. if (ACPI_FAILURE(status))
  308. return AE_OK;
  309. acpi_id = object.processor.proc_id;
  310. pblk = object.processor.pblk_address;
  311. break;
  312. case ACPI_TYPE_DEVICE:
  313. status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);
  314. if (ACPI_FAILURE(status))
  315. return AE_OK;
  316. acpi_id = tmp;
  317. break;
  318. default:
  319. return AE_OK;
  320. }
  321. /* There are more ACPI Processor objects than in x2APIC or MADT.
  322. * This can happen with incorrect ACPI SSDT declerations. */
  323. if (acpi_id > nr_acpi_bits) {
  324. pr_debug(DRV_NAME "We only have %u, trying to set %u\n",
  325. nr_acpi_bits, acpi_id);
  326. return AE_OK;
  327. }
  328. /* OK, There is a ACPI Processor object */
  329. __set_bit(acpi_id, acpi_id_present);
  330. pr_debug(DRV_NAME "ACPI CPU%u w/ PBLK:0x%lx\n", acpi_id,
  331. (unsigned long)pblk);
  332. status = acpi_evaluate_object(handle, "_CST", NULL, &buffer);
  333. if (ACPI_FAILURE(status)) {
  334. if (!pblk)
  335. return AE_OK;
  336. }
  337. /* .. and it has a C-state */
  338. __set_bit(acpi_id, acpi_id_cst_present);
  339. return AE_OK;
  340. }
  341. static int __init check_acpi_ids(struct acpi_processor *pr_backup)
  342. {
  343. if (!pr_backup)
  344. return -ENODEV;
  345. /* All online CPUs have been processed at this stage. Now verify
  346. * whether in fact "online CPUs" == physical CPUs.
  347. */
  348. acpi_id_present = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
  349. if (!acpi_id_present)
  350. return -ENOMEM;
  351. acpi_id_cst_present = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
  352. if (!acpi_id_cst_present) {
  353. kfree(acpi_id_present);
  354. return -ENOMEM;
  355. }
  356. acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
  357. ACPI_UINT32_MAX,
  358. read_acpi_id, NULL, NULL, NULL);
  359. acpi_get_devices("ACPI0007", read_acpi_id, NULL, NULL);
  360. if (!bitmap_equal(acpi_id_present, acpi_ids_done, nr_acpi_bits)) {
  361. unsigned int i;
  362. for_each_set_bit(i, acpi_id_present, nr_acpi_bits) {
  363. pr_backup->acpi_id = i;
  364. /* Mask out C-states if there are no _CST or PBLK */
  365. pr_backup->flags.power = test_bit(i, acpi_id_cst_present);
  366. (void)upload_pm_data(pr_backup);
  367. }
  368. }
  369. kfree(acpi_id_present);
  370. acpi_id_present = NULL;
  371. kfree(acpi_id_cst_present);
  372. acpi_id_cst_present = NULL;
  373. return 0;
  374. }
  375. static int __init check_prereq(void)
  376. {
  377. struct cpuinfo_x86 *c = &cpu_data(0);
  378. if (!xen_initial_domain())
  379. return -ENODEV;
  380. if (!acpi_gbl_FADT.smi_command)
  381. return -ENODEV;
  382. if (c->x86_vendor == X86_VENDOR_INTEL) {
  383. if (!cpu_has(c, X86_FEATURE_EST))
  384. return -ENODEV;
  385. return 0;
  386. }
  387. if (c->x86_vendor == X86_VENDOR_AMD) {
  388. /* Copied from powernow-k8.h, can't include ../cpufreq/powernow
  389. * as we get compile warnings for the static functions.
  390. */
  391. #define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
  392. #define USE_HW_PSTATE 0x00000080
  393. u32 eax, ebx, ecx, edx;
  394. cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);
  395. if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)
  396. return -ENODEV;
  397. return 0;
  398. }
  399. return -ENODEV;
  400. }
  401. /* acpi_perf_data is a pointer to percpu data. */
  402. static struct acpi_processor_performance __percpu *acpi_perf_data;
  403. static void free_acpi_perf_data(void)
  404. {
  405. unsigned int i;
  406. /* Freeing a NULL pointer is OK, and alloc_percpu zeroes. */
  407. for_each_possible_cpu(i)
  408. free_cpumask_var(per_cpu_ptr(acpi_perf_data, i)
  409. ->shared_cpu_map);
  410. free_percpu(acpi_perf_data);
  411. }
  412. static int __init xen_acpi_processor_init(void)
  413. {
  414. struct acpi_processor *pr_backup = NULL;
  415. unsigned int i;
  416. int rc = check_prereq();
  417. if (rc)
  418. return rc;
  419. nr_acpi_bits = get_max_acpi_id() + 1;
  420. acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
  421. if (!acpi_ids_done)
  422. return -ENOMEM;
  423. acpi_perf_data = alloc_percpu(struct acpi_processor_performance);
  424. if (!acpi_perf_data) {
  425. pr_debug(DRV_NAME "Memory allocation error for acpi_perf_data.\n");
  426. kfree(acpi_ids_done);
  427. return -ENOMEM;
  428. }
  429. for_each_possible_cpu(i) {
  430. if (!zalloc_cpumask_var_node(
  431. &per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map,
  432. GFP_KERNEL, cpu_to_node(i))) {
  433. rc = -ENOMEM;
  434. goto err_out;
  435. }
  436. }
  437. /* Do initialization in ACPI core. It is OK to fail here. */
  438. (void)acpi_processor_preregister_performance(acpi_perf_data);
  439. for_each_possible_cpu(i) {
  440. struct acpi_processor_performance *perf;
  441. perf = per_cpu_ptr(acpi_perf_data, i);
  442. rc = acpi_processor_register_performance(perf, i);
  443. if (WARN_ON(rc))
  444. goto err_out;
  445. }
  446. rc = acpi_processor_notify_smm(THIS_MODULE);
  447. if (WARN_ON(rc))
  448. goto err_unregister;
  449. for_each_possible_cpu(i) {
  450. struct acpi_processor *_pr;
  451. _pr = per_cpu(processors, i /* APIC ID */);
  452. if (!_pr)
  453. continue;
  454. if (!pr_backup) {
  455. pr_backup = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL);
  456. memcpy(pr_backup, _pr, sizeof(struct acpi_processor));
  457. }
  458. (void)upload_pm_data(_pr);
  459. }
  460. rc = check_acpi_ids(pr_backup);
  461. if (rc)
  462. goto err_unregister;
  463. kfree(pr_backup);
  464. return 0;
  465. err_unregister:
  466. for_each_possible_cpu(i) {
  467. struct acpi_processor_performance *perf;
  468. perf = per_cpu_ptr(acpi_perf_data, i);
  469. acpi_processor_unregister_performance(perf, i);
  470. }
  471. err_out:
  472. /* Freeing a NULL pointer is OK: alloc_percpu zeroes. */
  473. free_acpi_perf_data();
  474. kfree(acpi_ids_done);
  475. return rc;
  476. }
  477. static void __exit xen_acpi_processor_exit(void)
  478. {
  479. int i;
  480. kfree(acpi_ids_done);
  481. for_each_possible_cpu(i) {
  482. struct acpi_processor_performance *perf;
  483. perf = per_cpu_ptr(acpi_perf_data, i);
  484. acpi_processor_unregister_performance(perf, i);
  485. }
  486. free_acpi_perf_data();
  487. }
  488. MODULE_AUTHOR("Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>");
  489. MODULE_DESCRIPTION("Xen ACPI Processor P-states (and Cx) driver which uploads PM data to Xen hypervisor");
  490. MODULE_LICENSE("GPL");
  491. /* We want to be loaded before the CPU freq scaling drivers are loaded.
  492. * They are loaded in late_initcall. */
  493. device_initcall(xen_acpi_processor_init);
  494. module_exit(xen_acpi_processor_exit);