This source file includes following definitions.
- xen_stub_memory_device_init
- xen_stub_memory_device_exit
- xen_stub_processor_init
- xen_stub_processor_exit
1
2
3
4
5
6
7
8
9
10
11
12
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/export.h>
16 #include <linux/types.h>
17 #include <linux/acpi.h>
18 #include <xen/acpi.h>
19
20 #ifdef CONFIG_ACPI
21
22
23
24
25
26 static const struct acpi_device_id memory_device_ids[] = {
27 {ACPI_MEMORY_DEVICE_HID, 0},
28 {"", 0},
29 };
30
31 static struct acpi_driver xen_stub_memory_device_driver = {
32
33 .name = "acpi_memhotplug",
34 .class = ACPI_MEMORY_DEVICE_CLASS,
35 .ids = memory_device_ids,
36 };
37
38 int xen_stub_memory_device_init(void)
39 {
40 if (!xen_initial_domain())
41 return -ENODEV;
42
43
44 return acpi_bus_register_driver(&xen_stub_memory_device_driver);
45 }
46 EXPORT_SYMBOL_GPL(xen_stub_memory_device_init);
47 subsys_initcall(xen_stub_memory_device_init);
48
49 void xen_stub_memory_device_exit(void)
50 {
51 acpi_bus_unregister_driver(&xen_stub_memory_device_driver);
52 }
53 EXPORT_SYMBOL_GPL(xen_stub_memory_device_exit);
54
55
56
57
58
59
60 static const struct acpi_device_id processor_device_ids[] = {
61 {ACPI_PROCESSOR_OBJECT_HID, 0},
62 {ACPI_PROCESSOR_DEVICE_HID, 0},
63 {"", 0},
64 };
65
66 static struct acpi_driver xen_stub_processor_driver = {
67
68 .name = "processor",
69 .class = ACPI_PROCESSOR_CLASS,
70 .ids = processor_device_ids,
71 };
72
73 int xen_stub_processor_init(void)
74 {
75 if (!xen_initial_domain())
76 return -ENODEV;
77
78
79 return acpi_bus_register_driver(&xen_stub_processor_driver);
80 }
81 EXPORT_SYMBOL_GPL(xen_stub_processor_init);
82 subsys_initcall(xen_stub_processor_init);
83
84 void xen_stub_processor_exit(void)
85 {
86 acpi_bus_unregister_driver(&xen_stub_processor_driver);
87 }
88 EXPORT_SYMBOL_GPL(xen_stub_processor_exit);
89
90 #endif